Original Post
[WIP/REL] reSpar.lua
reSpar is primarily intended to aid continuity in long multiplayer sparing games. It's two basic functions are:

UPDATE 21/04/14: Added some graphical interfacing for the ease of your eyes in your face. After starting the script, right click the Joint State panel to view the load directory and options. Note: reSpar can now also be used as a slightly clearer replay loader.

After loading the script.

After right clicking the panel (or pressing F1)

The top panel shows your /replay directory. the bottom one displays the content of the highlighted replay file (I'll eventually get round to parsig that in to something more user friendly). Highlighting a different replay file is done by scrolling, arrow keys or '+' and '-'. Press Load Replay to load the file as a regular replay. Replay Moves to run the game one move at a time (holding SHIFT when pressing Replay Moves will swap Uke for Tori and Tori for Uke). Safe Save for constant live game saving. And Unload Script for... well you'll guess.

Older details, but still useful information:

1. More robust game saving

How many times has it happened that you're deep into a great multiplayer sparring game, only to have your partner ping and disconnect from the game? All that time wasted and not even a replay file to show for it... Unless you pressed 'f' and save the game every turn.
reSpar does this automatically. Before you start an important sparring game, use the command

"/safesave [OPTIONS FILENAME]"

This will ensure that every turn the replay will be updated and saved in the replay/ folder. if you don't give a filename the game will be saved as SafeSave.rpl

2. Recreating a saved mp game

Now what if you and you partner wanted pick up that game from where you left off. With:

"/replaymoves [FILENAME]" you can do just that. It will load the moves of the saved game and control your tori for you up until where the game was saved.


Run the /safesave command before you start the game you want to save. Once started, it will keep going until the current game has ended or a new game has started (in case of sudden disconnect).

Since you cant control your partner, both of you will need reSpar.lua and the to be loaded replay on your respective computers.
For now reSpar doesn't check whether the game whose move your loading has the same settings as game you're loading them into. Make sure they're compatible (and identical if you want continuity).
When ready, start a new game with your partner, both type in "/replaymoves [FILENAME]". On your screen you'll see a bar with a two sets of two sequence of letters, one above the other. Red for the tori position, blue for the uke. These are just joint (and grip) states. If the top and bottom are the same colour then your tori is making the exact same move as it did in the saved game. If you're both ready, press space for the next turn. Keep doing so until you want to pick up control.

Note: the joint state sequence is in a different format than usual.
f,b,h,r are still the same (forward (Mousewheel Up), back (Mousewheel Down), hold, relax) but it's ordered from neck to abs, right arm (right peck to right wrists & grip state ), left arm, right leg (right butt to right ankle), left leg.

Additional uses:
Yes: reSpar can be used as an extended MoveMemory.
Yes: reSpar can be used to help two colluding player rig a (decap) game by doing a "here's one we prepared earlier". God help you though, son, if you think it's a good idea.
Not really: You cannot perfectly recreate single player games in multiplayer or vice versa. Apparently the engine, ever so slightly, handles the two differently.

Let me know what you think.And if you enjoy this script, or any of my previous one, please, feel free to make a small TC donation. Thank You.

respar.lua (11.2 KB, 64 views)
Attached Files
respar.lua (22.9 KB, 1153 views)
Last edited by Daanando; Apr 21, 2014 at 11:15 AM.
>:OOO do my eye deceive me "Recreating a saved mp game" Good job if this works how I think it works.. you will go down in history as the greatest I will be testing this soon.
10/10 for catching my attention
It'd be nice to specify a frame number for the recreation to go through.

Excellent idea, excellent implementation.
[23:23:53] <AndChat|700625> Blue eyes ultimate dragon best card
[23:24:29] <AndChat|700625> You know the one with 3 heads
[23:24:39] <~Lightningkid> just like my dick

[11:35:40] <box> Hampa suck
[11:36:21] <hampa> not the first to tell me that today
Originally Posted by box View Post
It'd be nice to specify a frame number for the recreation to go through.

Excellent idea, excellent implementation.

(Thanks, Box, that's means a lot coming from you (I've read everything you've wrote on lua scripting)

For now, the script is just a bare bones proof of concept (I'm deathly afraid that maybe mp games cant be recreated in a new, but exactly the same, mp server by the moves alone) If the basic principle works, then I look forward to tackling yours and anyone else's .suggestions.
oh my goodness you have solved the problems of hundreds of sparrers. thank you so much. this should be stickied somewhere
Have a great day, thanks for looking at this post I guess.
cnc is an endangered resource
This is absolutely genius.
You have just solved the biggest problem of the current sparring scene.
Truly, truly ground-breaking.

I'll test this as soon as possible and add it to my Legends thread.
Congratulations on this feat, and thank you.
We're still kids in buses longing to be free.
I've been on the devs necks to implement something like this! Amazing that you were able to do it with lua!
Basically opens up lots of possibilities, and makes it easier for casual players to create spars!
Will test it soon.
Your messed up world enthrills me