Author Topic: Guilty Gear alike Mini Character Code!  (Read 2813 times)

Online WooshaQ

  • Contributor
  • ***
  • .......
    • View Profile
    • Samouczek, polski serwis o mugenie!
Guilty Gear alike Mini Character Code!
« on: June 27, 2008, 07:56:54 PM »
Hi gang, I'm writing on behalf of my friend who is an author of the code below. Before we will have this be able to use this option freely in shugendo I asked Armor_Cage to write this little code for me... For those who never played guilty gear here are some screens that will give you the general idea. Original Source: M.U.G.E.N SAMOUCZEK

Code allows to display mini characters which you can place anyhere on screen, works good as interactive portrait sorta thing.


That's how it looks on stimul mode!


I came across different code in the past but it had many flaws, during jump mini character didn't stayed "pinned" to the screen. Also depending on the stage position character was placed highter or lower on the screen which wasn't too esthetically. this code solves all the problems.

Code (Mugen): [Select]
[StateDef -2]
 
;--------------------------------------------
;minaiturki postaci na wzor Guilty Gear
;autor = ARMOR_CAGE
;--------------------------------------------
[State -2, Wywolanie miniaturek]
type = helper
trigger1 = numhelper(88888) = 0 && time = 0
helpertype = normal
ID = 88888
stateno = 88888
name = "MiniGG"
postype = back
facing = facing
pos = 0, 0
keyctrl = 0
size.xscale = .5
size.yscale = .5
size.shadowoffset = 99999
ownpal = 0
persistent = 1
ignorehitpause = 1

Code (Mugen): [Select]
;--------------------------------------------
 
[Statedef 88888]
type = S
movetype = I
physics = N
sprpriority = -5
velset = 0,0
ctrl = 0
 
[State 88888, Obracanie sie miniatur]
type = Turn
trigger1 = parent,facing != facing
ignorehitpause = 1
persistent = 1
 
[State 0, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
persistent = 1
 
 
 
[State 88888, Ustalanie kolejnosci pozycji]
type = VarSet
trigger1 = time = 0
trigger1 = NumPartner = 0
v = 0
value = 0
 
[State 88888, Ustalanie kolejnosci pozycji]
type = VarSet
triggerall = time = 0
triggerall = NumPartner = 1
trigger1 = teamside = 1
trigger1 = partner, Pos X <= parent, Pos X
trigger2 = teamside = 2
trigger2 = partner, Pos X > parent, Pos X
v = 0
value = 1
 
[State 88888, Ustalanie kolejnosci pozycji]
type = VarSet
triggerall = time = 0
triggerall = NumPartner = 1
trigger1 = teamside = 1
trigger1 = partner, Pos X > parent, Pos X
trigger2 = teamside = 2
trigger2 = partner, Pos X <= parent, Pos X
v = 0
value = 2
 
 
 
[State 88888, ustawienie na ekranie dla pojedynczego P1]
type = OffSet
trigger1 = Var(0) = 0
x = IfElse(teamside = 1, -ScreenPos X +20, -ScreenPos X +300)
y = -ScreenPos Y +60
ignorehitpause = 1
persistent = 1
 
 
[State 88888, ustawienie na ekranie P1 dla druzyny]
type = OffSet
trigger1 = Var(0) = 1
x = IfElse(teamside = 1, -ScreenPos X +20, -ScreenPos X +300)
y = -ScreenPos Y +60
ignorehitpause = 1
persistent = 1
 
[State 88888, ustawienie na ekranie P3 dla druzyny]
type = OffSet
trigger1 = Var(0) = 2
x = IfElse(teamside = 1, -ScreenPos X +50, -ScreenPos X +270)
y = -ScreenPos Y +60
ignorehitpause = 1
persistent = 1
 
 
[State 88888, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1
ignorehitpause = 1
persistent = 1
 
[State 88888, Zmiany animacji]
type = ChangeAnim
trigger1 = selfanimexist(parent,anim)
elem = parent,animelemno(0)
value = parent, anim
 
[State 88888, Usowanie miniaturki]
type = Destroyself
trigger1 = !parent,alive
 
;--------------------------------------------

For those who don't understand how to deal with it here's a little tutorial. The easiest way would be to make a new text file, copy those two codes and past them there. Let's name it mini.cns. Basicly all left to do is open the character def file and add a new states line. So if for example there is:

Quote
[Files]
cmd     = baiken.cmd   ;Command set
cns     = baiken.cns   ;Constants
st      = baiken.cns   ;States
st2     = AI.txt
stcommon = common1.cns ;Common states
sprite  = baiken.sff   ;Sprite


we should add st3 = mini.cns

Quote
[Files]
cmd     = baiken.cmd   ;Command set
cns     = baiken.cns   ;Constants
st      = baiken.cns   ;States
st2     = AI.txt
st3 = mini.cns
stcommon = common1.cns ;Common states
sprite  = baiken.sff   ;Sprite


Now run mugen, if it's working than it's ok. If now it means you'll have to find statedef -2 section in one character's cns files. If you manage to do that place the first part of the code there! It should work.

Armor_Cage asked me to write about certain parts that anyone can change according to their needs. The order of characters in the code is: P1 + P3 vs P4 + P2 but if anyone wants to change that just look for Var(0) and change 2 to 1 and vice versa. The mini characters also change their direction according to the side the big fighter is facing. To prevent that just null "type = Turn" section. Also minis have the same fixed position so if you play on stimul with Ryu and Ken. Ryu jumps over Ken and is in front, mini character position will not change. Mini Ryu will be displayed as a second character there, you can change that by finding time = 0 and setting it to time>= 0. Obviously messing with the offset section will change their position on the screen. Well that's about it. We wish you fun!
« Last Edit: July 01, 2008, 05:55:51 PM by WooshaQ »

Offline Laxxe23

  • Contributor
  • ****
  • Aka ShadesTeam/Zeckle
    • View Profile
    • Laxxes moon
Re: Guilty Gear alike Mini Character Code!
« Reply #1 on: June 27, 2008, 08:12:49 PM »
super jump compatable?
Shades of Manhattan

Blame Iced for the awsome av

Offline -SyN-

  • Contributor
  • ***
  • Not your regular Mugen Creator.
    • View Profile
    • Cs-X-treme Revision 4.2
Re: Guilty Gear alike Mini Character Code!
« Reply #2 on: June 27, 2008, 08:14:39 PM »
Yeah, same question as above because I have my own version of this code I used for my one of my past released stages and in your images, those stages are not super jump compatible.

Quote
Cs-X- inspires ppl to make AWESOME -X-TREME sigs!


Online WooshaQ

  • Contributor
  • ***
  • .......
    • View Profile
    • Samouczek, polski serwis o mugenie!
Re: Guilty Gear alike Mini Character Code!
« Reply #3 on: June 27, 2008, 08:21:11 PM »
Hmmm, i'm not really sure what you guys mean by this super jump compatible... :-[ How should mini character behave?

Offline -SyN-

  • Contributor
  • ***
  • Not your regular Mugen Creator.
    • View Profile
    • Cs-X-treme Revision 4.2
Re: Guilty Gear alike Mini Character Code!
« Reply #4 on: June 27, 2008, 08:22:45 PM »
super jump meaning taller than normal stages, if its compaible, the mini port helper should bind with the bars. (stay in place when a character moves higher up in a stage.)

Example, guilty gear XX stages, marvel vs capcom stages, etc.

Quote
Cs-X- inspires ppl to make AWESOME -X-TREME sigs!


Online WooshaQ

  • Contributor
  • ***
  • .......
    • View Profile
    • Samouczek, polski serwis o mugenie!
Re: Guilty Gear alike Mini Character Code!
« Reply #5 on: June 27, 2008, 08:30:31 PM »

Character is "pinned" to the position on the screen. It goes up along with lifebar etc. Pretty much compatible to me :sugoi:
« Last Edit: June 27, 2008, 08:34:40 PM by WooshaQ »

Offline -SyN-

  • Contributor
  • ***
  • Not your regular Mugen Creator.
    • View Profile
    • Cs-X-treme Revision 4.2
Re: Guilty Gear alike Mini Character Code!
« Reply #6 on: June 27, 2008, 08:34:00 PM »
Thats all i needed to know.

Thanks for sharing this, Definitely can make good use with this.

Quote
Cs-X- inspires ppl to make AWESOME -X-TREME sigs!


Offline PotS

  • MFG Network Member
  • ******
    • View Profile
    • PotS' MUGEN
Re: Guilty Gear alike Mini Character Code!
« Reply #7 on: June 27, 2008, 08:41:26 PM »
That's gonna bug/cause weird anims if the chars are thrown and have animations with the same number as the throw's custom anim (very likely). Needs some piece of code to detect custom states and, if in one, change to a predetermined anim.
Use anything you want from my works.  If you need to contact me use email, not private messages.

Offline -SyN-

  • Contributor
  • ***
  • Not your regular Mugen Creator.
    • View Profile
    • Cs-X-treme Revision 4.2
Re: Guilty Gear alike Mini Character Code!
« Reply #8 on: June 27, 2008, 08:48:31 PM »
Can try movetype=H && stateno!=[5000,5201], though it's not as reliable.


Works to a certain degree.

Quote
Cs-X- inspires ppl to make AWESOME -X-TREME sigs!


Online WooshaQ

  • Contributor
  • ***
  • .......
    • View Profile
    • Samouczek, polski serwis o mugenie!
Re: Guilty Gear alike Mini Character Code!
« Reply #9 on: July 01, 2008, 05:56:43 PM »
Code had been updated, small fixes with the order!

Offline -SyN-

  • Contributor
  • ***
  • Not your regular Mugen Creator.
    • View Profile
    • Cs-X-treme Revision 4.2
Re: Guilty Gear alike Mini Character Code!
« Reply #10 on: July 06, 2008, 08:39:19 AM »
I just wanted to confirm that the trick does work,




I used a helper trigger "root,movehit != H" to activate the helper and in that helper states I used the opposite trigger to kill it and thats when my static effects comes in, Normally when in a custom state the player is considered to be in its hit state, so far since I did random tests against other chars when being throwed, etc., and I haven't had any problems "as of yet".

Also I have a compact version of this code but the single offset code block was all I needed to make the characters bind to the bars (stay in place) when jumping higher in super jump compatible stages.

Thanks WooshaQ and Armor Cage for the offset code, that was basically all I needed. :)

Quote
Cs-X- inspires ppl to make AWESOME -X-TREME sigs!


Offline Zerox.

  • User
  • **
  • 3D Modeler thats Learning to Create Characters.
    • View Profile
    • Warcraft 3 Unlimited
Re: Guilty Gear alike Mini Character Code!
« Reply #11 on: March 07, 2009, 08:08:01 PM »
Forgive me for bumping an old topic but I was wondering if anyone could help me get this to work? Whenever I add this to any character nothing happens. Is it just my screen pack possibly?
I am Zerox admin of Warcraft 3 Unlimited, 3D modeler, and now a new Mugen addict seeking to learn how to create Mugen Characters and stages.

Offline interloko

  • Contributor
  • ***
    • View Profile
Re: Guilty Gear alike Mini Character Code!
« Reply #12 on: April 02, 2009, 03:05:11 AM »
the code works but what about envshake?

Offline SakirSoft

  • Contributor
  • ***
    • View Profile
    • SakirSoft.com
Re: Guilty Gear alike Mini Character Code!
« Reply #13 on: April 02, 2009, 03:56:27 AM »
Wow mugen code to emulate a ShugenDo feature.
Mostly i am try to emulate mugen.
Here you can find ShugenDo
www.sakirsoft.com

Online WooshaQ

  • Contributor
  • ***
  • .......
    • View Profile
    • Samouczek, polski serwis o mugenie!
Re: Guilty Gear alike Mini Character Code!
« Reply #14 on: April 10, 2009, 11:55:56 AM »
It's more of an attepmt to emulate Guilty Gear feature :P

Offline interloko

  • Contributor
  • ***
    • View Profile
Re: Guilty Gear alike Mini Character Code!
« Reply #15 on: April 11, 2009, 07:36:55 AM »
so.. what's happening if you use envshake?

Offline -SyN-

  • Contributor
  • ***
  • Not your regular Mugen Creator.
    • View Profile
    • Cs-X-treme Revision 4.2
Re: Guilty Gear alike Mini Character Code!
« Reply #16 on: April 11, 2009, 11:21:52 AM »
so.. what's happening if you use envshake?


It's more of an attepmt to emulate Guilty Gear feature :P


Meaning it's not perfect, its as close as you can get it to the original unless you code your lifebars as explods inside of an helper which I have done in the image in one of my earlier posts.

Quote
Cs-X- inspires ppl to make AWESOME -X-TREME sigs!