TheOddler / FactorioWorld

A mod for factorio that changes the map into a real-world map.
25 stars 3 forks source link

Version 1.1.0 #19

Closed HySpeed closed 2 years ago

HySpeed commented 2 years ago

I'm happy to make changes and test if there are better ways to do things.

As I understand it, the game initially puts 0,0 at the top left of the map's initial layout. The value in the 'spawns.lua' is the offset from that. After the map has been created, the spawn point becomes 0,0 and locations are relative to that.

HySpeed commented 2 years ago

I tested spawning with both repeat and non-repeat settings. Spawning worked correctly.
As I understand it, the game initially puts 0,0 at the top left of the map's initial layout. The value in the 'spawns.lua' is the offset from that. After the map has been created, the spawn point becomes 0,0 and locations are relative to that.

TheOddler commented 2 years ago

I tested spawning with both repeat and non-repeat settings. Spawning worked correctly. As I understand it, the game initially puts 0,0 at the top left of the map's initial layout. The value in the 'spawns.lua' is the offset from that. After the map has been created, the spawn point becomes 0,0 and locations are relative to that.

Ah yes! You are right.

I was now thinking, you created a second maps that is essentially just the original map with an offset. Is there a reason you did not simply implement an actual offset feature? Similar to the spawn-point setting, but this offsets the world around the player, rather than the player around the world. If that makes sense?

HySpeed commented 2 years ago

@TheOddler you wrote:

I was now thinking, you created a second maps that is essentially just the original map with an offset. Is there a reason you did not simply implement an actual offset feature? Similar to the spawn-point setting, but this offsets the world around the player, rather than the player around the world. If that makes sense?

I don't think I thought that far ahead. This is kind of a brute force solution.

TheOddler commented 2 years ago

@TheOddler you wrote:

I was now thinking, you created a second maps that is essentially just the original map with an offset. Is there a reason you did not simply implement an actual offset feature? Similar to the spawn-point setting, but this offsets the world around the player, rather than the player around the world. If that makes sense?

I don't think I thought that far ahead. This is kind of a brute force solution.

Fair enough, and since your map also removes Antarctica it actually is a real map too. Though maybe it makes sense to simply make a map with and without Antarctica, and then to do offset in code so any offset is possible. What do you think?

This is more work though, so I'd totally get if you don't want to put in more work.

HySpeed commented 2 years ago

@TheOddler you wrote:

I was now thinking, you created a second maps that is essentially just the original map with an offset. Is there a reason you did not simply implement an actual offset feature? Similar to the spawn-point setting, but this offsets the world around the player, rather than the player around the world. If that makes sense?

I don't think I thought that far ahead. This is kind of a brute force solution.

Fair enough, and since your map also removes Antarctica it actually is a real map too. Though maybe it makes sense to simply make a map with and without Antarctica, and then to do offset in code so any offset is possible. What do you think?

This is more work though, so I'd totally get if you don't want to put in more work.

I'm fine with how it is for now. The heavy lift is the testing. If it were only ~6 locations, no biggie. But I went a bit overboard with the locations and I'd need to test each one at different sizes again to ensure it worked right. That's very time consuming.

thanks

TheOddler commented 2 years ago

I'm fine with how it is for now. The heavy lift is the testing. If it were only ~6 locations, no biggie. But I went a bit overboard with the locations and I'd need to test each one at different sizes again to ensure it worked right. That's very time consuming.

Fair enough. I don't have time to do proper testing soon either, so we can leave it as is for now. Maybe some day in the future we can make it even fancier!

TheOddler commented 2 years ago

@HySpeed Will you make a new build for the mod portal too? I can do it as well, though don't have everything set up for it at the moment. You should already have access to the mod on the mod portal.