Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOTK Request: Horse editor #169

Closed
MJr0019 opened this issue May 12, 2023 · 59 comments
Closed

TOTK Request: Horse editor #169

MJr0019 opened this issue May 12, 2023 · 59 comments

Comments

@MJr0019
Copy link

MJr0019 commented May 12, 2023

First I would like to thank you for all your work so far.

thank you very much

could you add the function to edit the colors of the horses?


En primer lugar me gustaría darle las gracias por todo su trabajo hasta ahora.

muchas gracias

¿podrías agregar la función para editar los colores de los caballos?

@JonJaded
Copy link

Feel for this. My botw horses didnt transfer , and would love to edit them in.

@marcrobledo
Copy link
Owner

The issue title mentions BOTW, I'm not sure if that was a mistake. You can edit BOTW horses already.
Did you mean TOTK? If that's the case, the horse editor can come if you provide a savegame with horse data. It will be very helpful if it has five horses and you also provide their names, saddles, etc.

@JonJaded
Copy link

JonJaded commented May 16, 2023

Here's my save. Hopes this helps.

Askye -MAX BOND- Towing Harness
Pips -MAX BOND- Giant Horse Harness
Blindye -95 BOND- Default Harness
Marledo -36 BOND- Default Harness
Ichekse -00 BOND- Towing Harness
Jadeite -30 BOND- Towing Harness [1744 -1923 0012]
Untamed Horse -?? BOND- No Harness [1735 -1942 0012]

progress.zip

@marcrobledo marcrobledo changed the title BotW horse editor color? TOTK Request: Horse editor May 17, 2023
@JonJaded
Copy link

Question though, for my morbid curiousity. I opened my save in HxD and I'm just wondering how does parsing the info work? It's clearly not plaintext so how do you 'unencrypt' or demangle the save data structure? Is it just diffing until you find the pattern?

@Karlos007
Copy link

Offsets for v1.0.0 (for v1.1.0 need to add +0x38):

0010E008:Horse Name 01
0010E028:Horse Name 02
...+0x20

0008A0F0:Horse Type 01
0008A130:Horse Type 02
...+0x40

GameRomHorse00L is the Large Horse from botw
GameRomHorseGold is the new Gold Horse
GameRomHorse01L is the new Large White Horse

The only problem is that changing the horse type doesn't change the image preview when choosing horses.
Also need to find the stats and equipment.

@JonJaded
Copy link

The only problem is that changing the horse type doesn't change the image preview when choosing horses. Also need to find the stats and equipment.

This is another issue I've heard multiple times. The game seems to have a cached copy of a lot of the thumbnails which don't dynamicly update (likely because the game doesn't expect them to spontaneously change.) Not sure on what a fix would be.

@Ozymandias07
Copy link

When ever I open my save in the editor I cant edit my horses. I have horses registered, but the tab is grayed out and I cant click on it. Is there something I am doing wrong?

@JonJaded
Copy link

but the tab is grayed out

The feature is not yet implemented. It has not even been a week since release; gotta slow down a bit.

@Ozymandias07
Copy link

Ozymandias07 commented May 18, 2023

oh whoops i thought since it was closed it means it was implemented

@JonJaded
Copy link

JonJaded commented May 18, 2023

Oh no, the threads that say closed are the dupe thread. This one is still open. If you want to help marcro, please zip your save file and give a table of the horse information as I did in here. #169 (comment)

@Ozymandias07
Copy link

Here is my save if it helps
progress.zip

@Ozymandias07
Copy link

Epona Max Bond Regular Epona equipment
Goldy Max Bond Extravagant Saddle
Spirit Max Bond Regular Giant Horse equipment
Dairy 0 Bond Traveler's Saddle
Banana 0 Bond Regular Saddle
Blue Man 0 Bond Regular Saddle

I dont know if this will help either

@JonJaded
Copy link

JonJaded commented May 19, 2023

Giant Horse equipment

Ah you're right! One of my horses is the giant horse, they use a seperate harness type as compared to regular horses (as they did in BOTW.) I made a slight error in my horse inventory labeling (specifically Pips) @marcrobledo , it's fixed now.

@marcrobledo
Copy link
Owner

Added a very basic horse editor, it can edit the horse type for now.

@marcrobledo marcrobledo pinned this issue May 20, 2023
@marcrobledo
Copy link
Owner

The horse name editor is currently disabled for security reasons.

Can anyone share a savegame with japanese/chinese/korean characters for horses so I can check if it's safe?

@Karlos007
Copy link

The horse name editor is currently disabled for security reasons.

Can anyone share a savegame with japanese/chinese/korean characters for horses so I can check if it's safe?

image
Ryujinx.zip
I tamed 3 horses on slots 7 8 9
game v1.1.1

@JonJaded
Copy link

The game still has the same 9 character limit from BOTW. I saw in the sav file that after each character of a horses name is a00 spacer, and I'm sure that's what you're worried about.

@marcrobledo
Copy link
Owner

Oh, wait, so there is room for more than six horses? I recall someone here saying it was six.
That would explain why the savegame horse data array length is 10.

@Dominic-Dom
Copy link

Yes you unlock more slots by getting points at the stables

@JonJaded
Copy link

Oh, wait, so there is room for more than six horses?

Yes there is, I definetly should've mentioned that. you start with 6 slots, (because the game transfers over 5 of your horses from BOTW + first horse you capture.) If it doesn't transfer, those slots are still available to you. You can then later upgrade your slot count after a certain amount of tickets at the stables.

As you said, 10 is the max.

@Karlos007
Copy link

image
The slot 6 should be GameRomHorseSpPattern
Is a normal looking horse but you get it from a quest.
Maybe it's a unique type.

@marcrobledo
Copy link
Owner

And Strength and Stamina editors are up!

@JonJaded
Copy link

progress.zip
Here's my horse with RWS. Last horse. My other horses have different bodies though. (Like I tried to change one of my horses to Epona but it did not work in game.)
So I wouldn't use their data as vanilla. RWS is 100% untouched though.

@marcrobledo
Copy link
Owner

Added Royal White Stallion, thank you @JonJaded !

From now on, when changing horse in the editor, it should set the correct value for special horses so they should appear correctly in-game (their icon might not match, though, I haven't tested it).

@Karlos007
Copy link

0100f2c0115b6000_2023-05-27_08-34-32-119
0100f2c0115b6000_2023-05-27_08-36-56-557

The editor is awersome,
I found a workaround for the in game icon, but requires editing an unregistered horse (00053E40).
At firsts looks like it doesn't change but after registering the icons get updated.

Note 1: The mane may require to be edited for giant horses.
Note 2: Killing and reviving doesn't update the icon.

@marcrobledo
Copy link
Owner

Added a new untested horse: Donkey.

@Xario123
Copy link

Xario123 commented May 27, 2023

You are really doing a great job with this program. Thank you!

However, I ran into a problem. I hope the attached archive will help you to improve the save editor. I put many screenshots and the 3 progress.sav to illustrate what happens with horses.

I have a game save from "TOTK" with which I recovered 5 horses from "BOTW". ("source_save" folder of the zip archive).

I load the "progress.sav" file from the "source_save" folder in the save editor to copy the data to transfer it to the "progress.sav" file from the "unmodified_save" folder.

The result is in the "progress.sav" file in the "modified_save" folder. Horses do not match game save from "source_save".
saves.zip

For information: Link's horse and Zelda's horse are available in this save game.

@geogeim
Copy link

geogeim commented May 28, 2023

Lord of the Mountain works, sort of.
If you overwrite a horse that is already taken out with these values it will appear ok, without extra mane and bridle
image
image
But if you put it back in the stable or recall it it will glitch out :)
Also if you set the stamina to infinite it will throw you down when you try to go faster :)

@Zullivan1987
Copy link

0100f2c0115b6000_2023-05-27_08-34-32-119 0100f2c0115b6000_2023-05-27_08-36-56-557

The editor is awersome, I found a workaround for the in game icon, but requires editing an unregistered horse (00053E40). At firsts looks like it doesn't change but after registering the icons get updated.

Note 1: The mane may require to be edited for giant horses. Note 2: Killing and reviving doesn't update the icon.

Can you add the function to delete at least the horses that are in the stable? I would like the option to delete or free horses to exist since the only option to add more horses to the game is to kill them and send them to the fairy's cemetery.

@neico
Copy link

neico commented May 28, 2023

While I approve of the possibility to remove horses (and maybe to reorder them),
you can replace horses natively in-game if you hit the current limit, basically overriding a slot of your choosing.

@ApacheThunder
Copy link

ApacheThunder commented May 28, 2023

So I've fiddled with the horse editor code to see what the limits are for the game and here's my findings:

  1. Setting Pull/Speed/etc stats beyond the normal maximum crashes the game when you attempt to mount the horse. (so sadly no Mach 5 horses that can pull mountains. :( )
  2. The above crash does not occur for stamina! I was able to set stamina to 9 on a horse and while the UI glitched a bit it seems to actually register that I have 9 stamina!

image
(it appears 7 is the cut off before it it displays incorrectly)

Also setting stamina to 1 is also possible so if you want the lamest horse to ever exist you can do that too. Satori's special version of infinite stamina doesn't appear be possible it looks like. The value of 1 which I thought might be it just set him to 1 stamina bar and values above 5 just adds more bars of stamina to him. So he only gets his infinite stat in the wild? Maybe there's a unique int value for it but someone would have to data-mine that I suppose.

Also you can set the other stats to 1 too though for some reason. So while you can't go above 5 stars on the other stats without the game crashing it seems you can set them to 1 star. Behold the lamest possible horse!

image

:P

Anyways I suggest adding a new selection to the Stamina drop down menu. Perhaps a Custom entry which enables a text field that lets the user type in the custom value they want. Not sure what you can do in JavaScript/HTML but I'm sure something like that should be possible. Limit it to valid int values of coarse and prevent the user from using negative values as I'm not sure how the game would handle that. :P

I tried a value as high as 256 and the game seems to indicate that it handles it because I could tap A for a long time and never seemingly run out. :P

I tested putting them in/out of Stable. The Stable UI doesn't display the stamina stat beyond 5 stars so it doesn't break the Stable UI at least. :D

I'm not sure why the game doesn't like the other stats being higher then 5. Maybe they are handled differently and the editor isn't correctly setting them when going higher then 4 int value (unlike stamina int values don't exactly match the star count in the game's UI)...but I'm not really a programmer so I can't say much on that. Just speculating at this point.

@ApacheThunder
Copy link

ApacheThunder commented May 28, 2023

Also if you set the stamina to infinite it will throw you down when you try to go faster :)

I believe that might be due to his temperment stat? The editor can't currently set that. It might be something set by the horse type and not something the editor can change. A wild temperment = he kicks you off if you try to overwork them. Though I could be wrong. I forget what temperment the Giant White Stalion is and he's also a horse with infinite stamina and he doesn't kick you off if you try to hit A too much.

I seem to recall Satori's stamina bar is unique from normal horses too so you normally don't get the no stamina bar infinite stamina the other infinite stamina horses have and it doesn't look you can set it to that via the editor at least. Might be a unique stat only Satori/Lord of the Mountain has while in the wild.

It looks like Yuzu can dump RomFS so I will attempt the datamine the other animal types and test setting them in the horse editor. The JS code for the horse editor is understandable enough for me to attempt adding entries. I have more experience with C# stuff as I made mods for an unrelated game that used that code type but JS stuff is somewhat readable to me. :P

EDIT:

LOL I was able to set a horse to a blupee. It runs off screen every time I navigate the equipment menus. He runs forever and can't vanish. :P (yes you can farm rupees from him. :P )

image

So my adventures in animal testing has begone. :P

@ApacheThunder
Copy link

ApacheThunder commented May 29, 2023

Ok here's my test results. It looks like you could use most animal actor IDs without much game breakage beyond not being able to ride them. Which is interesting. I am curious as to why I can spawn animals this way but not NPCs. :(

Animal_Wolf_A - Spawns a wolf that runs away. If you catch up to him after he's done running he'll attack you. Interesting note if you kill him he does not vanish into meat and remains as a corpse. Stable doesn't recognize him as dead so you can just take him out again. (this likely applies to all animals spawned this way)
Animal_Donkey_B - Spawns with working collision. Can use donkey equipment but it doesn't let Link mount him. I believe this was the proper actor name used for the donkey's seen in the overworld. (no idea where the other name came from. It seems some horse names don't correspond to file names found in the game's AS folder so there might be a string table somewhere for this?)
Animal_Donkey_C - Works kinda. Shows up with no equipment. Has no collision and you can't mount him. (though it does react to sword slashes)
Animal_Cow_A - Spawns cow. Has collision and reacts to sword slashes (even walks to a different location to get away). Can't mount him.

It seems most if not all the Animal type Actor IDs work. I don't have the time to test them all so I'll post them here for others to experiment with:

Animal_Bear_A
Animal_Boar_A
Animal_Bull_A
Animal_Cassowary_A
Animal_Cow_A
Animal_Crow_A
Animal_Deer_A
Animal_Dog_A
Animal_Donkey_B
Animal_Donkey_C
Animal_Elk_A
Animal_Fish_A
Animal_Fish_Sell_B
Animal_Fox_A
Animal_Goat_B
Animal_Gull_A
Animal_Gull_Swarm
Animal_Hawk_A
Animal_Heron_A
Animal_Horse_A
Animal_Horse_A_00L
Animal_Insect_Beetle
Animal_Insect_Crab
Animal_Insect_Fairy
Animal_Insect_FireFly
Animal_Insect_Lizard
Animal_Insect_N
Animal_Kokko_A
Animal_LittleBird_A
Animal_Pao_A
Animal_Pigeon_A
Animal_RupeeRabbit_A
Animal_Sheep_A
Animal_SkyCassowary_A
Animal_Squirrel_A
Animal_Sunazarashi
Animal_Sunazarashi_B
Animal_SunazarashiSP_C
Animal_UnderInsect
Animal_WildDuck_A
Animal_WildGoat_A
Animal_Wolf_A

Most animals can be killed and their corpses will remain until you respawn them at a stable. It seems they don't register as dead to the stable system so I suppose you could do some funny things with the corpses if you want. Would be funny to try out some fish or insects but I want to spend time testing other stuff. :P

Even normal horse corpses despawn after awhile but the animal ones won't. That also means animals that despawn after they run away can't despawn either. That includes blupees which usually despawn pretty quickly.

I tested some other non animal stuff like NPCs and enemies. Most just result in glitched underworld camera view with nothing spawning.

I did get something to show up kinda with Npc_Zelda_Opening. It appears non supported stuff sometimes spawn something but they appear out of bounds for some reason. Case in point the Zelda NPC from prologue. She is briefly seen falling in an unknown area underground before going off screen (She even spawned with her torch). I think maybe a collision issue? Could be the area under the normal spawn spot for horses removed from the stable. But partially/fully clipped into ground causing them to fall into the void? I tried BackseatKorok as well which appears to be the actor name for those backpack Koroks but sadly no Koroks on demand with that one. I can't tell if anything at all spawns in the void with that one either.

EDIT: Tested the mini stable at Lookout. Not sure if this NPC can be spawned at any stable but here it does.

image

I may have made a mistake on who to call forth from the stable gods. :P

EDIT: Ok he just sits there doing nothing. Has collision but that's it. Thank god. Was worried he'd murder me the moment I exited the horse NPC's dialog. :P

EDIT2. Found a usable NPC/Thing

Npc_RaumiGolem_Sage

This spawns a certain something that you can use in towns which makes it better then the one you normally take with you. ;)

It appears to be fully functional! For some odd reason you can assign a mane to it which seems to show up. It's kinda cursed. :P

I mean I suppose it's kinda like a horse....

This one is fun to use so I'm probably gonna assign it to a slot on my main copy of ToTK on my Switch. :D

@VIXIVIXIV
Copy link

I did some messing around, and I think the horse editor right now has a major flaw (and the BOTW editor has this flaw too, but nobody cared because they chose a horse for looks first and modded in the stats after the fact): the color data is completely ignored. The "horse type" field probably only sets the coat pattern and muzzle pattern, the colorway (base color, pattern color, and muzzle color) are stored elsewhere in the save file and cannot be edited with the current editor.

For example, I took the transferred BOTW horse data from a fresh TOTK save, copied just the horse types, and then edited in the missing fields for health, name, bond, etc. The horses show up as registered at stables, but their coats in their profile pictures are blacked out and their manes are white, probably because the color data is missing. Taking them out grants a horse with a default coat color which doesn't match the original BOTW save in the slightest.

This color issue may also explain why changing the horse type doesn't update the profile picture, it's because it's an irrelevant variable. The profile picture has a separate, reduced "type" (because if you ignore the differences in body patterns, there are only like 5 distinct muzzle patterns), and then populates the rest of the picture using the color data.

So, fair warning to those wanting to backport their BOTW horses: currently not possible unless you go to the effort of seeking out horses with matching color sets which you'll then change the type to match.

@ApacheThunder
Copy link

ApacheThunder commented May 29, 2023

I found another folder with a more complete list of actor names. I managed to spawn prolog zelda's torch and now have it in my inventory:

image
image

An unexpected way of finding a new weapon ID but hey it works:

image

Maybe add that to the weapon editor. :P Interesting note it's actor name is the same as the weapon ID. Might help others looking for other unused weapons in the game perhaps. ;)

The MsgNotFound version of Zelda's torch seems distinct from the one you find when going down the castle chasm. That one I think was just a standard torch though I haven't actually explored that area yet so could be wrong. Not sure if this one is unbreakable or not. The weapon durablity glint went away after I did a ground pound with it so it might be breakable?

EDIT: Yeah it's breakable. I managed to cut down a tree with it before it finally broke. I picked up a normal torch and saw that it has a damage stat of 2 so this one is just a real buff version of the regular torch with a fancy icon. Odd ...why would Zelda's torch have a weapon icon?

EDIT2: Holy crap the Stable system in this game is way more stable then I thought. I can spawn just about anything with it!

I found the actor name for the backpack koroks:

KorokCarryPassenger_Pair

(There is also KorokCarryPassenger_Pair_BP which is just the backpack without the korok which you can move around with Ultrahand. Unlike the other one there is no Korok so no dialog when you go to move it. But it's got no Korok buddy on it so not as fun. :P )

(have fun with that. Game does not soft lock when you try to move/talk to him. He does his usual dialog but the camera never pans to show the destination he wants to be so it goes back to him and finishes his dialog. He's a korok buddy with no destination and if you assign him as a horse you can put him anywhere and the game will remember where you put him! :D )

Anyways a lot of the actor names I wasn't getting spawns for might have came down to not being the correct names for them. The Actor folder in the Pack folder seems to contain usuable actor names so go there when finding horses and such. ;) )

I was able to spawn most NPCs once I know their correct names. Though some bug out like the prolog zelda NPC. She falls into the abyss for some unknown reason. Maybe it requires additional setup that was only provided by the prolog event data. Interesting note, I spawned one of the regional 4 NPCs (Riju for example) and you can talk to them. They seem to know where you are in the quest and gives you the correct dialog.

Though unlike the backpack Korok NPC there's limited usefulness for spawning them from stables as you can't really move them anywhere. Maybe one of the regional 4 NPCs would activate and follow you around if you were in a specific part of their quest? Someone with an incomplete regional 4 quest line would need to test that.

EDIT: Here's my tweet showing off my own personal korok buddy I pulled from a stable:

https://twitter.com/Tankerbot/status/1663348599076397056

So yeah stables are surprisingly flexible with what you can spawn with them as long as said things operate correctly in a default state..

EDIT2: Also found DummyHorse. This appears to be a NPC horse seen in stables or horses pulled along by NPCs (but not ridden by them?

This horse can't be killed and can't be mounted. Comes with saddle that I recall the stable can't override.

@KrisCris
Copy link

KrisCris commented Jun 1, 2023

Will it be possible to edit untamed horse, similar to what we can do in the BotW editor?

@ApacheThunder
Copy link

ApacheThunder commented Jun 1, 2023

Untamed horses show up as a different actor ID. As I recall these would be base actor ID they all live under before being saved in a stable (also possible horse in the stables retain some data from the base animal Actor IDs they came from). Here's their Actor IDs:

Animal_Horse_A
Animal_Horse_A_00L
Animal_Horse_A_01L
Animal_Horse_A_Epona
Animal_Horse_A_Gold
Animal_Horse_A_SpPattern
Animal_Horse_A_Zelda
Animal_Horse_B
Animal_Horse_NoMove
Animal_Horse_Nushi

Not sure what the NoMove one. That one maybe ones seen hanging out inside the stable pens. It doesn't looks like these IDs are usable in the stables though. Tried Animal_Horse_Nushi and got nothing. (the camera in the void bug happens if you give it a actor ID that either doesn't exist or isn't a compatible actor for the stables)

@geogeim
Copy link

geogeim commented Jun 1, 2023

Not sure what the NoMove one. That one maybe ones seen hanging out inside the stable pens. It doesn't looks like these IDs are usable in the stables though. Tried Animal_Horse_Nushi and got nothing. (the camera in the void bug happens if you give it a actor ID that either doesn't exist or isn't a compatible actor for the stables)

If you get the weird camera it probably means you don't have a valid saddle/mane/reins.

@geogeim
Copy link

geogeim commented Jun 1, 2023

here are a few interesting ones:

Dm_Npc_Zelda_Catch // go where the horse sign is on map and press A, it will play the end game sequence
Enemy_Dragon_Darkness // will spawn dragon ganon, you can fight him

@ApacheThunder
Copy link

Not sure what the NoMove one. That one maybe ones seen hanging out inside the stable pens. It doesn't looks like these IDs are usable in the stables though. Tried Animal_Horse_Nushi and got nothing. (the camera in the void bug happens if you give it a actor ID that either doesn't exist or isn't a compatible actor for the stables)

If you get the weird camera it probably means you don't have a valid saddle/mane/reins.

I always have those set so it's just that some Actor IDs aren't recognized by the stable. I had rains/saddles defined in all my tests. There are many NPCs I've spawned that the saddle/rains don't attach to or appear on so it's not an issue of them not being able to attach to anything. (though it does look super cursed when you get a NPC combo that does accept a mane/bridle/saddle. I think Tulin was one NPC that it worked on. :P )

@marcrobledo marcrobledo unpinned this issue Jun 4, 2023
@luciilesbo
Copy link

luciilesbo commented Jun 5, 2023

is it possible to get a deer?
(also, is it possible to get an invisible saddle/bridle?)

@miraclematters
Copy link

Sorry to add onto this, but does the lord of the mountain have to be put over a specific horse in order to enable physics for the tail / antennae /etc?

@darkangle0512
Copy link

It's personally but can we have function that allow to switch horse slot (change horse order) ?

@marcrobledo
Copy link
Owner

It's personally but can we have function that allow to switch horse slot (change horse order) ?

You can export a horse into json format then reimport it in any other slot. That would allow you to switch horse slots.

@Peduls
Copy link

Peduls commented Aug 14, 2023

You can bypass the 9 character limit when naming your horse using your BotW Save Editor. It'd be great if you could add that into the TotK Save Editor as well.

@marcrobledo
Copy link
Owner

You can bypass the 9 character limit when naming your horse using your BotW Save Editor. It'd be great if you could add that into the TotK Save Editor as well.

I recall I tried that back when the game was released and I think it was impossible (I might be wrong though).

If anyone wants to try, just change the value at zelda-totk.class.horse, line 112. Set maxLength to anything longer than 9 (but shorter than 16) and see if it works.

@MJr0019 MJr0019 closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests