savegame-editors icon indicating copy to clipboard operation
savegame-editors copied to clipboard

TOTK request feature : Autobuilder import/export

Open cualquiercosa327 opened this issue 1 year ago • 62 comments

Hello, first thanks for your great work! I would love ask if it could be added a way to extract and injection devices which are on the Autobuilder memory, this way players could share their creations. Thanks!

cualquiercosa327 avatar May 22 '23 11:05 cualquiercosa327

Sounds good! I wasn't aware you could save creations. This is definitively a very cool idea and will happen sooner or later, but I haven't unlocked that Autobuilder yet haha.

marcrobledo avatar May 23 '23 10:05 marcrobledo

It will require to export a big chunk of memory as binary or something. The game remembers the last 30 builds, and 8 of them can be pinned so they don't get deleted.

Karlos007 avatar May 24 '23 14:05 Karlos007

Sounds like a good challenge :-P Can't wait to unlock the Autobuilder and start toying with it.

marcrobledo avatar May 24 '23 17:05 marcrobledo

The save file is very big but it doesn't change when it is unlock : i suppose it is filled with 0 until it is unlocked.

If you want maintaining having life, stop playing : it makes too addictive 😉.

In fact the game gets better the more one advance (i dont want spoiler you).

If you want i can sent my savegame although the creations are simply copy of some already done by developers I add a piece which let me keep as mine.

cualquiercosa327 avatar May 27 '23 10:05 cualquiercosa327

Not massively experienced with hex editing but having a dive I believe it's identifable as to your history for autobuilds. I created a simple rocket + water hydrant combo and was able to find it within the hex. Will continue to do some more digging!

Rocket: SpObj_Rocket_A_01 Water hydrant: SpObj_WaterPump_A_01

Not sure if this of any use but thought I'd post this here!

image

Edit: another observation is that each autobuild history starts with "CmbAct" I believe. image

harbour0 avatar Jun 03 '23 09:06 harbour0

Excuse me, how much is their size? Is it constant? If I can i will look mine tomorrow Thanks

cualquiercosa327 avatar Jun 03 '23 12:06 cualquiercosa327

Excuse me, how much is their size? Is it constant? If I can i will look mine tomorrow Thanks For me the size of every build is 6692 bytes (0x1A24) There are 30 slots (including 8 favorites) Data starts maybe around 000DB6DC or 000D7A5C on v1.1

You can summon small monsters if you change the objects (With big ones you can't press a to build).

Karlos007 avatar Jun 03 '23 12:06 Karlos007

Excuse me, how much is their size? Is it constant? If I can i will look mine tomorrow Thanks

If you can direct me on how to locate size; I can let you know. I am new to the HxD / .sav / hex scene lol.

I have some programming experience behind me so ideally; if we can locate this I can potentially chuck a PR in to allow us to export / import these autobuilds.

Ideally; we could look to extracting the objects with their positions -> export to json -> and handle it that way.

harbour0 avatar Jun 03 '23 12:06 harbour0

Excuse me, how much is their size? Is it constant? If I can i will look mine tomorrow Thanks

If you can direct me on how to locate size; I can let you know. I am new to the HxD / .sav / hex scene lol.

I have some programming experience behind me so ideally; if we can locate this I can potentially chuck a PR in to allow us to export / import these autobuilds.

Ideally; we could look to extracting the objects with their positions -> export to json -> and handle it that way.

It depends of the hex-editor. HxD works great. You can select with the mouse all the bytes and it will show the size on the lower part. You can copy it also Then create a new file and paste it. (it does no care the extension) Other can use that file and replace the own save with it (on the address of one build).

We need to know how it kept the favorites for avoid issues (i suppose they have a little mark.

We can interchange build this way but for exporting and importing in an accessible way the best is the dev implant on the program. I don't know if it also saves a picture of it.

I am agree it would great having a file format to share it: that way we can kept a lot of them organized.

cualquiercosa327 avatar Jun 03 '23 12:06 cualquiercosa327

Excuse me, how much is their size? Is it constant? If I can i will look mine tomorrow Thanks

If you can direct me on how to locate size; I can let you know. I am new to the HxD / .sav / hex scene lol. I have some programming experience behind me so ideally; if we can locate this I can potentially chuck a PR in to allow us to export / import these autobuilds. Ideally; we could look to extracting the objects with their positions -> export to json -> and handle it that way.

It depends of the hex-editor. HxD works great. You can select with the mouse all the bytes and it will show the size on the lower part. You can copy it also Then create a new file and paste it. (it does no care the extension) Other can use that file and replace the own save with it (on the address of one build).

We need to know how it kept the favorites for avoid issues (i suppose they have a little mark.

We can interchange build this way but for exporting and importing in an accessible way the best is the dev implant on the program. I don't know if it also saves a picture of it.

I am agree it would great having a file format to share it: that way we can kept a lot of them organized.

Looking for favourites was my next task. If we can at least bump up favourites to over 8 that would be a good start.

Regarding images; I would assume it's saved somewhere kinda like how the saves work. There is a chance it's generated on the fly as save images are stored within a seperate file.

I'll keep you posted with my findings!

harbour0 avatar Jun 03 '23 12:06 harbour0

Oh, i didn't read the important part :

"For me the size of every build is 6692 bytes (0x1A24) There are 30 slots (including 8 favorites) Data starts maybe around 000DB6DC or 000D7A5C on v1.1 "

...... It seems they are something wrong : the game has 30 for the history AND 8 for favorites according the game it kepts 38.

I looking for the String "CmbAct", they are 30 of them all of a fixed size : 6692 bytes (0x1A24).

Mine began on the address D7A94. Block D7A94 - 108ACB. Next block of zeros, whose size is 38hex: 108ACC-108B03 . I think it can be important because it saves 38 builds.

Probably the favorites are before that block, sadly am no at home.

I changed one block of CmbAct with other different of the save2. I restore the save on my Switch and it worked perfectly.

I looked on both saves but the icon has no changed. I have just seen my mistake: i changed the data of how to build, but no the icon data!! It is no build on the fly, it is on the save. I attached a file with my block. It has also individual builds because I was replacing them on my save.

Note : i dont know if the schemes are on the savefile also nor the vehicles the monster already have (i doubt that, it will be on one file if the game)

....... No needed for this..... I would love the limit of things can be attached and how behaves the physics engine.

Of course it is no important now but they kept on some way a 3d model. I would bet every object has its index, plus the position it is (the position include the differences from the item on "normal" state) nor where it is and what part joins the others.

The first object no need the extra information of position and it is no joined.

Ii know it is out the scope of the save editor which only need to extract/import the full chunk and add the picture it is showed,but i am thinking on how deep the game is and all options it gives for modders and new proyects. As example a model editor/viewer independent of the included on the game : with the 3d model and texture exported and its ID. ............ Excuse the speech: I LOVE this game.

Autobuilder.zip

cualquiercosa327 avatar Jun 03 '23 16:06 cualquiercosa327

Oh, i didn't read the important part :

### For me the size of every build is 6692 bytes (0x1A24) There are 30 slots (including 8 favorites) Data starts maybe around 000DB6DC or 000D7A5C on v1.1

...... It seems they are something wrong : the game has 30 for the temp AND 8 for favorites according the game it kepts 38.

I looking for the String "CmbAct", they are 30 of them all of 6692 bytes (0x1A24).

Mine began on the address D7A94. After that block they are a little block of 0, of size 38 hex.

Probably the favorites are before, sadly I had already closed the pc.

I changed one block of CmbAct with other different of the save2. I restore the save on my Switch and it worked perfectly.

I looked on both saves but the icon has no changed. I have just seen my mistake: i changed the data of how to build, but no the icon data!! It is no build on the fly, it is on the save.

Note : i dont know if the schemes are on the savefile also nor the vehicles the monster already have (i doubt that, it will be on one file if the game)

I would love the limit of things can be attached and how behaves the physics engine.

Of course it is no important now but they kept on some way a 3d model. I would bet every object has its index, plus the position it is (the position include the differences from the item on "normal" state) nor where it is and what part joins the others.

The first object no need the extra information of position and it is no joined.

Ii know it is out the scope of the save editor which only need to extract/import the full chunk and add the picture it is showed,but i am thinking on how deep the game is and all options it gives for modders and new proyects. As example a model editor/viewer independent of the included on the game : with the 3d model and texture exported and its ID.

Excuse the speech: I LOVE this game.

Yes I noticed a lot of spacing between each history item also.

I assumed that the way they are saved is how you mentioned; item -> it's rotation -> where it connects via the glue.

I haven't been able to locate the favourite info yet. I did a comparison of 2 saves; one with a favourite and one removed and it was difficult to notice the difference; I was hoping there was a flag being set of some sort.

Again though, I'm not massively experience in the world of hex or any yuzu modding lol.

I'll keep posted on here and look forward to seeing what everyone finds!

EDIT:

Mine started D7A90

harbour0 avatar Jun 03 '23 18:06 harbour0

Oh, i didn't read the important part : ### For me the size of every build is 6692 bytes (0x1A24) There are 30 slots (including 8 favorites) Data starts maybe around 000DB6DC or 000D7A5C on v1.1 ...... It seems they are something wrong : the game has 30 for the temp AND 8 for favorites according the game it kepts 38. I looking for the String "CmbAct", they are 30 of them all of 6692 bytes (0x1A24). Mine began on the address D7A94. After that block they are a little block of 0, of size 38 hex. Probably the favorites are before, sadly I had already closed the pc. I changed one block of CmbAct with other different of the save2. I restore the save on my Switch and it worked perfectly. I looked on both saves but the icon has no changed. I have just seen my mistake: i changed the data of how to build, but no the icon data!! It is no build on the fly, it is on the save. Note : i dont know if the schemes are on the savefile also nor the vehicles the monster already have (i doubt that, it will be on one file if the game) I would love the limit of things can be attached and how behaves the physics engine. Of course it is no important now but they kept on some way a 3d model. I would bet every object has its index, plus the position it is (the position include the differences from the item on "normal" state) nor where it is and what part joins the others. The first object no need the extra information of position and it is no joined. Ii know it is out the scope of the save editor which only need to extract/import the full chunk and add the picture it is showed,but i am thinking on how deep the game is and all options it gives for modders and new proyects. As example a model editor/viewer independent of the included on the game : with the 3d model and texture exported and its ID. Excuse the speech: I LOVE this game.

Yes I noticed a lot of spacing between each history item also.

I assumed that the way they are saved is how you mentioned; item -> it's rotation -> where it connects via the glue.

I haven't been able to locate the favourite info yet. I did a comparison of 2 saves; one with a favourite and one removed and it was difficult to notice the difference; I was hoping there was a flag being set of some sort.

Again though, I'm not massively experience in the world of hex or any yuzu modding lol.

I'll keep posted on here and look forward to seeing what everyone finds!

EDIT:

Mine started D7A90

I believe the others are on the blocks before that. 8 blocks of size = 0x1a24 (maybe more if it has a flag of favorites but i doubt.)

Ah, very useful on HxD:

control+G go to
control+E select block

cualquiercosa327 avatar Jun 03 '23 18:06 cualquiercosa327

Got an importer/exporter working already ;-)

marcrobledo avatar Jun 03 '23 18:06 marcrobledo

Got an importer/exporter working already ;-)

Bravo!

Were we in the right direction ?

harbour0 avatar Jun 03 '23 19:06 harbour0

Got an importer/exporter working already ;-)

Bravo!

Were we in the right direction ?

You were mising other needed bits for the thumbnail, but other than that yeah, you got the real data size ;-)

marcrobledo avatar Jun 03 '23 19:06 marcrobledo

Got an importer/exporter working already ;-)

Bravo!

Were we in the right direction ?

You were mising other needed bits for the thumbnail, but other than that yeah, you got the real data size ;-)

Amazing stuff! Can't wait to see it on master.

Are you looking to export it to a better format such as JSON?

Means we can create a little database with these and potentially create a system to retrieve and insert users creations with ease!

harbour0 avatar Jun 03 '23 19:06 harbour0

Got an importer/exporter working already ;-)

Bravo!

Were we in the right direction ?

You were mising other needed bits for the thumbnail, but other than that yeah, you got the real data size ;-)

Amazing stuff! Can't wait to see it on master.

Are you looking to export it to a better format such as JSON?

Means we can create a little database with these and potentially create a system to retrieve and insert users creations with ease!

If you talk about users can import it easily, it is no needed convert to Json : simply copy the chunk of data, save it on a file and share it(you can see examples on the file I attached).Once the user wants that creation, he/she upload their save file to the web and press the butto: it will replace tone of the builds with the new one.

cualquiercosa327 avatar Jun 03 '23 20:06 cualquiercosa327

I uploaded a very preliminary version. I've tested it and managed to clone one of my designs into other slots, so I figure it's functional.

~~The only issue I found is that the thumbnail gets a different camera angle for some reason. I'll take a look at it tomorrow.~~ Should be fixed now!

Enjoy :-)

marcrobledo avatar Jun 03 '23 22:06 marcrobledo

I uploaded a very preliminary version. I've tested it and managed to clone one of my designs into other slots, so I figure it's functional.

~~The only issue I found is that the thumbnail gets a different camera angle for some reason. I'll take a look at it tomorrow.~~ Should be fixed now!

Enjoy :-)

I'll give it a shot shortly!

Thanks again for your hard work 🤝

harbour0 avatar Jun 03 '23 23:06 harbour0

image

my_autobuilder_1.zip

You are the best!

Karlos007 avatar Jun 03 '23 23:06 Karlos007

Just curious; is the image stored within the data or generated in-game? Would be cool to view the schema on the editor so you know you've selected the correct one!

Once again, amazing work!

harbour0 avatar Jun 03 '23 23:06 harbour0

Great work! Have you understand already the how "combinedActorInfo" is coded? I know it is more than needed for an importer/exporter but I would love could delete any item. The reason? For having the machines the monsters use, I add one object ( with one is enough) as this way the build is saved on my autobuilder.

I see you have already discovered the offset of the variables : cameraPos, cameraAt and isFavorite for the full build. Thanks for your awesome work!

cualquiercosa327 avatar Jun 04 '23 00:06 cualquiercosa327

Haha I'm already doing crazy stuff with auto build:

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

Thanks to that I found where in my save some of my autobuild history is in. The slot names in the current version of the editor makes it hard to tell what they correspond to in game so instead I just searched by actor ID name in my save file and directly and replaced one object with another. It seems I can use longer or shorter names then the original so long as I use 00 hex value to correctly end the string.

Anyways I hope eventually the autobuild features eventually let you set position/rotation cooridents for autobuild objects. I tried to spawn something a bit larger and it seems if it overlaps with another object in the autobuild plan it will say there isn't room to build it so that limits me if I can't move them. It doesn't seem to matter if they are too far apart to actually connect. At least with my test of the NPC Zelda object. It just never connected to the korok NPC object and remained where I spawned it. :P

Sadly I could not use Korok backpack NPCs in my plan without the camera bugging out and it auto canceling. (normally it spawns a green backpack that doesn't have the korok NPC on it). So no full korok backpack NPC on demand it seems. :(

It does seem the autobuild thumbnails are saved as images somewhere. The object swaps I did not alter the thumbnail for it.

EDIT: Lol spawned a bokoblin with it. They spawn larger then normal too. The attached backpack korok just vainishes instantly because it it's the green korokless one and since it failed to attach it just vainishes. The bokoblin remained though. A good way to spawn random crap if you want. Seems better then via stables at least. :P

Note that the bokoblin would not attack if I spawned him in an area near a stable and one time he just vanishes. After I went out of the safe zone of the stable, he saw me and started attacking. killing him dropped the normal loot for a Bokoblin.

ApacheThunder avatar Jun 04 '23 04:06 ApacheThunder

Just curious; is the image stored within the data or generated in-game? Would be cool to view the schema on the editor so you know you've selected the correct one!

It is generated in real time.

It does seem the autobuild thumbnails are saved as images somewhere. The object swaps I did not alter the thumbnail for it.

The thumbnails are generated in real time, but probably the game just loads the environmental object models and ignores the rest.

Have you understand already the how "combinedActorInfo" is coded?

Anyways I hope eventually the autobuild features eventually let you set position/rotation cooridents for autobuild objects.

Sadly, if I ever add editing features, it will be very basic without no 3D model preview, as that sounds almost like another project by itself.

marcrobledo avatar Jun 04 '23 06:06 marcrobledo

Have you understand already the how "combinedActorInfo" is coded?

Anyways I hope eventually the autobuild features eventually let you set position/rotation cooridents for autobuild objects.

Sadly, if I ever add editing features, it will be very basic without no 3D model preview, as that sounds almost like another project by itself.

I agree you it will add things the editor doesn't need : if is better build an 3d viewer/editor independient.

What i mean is the editor render the thumbnail and maybe an option where it list the items the "device" has and let you check them to let all or quit and Although as you said it can be too much.

Thanks for your awesome work!

Note: it would be great the option of removing slots (put the code of a void one): Lots of times they are only garbage although the editor should show a flag on the favourites for avoid mistakes. Almost until the preview/thumbnail is added (if it is added)

I don't know why I saw 38 slots

cualquiercosa327 avatar Jun 04 '23 08:06 cualquiercosa327

Have you understand already the how "combinedActorInfo" is coded?

Anyways I hope eventually the autobuild features eventually let you set position/rotation cooridents for autobuild objects.

Sadly, if I ever add editing features, it will be very basic without no 3D model preview, as that sounds almost like another project by itself.

I agree you it will add things the editor doesn't need : if is better build an 3d viewer/editor independient.

What i mean is the editor render the thumbnail and maybe an option where it

list the items the "device" has and let you check them to let all or quit and

Although as you said it can be too much.

Thanks for your awesome work!

Note: it would be great the option of removing slots (put the code of a void one): Lots of times they are only garbage although the editor should show a flag on the favourites for avoid mistakes.

Almost until the preview/thumbnail is added (if it is added)

I don't know why I saw 38 slots

This is exactly why I recommend exporting it to a more readable such as JSON. It'll allow for it to be modified a lot more easier and can allow for us to create and export builds with ease.

It might be worth externally looking at creating a solution that will render and allow for these modifications of the auto builds to happen!

Love the discussion going on here :)

harbour0 avatar Jun 04 '23 15:06 harbour0

Could there be a way to have a repository where we could upload/download our creations easily?

Shideravan avatar Jun 04 '23 16:06 Shideravan

The biggest single object that is registerable in Autobuild seems to be "Obj_BoneWhale_A_02" which is found in the southwestern most cave in the desert (southwest of Lighting Temple.) The room size data of the entire blueprint is stored separately (independent of the objects stored but still within the data block I assume), but I'm not sure where exactly they are, maybe at the very end or the very beginning. If we could find that we can technically spawn every ActorName without the restriction of the No Room error.

Slightly off topic: Even still, I couldn't get larger enemies like Lynel to spawn in without the No Room error. However, by executing a glitch called Autobuild Cancel Slide (present on 1.0 - 1.1.1, patched out on 1.1.2,) I was able to get it to stay while letting Link to attack it: files.catbox.moe/p9oy61.mp4

The best I could come up with Enemy ActorNames is Enemy_Octarock_Stone , you can repair your equipment with it: https://files.catbox.moe/eoia36.mp4 Here's the autobuild export: my_autobuilder_2.zip

0757myt avatar Jun 04 '23 17:06 0757myt

Could there be a way to have a repository where we could upload/download our creations easily?

We only need a good place for it. Probably gbatemp.net be one of the best.

Also, in my view, it would be nice is it were split on two kind : the one which can be build on the game and other with the ones which use custom ones as Nintendo can easily patch it (they only need to add a code to verify if the item is on a list with the one allowed)

cualquiercosa327 avatar Jun 04 '23 18:06 cualquiercosa327