This thread is about the quirks you use when coding. For example:I define CLSN for throw animations, even if my character is invencible and can't be pushed in that state.I ever indent the code like this to align the values or attributes:[mcode][State 935, Cambio]type = ChangeStatetrigger1 = (pos y > 0) && (vel y > 0)value = 52[/mcode]Sometimes, I comment my code in Spanish, sometimes, in english.What else do you have?
same things as renzo. also:i make it so most of my code refers to the stateno variable instead of the actual state number, that way i only copy paste code and change the statedef and leave everithing else the same and it already works. all my chars share the same palette.i make a big reference.txt file with all teh planed layout and even code moves that will never trigger.and more importantly, i split my cmd in two.the first part is full of varsets, for each and every condition that makes changestates trigger, so i have a varset for ctrl, another for statetype=A, another for statetype=S, etc... the second part are the changestates, i only check for the vars i set before.
my cns although messy as hell (i don't number my sctrls accurately) always follows a logical progression with the sctrls in useVars, random stuff, hitdef then required to complete the move sctrls.I also often try to code as much of a move as possible in one state, not sure why just do.Last one would be what i refer to as coding blind, where you do the entire move without testing it until every little bit of code is fleshed out and all you have left is vel and time tweaking. If it works you have achieved success, i generally forget to add a changestate in the CMD though
Quoteand more importantly, i split my cmd in two.the first part is full of varsets, for each and every condition that makes changestates trigger, so i have a varset for ctrl, another for statetype=A, another for statetype=S, etc... the second part are the changestates, i only check for the vars i set before.== Easier AI commands.QuoteI also often try to code as much of a move as possible in one state, not sure why just do.I have the same "problem?". I feel like creating a State just for play an animation and then change to state 0 is forbidden Other quirk I have is sometimes the state numbers doesn't match the animation or sprite numbers, and the animation number doesn't match the sprite group numbers. I doesn't really matter, but I'm a maniac and sometimes I take 1 hour to just order all that mess.
I insist in coding chains by setting bits onto an int variable in order to make clean cmd files.My cmd files usually look like that:;---------------------------------------------------------------------------;Hazan Tensho Kyaku[State -1, Hazan Tensho Kyaku]type = ChangeStatetriggerall = (var(55) & 16384)triggerall = power >= 1000trigger1 = (command = "Hazan Tensho Kyaku")value = 3200I deal with damage and juggle by using variables as well and most of the times, the anim id matches the state id, but it's not always the case.I'm prone to use Animelemtime(number) = 0 rather than animelem = number.And I code different strength attacks in the same state, using a variable which I set in the CMD to tell them apart, unless they behave way too differently.That's all I can remember for now.
Bia said, September 07, 2007, 05:33:00 pmI insist in coding chains by setting bits onto an int variable in order to make clean cmd files.My cmd files usually look like that:;---------------------------------------------------------------------------;Hazan Tensho Kyaku[State -1, Hazan Tensho Kyaku]type = ChangeStatetriggerall = (var(55) & 16384)triggerall = power >= 1000trigger1 = (command = "Hazan Tensho Kyaku")value = 3200I deal with damage and juggle by using variables as well and most of the times, the anim id matches the state id, but it's not always the case.I'm prone to use Animelemtime(number) = 0 rather than animelem = number.And I code different strength attacks in the same state, using a variable which I set in the CMD to tell them apart, unless they behave way too differently.That's all I can remember for now.+1
I use custom juggle detection too, but it is completely f*cked up when playing Simultaneous modes and with P.O.T.S. duck hunt bonus char/stage
I use totally random state numbers for the common1.cns states, so everything's messed up and there's almost no order at all , even some helper states aren't the same as the helper Id and all that shit...
I try to remain relatively organized. I have a list of all the animations and their respective numbers down in notepad.
I forget to crop sprites And altso when i add sprites, i dont remember to change group, so the sff goes fucked up.And i try to use less sctrls, so i use IfElse all the time.My states a mess, random sctrls everywhere.
States [1000,1999] are special attacks.eg.1000 - Weak Hadouken1010 - Strong Hadouken1020 - Fierce Hadouken1030 - EX Hadouken- Same layout for every other special except the hundreds go up. (Shoryuken uses 1100, Tatsumaki uses 1200 etc)Obviously, I don't mind making several states for the same attack, because I just don't. Even if the Hadouken's have no distinguisable features between them, I make different states for different versions anyway.States [3000,3999] are super arts.Self-explanatory, tens go up if the Super Art has another version, hundreds go up if it's another Super Art altogether.Projectiles (Hadouken, Shinkuu Hadouken) use [6000,6999].As for .air, I have it all in order, so there's no [Begin Action 9000] before [Begin Action 500], etc. As for .cmd, I've yet to be as organised as I am with the others because my .cmds are just full of crap when I write them. So crap to the point I can't even do EX Shoryuken without doing EX Hadouken. But this will be fixed soon, once I get off my arse and do something.And vars, well, I don't want to get into that because I'm very inexperienced with them, so obviously I don't order them in any right way, just messed up stuff.
I always indent the code also.another thing, dunno if this counts, is I always end up throwing in some joke comment in the statedefs. for example:Code: ; Vegeta! What does the scouter say about Kikyo's Stateno?[Statedef 9000] ;ITS OVER NINE THOUUSAAAAAANNND!!!!!!!!movetype = Hand for the sctrls, I always end up naming them with brief descriptions. Helps me to remember what its supposed to do without having to look at the actual code:Code: [State 192, You're Screwed now, bub]type = playsndtrigger1 = (Anim = 190) && (AnimElem = 1)value = 192,0channel = 0[State 100, What Goes Up Must Come Down]type = VelSettrigger1 = AnimElem = 7y = 3.8[State 111, Return to Ground]type = PosSettrigger1 = AnimTime >= 28y = 0
I just write a bunch of random numbers and hope it works. :-DActually I keep everything ultra organized, and I've started specifying (via comments) exactly what each individual move is. I gribe about most Air Edit programs because they delete my comments! GRRRRR.
Artisto said, September 11, 2007, 05:50:41 pmI just write a bunch of random numbers and hope it works. :-DActually I keep everything ultra organized, and I've started specifying (via comments) exactly what each individual move is. I gribe about most Air Edit programs because they delete my comments! GRRRRR.Use Fighter Factory, it doesent delete your comments
I tend to revise my coding and remove unnecessary text, lines in state controllers, convert everything to the same syntax. It took me quite some time to work out a standard order for the parameters in HitDefs. Also I have many simiar quirks to others.
oh yeah, since i starter coding when mugen was still being updated, i always put all the parameters for all sctrls, even if i am perfectly fine with the default value; mostly because default stuff could still change o na newer version. that and not using deprecated trigger like animelem, same reason as above.
Oh, here's another one. I'm working on 9 characters at once....... but I work on them in alphabetical order! Any time I start on a new section (like I'm currently working on gethit elements) I always start with Burnisha because she's the first alphabetically.. It's partially because my windows explorer automatically alphabatizes everything.