YesNoOk
avatar

KOF Data Tutorial (Read 15436 times)

Started by Vans, November 26, 2008, 11:48:45 pm
Share this topic:
KOF Data Tutorial
#1  November 26, 2008, 11:48:45 pm
  • ****
    • China
    • http://vans.trinitymugen.net/
This is mainly thanks to Recruta42 and Fervicante, who were the first to apply this method for velocities (got the data directly from MAME), but Kira and I solved the equation to build the formula with any piece of KOF vel data.

This is also the method I use to get data for my characters, if something seems unclear, please ask here so I can explain further and correct it in the tutorial.

Quote
Sending a quick tut on how to get KOF data.

I will attach my KOF artmoney table.

This table will work in ANY KOF game from 94 up to 2002. (They changed the architecture in KOF2003). This table will give you ACCURATE values for velocities, hitvels, damage, power and offsets.

It is fairly easy to sync, for this matter I recommend using Winkawaks 1.58 for getting the data.

First off you must enter a training (or VS if it lacks the mode) session, and push your opponent all the way to the right, then you will move the character you want data from all the way to the left. Like so:



Open up the table with artmoney and make sure that Winkawaks is selected as the process you want to use it on.

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

Artmoney should also look like this at this point:



You can get whatever you want with this method. Just a note on how to get the data right:

Velocities.

The way KOF handles velocities is simple and straight-forward, however, this may confuse you if it's your first time working with this kind of data, we'll start with easiest. The Y vel.

The Y vels in KOF are handled just like in MUGEN, it's a regular velset and veladd. With the exception of hitvels which have a velmul instead (I usually guess these) you can check what kind of Y vel you are dealing with if you take a sample of 2-3 ticks (I recommend 3).

The Y vels, however, cannot be accurately translated into MUGEN, as KOF adds the yaccel twice once the velocity is no longer negative. This causes a delay of 1 tick in the land states, which I personally decided to keep in order to maintain correct feeling (You can get around this if you use !animtime as the trigger for the land though).

To get these you need to check artmoney and the game frame by frame using Winkawaks. You can do this by pausing the game and pressing shift + space (Next frame). You can input commands this way too, to start with something simple we'll check K's Y normal jump vel (Note that you need to hold up 8 ticks in order for him to perform his normal jump).

We'll do this tick by tick while checking if artmoney updates the value located in "P1 Vel Y Integer" and "P1 Vel Y Float". After a while you'll notice these change to 10 and 16896 respectively. This is our first value.

Now that we have our first value, we need to remember that we can't use it yet as it is a HEX number. That means using 10.16896 would be incorrect, we must transform it into a decimal value first.

To do this we'll do a simple step, we'll divide the "float" value artmoney gave us with 65536 (0x1000 in HEX). You should get 0.2578125 as the result. This is our correct float value.

Now that we got the correct float value, we'll just add the int value artmoney gave us to it. That will mean that our first vel is 10.2578125.

But how do we find the Y accel? Easy, we just need to gather a sample of three values for this.

I will take a step ahead and note them down:

Code:
10.2578125 (Tick 1)
9.640625 (Tick 2)
9.0234375 (Tick 3)

Now we just need to get the difference between the first and second values. Which is 0.6171875. This is apparently the correct Y accel value, but just to make sure subtract that Y accel value we got to the second velocity value: 9.640625 - 0.6171875 = 9.0234375. Success!

This is the process you should follow for any move (hitvels may vary though), and it should give you perfect results. Just to make correct use of this, a KOF Y velset should look like this:

Iori_WLS Heavy Oniyaki said:
[State 1101, VelSet]
type = VelSet
trigger1 = !time ;Can be anything
y = -9

[State 1101, pos]
type = Veladd
trigger1 = time > 0 ;Should be one tick after the velset was applied in order to prevent the controller from subtracting velocity before it should.
y = .50

Next is the X vel.

The X vel is harder to get than the Y vel, due to changes it may have during the move. I usually check the vel changes throughout the whole move to see if there are no sudden vel changes, if there aren't then you can easily implement it with few controllers, however, there are two ways to do it. The advanced way and the easy way.

The easy way is using a combination of velset + velmul. This, however, will result in distance loss (Few pixels).

We'll try to get the values for K's Hard Minute Spike.

Doing a frame by frame advance, we can observe that there are no sudden vel changes, this means we will only require a few controllers.

First, we'll need the usual three samples from the move:

K's Hard Minutes Spike said:
9.53125 (Tick 1)
9.08447265625 (Tick 2)
8.6586456298828125 (Tick 3)

How do we work with these values and get the mul needed? Easy, you divide the second vel value with the first. That will give you your mul value, in this case, 0.953125.

Now to correctly use this data you will only need two controllers:

One of Iori's custom states said:
[State 1402, VelSet]
type = VelSet
trigger1 = AnimElem = 8 ;This is when the first velset should be applied.
x = -11.921875

[State 1402, VelMul]
type = VelMul
trigger1 = AnimElemTime(8 ) > 0 ;Just like in the veladd, one tick higher than the velset is required.
x = 0.8515625


That will provide correct velocities in an easy method, but as I mentioned earlier, this may not be 100% accurate.

I 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 Minutes Spike said:
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.

Minute's Spike Accurate X VelSet said:
[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 here 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.

In addition, I recommend the use of displaytoclipboard in order to check that the first three vel values are like the ones you got in artmoney. If they are, you are good to go.

This method may look complicated, but it's shorter and very clean once you get used to it.

Don't forget that you also need to use physics = N for this.

Posadds.

Something I thought I'd mention, some KOFs will show this as a vel value, some won't. So I recommend you check if the character moved during a move in case it requires posadds, the pos values are integers so it's a basic operation here.

Damage / Power


Damage and Power maxes vary from KOF to KOF, you can see using the table the MAX value for that current KOF. The formula to convert the values to MUGEN is quite simple.

Quote
damagevalue / maxlife * 1000 = MUGEN damage value

This also works for POWER values, it is quite simple really.

Here is the artmoney table. (Right-click save as.)

I hope this helps you. Feel free to ask or check my works for help. :)
Last Edit: May 09, 2009, 10:07:32 pm by Vans
Re: KOF Data Tutorial
#2  November 28, 2008, 04:56:50 pm
  • ***
  • Feel the power of my Violin's melody!
    • bmt.mgbr.net
This is basically the same method that I used for velocities, but you don't need to credit me (Recrura 42 is the correct guy  :)). Using Artmoney or Mame we can extract the same numbers/results (artmoney has to display the "hexadecimal view" for this).

The mainly diffrerence is that I use Sigma Plot to discover the satisfatory convergion tolerance to define the most appropriate equation category (exponencial, etc).

It's almost impossible to reproduce something totally accurate on mugen... But with this we can make something close to the original game.
Re: KOF Data Tutorial
#3  November 28, 2008, 05:01:17 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Click on "Search", and use type "Custom". Uncheck everything but Integer 2 bytes and click OK. Click OK again to start the search.

It does not say what to use more than use custom (I mean exact value, unknown value, etc).

Just to add, search on exact value, the value should be 480 (that is when p2 is at the far right and when p1 is on far left).
My shitty mugen stuff:
Re: KOF Data Tutorial
#4  November 28, 2008, 05:59:56 pm
  • ****
  • "Moyashi tsuku shite yaru..."
P.o.t.S. taught me most of this, but your tut was very helpful. I had no idea know there was such dependency involving Euler's constant. Thanks a lot for that. By the way, how did you find this out?
Re: KOF Data Tutorial
#5  November 28, 2008, 06:58:50 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Talking about KoF and artmoney, do anyone remember how to synch the table via the timer?
P.o.t.S told me how to, I just forgot. ;P
My shitty mugen stuff:
Re: KOF Data Tutorial
#6  November 28, 2008, 11:16:47 pm
  • ****
  • "Moyashi tsuku shite yaru..."
Talking about KoF and artmoney, do anyone remember how to synch the table via the timer?
P.o.t.S told me how to, I just forgot. ;P
A quote from this tutorial:
Quote
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 (apply offset to all).
Let's say you had value for Timer found, but now this value has a different address. So you find this new address and apply an offset to all values you have in your table, like it's mentioned in the tut above.
Re: KOF Data Tutorial
#7  November 28, 2008, 11:54:17 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Let me rephrase that:
I cannot find the timer value (when searching that is).
My shitty mugen stuff:
Re: KOF Data Tutorial
#8  November 29, 2008, 10:16:43 am
  • ****
  • "Moyashi tsuku shite yaru..."
Re: KOF Data Tutorial
#9  November 29, 2008, 01:33:15 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Yes, my English sucks.
Anyway, iIrc, in KoF the timer is different than Capcom Co., Ltd.'s games.
Something with hex. I tried converting the time value into hex then searching, but after only two filters I get 0 results.
I tried more than one time, same thing. I always end up with 0 results, before that, its over 200. :gonk:
My shitty mugen stuff:
Re: KOF Data Tutorial
#10  November 30, 2008, 11:55:39 am
  • ****
  • "Moyashi tsuku shite yaru..."
Yes, my English sucks.
Anyway, iIrc, in KoF the timer is different than Capcom Co., Ltd.'s games.
Something with hex. I tried converting the time value into hex then searching, but after only two filters I get 0 results.
I tried more than one time, same thing. I always end up with 0 results, before that, its over 200. :gonk:
I think searching for Pos X like Vans suggests is the best variant as its values are universal for KOF 94-2002 games unlike life, timer and some other things. Why don't you just follow Vans's advice and find offsets using Pos X.
Sorry if I sounded rude, I meant no offence...
Re: KOF Data Tutorial
#11  November 30, 2008, 12:15:39 pm
  • ******
  • what a shame
    • Iran
ugh, Anjel's trying to figure out the SvC values and not the KoF values but is posting it in this thread (MSN conversation we had before) --;

Anjel, read :

SvC IS DIFFERENT FROM KOF.
Re: KOF Data Tutorial
#12  November 30, 2008, 12:37:33 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
Actually, no.
I finally figured out they way to find the timer in KoF (its the same in SvC).
I first thought the timer was decimal, I tried to convert it into hex and search. That was not the case.
The timer is hex, I had to convert it into decimal. ;P
My shitty mugen stuff:
Re: KOF Data Tutorial
#13  November 30, 2008, 05:32:53 pm
  • ****
    • China
    • http://vans.trinitymugen.net/
SvC is not that different from KOF, however, the architecture IS different.

Also, stage length is still the same in SvC, so the method I posted earlier to sync tables works there as well.

Here is the last table I made for SvC, hope it helps.
Last Edit: November 30, 2008, 05:41:37 pm by Vans
Re: KOF Data Tutorial
#14  March 09, 2009, 03:18:23 am
  • avatar
  • *****
  • Sr. Black Person
  • Mess with the chuchu you get the pewpew
    • USA
    • Kamekaze.world
I tried this method on kof98' using kawaks. and I was unable to find any of the values on your artmoney table provided. I used the search and filter method and I did come up with some values, but none of them matched with your table.
Want to feel useful for a useless show? click here
119/150 Chars, I'm not dead yet....the true surprise is in my thread.
Hahahah fuck you photobucket.
Re: KOF Data Tutorial
#15  May 22, 2010, 11:28:49 am
  • ****
    • China
    • http://vans.trinitymugen.net/
I realize this is a necro, but it's mostly an update.

I have started a website where I'll post some of my most recent KOF research (along with other games) and some tutorials to do extra stuff.

By request I have also uploaded all of my tables and their most updated versions (this includes KOFXI and 02 UM).

Here's the link.
Re: KOF Data Tutorial
#16  May 28, 2010, 01:25:58 am
  • avatar
  • ******
    • USA
OMG 02 UM table  :D, thanks! how the hell do you advance frame by frame in PS2 emulator anyway? dunno if I can even get the axis or CLSN data from it :P
Re: KOF Data Tutorial
#17  May 28, 2010, 07:23:08 am
  • ******
  • [E]
    • Mexico
You use my moded version of the video plugin.

Spoiler, click to toggle visibilty
Re: KOF Data Tutorial
#18  June 08, 2010, 05:05:18 pm
  • ******
  • Take better care of the plants around u or become
  • the fertilizer that feeds them.The choice is yours
    • Chile
    • network.mugenguild.com/basara/
Very interesting. For my EX chars (KOF-like gameplay) I used [E]'s Mai for data and I think I should improve more with this.

Vans, since I can't use well Artmoney, should I take a look to your chars to adjust my data in my chars?? I wanted to update Rai, Yuki and Ryu to more KOF-like and this could help me a lot

Rest in peace, Toriyama-san...
Normal WIPS - ClayFighter - Ideas - Anti-Gouki Project - Lifebars - Facebook - X
Re: KOF Data Tutorial
#19  August 06, 2010, 11:16:39 pm
  • ****
    • China
    • http://vans.trinitymugen.net/
Didn't check this topic in a while. :P

Basara: Sure, use anything you need.

Also, for everyone else. I updated my KOF2002/UM and KOFXI tables to include stun and block gauge values, for those interested.

They are all in the downloads section of my research place.

I'm also in the middle of writing a couple of new tutorials for PS2 KOF games, so expect those soon.

GT

Re: KOF Data Tutorial
#20  August 07, 2010, 05:46:21 am
  • *****
    • USA
    • Skype - gt_ruby
All these tables...
 :beamgoi:
Yeah Titiln, in fact, You Made Him