YesNoOk
avatar

Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features. (Read 36088 times)

Started by Messatsu, March 15, 2007, 01:28:38 am
Share this topic:
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#21  March 18, 2007, 11:21:46 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
:o If you're going to make a release, I can give you a number or three.  I'm not necessarily limiting releases to one set of reserved numbers.  edit:Since I can't see your code and since you don't need collisions for this particular thing, you can optimize this a bit by creating only one helper that detects stuff for all characters (you don't have to send me anything).

Quote
Thanks for the idea and motivation Messatsu!
Don't you know I'm an idea engineer! j/k

Is there a program out there that functions like sffextract?  Something that can extract the wav files and produce a txt file for reinsertion.  Like sndextract? :sugoi:

The best part of Reply 18 is that you can do this:

[Statedef]; a partial negative state extension??

[State ];anything you want, Darkstalkers life gain??
type = lifeadd
trigger1 = 1
value = 5

[State ]
type = changestate
trigger1 = 1
value = prevstatenoYou have to be careful about only entering these "negative state extensions" at the beginning of a state so to not interrupt a state in the middle.  That would be ugly.


Many people risk their lives everyday by having Mugen.
Last Edit: March 18, 2007, 11:37:02 pm by Messatsu
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#22  March 18, 2007, 11:38:38 pm
  • ***
    • kratos-kreations.webs.com/
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#23  March 19, 2007, 12:00:45 am
  • ******
  • [E]
    • Mexico
Suggested release format:

The pcx files with a matching txt file that could be piped into sprmaker. 
The snd files with a matching txt file that could be piped into sndmaker. 
A set of animations that would be inserted into the fightfx.air. 

A set of blank anims that refer to collisions for insertion into the player files. 
The master helper that needs to be loaded in all characters. 
Your set of code that needs to be inserted into the master helper to call the child helper. 
Your child helper code.

I'm just including the base common1.cns, common1.snd, fightfx.sff, and fightfx.air since it's easier on people who would download.

a sinmple script/program could perform the bolded actions, and maybe the unbolded ones to, but would not be that simple... testing stuff in .net
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#24  March 19, 2007, 12:25:52 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Quote
Helper spawning code is placed in 5900, 0, and 5000, so that I don't have to edit any characters.
I've considered that, but not all characters don't override state 0.  I believe one of Rikard's characters does that with their stance, too lazy to download and check.  Helpers created before roundstate 2(?) get terminated (state 5900), so if any calculations are needed early, you need them to be saved at every tick in a variable.  And state 5000, you'll have to wait until the first attack.

Quote
I can't do double redirects or use ParentVarSet to set sysvars so I had to rely on a second helper to ensure that the First Attack message doesn't show up for both characters if one of them overrides both 5900 and 0. Only thing I didn't check yet was two overriding characters against each other, although I don't see that being a problem other than no First Attack message will show up at all.
That can be solved by making the character with the lowest ID creating the helper that is responsible for everything.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#25  March 19, 2007, 12:57:42 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
[State 5900: Spawn Kamek's Helper]
type = Helper
trigger1 = !NumHelper(1338000000) && ID < Enemy, ID
name = "Syshelper"
stateno = 1338000000
ID = 1338000000If you only want to consider single player mode, yes.  I'm not 100 percent sure, but 32 should always be the lowest ID, but that could be false in watch mode or in cases where P2 enters survival mode (those that I've never bothered checking).  I'd personally detect the cases of numenemy = 1 and numpartner = 0, numenemy = 1 and numpartner, numenemy = 2 and numpartner = 0, and numenemy = 2 and numpartner; to avoid making any assumptions.  Survival mode enemies appear to be given random ID's.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#26  March 19, 2007, 02:23:01 am
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
Do you have your own helper launched for state 5000 then?  Because it should be easy enough to detect who has the First Attack via detecting the first guy who has obtained movehit.
Quote
Helpers created in statedef 5900 will persist as long as you don't skip the intro sequences -- if you do then it destroys all the helpers.
Beyond the 0 and 5900 states being overridden, you have a pretty good initialization.  Because if you skip the intro sequence, you are guaranteed to see state 0 and if you don't, the one from state 5900 would remain.  I'll consider revising my approach a bit to insert something to detect if those states have been overridden--to reduce the amount that needs to be entered.


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#27  March 19, 2007, 07:14:40 pm
  • ******
  • In after lock
    • mugenguild.com/~messatsu/index.html
If you want it to be reliable, you need something that's always going to work.  If the master helper is created from either 5900 or 0, you'll be able to do this without modification.
;master/child helper

;first attack
type = explod
triggerall = var(2) = 0
trigger1 = movehit
trigger1 = var(2):= 1
trigger2 = numenemy = 2
trigger2 = enemy(1), movehit
trigger2 = var(2):= 4
trigger3 = numpartner = 1
trigger3 = partner, movehit
trigger3 = var(2):= 8
trigger4 = enemy(0), movehit
trigger4 = var(2):= 2
anim = first attack anim
;identify who the first attacker is in terms of teamside and display it in those terms.

;move the first attack anim around
type = modifyexplod

;logic is here, but the values might not match up.
type = playsnd
trigger1 = someone's, hitcount > 4 && someone's, hitcount < 7;might need historical value here
trigger1 = someone's, hitover
value = combo sound
channel = -1


Many people risk their lives everyday by having Mugen.
Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#28  March 21, 2007, 07:06:24 am
  • *
  • nobody.
well, as it was already discussed. tsmugen heavily relies on var usage in its common1.cns. theres a lot of characters that rely on var usage as well and in most cases utilize almost all 59vars. i believe there was around 30 vars total that tsmugen uses(not including fvar's). this just breaks characters :(

anyways, i and a friend utilized some of this to add it to andy by zzzasd. got scoring+counter working. im currently trying to work in dizzy. note that i manually recoded andy's original var's that tsmugen uses into unused vars. then applied some of the code tsmugen uses. andy works well, no bugs.

Re: Teh Unrealized(?) Benefits of Using common1.cns for full game-ish features.
#29  March 21, 2007, 02:18:19 pm
  • **
  • Call me Private42.
I am using common1.cns to make the lifebars changing from yellow to red when you have  less than 1/4 of life and also the tag team feature on my project...