YesNoOk
avatar

Guilty Gear alike Mini Character Code! (Read 11183 times)

Started by WooshaQ, June 28, 2008, 02:56:54 am
Share this topic:
Guilty Gear alike Mini Character Code!
#1  June 28, 2008, 02:56:54 am
  • avatar
  • ***
  • Smart Icoca wannabe!
    • Poland
    • samouczek.com/
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.

[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

;--------------------------------------------

[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 02, 2008, 12:55:51 am by WooshaQ
Re: Guilty Gear alike Mini Character Code!
#2  June 28, 2008, 03:12:49 am
  • ****
  • Aka ShadesTeam/Zeckle
super jump compatable?
Shades 2 site:Shades of Manhattan
Re: Guilty Gear alike Mini Character Code!
#3  June 28, 2008, 03:14:39 am
  • ****
  • Club -SyN- in my past life
    • USA
    • negative-edge.net
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.
Re: Guilty Gear alike Mini Character Code!
#4  June 28, 2008, 03:21:11 am
  • avatar
  • ***
  • Smart Icoca wannabe!
    • Poland
    • samouczek.com/
Hmmm, i'm not really sure what you guys mean by this super jump compatible... :-[ How should mini character behave?
Re: Guilty Gear alike Mini Character Code!
#5  June 28, 2008, 03:22:45 am
  • ****
  • Club -SyN- in my past life
    • USA
    • negative-edge.net
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.
Re: Guilty Gear alike Mini Character Code!
#6  June 28, 2008, 03:30:31 am
  • avatar
  • ***
  • Smart Icoca wannabe!
    • Poland
    • samouczek.com/

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 28, 2008, 03:34:40 am by WooshaQ
Re: Guilty Gear alike Mini Character Code!
#7  June 28, 2008, 03:34:00 am
  • ****
  • Club -SyN- in my past life
    • USA
    • negative-edge.net
Thats all i needed to know.

Thanks for sharing this, Definitely can make good use with this.
Re: Guilty Gear alike Mini Character Code!
#8  June 28, 2008, 03:41:26 am
  • ******
    • Portugal
    • network.mugenguild.com/pots/
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.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.
Re: Guilty Gear alike Mini Character Code!
#9  June 28, 2008, 03:48:31 am
  • ****
  • Club -SyN- in my past life
    • USA
    • negative-edge.net
Re: Guilty Gear alike Mini Character Code!
#10  July 02, 2008, 12:56:43 am
  • avatar
  • ***
  • Smart Icoca wannabe!
    • Poland
    • samouczek.com/
Code had been updated, small fixes with the order!
Re: Guilty Gear alike Mini Character Code!
#11  July 06, 2008, 03:39:19 pm
  • ****
  • Club -SyN- in my past life
    • USA
    • negative-edge.net
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. :)
Re: Guilty Gear alike Mini Character Code!
#12  March 08, 2009, 03:08:01 am
  • **
  • 3D Modeler thats Learning to Create Characters.
    • wc3r.forumcircle.com/
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.
Re: Guilty Gear alike Mini Character Code!
#13  April 02, 2009, 10:05:11 am
  • avatar
  • ***
    • Argentina
the code works but what about envshake?
Re: Guilty Gear alike Mini Character Code!
#14  April 02, 2009, 10:56:27 am
  • avatar
  • ***
    • www.sakirsoft.com
Wow mugen code to emulate a ShugenDo feature.
Mostly i am try to emulate mugen.
Here you can find ShugenDo
www.sakirsoft.com
Re: Guilty Gear alike Mini Character Code!
#15  April 10, 2009, 06:55:56 pm
  • avatar
  • ***
  • Smart Icoca wannabe!
    • Poland
    • samouczek.com/
It's more of an attepmt to emulate Guilty Gear feature :P
Re: Guilty Gear alike Mini Character Code!
#16  April 11, 2009, 02:36:55 pm
  • avatar
  • ***
    • Argentina
so.. what's happening if you use envshake?
Re: Guilty Gear alike Mini Character Code!
#17  April 11, 2009, 06:21:52 pm
  • ****
  • Club -SyN- in my past life
    • USA
    • negative-edge.net