YesNoOk
avatar

Interactive KOF Character Tutorial (Read 77426 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
Re: Interactive KOF Character Tutorial
#21  June 03, 2013, 11:14:14 am
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
TBH I'm not sure there is much difference. I'm not sure exactly what that bug affects.
Re: Interactive KOF Character Tutorial
#22  June 03, 2013, 04:52:14 pm
  • ******
  • [E]
    • Mexico
not 13, 12 ; winmugen ignores one tick of pause time on the attacker, so if the attacker's frame last 5 ticks and you have 15 of pause time the frame will last 19 frames instead of 20, so you add 1 tick for winmugen, 16 in this case (there is one exception to the rule when teh pause time is 0 or 1 , nto sure but in practice it should not matter), so for mugen 1.0 you use the real pause time, 15 in this case.
Re: Interactive KOF Character Tutorial
#23  June 04, 2013, 05:26:48 am
  • ******
  • I'm not pushing you away,
  • I'm pulling *me* towards myself!
    • USA
    • network.mugenguild.com/jmorphman
Re: Interactive KOF Character Tutorial
#24  August 04, 2013, 10:53:51 pm
  • *
  • Quien coño te crees que soy!!!!!!
Would you please deepen in the 2003 ripping and animations taking please? I guess its the harder one to do.
Re: Interactive KOF Character Tutorial
#25  August 05, 2013, 09:03:17 am
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Re: Interactive KOF Character Tutorial
#26  August 05, 2013, 09:06:07 am
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Double Post because I fixed something in section 3-3. What else is there to talk about? I think I covered all the important parts.
Re: Interactive KOF Character Tutorial
#27  August 05, 2013, 09:00:37 pm
  • *
  • Quien coño te crees que soy!!!!!!
Ok, I used kong rips too, but for animations i like to know if there is a way to stop characters moving arroung or to see the "debug" character, I try every dipswitch and only send me a lot of numbers.... its for animations count principally
Re: Interactive KOF Character Tutorial
#28  August 05, 2013, 10:18:17 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
It could be possible with an artmoney table.
Re: Interactive KOF Character Tutorial
#29  November 12, 2013, 09:03:19 am
  • avatar
  • ****
For ripping sound, other than using Caname, are there any way to rip the sound from the game?
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#30  November 13, 2013, 04:24:50 am
  • ****
  • (o.O)!
  • MadkaT Was Here
    • Guernsey
    • a@b.xxx
    • Skype - admin
    • network.mugenguild.com/madkat
You could use winkawaks, the + and minus keys in the numeric pad and a sound recorder.
<- Foros Mugen en español. And also English forums.
Re: Interactive KOF Character Tutorial
#31  January 25, 2014, 05:26:21 pm
  • ***
  • Pro boxer
  • Meat!
    • dssunit.com
Hi, sorry for reviving topics. I have a question. For KOF projectiles in general (normal/super) do you recommend to use a Helper instead of MUGEN's classic Projectile controller?


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

Wait, nobody cares but I never used priority stuff on my characters' Hitdef. xD
Orochi did, though...
Re: Interactive KOF Character Tutorial
#32  January 25, 2014, 05:42:32 pm
  • ******
To add on to that question, it was mentioned that air.velocity was best done through approximation (unless using custom states were applied, which wouldn't work ideally). What would be a recommended yaccel number to prevent the character from falling all floaty and stuff? Also, (when they're not in a fall state) doesn't yaccel vary between characters in commercial games?

Btw, thanks for the tutorials... they helped me a whole lot.
Re: Interactive KOF Character Tutorial
#33  January 25, 2014, 05:44:53 pm
  • ****
    • Japan
I recommend going with helpers, they end up being very easy to update down the line.

One persistent problem with projectiles is that you can't control them after they're created. This is a problem with juggle systems since there's no reliable way of telling them not to hit anything anymore, this problem is of course fixed by using a helper.

It has been troublesome trying to setup a proper standard for helper projectiles though, but we're working on it. :)

I say helpers 100% all the way, they're easy to update and end up being the most compatible once you are able to detect projectiles made with the classic proj controller.

      Posted: January 25, 2014, 05:55:34 pm
To add on to that question, it was mentioned that air.velocity was best done through approximation (unless using custom states were applied, which wouldn't work ideally). What would be a recommended yaccel number to prevent the character from falling all floaty and stuff? Also, (when they're not in a fall state) doesn't yaccel vary between characters in commercial games?

Btw, thanks for the tutorials... they helped me a whole lot.

I'll try to explain it to the best of my ability. :P

KOF has several types of aerial gethit animations:

- Back gethit (such as a CD attack, or being hit by a Dokugami from Kyo)
- Launcher gethit (such as getting hit by an Oniyaki or Angel's down+C)
- Super launcher (getting hit by Kim's Hou'ou Hiten Kyaku)
- Spinning fall [and super spinning fall] (getting hit by Kyo's Nanase, Galactica Phantom)
- Spinning launcher (getting hit by Saika, Bari Bari Vulcan Punch's finish, K's Chain Drive)
- (And so on, counter wire, sliding on ground, etc. I'll focus on the first 3 first).

The first one is the very basic and can be done with MUGEN hitdefs (Data is -4.5,-7 with yaccel of 0.5). The rest are quite different.

Basically KOF likes using exponential friction in order to make acceleration in the ground but this is also true for the very special aerial gethits, like the ones I mentioned above. This "friction" is what gives them that really solid feeling, it cannot be recreated properly using MUGEN's veladd system.

What I used to do before programming the custom states was matching the opponent's maximum height and/or airtime, whichever makes the fall be longer. The most important part is making sure combos work properly.

The best solution would be using the custom states though (and thankfully we've got most of them covered now).

As for your second question, correct.

In commercial games the yaccel or gravity parameter is usually different between characters since it depends on their build and how they're supposed to feel. :)
Last Edit: January 25, 2014, 05:57:36 pm by Vans
Re: Interactive KOF Character Tutorial
#34  January 26, 2014, 12:49:02 am
  • ***
  • Pro boxer
  • Meat!
    • dssunit.com
Thanks for the answer Vans.
By the way, is there a way to get something like "projpriority" working on projectile helpers? I am talking about projectile helper VS projectile helper, but also projectile helper VS regular projectile (if you get what I mean).
Re: Interactive KOF Character Tutorial
#35  January 28, 2014, 11:19:31 am
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
You can use a varset to give a projectile "hitpoints" I'm bad at explaining things with just words, so I'll explain it with code:

Code:
[State 1, Anim]
Type = ChangeAnim
Trigger1 = !Time && !prevstateno
Value = 3005 ;This stops the projectile anim from resetting whenever it goes back into this state

[State 1, projectiles only]
type = HitBy
trigger1 = 1
value = SCA, NP, SP, HP ;Can only be hit by projectiles
ignorehitpause = 1

[State 1, Override]
type = HitOverride
trigger1 = !time
attr = SCA, AA, AP, AT ;But can override anything just in case
stateno = stateno ;Goes into the same state
time = -1
slot = 2
ignorehitpause = 1

[State 1 VarSet]
type = VarSet
trigger1 = !time && !prevstateno
var(5) = 5 ;this is the primary "hitpoint" value set when the projectile is created
[State 1, VarAdd]
type = VarAdd
trigger1 = !time && prevstateno
var(5) = -1 ;Whenever the projectile goes back into this state it loses a "hitpoint"
ignorehitpause = 1
persistent = 0

[State -2, FlagHit]
type = VarSet
trigger1 = Movecontact && NumTarget
var(5) = 0 ;This is a safety for when the projectile makes contact with a character and the changestate doesn't activate
ignorehitpause = 1

[State 1, hits a projectile or is parried]
type=changeState
trigger1 = movecontact && !NumTarget
value= ifelse(var(5)=0,stateno+1,stateno)
ignorehitpause = 0

[State 1000, DestroySelf]
type = DestroySelf
triggerall = time > 1
trigger1 = FrontEdgeDist <= -40; flies off screen

[State 1005, End]
type=changeState
trigger1 = movecontact && NumTarget ;hits an opponent
trigger2 = var(5) <= 0 ;has run of hitpoints
value= stateno+1
ignorehitpause = 0
Re: Interactive KOF Character Tutorial
#36  January 28, 2014, 07:27:21 pm
  • ***
  • Pro boxer
  • Meat!
    • dssunit.com
Oh I see, now we only have to add velocities if needed and hitdef. Thank you very much. =)
By the way what's up with "[State 1" and "[State -2" ?
Re: Interactive KOF Character Tutorial
#37  January 28, 2014, 07:31:44 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
random numbers :P

      Posted: February 19, 2014, 08:44:36 pm
Because I'm lazy (I'm working on that, I promise) I always try to streamline things as much as possible. So instead of using a calculator when checking damages, I just made a list of all the possible damage values. Since 2002 UM is the standard I'm using at the moment I'll share that file.

Here it is

Also this is useful if you are converting a character from one style to the other and don't want to use the damages from that game (because of different scaling, etc).



Jmorphman updated the optional animation standards thread's first post, but I'm going to highlight the parts relevant to this thread:

Spoiler: Collapse/Cheese Kill/Crumple - 5950, 5955, (click to see content)

Spoiler: KOF hard knockdown - 5420, 5421, 5422, 5423, 5424, 5430 (click to see content)

Spoiler: Throw Escape/Tech Hit - 5940 (click to see content)

Spoiler: Throw has been escaped out of - 5945 (click to see content)
what have I gotten myself into???

Be sure to go over those notes that he made if you are adding those animations to your sprites.

This concludes the revival post. Next tutorial will go over custom KOF states.
Last Edit: February 19, 2014, 08:45:58 pm by KoopaKoot
Re: Interactive KOF Character Tutorial
#38  February 19, 2014, 08:45:37 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Forgot to un-tick merge box. Bump (sorry).
Re: Interactive KOF Character Tutorial
#39  February 24, 2014, 09:13:03 am
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
This section (not checking what number) will cover custom states and when to generalise them.

The majority of KOF custom states have already been made by Vans and myself. They are not difficult to make. I will go over a few situations that may occur when making these states.

-Since these are customs states, you may as well get the correct velocities if applicable. Be wary when getting vels as artmoney has a tendency of displaying vels 1 tick late. There's a chance the initial vels won't even appear.

 

KOF has a tendency to start with simple numbers, whole numbers or .5s etc. It's obvious that the y vel is actually 9. So what about the x vel? Does the word "exponential"  still scare you? It's not that bad. We can get mugen to tell us the answer.

Code:
[State 10900, 1]
type = VelSet
trigger1 = time < 7
x = ifelse((facing=enemynear,facing),((abs(gethitvar(xvel))*exp((-0.20763936477824450161544104426739)*(time)))),(-(abs(gethitvar(xvel))*exp((-0.20763936477824450161544104426739)*(time)))))


Spoiler: method (click to see content)

This controller takes the x vel provided the the appropriate hitdef (in this case x = 15.4375) and applies exponential friction to it for the first 6 ticks. The ifelse checks to see which way the opponent is facing when they get hit since mugen doesn't like x deceleration.



You can see the vel appeared correctly. Now we can get mugen to calculate the actual vel by making the velset controller activate a tick early:

Code:
[State 10900, 1]
type = VelSet
trigger1 = time < 7
x = ifelse((facing=enemynear,facing),((abs(gethitvar(xvel))*exp((-0.20763936477824450161544104426739)*(time)))),(-(abs(gethitvar(xvel))*exp((-0.20763936477824450161544104426739)*(time-1)))));time changed to time-1




and now we have a nice 19. Then we change the velset controller back so it triggers correctly and the hitdef to the correct values.

The next section will go over animation timings.
 
Last Edit: February 24, 2014, 09:23:35 am by KoopaKoot
Re: Interactive KOF Character Tutorial
#40  May 22, 2015, 04:43:56 pm
  • avatar
  • ****
Hi, I have got some basic attack hitdef questions that I am stuck:

- Can anyone explain to me how do I use this formula to calculate the damage?:
Code:
damage = floor(42*ifelse(var(56),1.25,1)) 
I tried to figure out for weeks and I still can't get it.
- for air.velocity, I am still not sure how this is calculated, can anyone explain more in depth about the calculation of the air.velocity?
- For the crouch strong kick attack hitdef, I tried to figure out the yaccel which is this:
Code:
yaccel = 0.807692307692307692307692307692308
and also the fall.yvelocity
Code:
fall.yvelocity = -2-(p2statetype=A)*0.5
they are very much different from the rest of the yaccel and I can't figure out how this is calculated, can anyone explain in-depth on how I should calculate these?
<- I exercise like that regularly!
Last Edit: May 22, 2015, 04:46:59 pm by tehdevil
Re: Interactive KOF Character Tutorial
#41  May 22, 2015, 08:13:15 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Okay. Let me see if I can answer those for you:

- Can anyone explain to me how do I use this formula to calculate the damage?:
Code:
damage = floor(42*ifelse(var(56),1.25,1)) 
I tried to figure out for weeks and I still can't get it.

This one is pretty simple. If var(56) (counter hit check) is true, than the damaged will be multiplied by 1.25 (floor is used to round it down to an integer, since you can't use floats for damages). So 42*1.25 = 52.5 which is rounded down to 52
 If var(56) = 0, than the damage will be multiplied by 1 giving the same value. 42*1 = 42

- for air.velocity, I am still not sure how this is calculated, can anyone explain more in depth about the calculation of the air.velocity?

The x vel is an approximation used because x vels in get hit states don't use friction when you are in the air. The actual value is 12 (I guess) and it should looks something like this in KOF

Code:
[State -2, VelSet]
type = VelSet
trigger1 = time < 6
x = (-12*exp((-0.20763936477824450161544104426739)*(time)))

once 6 ticks have passed the friction stops and the vel remains the same until the character hits the ground. Implementing this for common get hit states would be a nightmare and a half, so I wouldn't bother with it. However if you are curious and want to make everything with customs states, you can take a look at some of the custom states that Vans and I made.

as for calculating the fall vels....artmoney has a tendency to show values one tick late, so you may need to add the yaccel to the y value you find and for x vels with friction, divide with the mul you find.
Like if you were making someone with a fast dashing kick move and you got x = 19.5 with a mul of .8125 and something doesn't feel right, try dividing the x vel with the mul. 19.5 / 0.8125 = 24.



Hope that helps you out. Well....you really shouldn't need to recalculate get hits since you can just use the values that I use. :P
Re: Interactive KOF Character Tutorial
#42  May 24, 2015, 10:36:16 am
  • avatar
  • ****
Hope that helps you out. Well....you really shouldn't need to recalculate get hits since you can just use the values that I use. :P
Yeah, I notice all characters uses the same air.velocity and fall.yvelocity value  :P


- Can anyone explain to me how do I use this formula to calculate the damage?:
Code:
damage = floor(42*ifelse(var(56),1.25,1)) 
I tried to figure out for weeks and I still can't get it.

This one is pretty simple. If var(56) (counter hit check) is true, than the damaged will be multiplied by 1.25 (floor is used to round it down to an integer, since you can't use floats for damages). So 42*1.25 = 52.5 which is rounded down to 52
 If var(56) = 0, than the damage will be multiplied by 1 giving the same value. 42*1 = 42

The calculation of damage value is weird, I am not sure did I use the damage calculation formula wrongly or something, this is how I calculated the damage by using weak close punch as an example:

from your Kyo:
Code:
;CLOSE A
[Statedef 200]
type    = S                     
movetype= A                   
physics = S                   
velset = 0,0                   
ctrl = 0                       
anim = 200 
poweradd= 0                               
sprpriority = 2 
juggle =10   
facep2 = 1

[State 200, snd]
type=playsnd
trigger1= animelem=1 && random<500
value=200,0
channel=0 

[State 200, Punch Attempt Sound]
type = Playsnd
trigger1 = time = 0
value = 3+(var(32)*2),0

[State 205, 1]
type = HitDef
triggerall = var(40) < 1 || var(57) > 0 || var(16) > 0
trigger1 = AnimElemtime(2) >= 0 && animelemtime(3) < 0
[b]damage = floor(42*ifelse(var(56),1.25,1))[/b]
sparkno = s17000+(var(31)*10000)
sparkxy = -10, -80
hitsound = s3+(var(32)*2+((random%3)*var(32))),1
guardsound = s3+(var(32)*2), 12
guard.sparkno = s17500+(var(31)*10000)
attr = S, NA
animtype = Light
air.animtype = Back
ground.type = High
guardflag = MA
hitflag = MAF
priority = 6, Hit
pausetime = 7,9
guard.pausetime = 7,8
ground.slidetime = 9
ground.hittime = 8
guard.hittime = 8
guard.slidetime = 9
guard.ctrltime = 16
ground.velocity = -5.796875
air.velocity = -4.5,-7
air.juggle = 0
getpower = 47,47
givepower = 16,16
air.fall = 0
forcenofall = 1
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
yaccel = .5
persistent = 0

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
So 42 is the damage value and when I check using kof98's Kyo from the art money table, it show that the damage value is 99

so when I use the formula:
Code:
damagevalue / maxlife * 1000 = MUGEN damage value
99/103 * 1000 = 961  :S

or maybe if I take 103 - 99 (I assume 99 is the life gauge that is left) and the value which 103 subtract from 99 is 4 which is the damage value and this is how I calculate:
4/103 * 1000 = 39 and it is not 42? I am confuse :S

this same goes for the power gauge, I managed to calculate all the basic attack's hitdef for getpower using Kyo from kof98's close weak punch as example:
Total kof98's powergauge is 128 so
6/128 * 1000 = 47 which is correct, but when calculating command attack and special moves, the calculation feels confusing and wrong such as I use  Kyo from kof98's Weak 75 Shiki Kai (first hitdef) as example:
Your Kyo shows get.power is 16 but when I calculate, it shows
4/128*1000 = 31 and it is not 16. I am not sure did I calculate wrongly or using the formula wrongly?
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#43  May 24, 2015, 12:25:52 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Oh that. Well the damages in KOF have a tendency to differ by 1 randomly. Your formula is correct. However the main difference is that I use 120 as the maxlife value and not 102 or 103.
Re: Interactive KOF Character Tutorial
#44  May 24, 2015, 03:47:21 pm
  • avatar
  • ****
Yup, it was stated in your previous post:
-The max life in 2002 is 102, 103 in 98 and 120 in 2002 UM. I don't know the rest. :D
120 is for 2002 Unlimited Match but still (using kyo from kof98's close weak punch as an example):
99/120*1000 = 825  :shocked2: even worst  :S
21(120-99)/120*1000 = 175
kof98 doesn't differ by 1 randomly but 2002 does, if that is the reason of having differ by 1 randomly, which one would be recommended to use to calculate the damage value?
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#45  May 24, 2015, 05:33:16 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Whichever value you get first is the one you should use.
Re: Interactive KOF Character Tutorial
#46  June 25, 2015, 09:37:01 am
  • avatar
  • ****
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.

Hi, I am confuse about the gethit animation timing. I have check the gethit animation timing from the game itself and not from the debug sprites viewer, it is different from your Kyo and your other Kof characters. Let's take Kyo's 5007 which is the recovery from Strong attack animation as an example, your Kyo's first three frame (5000,20 5000,10 5000,0)'s animation timing is 4 as shown in your air file, but when I look at kof98, it is for first frame: 3, second frame: 4 and third frame: 5. I wonder how do you calculate that the three frames' timing is 4? This same goes to the other gethits' timing as well which is pretty different.

Some of the gethits sprites doesn't have CLSN boxes in the debug sprites viewer, for instance the tripped animation 5075,0: how do I accord to draw an accurate clsn box for this sprites?

and also:
What Jesuszilla said. 1.0 is the very best when it comes to pcsx2. If you would like, I could explain how I would synch a table for the ps2 games.
Is it possible to make a tutorial for this? I wanted to find datas for Geese Howard from Kof98um since he is not available in the original kof98.
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#47  June 25, 2015, 10:07:25 am
  • ******
  • Double-Crosser
  • I'm not standing out. This isn't weird at all.
    • USA
Then don't draw them? Don't think you're supposed to draw CLSN on trip animations.
Re: Interactive KOF Character Tutorial
#48  June 25, 2015, 01:03:06 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Do draw them! Use something generic for compatibilities sake.  :laugh:
Re: Interactive KOF Character Tutorial
#49  June 25, 2015, 01:04:10 pm
  • ******
Iirc they have to be present or P2 will be able to move through P1.
Re: Interactive KOF Character Tutorial
#50  June 25, 2015, 01:07:27 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • Skype - websta786
    • www.trinitymugen.net/
You should definitely draw them, some characters combo from trip states
Re: Interactive KOF Character Tutorial
#51  June 26, 2015, 12:16:56 pm
  • avatar
  • ****
of course a collision box is needed for the trip sprites and all of the gethits sprites, otherwise I could have walk through the opponent after hitting him. It is just that some of the gethits doesn't have collision box in the debug viewer and I am not sure if it advisable to use other gethit's collision box on the gethit's sprites that doesn't have collision box? I normally trace the collision box from the debug sprite viewer's collision box to make hitbox.
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#52  January 19, 2016, 08:13:14 pm
  • ****
  • Frozen in Time
  • The seige continues...
    • USA
    • www.eternal-anomaly.com
@Koop:
Given that I fully grasp the steps of this tutorial, I don't suppose you'd have any recommendations in the instance that the emulator (version 1.64) doesn't allow me to control the debug object? :S
Latest Release: Here / Current Projects: Stage Rectifications (2nd Set) & Sprite Ripping for ???
Re: Interactive KOF Character Tutorial
#53  January 19, 2016, 08:33:17 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
I've never come across that issue. If you are having issues with that version I suggest looking for a 1.55 version of Kawaks.
Re: Interactive KOF Character Tutorial
#54  June 26, 2016, 04:53:40 pm
  • avatar
  • ****
<- I exercise like that regularly!
Re: Interactive KOF Character Tutorial
#55  June 26, 2016, 04:58:48 pm
  • ******
Oh nice, I was just looking at collision boxes for vanilla 2K2. Not sure how different they are from 02UM.

Doesn't seem to have special moves sadly but it's something.
Last Edit: June 26, 2016, 05:03:41 pm by Niitris
Re: Interactive KOF Character Tutorial
#56  July 16, 2016, 09:27:56 am
  • ***
  • I hate coding helpers.
Re: Interactive KOF Character Tutorial
#57  July 16, 2016, 09:43:25 am
  • ******
Last Edit: July 16, 2016, 09:49:56 am by Niitris
Re: Interactive KOF Character Tutorial
#58  July 16, 2016, 01:57:35 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
A very nice development. :)
Re: Interactive KOF Character Tutorial
#59  July 22, 2016, 09:20:19 am
  • **
  • WE ARE NESTS: THE NEW WORLD ORDER
    • USA
Hi. I'm looking into making a KoF character for M.U.G.E.N (it's actually my first character for the engine as well), but I get the impression that the tutorial you have assumes that the viewer is already an experienced M.U.G.E.N creator, so I'm kind of lost already. Do you think I should focus on making other types of characters for the game before I jump into your tutorial and continuing making a KoF character? I want to specifically make a version of NESTS Kyo (at least that's what it'll be). I currently use FF3.
Re: Interactive KOF Character Tutorial
#60  July 22, 2016, 02:14:47 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Oh! You are quite right. I always wondered if there was a need for a more layman like tutorial. The docs that come with mugen are very informative. I still look at them from time to time.

I think you should start wherever you want to start.
Re: Interactive KOF Character Tutorial
#61  July 23, 2016, 02:33:07 am
  • **
  • WE ARE NESTS: THE NEW WORLD ORDER
    • USA
Yes, so true. I took a look at it the other day and I managed to learn how to implement my own hit and guard sounds.

I've pretty much found a solid start in Elecbyte's tutorials, but it makes me wonder, how many M.U.G.E.N creators starting out even know if these tutorials are within the doc folder? Because I didn't for YEARS. No one told me that there were solid tutorials in the docs folder, not even Elecbyte when I started out nine years ago, mainly because they were pretty much gone for quite a bit until 2008 or so. And now they're gone again, so yeah, if any creator starting is reading this post and wants to make stuff, GO TO THE DOCS FOLDER IN YOUR M.U.G.E.N DIRECTORY.
Re: Interactive KOF Character Tutorial
#62  July 23, 2016, 02:46:45 am
  • ******
    • www.justnopoint.com/
Re: Interactive KOF Character Tutorial
#63  July 23, 2016, 08:35:29 am
  • **
  • WE ARE NESTS: THE NEW WORLD ORDER
    • USA
NIIICCCEEEE. Bookmarked for convenience!

Anyways, before we end up going off topic, do you guys happen to know how creating the running animation works, specifically making the sound loop but then stop when you release forward? I also have the "Running Animation END" part of my Kyo character in my AIR file, but I'm figuring out out to put these things together.
Re: Interactive KOF Character Tutorial
#64  July 23, 2016, 09:26:16 am
  • ******
You'd give the running sound it's own channel, and then use StopSnd in the StateDef -2.

Docs are very convenient, I'm not nearly as smart as I believe so I use them a bit. And yeah, it's best to start with something you'll be emotionally invested in because creating can get real boring at times. :P
Re: Interactive KOF Character Tutorial
#65  July 24, 2016, 12:55:11 am
  • **
  • WE ARE NESTS: THE NEW WORLD ORDER
    • USA
How do I do the same thing with jumping and crouch? I had Kyo jump fwhile running but the loop didn't stop, same with crouching too.
Re: Interactive KOF Character Tutorial
#66  July 24, 2016, 01:22:20 am
  • ******
In the StopSnd at [StateDef -2],
make sure you have trigger1 = StateNo != 100 (or whatever number the running state is).

This will make it to where the sound will only play when running, and not in any other state.
Re: Interactive KOF Character Tutorial
#67  July 24, 2016, 01:26:41 am
  • **
  • WE ARE NESTS: THE NEW WORLD ORDER
    • USA
Getting closer now. The last thing I need to figure out is how to TOTALLY stop the loop. Now the loop does stop, however, when jumping or crouching, it still plays for at least a second before it actually stops.

I'll show you my code to show you how far I've gotten:

Code:
; Run forward
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 0]
type = PlaySnd
trigger1 = Time = 0
value = S100,0
channel = 1
loop = 1

[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, 4]
type = ChangeState
trigger1 = command != "holdfwd"
value = 0

Code:
[State -2, Stop Running Loop]
type = StopSnd
trigger1 = stateno != 100
trigger1 = command != "holdfwd"
channel = 1

Re: Interactive KOF Character Tutorial
#68  July 24, 2016, 02:01:01 am
  • ******
Dunno if this is causing it but remove the command != "holdfwd" trigger below it, it's not necessary.
Re: Interactive KOF Character Tutorial
#69  July 24, 2016, 02:08:13 am
  • **
  • WE ARE NESTS: THE NEW WORLD ORDER
    • USA
Well, it's fixed now, but now I notice that if I run for maybe two seconds then stop, the sound loop doesn't stop again. I managed to figure that out by putting a StopSnd controller in the common1 cns for my character.

So I have a complete Running Animation now! XD

EDIT: OH GREAT I ALMOST FORGOT

I have to add the "Running Animation END" to the Running animation to complete it. :P
Last Edit: July 24, 2016, 03:28:55 am by Slivern
Re: Interactive KOF Character Tutorial
#70  December 26, 2016, 05:38:08 pm
  • ******
Bump.

Custom hit states, not my strongest area. I know we have animation standards, but anything I should know about coding the states so that I don't run into behavioral issues? Besides what was already mentioned because I kinda forgot to look at the previous pages?
Last Edit: December 26, 2016, 11:19:54 pm by Niitris
Re: Interactive KOF Character Tutorial
#71  December 28, 2016, 11:27:13 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
It's best to just use selfanimexist(n) as the trigger for optional animations
Re: Interactive KOF Character Tutorial
#72  March 21, 2017, 03:48:03 pm
  • *****
  • ???
    • UK
    • Skype - koopakootmugen
Rise (not "Rise up" because that will cost you like $90)!

Right now there have been some system advancements. The following parts will be slightly more advanced, but I will do my best to explain them.
Next part of the tutorial will be...buffering!