YesNoOk
avatar

Interactive KOF Character Tutorial (Read 75523 times)

Started by Koop, February 07, 2013, 04:41:25 pm
Share this topic:
Interactive KOF Character Tutorial
#1  February 07, 2013, 04:41:25 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
I think it would be a good idea to make a character tutorial for those who may be interested.

This tutorial will explain the main parts of creating a kof character. For this tutorial, I will be creating Kyo 98 but with the system that I use for my newer characters.

This tutorial will be covering:

-Sff making: Sprite alignment and get hits will be the main part of this section.
-Air making: The main part of this section will be non required get hit anims
-Getting Data: Will be explaining how to use artmoney and how to put that data into code
-Coding: This part is self explanatory.

Are there any other things that anyone would like me to go over? I'll be sure to explain how everything (that I know how to do) is done.
Re: Interactive KOF Character Tutorial
#2  February 07, 2013, 11:00:32 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
-Sff making part 1: Getting the sprites.

For this section you will need:

-Winkawaks



Now this wasn't going to be part of the tutorial, considering all the 2D KOF characters should be ripped by now. But it's a good thing to know how it's done is case of mishaps, such as sprites missing from the set that you have or sprites with potential color loss. In this part we will explain how to solve the latter. Unfortunately it will take a bit of time.

KoopaKoot secret tip No:1: "It's always a good idea to know as much about the character you are making before you start on them."

So as mentioned in the first post, this tutorial will be using Kyo 98 as the example character. So let's get his sprites already! Luckily Kong ripped all the KOF character sprites from 94-2003. You can get them from here: http://www.mediafire.com/?84orz89rc78zg

Normally the rips are very useful, but there is a problem with Kyo's. Most characters in KOF use 16 colours on their sprites. Some characters have extra layers on their sprites to give them a higher color count (Jhun, pre 99 Ralf and Clark, Chang are a few examples). But generally, when you check a character's sprites, they should have 15 colours for the sprite + the transparency color.



But as you can see, we have a problem here. The above screen was a sprite I ripped myself and it seems to be missing a color. The problem is that Kyo's default palette uses the same color index (0,0,0) for 2 parts. The solution? Rip him with an alternate palette.

In winkawaks (will be known as kawaks from now on) go to, "Game, NeoGeo Settings, Debug Dipswitches and tick dip 1,1 (top left box)" this will activate the debug viewer. This will display a character using player 1's palette. The first character is Kyo more often than not.



To control the debug object, hold the coin button. The directions will move the character, a will change to the next animation, b will change to the previous animation, c will change to the next character and d will change to the previous character. This only work when the coin button is held. It's a good idea to move the debug object so that the character is facing right and that they away from the screen edges. It would also help to save your state using F5 in case you move the debug object while ripping.

Next we need to clear everything so that only the debug object is visible. We can do this in kawaks.  Go to "tools, shot factory and then deselect everything but the debug object (you may have to do this more than once).



Once that's done, you can cycle through the anims and capture each frame. When you pause kawaks, you can frame step by holding left shift and then tapping the space bar, this way you wont miss anything. To take a screenshot in kawaks is ctrl+alt+p

I believe there is a way to rip the sprites using animget, but I'm not 100% on that.

Now you should be able to start ripping. This concludes part one. Part two should be ready tomorrow.
Re: Interactive KOF Character Tutorial
#3  February 07, 2013, 11:29:27 pm
  • ******
    • www.justnopoint.com/
I've never ripped from a KOF game. But if you can remove all other elements from the screen that animate you can use animget. It records anytime there is a change in the screen that is active. So you'd only have to frame advance. It saves images as bmp, I prefer png like kawaks saves as. Though there are many programs that can batch save the files in your favorite format.

You may have a better way for converting CLSNs for the air file but I figure I'll share my method a bit. I'm sure you'll explain how to use the CLSN viewer. Not sure if you will tell everyone to save the images or record all the sprites with CLSNs. Either way I recommend using a program called Ghost Win to overlay your sprites+CLSN over your sprites in Fighter Factory's air. You can make the window a transparency overlay and work on the window below(FF) to trace the CLSNs.

I'm really interested in this tutorial! Thank you for making it.
Re: Interactive KOF Character Tutorial
#4  February 07, 2013, 11:46:35 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Managing things with animget + artmoney can make things really fast, although it does bugger up a bit with the blasted super sparks.

Get p1 and p2's Y axis. Place them off screen, this takes their shadows out of it and prevents the portraits from flickering as you capture (extra useless images) Use kawaks "Record Input" function (this is awesome). Skip through all the animations as fast as you like. Just get through the lot, doesn't matter about counting or anything as you'll have to do that later anyway. When you're done, stop the recording. Choose to replay it and hit enter to pause. Load up animget, make it observe and select the kawaks window. Unpause and let the movie run. When you're done hit save on animget.

Using scripts/imagerobot in PSP will allow you to do automated cropping and remove the portraits from each image rather than trying to do it with the shots factory.

Another random point. If ripping from 2k3, the debug object does not have null velocity. In addition you can change palette with p2's keys. This doesn't work in earlier ones, it's a 2k3 only thing.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Interactive KOF Character Tutorial
#5  February 07, 2013, 11:49:48 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
I was going to mention that about 2003, but it seems like everyone was ripped correctly in 2003 by Kong (except Malin).

Re: Interactive KOF Character Tutorial
#6  February 07, 2013, 11:53:15 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
The palette thing is useful for bosses though as you can't get at their alts without it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Interactive KOF Character Tutorial
#7  February 09, 2013, 10:14:35 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
-Sff making part 2: Sff making and get hits

If you ripped the sprites yourself like this or downloaded Kong's rips, these sprites will be "uncropped." The best part about uncropped rips is that they will have the same axis for ALL sprites. Even for those sprites where it seems like the character is walking off axis, this is still CORRECT.

To get an alignment shot, all you have to do is rip a sprite with the clsn visible:
For KOF 94-2002 go to, "Game, NeoGeo Settings, Debug Dipswitches and tick dip 1,2"
For KOF 2003 go to, "Game, NeoGeo Settings, Debug Dipswitches and tick dip 1,4"



Use the small crosshair to align this sprite. The alignment of the above shot is x = 158, y = 172



Here's how it looks in fighter factory

Since I got this alignment shot before I started ripping, it is also the same as the sprites that I ripped. If it's not the same, use onion skin to view the alignment shot and then make sure that your sprite lines up with it.



Now you are ready to make the sff. Here are the numbers I use for the unique KOF get hit frames:

5052: Spinning Hit
5075: tripped
5101: Hit and bounce off the ground face first
5121: Get off the ground from lying face down
5900: Flying to wall
5910: Guard break/throw escape
5950: Collapse
5970: Blue Mary arm lock
5975: Blue Mary leg lock

Numbers 5900-5975 are trivial though so long as you use those numbers for the animations. I just like the consistency.   :mool:

This concludes the sff segment of this tutorial. I'm assuming that you already know the basics, like setting up palettes and indexing sprites.

The next part will begin once I finish the sff. :P

There will be a special section after the main tutorial explaining how to align CROPPED rips  :D
Re: Interactive KOF Character Tutorial
#8  February 09, 2013, 11:35:17 pm
  • *****
  • ↑←↑
  • Life sucks, but at least I have JoJo
    • Bosnia and Herzegovina
2 questions
1.When you start coding,will you explain the KoF mechanics first and what should a KoF character have?
2.Will you release the character after you are done?
Re: Interactive KOF Character Tutorial
#9  February 10, 2013, 08:19:22 am
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
1. Yes I will explain in detail.
2. Yes the character will be released.
Re: Interactive KOF Character Tutorial
#10  February 10, 2013, 02:49:44 pm
  • avatar
  • ****
Then I will have another Kyo for my collection :p thanks for the tutorial, I am looking forward more to your art money and coding section :P
<- I exercise like that regularly!

XSZ

Re: Interactive KOF Character Tutorial
#11  February 13, 2013, 02:57:40 am
  • **
    • USA
    • www.youtube.com/user/XSZ105
Very interested in this tutorial!
Re: Interactive KOF Character Tutorial
#12  February 13, 2013, 04:23:40 am
  • *****
  • I'll do it myself.
    • Canada
    • Skype - djoulianne
    • network.mugenguild.com/cybaster/hosted.html
following !!!
Re: Interactive KOF Character Tutorial
#13  March 07, 2013, 04:52:12 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Forgive the lateness of this part. There are too many things on the mind. Most of which ARE mugen related and this tutorial is a good way to get everything covered.

Part 2: AIR Making

Now this can be the longest part of character creation. I recommend you have some music or a good podcast to listen to. It really helps. First things first, you need a program to make the .air file. Of course you could just use notepad, but I'm guessing that would take a longer time than most of the dedicated programs we have now. I personally use Fighter Factory Classic. I would suggest that newer creators get used to fighter factory 3. Here is some info that may interest you regarding Fighter Factory:

How clsns appear in FF isn't accurate to how they appear in mugen. Clsn made in FF will be drawn 1 pixel lower and one pixel to the right in mugen. I believe mcm and the latest FF3 show clsn correctly. However this isn't usually a problem if you add sprites with clsn in order to trace. A bit of a moot point when you can get perfect clsn, but it's always good to know. For those times when you don't have axis to the clsn viewer (nbc/kof xi and higher).

So as previously mentioned, the way to get clsn right is by adding frames with clsn visible to the sff, then tracing over them. Some of us have different....methods of getting clsn but this is the one that works for all. For get hits, I suggest using correct clsns (I know most of my characters don't) just because there are some things that won't work right with incorrect get hit clsns

In terms of animation timings, get them in game and not from the debug viewer as they tend to be different. To get the correct timings, pause kawaks and use l shift + spacebar to frameskip. If you are getting timings from a console game, you can make a 60fps video. pcsx2 can do this regardless of the speed the game runs on your pc (hold a direction during the end of a move, so you can see the correct last frame (in case the last frame is the same as the first frame of the character stance)).

For some moves, it's sometimes best to split the animation up into parts. For example, Kyo's oniyaki. You should make the landing part separate from when he jumps (this seems obvious) but you may also want to separate it into 3 parts (startup, jumping attack, landing). Because mugen is dumb, sometimes a move with an autoguard frame will cause problems regarding the combo counter, so I would split up the part with the autoguard from the rest of the move. 

Because of how the bounce states work in mugen, I would suggest moving the bouce frames (5160 etc) up by 20 pixels. You can override the bounce states (in fact I will make sure that you do (for another reason)) but I think it's best just to do it the way it's done now. I feel like it's too late to change something like that now.

There are a few non required anims that are used in KOF, check out an existing character to see what numbers they use. This will be great for consistency.

This concludes the AIR making tutorial. If you have any information that can be added or questions regarding things I may have missed, feel free to post.


     Posted: April 04, 2013, 09:12:14 pm
I believe it's time to continue this tutorial. Unfortunately this is gonna be mostly theory as the character I was using for this tutorial isn't ready for this stage yet. But I'm sure if you've been following you'll be able to understand. :)

Part 3-1:  Coding. Constants and Overrides

This is common mugen info but lets go over it once more. You'll have to set the player variables for the character. For [Data] you may want to add "Power = 5000" if you feel like you need to. You may also want to lower airjuggle as you won't be needing it.

For [Size] change ground.back/front to 15 and air.back/front to 12. For head.pos and mid.pos, I would recommend using sprite 5010,0 to get these. My reasoning is that most moves that have the player bound to an opponent's head use this sprite. Also the head position is usually closer to the position the character's head is during their stance than any other get hit sprite. for head.pos try to make it so the position is the top of the players head. I recommend using Scal's Chris or Clark to check to see if  head.pos is correct (mid.pos is somewhat less important lol).

[Velocity] and [Movement] will be explained in the artmoney section of this tutorial.

Now for overrides. I don't really wanna explain each one of these, but I guess I have no choice.

State 0. Remove all that silly vel stuff. Having your character sliding around while neutral is unnecessary. Do they same for states 10 and 11

I'll explain the jump states in the artmoney section as well

For the run/back dash states, I would split those into 3 parts. Start, dash, and end. Here are some examples:

Quote
;-----------------------------------------------------------------------
; DASH_FWD
[Statedef 100]
type    = S
physics = S
anim = 99+var(1)*30000
ctrl = 0
velset = 0
sprpriority = 1

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 101

[Statedef 101]
type    = S
physics = N
anim = 100+var(1)*30000
ctrl = 0
velset = 0
sprpriority = 1

[State -3, dash]
type = PlaySnd
trigger1 = time = 1
value = 2+(var(32)*10),8
loop = 1
channel = 27

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, VarSet]
type = VarSet
trigger1 = !time && prevstateno != 102
var(26) = 0

[State 100, VarSet]
type = VarSet
trigger1 = time > 10
var(26) = 1

[State 220,2]
type = ChangeState
trigger1 = command = "holdup"
value = 40

[State 100, GoToCrouch]
type = ChangeState
trigger1 = Time > 9
trigger1 = Command = "holddown" && Command != "holdfwd"
value = 15

[State 101, 6]
type = ChangeState
trigger1 = Time > 9
trigger1 = command != "holdfwd"
value = 102

[Statedef 102]
type    = S
physics = S
anim = 101+var(1)*30000
ctrl = 0
velset = 0
sprpriority = 1

[State 102, 3]
type = StopSnd
trigger1 = time = 0
channel = 27

[State 100, 4]
type = ChangeState
triggerall = var(26)
trigger1 = command = "holdfwd"
value = 101

[State 220,2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;RUN BACK
[Statedef 105]
type    = S
physics = S
ctrl = 0
anim = 105+var(1)*30000
sprpriority = 1

[State 105, 3]
type = ChangeState
trigger1 = animtime = 0
value = 106

;---------------------------------------------------------------------------
; RUN_BACK
[Statedef 106]
type    = A
physics = N
ctrl = 0
anim = 106+var(1)*30000
sprpriority = 1

[State 105, 1]
type = VelSet
trigger1 = 1
x = (const(velocity.run.back.x)*exp((const(velocity.airjump.back.x))*(time)))

[State 105, 1]
type = VelSet
trigger1 = !time
y = const(velocity.run.back.y)

[State 105, VelAdd]
type = VelAdd
trigger1 = time > 0
y = const(velocity.airjump.fwd.x)

[State -3, hop]
type = PlaySnd
trigger1 = !time
value = 2+(var(32)*10),12

[State 105, 3]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = 107

; RUN_BACK2 (land)
[Statedef 107]
type    = S
physics = S
ctrl = 0
anim = 107+var(1)*30000

[State -3, land]
type = PlaySnd
trigger1 = !time
value =  2+(var(32)*10),2

[State 106, 1]
type = VelSet
trigger1 = Time = 0
x = 0
y = 0

[State 107, CtrlSet]
type = CtrlSet
trigger1 = time = 2
value = 1

[State 106, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 106, 4]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

If you are wondering what var(1)*30000 is, that's something I use when a character has alternate animations for moves (May Lee, Leona etc). State 15 is something Scal came up with and will be explained later.

State 5050. Change the changestate for hitting the floor to

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y + Pos Y >= 0
value = 5100 ;HIT_BOUNCE

So you character changes state to when they hit the ground, instead of falling through the ground. Also add this same ctrl to state 5071, so your character goes into the bounce state when tripped instead of going into the lie down state.

Aaaaaaand because I'm getting tired, let me just paste my bounce states so you don't have to go through this. Just replace the sounds and explods for your own.

Quote
;================================================================================
; Downed get-hit (hit ground from fall)
[Statedef 5100]
type    = L
movetype= H
physics = N

[State 5100, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5100, Var] ;Save fall velocity
type = VarSet
trigger1 = Time = 0
sysvar(1) = floor(vel y)

[State 5100, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = (anim != [5051,5059]) && (anim != [5061,5069])
trigger2 = !SelfAnimExist(5100 + (anim % 10))
value = 5100

[State 5100, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
trigger1 = time = 0
trigger1 = (anim = [5051,5059]) || (anim = [5061,5069])
trigger1 = SelfAnimExist(5100 + (anim % 10))
value = 5100 + (anim % 10)

[State 5100, 4]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5100, 5]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5100, 6] ;Reduce speed
type = VelMul
trigger1 = Time = 0
x = 0.75

[State 5100, 7]
type = ChangeState
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) = 0
value = 5110 ;Downed get-hit (lying down)

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = 2+(var(32)*10),5
channel = 1
volume = 200

[State 5100, Explod]
type = Explod
trigger1 = !time && (sysvar(1) < 14)
anim = 12000
pos = 0,0
postype = p1  ;p2,front,back,left,right
sprpriority = -4
ownpal = 1

[State 5100, 9]
type = HitFallDamage
trigger1 = Time = 3

[State 5100, 11]
type = PosFreeze
trigger1 = 1

[State 5100, 12]
type = ChangeState
trigger1 = AnimTime = 0
value = 5101 ;Downed get-hit (bounce off ground)

[State 5100, 13]
type = ForceFeedback
trigger1 = Time = 0
waveform = sinesquare
ampl = 128,-3,-.2,.005
time = 20
;================================================================================
; HIT_BOUNCE (bounce into air)
[Statedef 5101]
type    = L
movetype= H
physics = N

[State 5101, 1] ;Coming hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5101,5109]
trigger2 = !SelfAnimExist(5160 + (anim % 10))
value = 5160

[State 5101, 2] ;Coming hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5101,5109]
trigger1 = SelfAnimExist(5160 + (anim % 10))
value = 5160 + (anim % 10)

[State 5101, 3]
type = HitFallVel
trigger1 = Time = 0

[State 5101, 4]
type = VelSet
trigger1 = Time = 0
y = -3

[State 5101, 5] ;Acceleration
type = VelAdd
trigger1 = time > 0
y = gethitvar(yaccel)

[State 5101, 6] ;Hit ground
trigger1 = Pos Y + Vel Y >= 0
type = ChangeState
value = 5110
;================================================================================
; HIT_LIEDOWN
[Statedef 5110]
type    = L
movetype= H
physics = N
[State 5110, 0]
type = ChangeState
trigger1 = 1
value = 5111
;================================================================================
; HIT_LIEDOWN
[Statedef 5111]
type    = L
movetype= H
physics = N
velset = 0,0

[State 5110, EnvShake]
type = FallEnvShake
trigger1 = Time = 0

[State 5110, 1] ;For hit up/up-diag type (from state 5081)
type = ChangeAnim
persistent = 0
trigger1 = SelfAnimExist(5110 + (anim % 10))
trigger1 = anim = [5081,5089]
value = 5110 + (anim % 10)

[State 5110, 2] ;Hit ground anim (normal)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim != [5161,5169]
trigger2 = !SelfAnimExist(5170 + (anim % 10))
value = 5170

[State 5110, 3] ;Hit ground anim (for hit up)
type = ChangeAnim
triggerall = time = 0
triggerall = anim != [5110,5119] ;Not already changed anim
trigger1 = anim = [5161,5169]
trigger1 = SelfAnimExist(5170 + (anim % 10))
value = 5170 + (anim % 10)

[State 5110, 4]
type = HitFallDamage
trigger1 = Time = 0

[State 5110, 5]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5110, Var] ;Get fall velocity
type = VarSet
trigger1 = Time = 0
trigger1 = GetHitVar(fall.yvel) != 0
sysvar(1) = floor(vel y)

[State 5100, 10]
type = PlaySnd
trigger1 = Time = 1
value = 2+(var(32)*10),5
channel = 1
volume = 200

[State 5110, 8]
type = VelSet
trigger1 = Time = 0
y = 0

[State 5110, 9] ;For hit up type
type = ChangeAnim
persistent = 0
triggerall = anim = [5171,5179]
triggerall = SelfAnimExist(5110 + (anim % 10))
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
value = 5110 + (anim % 10)

[State 5110, 10] ;For normal
type = ChangeAnim
persistent = 0
triggerall = Anim != [5111,5119]
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
value = 5110

[State 5110, 11] ;If just died
type = ChangeState
triggerall = !alive
trigger1 = AnimTime = 0
trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
trigger3 = Anim = [5110,5119]
value = 5150

[State 5110, 11] ;If just died
type = ChangeState
trigger1 = time = 10 + 10*(anim=5111||anim=5112)
value = 5120

[State 5110, 12]
type = VarSet
trigger1 = SysVar(0)
trigger1 = Time = 0
sysvar(0) = 0

[State 5110, 13] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5110, 14]
type = ForceFeedback
trigger1 = alive
trigger1 = Time = 0
time = 8
ampl = 240
waveform = sine

[State 5110, 15]
type = ForceFeedback
trigger1 = !alive
trigger1 = Time = 0
ampl = 200, 7, -.467
time = 30
waveform = sine
;================================================================================
; HIT_GETUP
[Statedef 5120]
type    = L
movetype= I
physics = N

[State 5120, 1a] ;Get up anim (normal)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim != [5111,5119]
trigger2 = !SelfAnimExist(5120 + (anim % 10))
value = 5120

[State 5120, 1b] ;Get up anim (for hit up/diag-up)
type = ChangeAnim
triggerall = time = 0
trigger1 = anim = [5111,5119]
trigger1 = SelfAnimExist(5120 + (anim % 10))
value = 5120 + (anim % 10)

[State 5120, 2]
type = VelSet
trigger1 = Time = 0
x = 0

[State 5120, 3]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5120, 4]
type = HitFallSet
trigger1 = AnimTime = 0
value = 1

[State 5120, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------------------
; HIT_FALLRECOVER (on the ground)
[Statedef 5201]
type    = S
movetype= H
physics = N
anim = 5200

[State 5201, 1]
type = Turn
trigger1 = Time = 0
trigger1 = p2dist X < -5

[State 5201, 3]
type = PosSet
trigger1 = Time = 0
y = 0

[State 5201, VelSet]
type = VelSet
trigger1 = !time
x =-11.5
y = 0

[State 5201, VelSet]
type = VelSet
trigger1 = time = 1
x = -7.921875

[State 5201, VelMul]
type = VelMul
trigger1 = 1
x = 0.8125

[State 750, Push]
type = PlayerPush
trigger1 = 1
value = 0

[State 5201, 4]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 705, 1]
type = SelfState
trigger1 = Animtime = 0
value = 0
ctrl = 1

This isn't cheating! There's really nothing to explain here but this will make your bounce/liedown states more KOF like. :P

That covers this part of the tutorial. If you'd like me to go into detail about the liedown states, I can (grudgingly). Or if there is something that should be expanded on, feel free to mention it.
Re: Interactive KOF Character Tutorial
#14  April 04, 2013, 09:16:09 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Aw I forgot about that post merging thing! D:

The previous post was updated.
Re: Interactive KOF Character Tutorial
#15  April 05, 2013, 05:43:18 pm
  • avatar
  • *
I have looked at your characters for a while and have wanted to have a good KOF template to start with. I hope to see more KOF coding from you. Especially authentic system mechanics.
Re: Interactive KOF Character Tutorial
#16  April 05, 2013, 07:42:45 pm
  • ******
  • KOF Spriter
This is very interesting, and I was actually wondering about var(1)*30000 and Var15

TELL ME MORE, YARGH
Re: Interactive KOF Character Tutorial
#17  May 01, 2013, 06:16:17 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Part 3-2:  Artmoney, the heads and tails. Plus clearing up things mentioned in Vans' data tutorial.

Now for the fun part. Using artmoney to get data. Obviously you'll need artmoney for this part. Available from here:

http://www.artmoney.ru/

This part of the tutorial is mainly a reiteration of Vans' KOF Data Tutorial found (you'll also need his artmoney tables):

Here: http://www.vans.trinitymugen.net/
Here: http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299
and here: http://mugenguild.com/forum/topics/kof-data-tutorial-90085.msg784274.html#msg784274

Most of the instructions are self explanatory, so I'll just go over some key parts

Quote
Click on "Search", and use type "Custom". Uncheck everything but "Integer 2 bytes" and click OK. Click OK again to start the search.

Now move the character a bit to the right and press "filter", "Unknown value", "was increased". Click OK.

Now move the character all the way to the left again and click on "filter", Exact value = "480", click OK.

A few values should be on the list at your left, select one of them and select "P1 Pos X" on the list at the right and press CTRL + A (or right click and apply offset to all). You will know you synced with the correct value when the character no longer moves if you "freeze" the Pos X.

-There's an easier way to do this. Move p2 all the way to the right and move p1 all the way to the left.
-Click on "search" and use type "Integer (standard)" Search as "exact value = "480""
-move p1 all the way to the right so they are right next to a cornered p2
-click on "filter", Exact value = 704", click OK.
-You should get 3 to 4 search results. It's usually the 2nd value if you have 4 results and the 1st if you have 3.
-select "P1 Pos X" on the list at the right and press CTRL + A Noooo~
-select "P1 Pos X" on the list at the right and press Alt + A

and your kawaks will be synched to artmoney. So let's get some vels. :D

Still using Kyo 98 as my example, I have him move forwards. Artmoney shows "P1 Vel X Integer" as "3" and "P1 Vel X Float" as "5376." The integer is good as is to add to mugen, but the float needs to be converted to decimal. To get this from a "positive" velocity, divide the float by 65536. In this case we get 0.08203125. So Kyo's walk.fwd in mugen will be 3.08203125, which of course is the total of the Interger + the converted float.

When we have Kyo walk backwards, Artmoney shows "P1 Vel X Integer" as "65532" and "P1 Vel X Float" as "60160." Clearly this isn't right (well it is, but you know what I mean). This is how "negative" values appear. Here's how you convert them. For a negative integer, subtract 65535 from it. In this case we get -3. For a negative float, subtract 65536 (-5376)  and then divide a positive version of that result by 65536. This gives us 0.08203125.

Spoiler, click to toggle visibilty

I was gonna go to Y velocites next, but let's cover something a lot more advanced involving x vels (besides you can just use Vans' tutorial for that). You can skip this part and do it the "easy" way as mentioned in Vans' tutorial.

Spoiler: X vels the hard way (click to see content)

Now for Y velocities. Still using kyo, I tap (not hold) up, the pause. Before Kyo even jumps it shows the y integer as 10 and the float as 16896. This means that his jump.neu is 0,-10.2578125 (the 0 is the x vel). Artmoney shows the "P1 Vel Y yaccel" as 40448. After converting that gives us 0.6171875. This is our yaccel in mugen. One tick before Kyo jumps his jump vel drops to 7 int 4992 float or 7.076171875. This is the 1st vel of Kyo's short hop. By tapping up to jump instead of holding, You're able to get both vels at once. But where do you put the short hop vel in mugen? I'll explain that in the next part.

Vans' tutorial mentions all the other basic things you need to know, so I'll just give you a few tips:

-Know when to use posadd and when to use velset
-The max life in 2002 is 102, 103 in 98 and 120 in 2002 UM. I don't know the rest. :D
-You can get positive x values in artmoney for moves with negative x values, by performing that move when your character is facing left.

Before my browser crashes again, I'm gonna wrap up this section of the tutorial. If you have anything to ask/add, please feel free to do so.
Last Edit: May 03, 2013, 06:11:39 pm by KoopaKoot
Re: Interactive KOF Character Tutorial
#18  May 02, 2013, 10:50:43 am
  • avatar
  • ****
I got a question:
Quote
When we have Kyo walk backwards, Artmoney shows "P1 Vel X Integer" as "65532" and "P1 Vel X Float" as "60160." Clearly this isn't right (well it is, but you know what I mean). This is how "negative" values appear. Here's how you convert them. For a negative integer, subtract 65535 from it. In this case we get -3. For a negative float, subtract 65556 (-5376)  and then divide a positive version of that result by 65536. This gives us 0.08203125.
shouldn't this be 65535?
60160-65556 = -5396
60160-65535 = -5376
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#19  May 03, 2013, 06:11:53 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Fixed.

      Posted: June 02, 2013, 08:08:21 pm
Please excuse my tardiness. I wanted to have the character complete so I could explain everything without a hitch. :)

Part 3-3: Hitdefs and Juggling

Coding a move with correct positioning and velocities should be easy to you know, so it's time to explain the hitdefs. Luckily for you (and me) Vans made a post back at the ranch that explains most of what I wanted to explain about hiidefs. So I'm gonna be super cheeky and paste that here:

Quote
sparkxy

There's no reliable way of getting sparkxy that I know of. I usually try to get the y position of the spark relative to P2, and run with that.

Other times, I align it by eye (I am a very lazy person when it comes to this). Keep in mind that the x-parameter depends on P2.

Pausetimes, keep in mind pausetime is the number of ticks the character will be frozen for.

In Iori's example, his standing D lasts for 4-frames. If this attack hits, Iori is frozen in this frame for 16 ticks.

This means that the pausetime is the difference between these two values, 16-4 = 12. 12 ticks of pausetime.

Calculating guard pausetimes uses the same principle.

Priority. Impossible, there is no "priority" concept in KOF, everything is decided via CLSN.

The only reason we all keep using these priority parameters is because they were standards set by previous KOF creators (CCIronmugen, OrochiKOF97 among others).

We keep them in order to maintain whatever sense of balance we managed to achieve. But technically, priority should be the same for every single move.

Guard.ctrltime

This value starts counting from pausetime onwards. To calculate, hit an opponent. As soon as they enter the blocking animation, start counting down.

For Iori's close HP you can clearly see it lasts for 28 ticks.

Air.velocity. KOF uses exponential friction for several air gethits, it has only been recently that we've started adding these via custom states.

The values you see in Iori_WLS are merely approximations to replicate the same velocity structure using MUGEN's calculations.

The only way around this is making everything a custom state, but by doing that you are violating a fellow author's gameplay standards. This (in my case) should be avoided as much as possible, and due to this, I've decided to use approximations for these values in order to preserve my opponent's states.

The custom states will be explained in the last (next) part of the tutorial. Now I'll add some additional info.

-For triggers, don't use !time or time = 0. If you see this in my old characters, it's because I was a lazy so and so who couldn't be bothered to do it right. By using those triggers, your hitdef will not respond correctly to changes from other triggers. For example, if you want a move to only hit an airborne opponent, it will only check on the first tick. So if p2 was on the ground when the move starts and in the air when the move is about to hit, it may miss.

-Mugen can be buggy at times and you need to keep this in mind. Using p1stateno and p2stateno in a hitdef that isn't a throw can lead to problems if 2 of the same hitdefs trade with one another. Moves with reversaldefs and hitdefs can sometimes add extra hits when they shouldn't (I don't know how to fix this (Cyanide help!)).

Projectiledefs have the same problems as hitdefs with !time triggers. I would recommend using helpers with hitdefs to make projectiles as it's easier to control their functionality. If you really want to use projectilesdefs, you may want to try having a projectile that lasts only one tick (so it responds to the situation in real time, but this is a waste of time).



Now I will explain juggling. It's done with magic/science/however mugen feels like. This concludes this section of the tutorial.

Ahem.

I used a modified version of the method listed in this post:

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

You can use vars to set what moves juggle and....I really don't want to explain how to do this just yet. Everyone has their own way of doing juggling so I would recommend trying stuff out that suits you (hell, K.O.D was able to get juggling to work without any fancy juggle code (more or less)).

This concludes this section of the tutorial. The next part will be the last part and will cover custom states. I was hoping that this thread would stay open for discussions afterwards or maybe if people wanted help in doing character specific things, they could ask.
Last Edit: August 05, 2013, 09:04:58 am by KoopaKoot
Re: Interactive KOF Character Tutorial
#20  June 03, 2013, 11:08:23 am
  • ******
  • I'm not pushing you away,
  • I'm pulling *me* towards myself!
    • USA
    • network.mugenguild.com/jmorphman