YesNoOk
avatar

Transformations in Mugen, DBZ style (Read 12448 times)

Started by Vegeta 20XX, December 01, 2008, 11:52:47 am
Share this topic:
Transformations in Mugen, DBZ style
#1  December 01, 2008, 11:52:47 am
  • ****
  • Honki ni Natta, bitches.
    • x-ism.co.cc/index.html
This is relatively easy to achieve, it just takes patience (I'll be skipping everything in the code that's not relevant to the transformation).

First add this code to all of your states:

[mcode]
[State 0]
anim=ifelse(var(1)=1,10000,0[/mcode]

where var(1) is the transformation variable. Now, for more than one transformation (using three as an example):

[mcode]
[State 0]
anim=ifelse(var(1)=3,30000,ifelse(var(1)=2,20000,ifelse(var(1)=1,10000,0)[/mcode]

meaning that if var(1) equals 3 (i.e., the third transformation), than state 0's anim is 30000, if it's 2, 20000, if 1, 10000, and if in base form (no transformation), 0.

Now, for attack values, simply move the ifelse(s) from the first state and put them in the hitdef, adjusting the values accordingly.

Light Punch:

[mcode]
[State 200]
damage=ifelse(var(1)=3,45,ifelse(var(1)=2,35,ifelse(var(1)=1,25,20)[/mcode]

Now, the actual transformation. There are two logical ways of doing this. Here is the first, which is command-based:

[mcode]
[State 4000];Transformation
anim=ifelse(var(1)=2,24000,ifelse(var(1)=1,14000,4000);The characters transformations aren't going to look identical, are they?

[State 4000];Varset
type=varset
trigger1=command="transform"
v=1
value=ifelse(var(1)=2,3,ifelse(var(1)=1,2,1)

[State 4000];Changestate
type=changestate
trigger1=animelem=5;it doesn't have to be five, that's just a placeholder
value=0;back to standing state[/mcode]

The other method is power-based, where you replace "command="transform"" with this:

[mcode]power=>###;### is the number, if that wasn't already evident[/mcode]

The transformation can be reversed like so:

[mcode]
[State 4001];Revert
anim=ifelse(var(1)=3,34001,ifelse(var(2)=1,24001,14001);The characters transformations aren't going to look identical, are they?

[State 4001];Varset
type=varset
trigger1=command="untransform"
v=1
value=ifelse(var(1)=3,2,ifelse(var(1)=2,1,0)

[State 4001];Changestate
type=changestate
trigger1=animelem=5;it doesn't have to be five, that's just a placeholder
value=0;back to standing state[/mcode]

And the power trigger:

[mcode]power<=###[/mcode]

And that's it, really. You can have an indefinite amount of transformations with this method. There's a much harder way of doing this, but I'll post that another day.
Re: Transformations in Mugen, DBZ style
#2  December 02, 2008, 04:03:51 am
  • **
  • Oozaru with a hang over
Awesome Vegeta , thanks a million ! were do you put in the sprite #'s in ? Im trying to learn, its just really confusing at this point  ??? .
Last Edit: December 02, 2008, 06:40:53 am by EVILNEON
Re: Transformations in Mugen, DBZ style
#3  December 03, 2008, 01:45:00 am
  • ****
  • Honki ni Natta, bitches.
    • x-ism.co.cc/index.html
You have to make the animation in the AIR file first. When you do that, put the animation number in the place of the 4000 that I used in this code. You should look at another Mugen character's AIR file to see how an animation is made in Mugen.

The first number is the sprite group number. The second is the sprite number within the group. The third and fourth numbers are x and y offset, which is how many pixels the sprite is shifted from it's original position in the SFF. The last number is the amount of time (in ticks, 60 to a second) the animation frame takes.
Re: Transformations in Mugen, DBZ style
#4  February 12, 2009, 05:36:47 pm
  • avatar
ok im kinda confused...if i want my char to have 3 transes i need to put [State 0]
anim=ifelse(var(1)=3,30000
but... u said to add that code to ALL states...when i opened chars data file
where states are i got confused...so where do i put [State 0]
anim=ifelse(var(1)=3,30000 exactly?:S ??? any explaination is appreciated
Last Edit: February 12, 2009, 06:31:56 pm by Xarian
Re: Transformations in Mugen, DBZ style
#5  February 12, 2009, 08:54:32 pm
  • *****
    • Mexico
There is a easier way.
Set a variable to like 10000 (your transformation anims needs to be 10000 + then).
Then set you anim to.
Anim = 0+var(yourvar)
Re: Transformations in Mugen, DBZ style
#6  February 13, 2009, 09:26:58 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
in any case, you will have issues with custom states
XGargoyle: Fighting for the top since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
Re: Transformations in Mugen, DBZ style
#7  February 14, 2009, 01:24:27 am
  • avatar
so basicly i gotta add to CNS files some custom states?
such as for transformation...but if i do how i put commands then?
tnx in advance guys im still noob at this :)
Re: Transformations in Mugen, DBZ style
#8  March 27, 2009, 09:57:25 pm
  • ***
  • I never really was on your side.
    • www.mugenguild.com/~davidgee
From what I can tell, characters with transformations are common. But, there doesn't seem to be an unofficial transformation standard. Although there are characters that transform, there are not characters that support these transformations in custom states (namely, throws), besides probably the particular transformation character itself and perhaps other characters by the same author. Please correct me if I'm wrong.

So what we do have so far is the indices that characters should use for required sprites and animations of their alternate forms. Simply increase the index by 10,000 for each form.

  • Form 0 - indices 0 to 9,999
  • Form 1 - indices 10,000 to 19,999
  • Form 2 - indices 20,000 to 29,999
  • Form 3 - indices 30,000 to 39,999
  • (and so on if there are more forms...)

Assuming all transformation characters follow this numbering scheme, there is only one thing that prevents us from making our character use the correct sprites when throwing a transformed character. We can't tell what form the character is in!

We need a way to determine (A) that the opponent has multiple forms, and (B) what form they are currently in.

What I want to know is... has anybody done this? Is there a reliable method that has been used by multiple authors? Is there a single author who has released multiple transformation characters using a reliable method? If a good method already exists, is already implemented in more than 1 existing characters, then it should be taken and made an unofficial standard. Otherwise, a new standard should be documented and implemented in a new character, and then (hopefully) adopted in future character releases.
Re: Transformations in Mugen, DBZ style
#9  March 27, 2009, 10:20:06 pm
  • ******
  • [E]
    • Mexico
the closer we got to that is gm's gill.

While I am also doing transformations using a very similar method I gave uup on comunitty standars and am making it for a closed game.

I also said she's my dearest friend, so because I want to protect her, it's like I have to do my best so damn hard, so maybe if Mii-chan would be there I would have to be like: "ah! So for Mii-chan's sake I'll work hard!"
Re: Transformations in Mugen, DBZ style
#10  March 28, 2009, 12:04:07 am
  • ***
  • I never really was on your side.
    • www.mugenguild.com/~davidgee
I downloaded GM's SF3 characters, and they just use authorname="GM" and name="Gill" as triggers, so there's no standard detection method there. And Gill's form simply depends on the direction he's facing. The only thing that indicates the character's current form is the facing trigger.

So far, I know of no implemented method that can be standardized to use in any character. It's a rather simple matter though. All you need is a variable that says "I have multiple forms" and another variable that says "I am in this form right now." It could be reduced to 1 variable if you use something else (like action numbers) to indicate that multiple forms exist.
Last Edit: March 28, 2009, 12:11:49 am by DavidGee
Re: Transformations in Mugen, DBZ style
#11  March 28, 2009, 01:39:36 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Again, the problem is that some characters will have just one form (Goku -> SSJ Goku) whereas others will have more than 1 (MVC Ryu -> MVC Ken or MVC Akuma)

Therefore, even if all characters use the same variable, you still don't know how many transformations your enemy has. Are you going to include thousands of custom states just for the sake of compatibility with that character who happens to have 13 transformations (Shang Tsung, for example)
XGargoyle: Fighting for the top since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
Re: Transformations in Mugen, DBZ style
#12  March 28, 2009, 02:56:33 pm
  • ***
  • I never really was on your side.
    • www.mugenguild.com/~davidgee
Well you wouldn't need to duplicate states; only animations. And the only modification you'd need to make to them is prepending the sprite numbers with 10, 20, 30... And then you put a variable in the value of changeanim2, so not much work would be involved in making any given character compliant.

And I don't see a reason to support more than 5 forms. Shang Tsung isn't something I think is worth mimicking in Mugen. But I am thinking of characters that drop weapons or armor (Vega), characters with multiple costumes (KOF), and characters that power up and change their appearance (DBZ). Apart from something like Shang Tsung, is there a character that would need more than 5 forms? Deciding on a specific number would be nice.
Re: Transformations in Mugen, DBZ style
#13  March 28, 2009, 04:06:07 pm
  • *****
  • 皆のお姉さん
  • 私、しっかりしないといけませんよね。事務者の皆の為にも!
    • twitter.com/c001357
Twelve.
Re: Transformations in Mugen, DBZ style
#14  May 10, 2009, 11:14:07 am
  • ***
  • Reincarnation of UltraSonic50
how about changing the get-hit animations (5000-whatever) using variables and "ifelse" trigger?

Anyway, I can use this for my edit.
Re: Transformations in Mugen, DBZ style
#15  June 11, 2009, 05:10:22 am
  • **
  • Freedom is the right of all sentient beings.
    • akkuis1173.me.pn/
I don't know whether what I'm about to do is right or wrong,
 however I think there's a genius among us that already solved this trouble:
The maker of reploids
Yes, N-mario, and I say this because Vent&Aile have up to 7 transformations and can keep track of the correct animation even in custom states. I know N-mario already said Vent&Aile were unfinished crap, (and he abandoned them because of his rockman game I guess...)
However the three models that are working (X,Zx and Ox) can be normally thrown without loosing the corresponding anim i.e. you throw them as model Ox and they remain as model Ox while thrown.
Yet, even being "unfinished crap" (some sprites are not correct)
the problem is that I can't seem to find how the heck he did it.
I wanted to try to work on them so I asked him "where's the trick",
 and he only answered with evasive. ???
Re: Transformations in Mugen, DBZ style
#16  June 11, 2009, 07:51:03 pm
  • **
As far as i know FIREBOY the MK mugen creator did a shang tsung that can fully transform.maybe u should ask him.Also there is a twelve done by "rei" he can transform sakura and ken.Folder contains all 3 chars' def in it.but it turns to twelve whenever it is thrown.Anyway its not looking so absurd in those chars. but probably suck at DBZ chars.
Re: Transformations in Mugen, DBZ style
#17  June 11, 2009, 08:46:34 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
@Josue: What GCNMario did is a full game, where you know beforehand the sprites that each character will require during a custom state. This is nothing out of the extraordinary, and any developer with a basic experience can do it.

What is impossible, is doing that on a standard and open mugen environment.
XGargoyle: Fighting for the top since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
Re: Transformations in Mugen, DBZ style
#18  June 12, 2009, 06:49:00 am
  • **
  • Freedom is the right of all sentient beings.
    • akkuis1173.me.pn/
@Josue: What GCNMario did is a full game, where you know beforehand the sprites that each character will require during a custom state. This is nothing out of the extraordinary, and any developer with a basic experience can do it.

What is impossible, is doing that on a standard and open mugen environment.

Wait a minute. I don't get it, why do you say "full game", Vent&Aile are just chars, they can be thrown in any mugen by any other char that means they can be put into any custom state you
desire no matter who is the opponent or what kind of throw made!
Or I just misunderstood the whole thing ???
Re: Transformations in Mugen, DBZ style
#19  June 12, 2009, 08:51:43 pm
  • avatar
  • **
    • www.codejin.com
I believe I know how this can work with transformations. I believe it was discussed long ago.

Your required get hit sprites must all have all forms in them but with their offset way separate. Like say 1000 pixels separate in the y-axis. This way when you are in a custom state, the sprites for both forms are shown. However what will appear on screen is the current form and the other form will be 1000 pixels or so above or below depending on how you set it.

Use the offset controller to trigger when you are in a custom gethit state. This would have to be put in statedef -2. Apply the offset for y so that it will be offset by 1000 in form 2 when in a custom state to show form 2's sprites on screen with form 1's sprite 1000 pixels above/below depending on how you set it.

I haven't tested it out but it should work.

Hope someone understands it.
Last Edit: June 12, 2009, 09:00:46 pm by XsLaught
Re: Transformations in Mugen, DBZ style
#20  June 12, 2009, 11:56:26 pm
  • ******
Won't work if the enemy uses a targetbind or a constant posset in the custom state.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.