Trinity MUGEN

MUGEN => Tips, Tricks, and Tutorials. => Topic started by: KoopaKoot on February 07, 2013, 04:09:34 PM

Title: Interactive KOF Character Tutorial
Post by: KoopaKoot on February 07, 2013, 04:09:34 PM
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.




-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 (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.

(http://www.koopakoot.trinitymugen.net/Tutorials/Tutorial2.png)

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.

(http://www.koopakoot.trinitymugen.net/Tutorials/Tutorial3.png)

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).

(http://www.koopakoot.trinitymugen.net/Tutorials/Tutorial5.png)

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.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on February 07, 2013, 09:50:34 PM
Some of Kong's sprite rips have missing frame like his Iori99 when I was building his sff, it is advise to use winkawaks to observe the missing frame and rip it from there
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on February 09, 2013, 03:13:48 PM
-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"

(http://www.koopakoot.trinitymugen.net/Tutorials/Tutorial4.png)

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

(http://www.koopakoot.trinitymugen.net/Tutorials/Tutorial6.png)

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.

(http://www.koopakoot.trinitymugen.net/Tutorials/Tutorial7.png)

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.  :sho:

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
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on February 14, 2013, 10:31:02 AM
I guess I might want to remake my :iori:'s sff since it is quite messy especially the gethits :P and will follow your method since my method is pretty long winded :P One question about your Kyo, which HSDM do you intend to add for your Kyo? From King of Fighters 2002 um's Kyo-1 or Kyo 2 or your custom made up?
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on February 14, 2013, 03:55:25 PM
I was think 524 Shiki: Kami Gomi to help out with...something else.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on February 21, 2013, 08:33:53 AM
When I was adding sprites that have jump animation, I can't seems to align them well even I use the first stance sprite axis to align them. I need to adjust the axis for the jump sprites which is pretty tiring. What I did was to rip all the jump sprites with their axis:

(http://imageshack.us/a/img577/5797/405d.png)

then I add it to my sff. Next, I add my jump sprite without the axis and align them one by one which gives me an accurate axis but it takes quite a while if the character have lots of jumping action sprites. For some sprites, I can't align them well even if I rip the sprite with its axis such as sprite 5160,0:

(http://imageshack.us/a/img94/7498/51600axis.jpg)

and I get this:

(http://imageshack.us/a/img716/3904/5160wrongalign.png)

so I use Vans's iori_wls's axis since he allow me to use his work: http://www.trinitymugen.net/forum/index.php?topic=2539.0 (http://www.trinitymugen.net/forum/index.php?topic=2539.0) and the sprite 5160,0 works perfectly. I am not sure are there any practical way to actually align this sprite accurately without using other creator's axis?
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on February 21, 2013, 11:34:52 AM
It looks like he's sinking. Did you change the landing trigger to Vel Y + Pos Y >= 0?
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on February 21, 2013, 11:43:29 AM
It looks like it's Vans' Iori that did the throw. Bounce states have always been a mess in mugen.

We make those bounce anims (5160-5162) 20 or so pixels high right?
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on February 21, 2013, 12:31:27 PM
Yeah, -20 on the Y in the .air.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on February 24, 2013, 09:28:34 AM
I see, I also adjust it with sprite 5101,1 and 5101,2. Thanks for the hint ;)
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on March 07, 2013, 09:52:54 AM
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.
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on April 04, 2013, 02:11:46 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.

Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on May 01, 2013, 11:18:00 AM
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/ (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/ (http://www.vans.trinitymugen.net/)
Here: http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299 (http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299)
and here: http://mugen (http://mugen) guild.com/forum/topics/kof-data-tutorial-90085.msg784274.html#msg784274 (fill the gap (but why))

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

QuoteClick 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.  :sho:

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]I guess now would be a good time to tell you that walk.fwd and walk.back use the same vels, but negative for back. They are also the same values as jump.fwd and jump.back (for kof 94-2002). :P[/spoiler]

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]
QuoteI will now explain the "advanced" way, the advanced way involves Euler's constant. If you take the time to observe the game, you will notice that the accel values change in each tick, this is because there is a base accel value being affected by time and Euler's constant, that means that there are only two values needed in order to calculate those velocities, a base accel and a base velocity. Can this be done in MUGEN? The answer is yes.

First off, we will need our usual three samples.

K's hard Minute Spike:

9.53125 (Tick 1)
9.08447265625 (Tick 2)
8.6586456298828125 (Tick 3)
And we will obtain the first accel value, 0.953125.

Now, the basic KOF velocity equation goes like this: y = z ・e^(w ・x); This translates to: (current vel = basevel*e^(baseaccel*time)

I'm going to skip the demonstration and show you how to use it. First you need to take the natural logarithm (ln) of that first accel value, -0.048009219186360607752003625323445. That is your base accel value.

Now with those two values you can build the controller and have NEAR PERFECT velocities, this is quite simple as it takes very little time once you are used to the system. I will build the example controller for this move (K's Heavy Minutes Spike) in order to show you how it's done.

The accurate X velset controller would be as follows:

[State 1300, Velset]
type = VelSet
trigger1 = 1 ;This controller must trigger in EVERY TICK the vel is active. Can be changed for animelemtime(X) <=/>= if needed.
x = (9.53125*exp((-0.048009219186360607752003625323445)*(time)))

"Time" used in the equation is EXTREMELY important, the time must ALWAYS be "zero" when the vel is set, that means that if you first trigger your vel in time = 3 of the character's state, you will need to use (time-3) in order for the equation to multiply by 0 in the first tick of your vel.

Umm....scary much? The part I bolded is the scary part it's never explained how such a number was acquired. HOWEVER.

Quote from: Mukashi mukashiKoopaKoot: what's the formula for finding a natural logarithm or should I just cheat with the ln button on the calculator? : P
Vans: I don't know the formula
Use the button
lol

So there you have it. If you don't have a calculator like that on your computer, use this site, http://www.calculator-tab.com/ (http://www.calculator-tab.com/) :)

[/spoiler]

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.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on May 02, 2013, 03:50:30 AM
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
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on May 03, 2013, 11:02:50 AM
Typos crash mugen!  :rpeng:

Fixed. Thanks.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on May 04, 2013, 04:20:16 AM
Since I got some free time, I would like to clarify some things:
Quote
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).
In one of my thread that I made: http://www.trinitymugen.net/forum/index.php?topic=2548.0 (http://www.trinitymugen.net/forum/index.php?topic=2548.0) there seems to be no accurate ways to get the head.pos, it need self adjusting to just get it right and quite accurate, it is just approximately untill it looks pretty simillar to the original kof game like maybe I rip a screenshot of the original kof from the kawaks emulator with clark performing his Frankensteiner on the character you plan to make like this:
(http://img543.imageshack.us/img543/4683/kof2002.png)
(With all the other sprites disable and leave only clark and your character)
What I did was to use kfm's head.pos: head.pos = -5, -90 and keep on adjusting the value from there to get it right and look exactly the same like in the original kof game by comparing the original kof screenshot and your adjusted head.pos screenshot:
Compare 1 using KFM's head.pos and kof2002's head.pos:
(http://img543.imageshack.us/img543/4683/kof2002.png)(http://imageshack.us/a/img837/7185/kfmheadpos1.png)
It is not correct so I keep on adjusting until I have got it quite right, head.pos = -5,-88 which looks pretty much the same as in original kof:
Compare 2 using adjusted head.pos and kof2002's head.pos:
(http://img543.imageshack.us/img543/4683/kof2002.png)(http://imageshack.us/a/img17/6025/correctheadpos.png)
that is how I get the head.pos


Another request:
For your Coding. Constants and Overrides, is it possible to show which sprite and animation is used for that part of code like in this way:

(http://imageshack.us/a/img689/9296/1050x.png)
Quote
;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

(http://imageshack.us/a/img844/9184/1051j.png)
Quote
; 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

(http://imageshack.us/a/img42/5313/1060.png)
Quote
[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

because it is pretty confusing especially the Downed get-hit (hit ground from fall) up till the HIT_FALLRECOVER (on the ground)'s state. Sorry if it is pretty troublesome as I want to understand it more. I would also like all the codes that you are going to explain it in this way in future, maybe I would understand it more and clearer.

and one last request:
could you explain this in more depth what it does:
QuoteState 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.
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on May 30, 2013, 01:48:31 PM
Time for the long awaited reply (ran out of excuses).  :sho:

I never said there was an accurate way to get head.pos. I explained what looks best and my reasoning. The only way to get head pos 100% accurate is to make the move that targets the opponent's head character specific (I did this for the Whip in my full game).

https://www.youtube.com/watch?v=kUpmWMgf_LU (https://www.youtube.com/watch?v=kUpmWMgf_LU) (like so)

As for showing which sprite goes with an anim, that wouldn't be advisable as every character has their own unique frame/s for moves like that.

This ctrl:

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

Is a replacement for:

[State 5050, 6]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= ifelse((anim = [5051,5059]) || (anim = [5061,5069]), 0, Const(movement.air.gethit.groundlevel))
value = 5100 ;Downed get-hit (hit ground from fall)

This ensures that p1 changes to the correct state as soon as they reach ground level. This is how it looks with the latter ctrl:

(http://www.koopakoot.trinitymugen.net/Screens/mugen140.png)

and I think that about covers it.
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on June 02, 2013, 01:09:39 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 here that explains most of what I wanted to explain about hiidefs. So I'm gonna be super cheeky and paste that here:

Quotesparkxy

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.

Keep in mind that if the mugenversion is 1.0, these become 11 for the attacker.

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 (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.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on June 20, 2013, 11:30:48 PM
Quote from: KoopaKoot on May 01, 2013, 11:18:00 AM
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/ (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/ (http://www.vans.trinitymugen.net/)
Here: http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299 (http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299)
and here: http://mugen (http://mugen) guild.com/forum/topics/kof-data-tutorial-90085.msg784274.html#msg784274 (fill the gap (but why))

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

QuoteClick 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.  :sho:

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]I guess now would be a good time to tell you that walk.fwd and walk.back use the same vels, but negative for back. They are also the same values as jump.fwd and jump.back (for kof 94-2002). :P[/spoiler]

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]
QuoteI will now explain the "advanced" way, the advanced way involves Euler's constant. If you take the time to observe the game, you will notice that the accel values change in each tick, this is because there is a base accel value being affected by time and Euler's constant, that means that there are only two values needed in order to calculate those velocities, a base accel and a base velocity. Can this be done in MUGEN? The answer is yes.

First off, we will need our usual three samples.

K's hard Minute Spike:

9.53125 (Tick 1)
9.08447265625 (Tick 2)
8.6586456298828125 (Tick 3)
And we will obtain the first accel value, 0.953125.

Now, the basic KOF velocity equation goes like this: y = z ・e^(w ・x); This translates to: (current vel = basevel*e^(baseaccel*time)

I'm going to skip the demonstration and show you how to use it. First you need to take the natural logarithm (ln) of that first accel value, -0.048009219186360607752003625323445. That is your base accel value.

Now with those two values you can build the controller and have NEAR PERFECT velocities, this is quite simple as it takes very little time once you are used to the system. I will build the example controller for this move (K's Heavy Minutes Spike) in order to show you how it's done.

The accurate X velset controller would be as follows:

[State 1300, Velset]
type = VelSet
trigger1 = 1 ;This controller must trigger in EVERY TICK the vel is active. Can be changed for animelemtime(X) <=/>= if needed.
x = (9.53125*exp((-0.048009219186360607752003625323445)*(time)))

"Time" used in the equation is EXTREMELY important, the time must ALWAYS be "zero" when the vel is set, that means that if you first trigger your vel in time = 3 of the character's state, you will need to use (time-3) in order for the equation to multiply by 0 in the first tick of your vel.

Umm....scary much? The part I bolded is the scary part it's never explained how such a number was acquired. HOWEVER.

Quote from: Mukashi mukashiKoopaKoot: what's the formula for finding a natural logarithm or should I just cheat with the ln button on the calculator? : P
Vans: I don't know the formula
Use the button
lol

So there you have it. If you don't have a calculator like that on your computer, use this site, http://www.calculator-tab.com/ (http://www.calculator-tab.com/) :)

[/spoiler]

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.
This only work for Window Vista and above, When I used my Window XP computer, I can't find any values after I have done the first step:
QuoteClick on "Search", and use type "Custom". Uncheck everything but "Integer 2 bytes" and click OK. Click OK again to start the search.
Quote-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""
It shows me no address found, only work for Vista and above  :sho: hopefully I can get a new Vista computer so that I can get to work on my character again, my previous vista computer was destroyed by me yesterday
(http://thebiglead.fantasysportsven.netdna-cdn.com/wp-content/uploads/2011/07/Vince-McMahon-weeps-upon-being-dismissed-by-Triple-H2.png)
but luckily most of my Mugen project, I put it in my email :iori: and hopefully if I get the new vista computer and I can use PS2 emulator, then I may try using artmoney on PS2 emulator  :iori:
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on June 21, 2013, 04:10:17 AM
I didn't know that Artmoney ran differently on other OSs  :'(
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on June 21, 2013, 08:41:01 PM
Uh, it shouldn't.... I used ArtMoney on XP all the time, and it transferred over to 7 just fine.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on June 22, 2013, 01:26:17 AM
??? that is odd, mine can't maybe is it service pack issue? Mine is Service Pack 1. I have brought a Window 8's laptop, hopefully the winkawaks will be working with the art money, otherwise I am going to commit suicide:
Hokuto No Ken M.U.G.E.N. version - Shin's Suicide KO (http://www.youtube.com/watch?v=bA7TIIF8qzo#)
Heard that my new laptop will be able to work with ps2 emulator, I got to try it later so that I can have fun finding values for the ps2 kof games :iori:
Title: Re: Interactive KOF Character Tutorial
Post by: Websta on June 22, 2013, 02:56:41 AM
Quote from: devilgenemugen on June 22, 2013, 01:26:17 AMotherwise I am going to commit suicide

....What? :what:
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on June 22, 2013, 06:02:42 AM
Sorry about that I am not familiar with Window 8, but now it is okay already, everything works fine now I can sync art money on winkawaks
(http://26.media.tumblr.com/tumblr_m1xj6lGQcG1qi0mi7o1_400.gif) as I am using the new version of art money, this is the one that make me can't sync with the winkawaks which is a new feature for the art money:
(http://img23.imageshack.us/img23/913/cpbi.jpg)
I should choose Custom in the Address range drop down list, then it is working  :iori: even in Window XP :sho: later I will be trying the PCX2 emulator with my new Window 8 and see how it is going :iori:
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on July 20, 2013, 07:19:51 AM
Hi, just one question, when you make character, which way do you recommend?

1) First you compile the sff file, putting every sprites in like all the basics, all the specials, all the supers, all the effects etc, next you compile the air file, all of the animation sprites, then go to cmd to programmed all the moves and finally cns

2) First, you would compile Kyo's Yami Barai special move with his sprite animation and his projectile into his sff. Second, you make his Yami Barai's animation to his air file, third you programmed his Yami Barai move in his cmd then followed by cns file. After you completed making his Yami Barai Special move, you make his Oniyaki special move by adding his sprites in sff, followed by air, cmd then cns...
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on July 20, 2013, 01:42:39 PM
For me, it depends on the complexity of the character and how I feel. If I were making Balrog/Vega, I'd be adding in the mask sprites as I go. For pretty much anyone else, I try to add all the sprites first. Waiting on edits to be done can also play a role in this.

For animations, I do them as I code the move. For KOF, perhaps you could do all the animations first, but for Capcom games which complicate things with turbo, I would not recommend it.
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on July 22, 2013, 03:29:19 PM
I make the whole sff first because there are times where a move will have a frame from another move and some of the sprite packs I use don't have duplicates.

Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on August 15, 2013, 01:06:26 AM
Quote from: KoopaKoot on May 01, 2013, 11:18:00 AM
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/ (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/ (http://www.vans.trinitymugen.net/)
Here: http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299 (http://www.trinitymugen.net/forum/index.php?topic=1172.msg10299#msg10299)
and here: http://mugen (http://mugen) guild.com/forum/topics/kof-data-tutorial-90085.msg784274.html#msg784274 (fill the gap (but why))

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

QuoteClick 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.  :sho:

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]I guess now would be a good time to tell you that walk.fwd and walk.back use the same vels, but negative for back. They are also the same values as jump.fwd and jump.back (for kof 94-2002). :P[/spoiler]

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]
QuoteI will now explain the "advanced" way, the advanced way involves Euler's constant. If you take the time to observe the game, you will notice that the accel values change in each tick, this is because there is a base accel value being affected by time and Euler's constant, that means that there are only two values needed in order to calculate those velocities, a base accel and a base velocity. Can this be done in MUGEN? The answer is yes.

First off, we will need our usual three samples.

K's hard Minute Spike:

9.53125 (Tick 1)
9.08447265625 (Tick 2)
8.6586456298828125 (Tick 3)
And we will obtain the first accel value, 0.953125.

Now, the basic KOF velocity equation goes like this: y = z ・e^(w ・x); This translates to: (current vel = basevel*e^(baseaccel*time)

I'm going to skip the demonstration and show you how to use it. First you need to take the natural logarithm (ln) of that first accel value, -0.048009219186360607752003625323445. That is your base accel value.

Now with those two values you can build the controller and have NEAR PERFECT velocities, this is quite simple as it takes very little time once you are used to the system. I will build the example controller for this move (K's Heavy Minutes Spike) in order to show you how it's done.

The accurate X velset controller would be as follows:

[State 1300, Velset]
type = VelSet
trigger1 = 1 ;This controller must trigger in EVERY TICK the vel is active. Can be changed for animelemtime(X) <=/>= if needed.
x = (9.53125*exp((-0.048009219186360607752003625323445)*(time)))

"Time" used in the equation is EXTREMELY important, the time must ALWAYS be "zero" when the vel is set, that means that if you first trigger your vel in time = 3 of the character's state, you will need to use (time-3) in order for the equation to multiply by 0 in the first tick of your vel.

Umm....scary much? The part I bolded is the scary part it's never explained how such a number was acquired. HOWEVER.

Quote from: Mukashi mukashiKoopaKoot: what's the formula for finding a natural logarithm or should I just cheat with the ln button on the calculator? : P
Vans: I don't know the formula
Use the button
lol

So there you have it. If you don't have a calculator like that on your computer, use this site, http://www.calculator-tab.com/ (http://www.calculator-tab.com/) :)

[/spoiler]

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.
I can get PCSX2 emulator to work but it is quite slow and I am able to input many moves without any problem but I can't seems to sync with art money, I used the table in Vans's website, ko98um, the pcsx2 emulator I am using is version Pcsx2_0.9.4, I am able to get 7 values from the first step which is the search but when I start to filter, I get no addresses
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on August 15, 2013, 09:10:55 PM
Try using PCSX2 1.0 from the official site. It's more stable.
Title: Re: Interactive KOF Character Tutorial
Post by: KoopaKoot on August 16, 2013, 01:17:50 PM
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.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on August 17, 2013, 01:32:48 AM
Quote from: Jesuszilla on August 15, 2013, 09:10:55 PM
Try using PCSX2 1.0 from the official site. It's more stable.
Hooray! It is working very well, but a bit slow especially kof2002um, could be the stage issue:
Testing PCSX2 emulator in my PC Part 1 (http://www.youtube.com/watch?v=LupLDrCqdUE#)
Testing PCSX2 emulator in my PC Part 2 (http://www.youtube.com/watch?v=EssuIAyD71A#)
I used the SVN version, thanks for your help  ;)

Quote from: KoopaKoot on August 16, 2013, 01:17:50 PM
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.
Sure, I would be glad if you could explain it :) since winkawaks' method is quite different from pcsx2's method as I used your method to synch:
(http://imageshack.us/a/img837/1596/nzno.png)
(http://imageshack.us/a/img46/4702/xw4.png)
the value of the p1 vel X and p1 vel Y's value move a little, but it looks pretty wrong to me  :P
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on November 06, 2013, 09:57:15 PM
Hi, I was reading Sander 71113's tutorial about ripping sound, I have downloaded Neojuke but I do not know how to use Neojuke as there aren't any instruction in the readme file on setting up Neojuke yo use it. I have also managed to enable dip2-5 to see the sound code value. Are there any other ways to rip sound from kof98 using winkawaks?
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on November 06, 2013, 11:43:02 PM
I would suggest to use caname to rip from arcade rather than Kawaks.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on November 11, 2013, 04:58:09 AM
Seems like I can't get to load Caname as I can get the game selectable like this:
(http://img854.imageshack.us/img854/8818/fwcq.jpg)
when I double click on the game, nothing happen, it still stay on that screen. I am not sure is it window compatible problem?
I download caname from here: http://mamespi.sourceforge.jp/ (http://mamespi.sourceforge.jp/)
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on November 11, 2013, 06:26:04 PM
Right click, jukebox.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on November 11, 2013, 08:12:49 PM
it is also the same, nothing happen  :'(
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on November 13, 2013, 05:00:36 AM
It works in Window XP computer, luckily I still got my Window XP computer :iori: Now I will try ripping the sound and get use to the emulator, Thanks Jesuszilla for introducing the Caname emulator to me  :)
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on December 02, 2013, 07:10:38 AM
Quote from: KoopaKoot on April 04, 2013, 02:11:46 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.

For hop back, I need to find the friction for it which is this:
airjump.back = -2.55
but I am not sure how do you calculate the airjump.back Hop back's friction?
Title: Re: Interactive KOF Character Tutorial
Post by: Jesuszilla on December 02, 2013, 06:41:47 PM
What exactly do you mean by "friction"?
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on December 02, 2013, 07:49:27 PM
When I am looking at Koopakoot's Kyo Hop back's constant in KyoCNS.cns:
airjump.back = -0.06453852113757117167292391568399                ;Hop friction
I could not figure out how to get this value
Title: Re: Interactive KOF Character Tutorial
Post by: Websta on December 03, 2013, 04:11:57 AM
That number is the Natural logarithm. Back dashes in KOF games usually work like this:

Character jumps back. They have a value pulling them downwards and another value that's applying friction, pushing them forward slightly.

Koopakoot is just making things look complicated by using MUGEN's hardcoded variables instead of just using the numbers like a normal person :P
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on December 04, 2013, 10:50:57 PM
So for Kyo's Hop back animation, when he start to hop back which is at the third tick like this:
(http://img801.imageshack.us/img801/8067/05sm.png)
there is a slight friction pushing him forward as he start hoping, just like frictional force. For downwards, is it after the tick where he reach the maximum height before he start handing on the ground? I am kind of confuse as my first time :P Is there any velocities I can use from the Hop Back animation to calculate this?
Title: Re: Interactive KOF Character Tutorial
Post by: Websta on December 05, 2013, 05:19:12 AM
If you want to get the natural logarithm is:

-Divide the horizontal velocity on the 2nd tick by the horizontal velocity on the 1st tick.

-Then press the "ln" button on your calculator.
Title: Re: Interactive KOF Character Tutorial
Post by: devilgenemugen on December 05, 2013, 08:00:56 AM
I see, thanks for your help :D