Skip to content

Adding a few remote.calls for external access and new cities#32

Open
heyqule wants to merge 2 commits intoTheOddler:masterfrom
heyqule:master
Open

Adding a few remote.calls for external access and new cities#32
heyqule wants to merge 2 commits intoTheOddler:masterfrom
heyqule:master

Conversation

@heyqule
Copy link
Contributor

@heyqule heyqule commented Mar 15, 2026

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.

heyqule added 2 commits March 14, 2026 22:53
    - 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.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

@heyqule heyqule Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TheOddler
Copy link
Owner

Thank you for the PR :D Just two questions, I'll do some testing later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants