Jump to content

Saves Wanted - Platinum Save R&D: Battle Videos


evandixon

Recommended Posts

I am going to start working on trying to obtain the Battle Video stored on a Platinum save file, and need save files to look at. If anyone has Pokemon Platinum with a Battle Video playable in the VS Recorder, please post it here, along with a detailed description of what happens in the video - as detailed as possible.

Todo:

1. Find Where the battle video is stored, possibly extract/import the data as a *.plbv file. - WIP

2. Attempt to Decode the video into a text script.

3. Allow for editing.

4. After first beta is published, attempt to make graphical playback.

Edited by evandixon
Link to comment
Share on other sites

Steps I need to take:

1. Find Where the battle video is stored, possibly extract/import the data as a *.pbv file.

2. Attempt to Decode the video into a tet script.

3. Allow for editing.

4. After first beta is published, attempt to make graphical playback.

Edited by evandixon
Link to comment
Share on other sites

4. After first beta is published, attempt to make graphical playback.

0_o

No offense, but I seriously doubt that is going to happen. Unless of course it is extremely simplified.

The rest of it seems easy enough though. Just a bunch of index numbers and booleans, I bet.

Get in touch with Jiggy-Ninja, I think he knows the location of the battle videos. He also thinks they're in their own block in the save structure, by the way, which means they might carry their own footer / checksum / etc.

Link to comment
Share on other sites

0_o

No offense, but I seriously doubt that is going to happen. Unless of course it is extremely simplified.

The rest of it seems easy enough though. Just a bunch of index numbers and booleans, I bet.

Get in touch with Jiggy-Ninja, I think he knows the location of the battle videos. He also thinks they're in their own block in the save structure, by the way, which means they might carry their own footer / checksum / etc.

I doubt it too, but it gives me something to work toward. After I get the others done, this will be remotely possible.

Link to comment
Share on other sites

Um, having other people post their saves is hardly necessary. Go onto the GTS and download some battles that people have posted there. Then you can watch them and be 100% sure you're getting the full description.

Also, the data for the video itself is encrypted. =(

I was asking that, because I was unsure of finding it. Because Jiggy-Ninja gave me the location(s), then I no longer need that.

I also was unaware of being able to download videos from the GTS.

Well, it will give me something to do. I am currently working on a program to attempt to extract and emplant them in a save file.

[Edit]: I could use at least one save file so I can test the program I am working on.

[Edit]: Sucessfully Extracted the Data (So I think).

Link to comment
Share on other sites

If this plan came into fruition, what would it do exactly?

Like, would you be able to change the text in battle videos so it would say things like instead of:

The opponents Hipmonlee fainted!

you could make it

DAMN! That mua fucka got knocked da fuck out!

I doubt it.

I imagine that there is some kind of compressed HEX script that cannot be edited in that way.

Link to comment
Share on other sites

If this plan came into fruition, what would it do exactly?

Like, would you be able to change the text in battle videos so it would say things like instead of:

The opponents Hipmonlee fainted!

you could make it

DAMN! That mua fucka got knocked da fuck out!

rofl

The most useful thing it would allow for is probably automatic "warstories" or w/e from games you play over WFC. And if someone got really ambitious they could write something to parse the data into an actual video.

Link to comment
Share on other sites

To turn this data into a video matching the in-game videos would be massively complex. I mean, does anyone know how to call the RNG to decide where the bubbles go in Bubble, for example? That's assuming someone is savvy enough to get the animation down in the first place.

And no, you can't change text like that by editing the save file, since that text is stored in the ROM itself.

Link to comment
Share on other sites

To turn this data into a video matching the in-game videos would be massively complex. I mean, does anyone know how to call the RNG to decide where the bubbles go in Bubble, for example? That's assuming someone is savvy enough to get the animation down in the first place.

And no, you can't change text like that by editing the save file, since that text is stored in the ROM itself.

That is in the FAR future - I haven't even sucessfully transfered a video from one sav to another (I can extract, but I haven't tested implanting, which is why I need saves.)

Link to comment
Share on other sites

  • 2 weeks later...

Here you go.

*EDIT*

I am pretty sure the video data is just the pokemon for both players and a set of variables saved for each turn. Like what attacks each pokemon used, what poke gets switched in, and hax variables like critical hit chance, secondary effect chance, miss chance, numb of times a multiple attack hit does, min/max damage number, sleep/freeze ending number, and what ever else there is. I think when you play back a video, all it really does is do a battle, and reads the variables for the file instead of generating them like normal. It should be possible to change the file, but that may cause glitches. For example, it might not cause a problem if the difference of a minimum hit and a maximum hit still cause a ohko, but lets say it was a maximum hit, and you change it to a minimum hit, so in the replay the pokemon survives the hit, now it might switch the pokemon on the next turn to what was used to replace the fainted pokemon, the surviving pokemon may start using attacks the replacer would have used, or the game might just crash. It might even be possible to extract pkm files from it.

Also here is another save.

Pokemon Platinum.sav

Pokemon Platinum2.sav

Pokemon Platinum.sav

Pokemon Platinum2.sav

Edited by KazoWAR
Link to comment
Share on other sites

Here you go.

*EDIT*

I am pretty sure the video data is just the pokemon for both players and a set of variables saved for each turn. Like what attacks each pokemon used, what poke gets switched in, and hax variables like critical hit chance, secondary effect chance, miss chance, numb of times a multiple attack hit does, min/max damage number, sleep/freeze ending number, and what ever else there is. I think when you play back a video, all it really does is do a battle, and reads the variables for the file instead of generating them like normal. It should be possible to change the file, but that may cause glitches. For example, it might not cause a problem if the difference of a minimum hit and a maximum hit still cause a ohko, but lets say it was a maximum hit, and you change it to a minimum hit, so in the replay the pokemon survives the hit, now it might switch the pokemon on the next turn to what was used to replace the fainted pokemon, the surviving pokemon may start using attacks the replacer would have used, or the game might just crash. It might even be possible to extract pkm files from it.

Also here is another save.

I doubt it stores that much. It probebly stores that the player had pokemon ID#___ and that it used move ID ___. It might even be possible to make a pokemon seem to use 17 moves without swiching.

Link to comment
Share on other sites

I would think some of the values are stored in bitfields as well, to compress the data more easily. After all, what better way to store True / False values than a simple 1 / 0? That would easily take care of the "hax" variables.

It might even be possible to extract pkm files from it.

I really doubt this. There's no need to store the entire PKM; just the results of the battle itself. The only things it probably keeps from the PKM are species, forme, gender, & shininess so it knows which sprite to use.

Link to comment
Share on other sites

I really doubt this. There's no need to store the entire PKM; just the results of the battle itself. The only things it probably keeps from the PKM are species, forme, gender, & shininess so it knows which sprite to use.

It may be possible to create a *.pkm using the data given, but aditional data will need to be given (such as where the pokemon was found, PP, etc.)

I may have found the location that specifies wether there "is" a battle video or not, but I haven't been able to test it.

Hex offset: 2AB8

Link to comment
Share on other sites

Here you go.

Thank you for those saves, because now I know (or am pretty sure) that my small program that can extract and import Battle Videos (sort of) works. When I imported one that I had, it said that the battle video was corrupt, but when I imported the one originally in the save file, it worked.

[Off-Topic]:You sure do have a lot of lvl100's...

Link to comment
Share on other sites

I would think some of the values are stored in bitfields as well, to compress the data more easily. After all, what better way to store True / False values than a simple 1 / 0? That would easily take care of the "hax" variables.

I really doubt this. There's no need to store the entire PKM; just the results of the battle itself. The only things it probably keeps from the PKM are species, forme, gender, & shininess so it knows which sprite to use.

On the other hand, when the video is uploaded to the GTS it is checked for legitimacy. And I've heard that the GTS legit checker is even more strict than PBR. That, to me, implies that the Pokemon must be stored with the video. There is plenty of room. IIRC, the battle video area takes up ~5.7 kilobytes, and 12 Party sized Pokemon is just a bit shy of 3 KB.That leaves about 3 KB for the actual video script.

Thank you for those saves, because now I know (or am pretty sure) that my small program that can extract and import Battle Videos (sort of) works. When I imported one that I had, it said that the battle video was corrupt, but when I imported the one originally in the save file, it worked.

[Off-Topic]:You sure do have a lot of lvl100's...

I'm sure the problem you had has to do with the save ID of some kind in the footers. I might look into this myself a bit, from time to time.

I wish No$ Debug worked on my computer. T_T

Link to comment
Share on other sites

How much of the data are you transferring? Battle videos appear to be exactly 7,520 bytes (~7.3 KB), including what looks like the footer at the end of their block.

If you're transferring all of that data, it's unlikely the checksum would be causing the problem.

Codemonkey and I were analyzing the Battle Video block footers last night (or more accurately, this morning :) ) and found a few odd things that I'm going to look into some more today.

Link to comment
Share on other sites

I really doubt this. There's no need to store the entire PKM; just the results of the battle itself. The only things it probably keeps from the PKM are species, forme, gender, & shininess so it knows which sprite to use.

I think complete .pkm files are stored in the battle video for the hack checking it does when trying to upload to the gts.

[Off-Topic]:You sure do have a lot of lvl100's...

They are all sav'd. At first I used to make them the max level they needed to be for a certain move or the level it evolved in to that pokemon at, but later I became lazy and just put 100. Most where made just for roulette battles, some are from my old teams.

Link to comment
Share on other sites

How much of the data are you transferring? Battle videos appear to be exactly 7,520 bytes (~7.3 KB), including what looks like the footer at the end of their block.

If you're transferring all of that data, it's unlikely the checksum would be causing the problem.

Codemonkey and I were analyzing the Battle Video block footers last night (or more accurately, this morning :) ) and found a few odd things that I'm going to look into some more today.

Windows said it was 8KB, although I didn't specifically check for a completely accurate size.

[Edit]: 8,196 bytes

When I'm not on my DSi, and after I modify my research program, Ill post it.

Edited by evandixon
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...