Toribash
Original Post
[REL]Ghost trainer
This thread is the home of the ghost trainer script generator that I developed. The generator allows you to extract move sequences from replay files and put them into an LUA script. When run, Uke will select a sequence at random that you can train against in single player.

The current version (2) of the trainer generator can be found here:
http://www.mydistraction.net/Out/trainer2.htm


Update 7/6/2007:
(Not really) bug fix.

Trainer script- v2.1:
- Fixed the first round setting import issues. Settings are now properly imported from round one, if the use replay settings option is enabled. Generator reflects this change, and has no other updates.


Update 7/5/2007:

Some usability improvements.

Trainer generator - v2.1:
- Added the option to select a specific player from a replay to add to Uke's move list, so taking sequences from single player replays doesn't have to pollute your move set.
- Put the instructions on the page, outside of a dialog box, with hide and show controls to continue to allow users to simply select all text on the page.

Replaced the older version, so it can still be found here:
http://www.mydistraction.net/Out/trainer2.htm


Update 7/3/2007:
Made fairly major upgrades to the system in general.

Trainer script:
- Added support for grips
- Added option to display ghost source
- Added option to load related game settings and mods
* Loading game settings is ineffective in the first round, but works as expected thereafter (you may just want to skip the first round)
* dev note: imported entire header string and frame numbers for semi future-proofing

Configure options by opening up the LUA script and setting the variables below the general documentation to true or false. Instructions are enclosed.

Trainer generator:
Pretty much just made all of the changes required to extract the necessary information to support the additional functionality of the trainer script. Nothing about the frontend has changed, so use it exactly as before.

The new version of the trainer generator can be found here:
http://www.mydistraction.net/Out/trainer2.htm

Attached is a small sample mixed bag (sambo, kickbox, wushu) trainer to demonstrate the new functionality:
Mixed trainer

Update 7/1/2007:
I redid the LUA generator in JavaScript, honestly, to spare myself from having everyone uploading replays (and potentially other crap) to my server. It's pretty bootleg right now. I might touch it up with more features later. Feedback would be appreciated.

Usage:
- Paste replay file text into the text area in the upper left.
- Hit "Add Moves", and the replay will be converted into two sequences of moves and added to the generated LUA.
- Be mindful that move sequences from both players will be added, so multiplayer replays will produce the best results.
- Clear the text in the text area, and repeat to add moves from different replays as desired.
- When you're done adding moves, select all text on the page, and copy to your clipboard.
- Paste into a plaintext editor and save the file as a .lua file and place into your 'data/script' directory in your Toribash folder.

Incidentally, no information about framestep or distance is preserved, so if you want to make a wushu trainer, where you'll be working with a framestep of 50, and an engage distance of 250, try to only choose wushu replays.

If you generate any good trainers, I encourage you to share here.


Original Post:
These are a couple of sample scripts generated by a PHP script I wrote last night. The PHP parses a directory of replay files, converts each player's move sequences into an LUA table, and generates a table of those tables.

The LUA script picks a sequence from the table at random and puts in those inputs for Uke after each input freeze, so you can use it as a ghost of the players in the replays, and train against it.

It's mostly good for practicing against openers, as later stage stuff is more context sensitive.

I'll make improvements to the script over time, and I'll be building a frontend interface for the generator script or something so you guys can build your own trainers from replays that you pick.

These are for wushu, and you'll have to make your settings match. 250 engage distance / 500 frames / 50 framestep. The second one, I think, has a better spread of openers. The first was just generated for testing.


Enjoy.
Attached Files
wushuTrainer.lua (9.3 KB, 702 views)
wushuTrainer2.lua (11.4 KB, 1150 views)
Last edited by Dafe; Jul 13, 2007 at 08:30 AM. Reason: Updated
Radioactive torso's description should be, "You have cancer like wow."
Im currently making a sambo training, i will post it as soon as it is done
Last edited by ishi; Oct 16, 2008 at 02:57 PM.


[T]
#hi


Originally Posted by Ishi View Post
Im currently making a sambo training, i will post it as soon as it is done

I made an updated version that sets the default sambo settings on start.
Attached Files
sambotrainer2.lua (8.7 KB, 225 views)
This is like, awesome! I made a fairly mean Classic trainer, though it only has
a few moves... Still hurts!

Edit: Darn, necroed >_>
Attached Files
classicbot.lua (3.4 KB, 87 views)
<Blam|Homework> oiubt veubg
various places to find me lol
This is awesome... Now I can really get some new wushu openers going

Just one question though... Will this ever be updated with more moves and such?
5:13 PM - vasp: everybody's nuts is so good
[00:18:38] <&vespesi3n> you should see when i swallow
[21:49:37] <&vespesi3n> >my mouth when
[21:49:43] <&vespesi3n> >my tastebuds when
I included a generator HTML page so you can make your own trainers with replays that you pick. Check the first post for updates.
Radioactive torso's description should be, "You have cancer like wow."
I'm reserving the right to double post in this thread when I make major updates. Don't ban me, please.

Update 7/3/2007:
Made fairly major upgrades to the system in general.

Trainer script:
- Added support for grips
- Added option to display ghost source
- Added option to load related game settings and mods
* Loading game settings is ineffective in the first round, but works as expected thereafter (you may just want to skip the first round)
* dev note: imported entire header string and frame numbers for semi future-proofing

Configure options by opening up the LUA script and setting the variables below the general documentation to true or false. Instructions are enclosed.

Trainer generator:
Pretty much just made all of the changes required to extract the necessary information to support the additional functionality of the trainer script. Nothing about the frontend has changed, so use it exactly as before.

The new version of the trainer generator can be found here:
http://www.mydistraction.net/Out/trainer2.htm

Attached is a small sample mixed bag (sambo, kickbox, wushu) trainer to demonstrate the new functionality.

Enjoy.
Attached Files
mixedTrainer.lua (12.1 KB, 368 views)
Last edited by Dafe; Jul 3, 2007 at 09:07 AM. Reason: Formatting
Radioactive torso's description should be, "You have cancer like wow."