YesNoOk
avatar

Marvel Data scrpt (Read 8315 times)

Started by Yoshin222, January 03, 2022, 05:57:02 PM
Share this topic:
Marvel Data scrpt
#1  January 03, 2022, 05:57:02 PM
  • ***
  • Getting better, still a long way to go
    • UK
------IMPORTANT!!!-----
-Only use mid fight
-"File" refers to the numbered file found in a given games ROM. Can be opened in HxD to get raw data
- Breaks if attempts to read a player who hasn't entered. Only really affects MVC, will try to fix in future
SUPPORTED GAMES
xmcota
xmvsf
mvsc
msh - Character Select timer isn't frozen though


Little bit of backstory. Been trying my hand at Lua for a while, and wanted to rip Red Earth data, but  the values wern't 1-1 with Mugen,. Thought hey, make a script that automates that
A while later, a dude asked for help romhacking X-Men: Children of the Atom, so adapted the script to work with that. Then saw the other Marvel games were handled similarly, so now the script works with them!
The script outputs the current characters position, velocity and acceleration as floats you can directly chuck in to Mugen
Explanation for those who care
Spoiler, click to toggle visibilty
It also outputs some ROM data to make life a little easier. It spits out the current address for the Anim, as well as for the Sprite being used, while also converting that raw value to where it would specifically be in what specific file. You can find these things simply by opening the corresponding numbered ROM file in a hex editor like HxD, and going to the offset specified
Images




Links
Spoiler, click to toggle visibilty


Last Edit: March 17, 2022, 09:28:48 PM by Yoshin222
Re: Marvel Data scrpt
#2  January 15, 2022, 08:27:59 PM
  • ***
  • Getting better, still a long way to go
    • UK
UPDATE, CHECK FIRST POST
Due to a request by Sir Ghostler, added MSHVSF suppoort. Same rules as MVC. Also added player toggling backwards by pressing O as a quality of life thing, as well as display of FrameTime to help find raw values in the ROM
Last Edit: March 17, 2022, 09:39:57 PM by Yoshin222
Re: Marvel Data scrpt
#3  January 25, 2022, 12:19:23 AM
  • ***
  • Getting better, still a long way to go
    • UK
BIG UPDATE!!!  Check first post!!
After working on a script for Samsho 3/4, decided to port over some things i learned to this script, and ended up fixing the main issues!
REV1.2
- Can now use the script whenever ya like
- Can target any player, any time
- Added TileDef output
- XCOTAs Character Select timer was wrong, now properly freezes
- A port over from the Samsho script, can display Pos/Vel Data as either converted Floats for Mugen, or Hexadecimal like the Source game
Re: Marvel Data scrpt
#4  January 28, 2022, 09:37:23 AM
  • avatar
  • ***
  • If you rip sprites i´ll rip your code
    • Mexico
    • www.m3xweb.260mb.com
This is amazing, a very usefull tool for romhacking.
I just got a question maybe quite obvious from the pictures but what emulators support or should be used with the script?
There is no knowledge that is not power
--------------------------------------
My Web Site
Re: Marvel Data scrpt
#5  February 13, 2022, 08:47:31 PM
  • ***
  • Getting better, still a long way to go
    • UK
Glad ya dig it! Mainly FBNeo/Mame. Though i imagine other Arcade emulators that support LUA would work too
Re: Marvel Data scrpt
#6  February 18, 2022, 09:17:52 PM
  • ***
  • Getting better, still a long way to go
    • UK
YET ANOTHER UPDATE, CHECK FIRST POST!
Mainly for XMCOTA. It handles sprites slightly differently than the other VS Games, as it uses 2 Pointers as opposed to 1. Script now accommodates it, alongside the script running adjusting based on game, and added the name of the current game for fun. These 2 screenshots didn't need the script to be disabled

It SHOULD run smoothly with every VS Game now. Lemme know of anything useful i could add in future!
Re: Marvel Data scrpt
#7  March 14, 2022, 05:15:49 AM
  • avatar
  • ****
Hello Yoshin222, let me first say that this is awesome! Very useful indeed.
I have one question. The values that the script displays are raw, right? Meaning we still have to apply some math for turbo speed and the CPS2 resolution when translating to MUGEN. Is that correct?
Re: Marvel Data scrpt
#8  March 17, 2022, 09:23:17 PM
  • ***
  • Getting better, still a long way to go
    • UK
Glad ya dig it! The script automatically outputs what the game sees, so i imagine turbo timings would display properly, though i admit i haven't properly looked. As for velocities and the like, they are 1.1 with the source games. The velocity values should work out the box with Mugen since the script automates the calculation of WORDS to Floats
Different script but the fundamental idea is the same


Also, New update! (The images are slightly old but still show the new things) Check first post for the link
REVISION 1.4
- Added a new mode, Address. This displays the raw Unit ID addresses for stuff like Velocity and Anim, hopefully streamlining the usage of Watchpoints and the like via MAME
- The Lua now displays the AnimElem data in real-time. Can swap the Endian by pressing Z, by default it displays the data the game sees, whereas swapping the Endian views the raw data from the program data you would see in any given Hex Editor

Images
Spoiler, click to toggle visibilty
Last Edit: March 17, 2022, 09:29:27 PM by Yoshin222
Re: Marvel Data scrpt
#9  March 18, 2022, 06:46:33 PM
  • avatar
  • ****
So, messing a little with the script, I still think the values should use some math when converting to mugen. An example using MSHvsSF:
One of Dark Sakura's supers launches the opponent in the air, the Y accel in the script gives me a value of 0.375, however if I use this in MUGEN, the character is very "floaty" compared to the source. This is probably because it's giving me normal speed values and not turbo speed values.
Doing some research, the turbo speed in MSHvsSF is 1.25, and the horizontal resolution is 384 scaled to 320, so the math should be something like this:

X vel: value * 1.25 * (5/6)
Y vel: value * 1.25
X accel: value * 1.5625 * (5/6)
Y accel: value * 1.5625

Going back to the Y accel I mentioned, 0.375 * 1.5625 = 0.5859375, or just 0.58, using this gives me a more accurate result I think. Someone can correct me if I'm wrong.

Gonna check the updated script later, and thank you again for sharing!
Re: Marvel Data scrpt
#10  March 18, 2022, 07:16:11 PM
  • ******
    • Portugal
    • network.mugenguild.com/pots/
The script does exactly what it sets out to do, though. For Mugen conversions in Turbo, you're always going to need to pull up a calculator and some Physics.