YesNoOk

Show content

This section allows you to browse the content for this member. Note that you can only see content for which you have sufficient viewing permissions.

*****
XGargoyle is Offline
Contact XGargoyle:

XGargoyle

Contributor

Messages by XGargoyle

    

Ginyu's Body Change, or an essay on how to switch character controls in Mugen

 December 30, 2014, 07:13:44 pm View in topic context
 Posted by XGargoyle  in Ginyu's Body Change, or an essay on how to switch character controls in Mugen (Started by XGargoyle December 30, 2014, 07:13:44 pm
 Board: Development

This will be a long read, you've been warned ;)

You’ve seen it in Dragon Ball: Captain Ginyu swaps his body for Goku’s one, but things don’t turn quite as expected, resulting in the characters unable to reach full potential on the new hosts. If you don’t know what I’m talking about, here’s a short clip of the Body Change’s side effects
https://www.youtube.com/watch?feature=player_detailpage&v=MRZziD6WxoE#t=74

How can we replicate this effect in Mugen? The engine doesn’t allow switching control directly, but there are workarounds to achieve a similar effect.

I’m going to propose one of them, which I’d like to discuss with you guys on how to improve it or even find a better method.

The current implementations from other authors either rely on heavy customization of Ginyu and the other enemies (such as including other character’s sprites within the SFF) or requiring lots of code that need to be updated with every character “compatible” with Ginyu. Also, some of the current implementations are really cheap such as characters exchanging life values or similar tricks, unbalancing whatever balance had the original characters.

My goal was to create a code that didn’t have the abusive behavior of the previous implementations, was balanced enough to bring an added value to the fight strategy, and required the least modification for the other characters to make it compatible with Ginyu.

So, this is the result:


This is what you need to make it work:
Ginyu needs to place the enemy on a custom state. In the concept video I’m using a projectile, but it really doesn’t matter if you use a hitdef, a projectile or a helper to place the enemy into a custom state.

The custom state in which the enemy is placed is:
Code:
[Statedef XXXX]
type = U
movetype = I
physics = U
ctrl = 0
velset = 0,0
poweradd = 0
[State Enemy Helper on Player]
type = Helper
trigger1 = !time
helpertype = normal ;player
name = "P2onP1"
ID = 9123
stateno = 9123
pos = 0,0
postype = p2   
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0


[State ChangeState]
type = SelfState
trigger1 =  !time
value = 0
ctrl = 1

This code will make P2 create a Helper that will be placed on top of Ginyu (P1). The State for the Enemy’s Helper needs to be located on the Enemy’s files.
Ginyu also needs the following state, which will be the “P1onP2” Helper:
Code:
;GINYU
[Statedef 9124]
type    = U                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= U                      ;Move-type: A-attack, I-idle, H-gethit
physics = U                      ;Physics: S-stand, C-crouch, A-air
juggle  = 0                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                         ;Set ctrl (Def: no change)                     ;Change animation (Def: no change)
sprpriority = 10                 

[State 9124, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
;persistent =

[State 9124, Pos] ;bind the helper to a fixed position
type = PosSet
trigger1 = 1
x = (enemy, pos x)
y = enemy, pos y
ignorehitpause = 1

[State 9124, turn] ;the helper will face the enemy
type = Turn
trigger1 = pos Y = 0
trigger1 = facing = root,facing
ignorehitpause = 1

[State 9124, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
trigger1 = Anim != (enemy, anim)
trigger2 = AnimElemNo(0) > (enemy, AnimElemNo(0))
value = enemy, anim
elem = enemy,AnimElemNo(0)
ignorehitpause = 1

[State 9124, DestroySelf]
type = DestroySelf
trigger1 = root,var(51)=0 ;time = 500
ignorehitpause = 1
;persistent =

This code basically places a Helper on top of the Enemy (P2) and it replicates the same animation number as the Enemy.
Ginyu also needs the following -2 states:

Code:
[State -2, Ginyu Mode ON]
type = VarSet
trigger1 =1
var(51)= IfElse((enemy,Numhelper(9123)=1),1,0)

 [State -2, Ginyu missing animation check]
type = VarSet
triggerall = Teamside = 1
triggerall = NumHelper(9124)=1
trigger1 = (helper(9124),AnimElemNo(0)) = (enemy, AnimElemNo(0))
var(53) = Ifelse((helper(9124),anim)!=(enemy,anim),0,1)

[State -2, Ginyu missing animation check]
type = VarSet
triggerall = Teamside = 2
triggerall = NumHelper(9124)=1
trigger1 = (helper(9124),AnimElemNo(0)) = (enemy, AnimElemNo(0)+1)
var(53) = Ifelse((helper(9124),anim)!=(enemy,anim),0,1)

[State -2, AssertSpecial]
type = AssertSpecial
trigger1 = var(51)=1
flag = invisible
ignorehitpause = 1

[state -3, remove afterimage]
type = afterimagetime
trigger1 = var(51)=1
time = 0

[State -2, Ginyu Helper on Enemy]
type = Helper
trigger1 = !NumHelper(9124)
trigger1 = var(51)=1
helpertype = normal ;player
name = "P1onP2"
ID =  9124
stateno = 9124
pos = 0,0
postype = p2    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermovetime = 0
pausemovetime = 0

var(51) basically tells the game that the Body Swap has been enabled. Var(53) keeps track of the animation of the enemy versus the helper’s animation. Due that P2 code is executed with 1 tick after P1 code, we need to do a workaround to keep that 1 tick delay, otherwise the code will not work when performed by P2.

Now, let’s see the code that needs to be added to the enemy’s files to make it compatible with Ginyu:
Code:
;GINYU’s Helper
[Statedef 9123]
type    = U                      ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= U                       ;Move-type: A-attack, I-idle, H-gethit
physics = U                      ;Physics: S-stand, C-crouch, A-air
juggle  = 0                      ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0                     ;Set velocity (x,y) (Def: no change)
ctrl = 0                          ;Set ctrl (Def: no change)
sprpriority = 10                 

[State 9123, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT

time = 1
ignorehitpause = 1

[State 9123, Pos] ;bind the helper to a fixed position
type = PosSet
trigger1 = 1
x = (enemy, pos x)
y = enemy, pos y
ignorehitpause = 1

[State 9123, turn] ;the helper will face the enemy
type = Turn
trigger1 = pos Y = 0
trigger1 = facing = root,facing
ignorehitpause = 1

[State 9123, 2] ;this will allow the helper to replicate the same animation than the root
type = ChangeAnim
trigger1 = anim != (enemy, anim)
trigger2 = AnimElemNo(0) > (enemy, AnimElemNo(0))
value = enemy, anim
elem = enemy,AnimElemNo(0)
ignorehitpause = 1

[State 0, DestroySelf]
type = DestroySelf
trigger1 = time = 500 ;it’s a good idea to kill the helper after some time, but we can find other ways to kill it. This is up to the author
ignorehitpause = 1

The enemy also needs to include this code in their -2/-3 states:
Code:
[State -3, AssertSpecial]
type = AssertSpecial
triggerall = enemy,Name=" Ginyu "
trigger1 = enemy,var(51)=1 ;Ginyu Mode ON
flag = invisible
ignorehitpause = 1

[state -3, remove afterimage]
type = afterimagetime
triggerall = enemy,Name=" Ginyu "
trigger1 = enemy,var(51)=1 ;Ginyu Mode ON
time = 0
ignorehitpause = 1


[State -3, Prevent playing missing anim] ;HACK
type = ChangeAnim
triggerall = enemy,Name=" Ginyu "
triggerall = enemy,var(51)=1 ;Ginyu Mode ON
trigger1 = stateno = 0
trigger1 = !time
trigger2 = enemy,var(53)=0
value = 0
;elem = 1
ignorehitpause = 1


[State -3, Prevent Wrong State S]
type = ChangeState
triggerall = enemy,Name=" Ginyu "
triggerall = enemy,var(51)=1 ;Ginyu Mode ON
triggerall = statetype=S
trigger1 = enemy,var(53)=0
value = 0
ctrl = 1
ignorehitpause = 1

[State -3, Prevent Wrong State C]
type = ChangeState
triggerall = enemy,Name=" Ginyu "
triggerall = enemy,var(51)=1 ;Ginyu Mode ON
triggerall =  statetype=C
trigger1 = enemy,var(53)=0
value = 11
ctrl = 1
ignorehitpause = 1

[State -3, Prevent Wrong State A]
type = ChangeState
triggerall = enemy,Name="Ginyu"
triggerall = enemy,var(51)=1 ;Ginyu Mode ON
triggerall = statetype=A
trigger1 = enemy,var(53)=0
value = 50
ctrl = 1
ignorehitpause = 1

I’m using a enemy,name trigger to check the identity of Ginyu and then execute the necessary code. Other alternatives to this would be through a helper or anim check, but as this is a concept move, I’ll leave the possible methods of “standardization” open to discussion.

The full code results in a helper on top of an invisible character repeating the same animation as the invisible character. That means if P1 plays animation 200, the Helper will play the same animation 200 using his own sprites (actually the other player’s ones). If the character plays an animation not available or if the animation from the character is longer or shorter than the one from the Helper, then it will revert to an idle state. This replicates the original concept of the move in which the characters weren’t able to reach the full potential of the new bodies. It also brings a new strategy layer as both characters are nerfed down having most of his attacks disabled for the duration of the move.

The full code is also to implement in other characters as it can be placed at the end of statedef -2 or -3, requiring one single copy&paste process to make it compatible. There are no sprites to be added or modified, making it easier the compatibility with other characters Ginyu also doesn’t need to update his code every time a new character is added to the compatibility list.

The code isn’t exempt of problems though. First of all, whenever a character tries to play a missing animation, there will be a debug warning. Also, the characters could get stuck for some ticks while performing some moves. Another known issue is that the actual animation and clsn boxes are the ones from the invisible character. This means that if animation 200 for the character is a high punch, but the enemy’s animation 200 is from a low kick, the hitsparks and the movehit behavior will not reflect on the animation being displayed. Effects such as Explods around a particular animation will still be played on the Helper (which in some cases will not match with what's shown on screen)

Also, in the same fashion, the Helper could turn into a fireball if the animation numbers from one character match the Helper’s ones. A full game implementation using my “helper on top of character” would easily prevent such problems by restricting the attacks that could be performed during the Body Change being enabled -remember Ginyu’s var(51)- as well as limiting the explods that should be displayed during Ginyu’s Body Change mode. Obviously this will require more customization on the enemy’s files, but for full game authors, my method could be a viable option to implement a true Body Change attack.

Let me know your thoughts or comments on this :)
    

Re: Games you discovered through Mugen?

 December 27, 2014, 07:35:16 pm View in topic context
 Posted by XGargoyle  in Games you discovered through Mugen? (Started by Niitris December 24, 2014, 05:42:55 pm
 Board: M.U.G.E.N Discussion

    

Re: Removing background animations, dark screen, etc

 December 27, 2014, 07:33:13 pm View in topic context
 Posted by XGargoyle  in Removing background animations, dark screen, etc (Started by puissance December 27, 2014, 07:19:41 pm
 Board: M.U.G.E.N Configuration Help

On #5, all these elements are either Helpers or Explods.

If they are helpers, locate the state of the Helper used as the background element and add this line of code to every helper state:
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = invisible
ignorehitpause = 1

You don't need to replace the sprites within the character or the animations in it. That code will automatically make them invisible.

If they are Explods, simply modify the scale parameter with this:
scale = 0,0
This will make the background element invisible

These methods are non-destructive, meaning that you can undo them easily in case you need them back.
    

Re: How does one make a character feel more like a fighting game?

 December 27, 2014, 07:16:11 pm View in topic context
 Posted by XGargoyle  in How does one make a character feel more like a fighting game? (Started by shotgun160 December 27, 2014, 05:56:10 pm
 Board: M.U.G.E.N Discussion

First, you need to understand the game or system you are trying to replicate or at least have a similar look and feel. It is also a good idea to play lots of different FG series to see how they work. If you only play KOF or Smash Bros, even if you are a master at them, you will lack the knowledge of other systems.

Good mugen characters are obtained through a deep research.

- Analyze the combo and cancel system. Analyze the combo ladder and which moves can be cancelled into another and which not.
- Analyze basic parameters such as velocities, gravity and hitpauses. If you can't extract this data from ArtMoney or a similar tool, you will have then to count the ticks directly and do calculations
- animation timings must be also correct, otherwise the character would be unbalanced (like a light punch coming slower than a strong one).
- Analyze if the game has a damage dampening system and how it works.
- Collision boxes must be equal to the game source. Nowadays, almost all fighting games have some way to display them. If for any reason, your game doesn't have a hitbox viewer, then having a solid knowledge on how collision boxes work in other games will allow you to come up with a good standard for your character, this is why it's also important to play as many games as possible.
- Last but not least, experience also helps. All mugen character creators have made horrible characters on their beginnings. Don't be ashamed if your characters are not POTS-level yet. You will achieve it with experience and time. Listen to feedback from other people, there is always someone who will be better than you and his advices will help you to become a better creator. Learn from your mistakes and improve from them.

Making a mugen character is as easy as placing a bunch of sprites together and coding some lines, but if you want to create a good character, then you need to do a lot of research.
    

Re: PSN not working...

 December 27, 2014, 01:50:22 pm View in topic context
 Posted by XGargoyle  in PSN not working... (Started by Lord M December 27, 2014, 02:55:24 am
 Board: Gaming


Not expecting PSN to be back for a while. If PSN gets crippled this badly on a DDOS attack, it really shows Sony doesn't even have a proper Plan B for this situation.

What would you expect from a company that stored credit card information from their users in a plain text file?
    

Re: Most overused Mugen character in your opinion?

 December 27, 2014, 01:41:54 pm View in topic context
 Posted by XGargoyle  in shitpost r us (Started by Do not even ask October 28, 2012, 10:37:23 am
 Board: All That's Left

    

Re: Mugen before Fighter Factory: What was it like?

 December 26, 2014, 11:14:16 pm View in topic context
 Posted by XGargoyle  in Mugen before Fighter Factory: What was it like? (Started by Shulk December 26, 2014, 11:07:57 pm
 Board: M.U.G.E.N Discussion

You don't have to use C++ to code mugen characters, not even before FF.
Before FF there were other similar tools that weren't really stable and tended to corrupt the characters. And before these tools you had to use notepad to create the characters, which you can still use nowadays
    

Re: Palettes won't change during selection

 December 26, 2014, 07:57:10 pm View in topic context
 Posted by XGargoyle  in Palettes won't change during selection (Started by melongod December 26, 2014, 03:53:47 am
 Board: M.U.G.E.N Development Help

Are the sprites on the sff file using a shared palette?
    

Re: Palettes won't change during selection

 December 26, 2014, 01:14:52 pm View in topic context
 Posted by XGargoyle  in Palettes won't change during selection (Started by melongod December 26, 2014, 03:53:47 am
 Board: M.U.G.E.N Development Help

If you are using 1.0 or 1.1, ensure that you do not have a RemapPal active on your code
    

Re: Character "exploding" during KO?

 December 26, 2014, 01:12:05 pm View in topic context
 Posted by XGargoyle  in Character "exploding" during KO? (Started by Shulk December 25, 2014, 11:43:38 pm
 Board: M.U.G.E.N Development Help

Electro's code is basically for the player to go to a custom state after being defeated. I believe the OP is asking for the opposite, put the enemy into a custom state and have him explode after being KO'd.

To place the enemy in a custom state when he's KO'd, you will need to hit the enemy with a projectile in the same instant he's defeated. The projectile will put the enemy into a custom state of yours where you can do anything to him.
    

Re: INTRO HELPER

 December 25, 2014, 09:03:14 pm View in topic context
 Posted by XGargoyle  in INTRO HELPER (Started by sergeus December 25, 2014, 06:52:59 pm
 Board: M.U.G.E.N Development Help

When you skip the intro, and respawn the helper at the beginning of the round, you can place it wherever the helper would be if the intro wasn't interrupted. Same if the helper evolves or changes its state, just respawn it on the same condition he would be if the intro was fully played.


P.S: Yes, it seems we Spaniards are a small minority in this community, but I'm glad to see other peers around.
    

Re: INTRO HELPER

 December 25, 2014, 07:51:34 pm View in topic context
 Posted by XGargoyle  in INTRO HELPER (Started by sergeus December 25, 2014, 06:52:59 pm
 Board: M.U.G.E.N Development Help

Helpers are always removed when skipping intro. The easiest way to fix it is to respawn the helper again at the start of the round if it no longer exists.
    

Re: Majin Vegeta Z2

 December 25, 2014, 06:26:43 pm View in topic context
 Posted by XGargoyle  in Majin Vegeta Z2 (Started by Balthazar October 29, 2012, 02:20:10 pm
 Board: Projects

This is because Goku's temporarily in a custom state, which plays the default KO sound for the character
    

Re: [SPANISH ONLY] Español solamente V2

 December 25, 2014, 12:40:29 am View in topic context
 Posted by XGargoyle  in [SPANISH ONLY] Español solamente V2 (Started by Titiln July 14, 2010, 03:57:43 am
 Board: International

Siento mucho la perdida de tu madre. Mi padre tambien fallecio hace años por estas fechas y se por lo que estas pasando. Un abrazo de mi parte y sepas que puedes contar conmigo si necesistas alguien con quien hablar. Animos compañero!
    

Circus tricked kids with dogs painted as pandas

 December 24, 2014, 06:24:11 pm View in topic context
 Posted by XGargoyle  in Circus tricked kids with dogs painted as pandas (Started by XGargoyle December 24, 2014, 06:24:11 pm
 Board: All That's Left

Only in Italy...

Quote
Two painted chow chow dogs posing as pandas have been seized from a circus in northern Italy, after tricking children into handing over cash, police have said.

The male and female dogs were seized by police after it became clear that they were not, in fact, pandas.

http://www.thelocal.it/20141223/circus-tricked-kids-with-dogs-painted-as-pandas

Aren't they cute?

Spoiler, click to toggle visibilty
    

Re: Help with custom palette states

 December 23, 2014, 08:20:32 pm View in topic context
 Posted by XGargoyle  in Help with custom palette states (Started by melongod December 23, 2014, 07:39:22 pm
 Board: M.U.G.E.N Development Help

enemy, Name = "whatever"
    

Re: TESTP site is back up.

 December 23, 2014, 09:05:42 am View in topic context
 Posted by XGargoyle  in TESTP site is back up. (Started by Jesuszilla December 23, 2014, 12:20:51 am
 Board: M.U.G.E.N Discussion

aren't we a bit late?

http://mugenguild.com/forum/msg.2060935

:P

Jokes aside, the site has been back since October. I don't know why it has been restored (including the BBS) but either Elecbyte is cooking up something or the site has been restored by mistake
    

Re: Stopping ONE sound channel for both sides?

 December 21, 2014, 01:04:31 pm View in topic context
 Posted by XGargoyle  in Stopping ONE sound channel for both sides? (Started by Sheng Long December 20, 2014, 10:32:56 pm
 Board: M.U.G.E.N Development Help

When you use -1, it stops all channels for all players. I can't see any scenario where you would like, for example, stop channel 5 on both characters, but let channel 4 and 6 still being played, unless you are working in a full game, because you have no control on what sound channels are being played by the other character in an open game.

And if you are working on a full game, then it's easy for you to use a channel specific stopsnd in both characters at the same time
    

Re: [SPANISH ONLY] Español solamente V2

 December 21, 2014, 12:59:30 pm View in topic context
 Posted by XGargoyle  in [SPANISH ONLY] Español solamente V2 (Started by Titiln July 14, 2010, 03:57:43 am
 Board: International

Un spambot es básicamente un programa que automatiza las acciones que haría un usuario, de forma que es capaz de registrarse en un foro, acceder a una sección y postear un mensaje.

Los "spambots" originalmente se usaban para labores de automatizacion de testing, para verificar o comprobar acciones básicas y repetitivas en un entorno web, pero un buen dia alguien penso que se podrian utilizar para hacer spam
    

Re: [SPANISH ONLY] Español solamente V2

 December 20, 2014, 08:11:20 pm View in topic context
 Posted by XGargoyle  in [SPANISH ONLY] Español solamente V2 (Started by Titiln July 14, 2010, 03:57:43 am
 Board: International

eso parece