-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Keep original values when saving based on Map version #1146
Conversation
the changes have been tested on terraria IOS mobile 1.3.0.7 (latest)
Thanks for the PR. These changes are pretty extensive so I will need to test a several scenarios. Alternatively, the previous release can be used for now. |
@@ -310,7 +319,7 @@ public static int SaveNPCs(IEnumerable<NPC> npcs, BinaryWriter bw) | |||
foreach (NPC npc in npcs) | |||
{ | |||
bw.Write(true); | |||
bw.Write(npc.SpriteId); | |||
bw.Write(npc.Name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this change made? Is this an IOS save file format?
@@ -21,8 +21,10 @@ private static void SaveV2(World world, BinaryWriter bw) | |||
{ | |||
world.Validate(); | |||
|
|||
// initialize tileframeimportance array if empty | |||
if (TileFrameImportant == null || TileFrameImportant.Length < TileCount) | |||
if (TileFrameImportant.Length < TileCount && TileFrameImportant.Length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If framed tiles change between versions there could be issues here. I don't know if this is something that can be fixed here without keeping track of framed tiles for every version.
If you can rebase and update this with the latest changes I will test and merge it. Could you also attach a world file to test with? Thanks. |
An iOS world file?
…On Sun, 24 May 2020 at 16:37, BinaryConstruct ***@***.***> wrote:
If you can rebase and update this with the latest changes I will test and
merge it. Could you also attach a world file to test with? Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4HJYLU5NUDTXMGCPVN6RDRTC6EFANCNFSM4IYGVHKQ>
.
|
Yes, please. |
Just downloaded terraria again on iOS Terraria IOS is still on v1.3.0.7.9 build 390 Test world is a new blank created world. The other two worlds are more advanced with few buildings and chests and npcs etc. By the way, where do I upload it here? Just in a new issue? I did delete the local repo after few weeks of no activity in that project so I haven’t had the time to check it out again and migrate any of your other changes done for 1.4 ... I hope I can have a look / play on the weekend and then I can do the rebase |
This has been merged. Thanks for the idea! |
Changed the saving routine to take into account what the current map version is
this allows to modify maps from terraria mobile (iOS), save them and load them up in the game again
without any issues.