ti-assistant / issues

All bug reports, planned features, and ideas for the TI Assistant
1 stars 0 forks source link

5p warp maps break when the hyperlanes are not where expected (anywhere but the middle low slice) #51

Closed luisguirc closed 1 week ago

luisguirc commented 2 weeks ago

Hey! First of all, thanks for all the effort put in the tool! My group cannot play TI$ without it anymore. Now, let's go to the issue.

I tried to load a map string for a 5p warp map. The map string is: 86A3 61 64 59 62 63 67 88A1 69 41 65 68 72 80 66 40 75 87A5 85A3 84A 45 0 74 49 0 37 39 0 60 77 0 76 79 0 70 83A

The map image got bugged: image

The expected was: image

It is probably because I built the map without the default hyperlane location, but it would be nice to be able to put the hyperlanes anywhere when wanted.

Thanks a lot!

SephHawkins commented 2 weeks ago

Hey thanks for reporting this - I took a pass at fixing it yesterday, but still need to fix a couple of things before it's working correctly.

Essentially, the issue was that the logic for merging the template with the passed in map string was deferring to the template more than it should've - essentially it was starting with the template and only overwriting systems that were not explicitly set by the template.

I'm updating it so that it defers primarily to the passed in map string - the main exception being if the passed in string doesn't have the right number of home systems (or "0" systems), in which case the app will need to fall back on using the home systems from the template.

FWIW, if you use the Map Builder and manually set the home systems, the map string that it gives you will work correctly since it explicitly sets the home systems. Obviously, this isn't ideal, but just in case you have a game coming up before I get the fix in, I figured I'd give you the alternative.

SephHawkins commented 1 week ago

This is now fixed - as long as the map has the correct number of "0" (or "P#") systems, the map will be used as is without trying to merge it with the template.