Adding a few remote.calls for external access and new cities#32
Adding a few remote.calls for external access and new cities#32heyqule wants to merge 2 commits intoTheOddler:masterfrom
Conversation
- Added remote.call('factorio-world','has_spawn_point', luaSurface, area) to checks whether the chunk contains a spawn point from spawns.lua.
- Added remote.call('factorio-world','get_world_tile_name',x, y) to get tile name
- Added remote.call('factorio-world','is_factorio_world_surface', luaSurface) to check whether the surface is using earth layout.
- Added many cities to spawn city selector.
| -- The second one will be used as default for the custom x and y coordinates | ||
| -- AI Prompt to get coordinates: | ||
| -- Divide earth by X=4032 and Y=1920 blocks, {x=0,y=0} is the international date line and north pole and it goes from west to east. Only show final result in the following format, ["Oceania, Australia, Mount Isa City"] = { x = 3578, y = 1181 }, . Which X and Y is Orlando US? | ||
| -- Notice: Make sure startup resources spawn at your city. Otherwise the location is not usable. |
There was a problem hiding this comment.
Notice: Make sure startup resources spawn at your city. Otherwise the location is not usable.
What do you mean by this?
If I remember right (it's been a long time since I implemented this), the spawn offsets the world, so you always start at 0,0 in the in-game coordinates. And that means the resource-gen around you is just what the vanilla game does.
There was a problem hiding this comment.
The start location may have too many water tile spawn resource. For example, I tried adding a spot on Kuala Lumpur, Malaysia. Depending on the seed, copper resource patch can be missing. I tested it with your default scale.
| ["Custom (fill in x,y below)"] = { x = nil, y = nil }, | ||
| -- The second one will be used as default for the custom x and y coordinates | ||
| -- AI Prompt to get coordinates: | ||
| -- Divide earth by X=4032 and Y=1920 blocks, {x=0,y=0} is the international date line and north pole and it goes from west to east. Only show final result in the following format, ["Oceania, Australia, Mount Isa City"] = { x = 3578, y = 1181 }, . Which X and Y is Orlando US? |
There was a problem hiding this comment.
So AI figured this out, and then you mapped the coordinates on the google maps? So you've double checked that all the coordinates it spat out are reasonably close to the real place?
There was a problem hiding this comment.
Ya. I checked the new cities beside the sea and adjusted those to an inner spot, so that resources spawn properly if player use them. Other inland cities are reasonably close imo.
Then I plot them to google map for distance reference. The new city spawn preference is based on how I want to plot my enemy's unique base lol.
|
Thank you for the PR :D Just two questions, I'll do some testing later. |
Hello again :)
I added a few remote.call to support new features for my enemy mods.
I also added many new cities to let enemy build bigger base on those city location. I tagged them here for referencing the gaps. https://maps.app.goo.gl/RsBEq6ZVrzCTr7hn9 I noticed a few of them are very close together. But i don't think it's ideal to remove them at this point since player may be using them.
Changelog:
- Added remote.call('factorio-world','has_spawn_point', luaSurface, area) to checks whether the chunk contains a spawn point from spawns.lua.
- Added remote.call('factorio-world','get_world_tile_name',x, y) to get tile name
- Added remote.call('factorio-world','is_factorio_world_surface', luaSurface) to check whether the surface is using earth layout.
- Added many cities to spawn city selector.