Search found 192 matches

by Natha
Sat May 25, 2024 9:30 am
Forum: Modding help
Topic: How to access the used preset at runtime?
Replies: 4
Views: 218

Re: How to access the used preset at runtime?

FuryoftheStars wrote:
Fri May 24, 2024 10:50 pm
Try taking a look at this mod and what it does and how:

https://mods.factorio.com/mod/ChangeMapSettings
Thanks! There they are: https://lua-api.factorio.com/latest/cla ... p_settings
by Natha
Fri May 24, 2024 9:30 pm
Forum: Modding help
Topic: How to access the used preset at runtime?
Replies: 4
Views: 218

Re: How to access the used preset at runtime?

All presets are available here: https://lua-api.factorio.com/latest/classes/LuaGameScript.html#map_gen_presets The preset used for the current map is not saved. But you can get the current map gen settings are from the surface: https://lua-api.factorio.com/latest/classes/LuaSurface.html#map_gen_set...
by Natha
Fri May 24, 2024 9:25 pm
Forum: Modding help
Topic: How to make a resource only spawn on non-homeworld planets
Replies: 1
Views: 209

Re: How to make a resource only spawn on non-homeworld planets

What you could do is to apply your resources's autoplace settings after surface creation: - register on_surface_created - call SE remote function `get_zone_from_surface_index` and to get the zone check if `is_homeworld` is false - then apply map settings on this surface by adding your resource: mapg...
by Natha
Fri May 24, 2024 9:07 pm
Forum: Modding help
Topic: How to access the used preset at runtime?
Replies: 4
Views: 218

How to access the used preset at runtime?

I want to read these properties at runtime: https://lua-api.factorio.com/latest/con ... pGenPreset, especially the advanced settings. How's that possible?
by Natha
Fri May 24, 2024 9:06 pm
Forum: Modding help
Topic: trying to make a workable engine
Replies: 4
Views: 349

Re: trying to make a workable engine

No, otherwise the game would complain before starting
by Natha
Mon May 13, 2024 1:41 pm
Forum: Modding interface requests
Topic: Collision masks for whole surfaces OR collision mask of hidden tiles
Replies: 3
Views: 262

Re: Collision masks for whole surfaces OR collision mask of hidden tiles

You can take a look at how Space Exploration solved this, which, I believe, is done via collisions on ground tiles. Space-only building collide with all natural ground tiles, land-only buildings collide with the space platform tile. Obviously, this wont help you in case some ground tiles are used o...
by Natha
Sun May 12, 2024 10:17 am
Forum: Modding interface requests
Topic: Collision masks for whole surfaces OR collision mask of hidden tiles
Replies: 3
Views: 262

Collision masks for whole surfaces OR collision mask of hidden tiles

I need to prevent placement of certain entities in certain surfaces. For now, I have a placement cancelling logic which directly mines the entity if it is prohibited there. But it is still colored green in the cursor. Applying collision masks on these entities and some tiles wouldn't work because wh...
by Natha
Sun May 05, 2024 11:54 am
Forum: Assigned
Topic: [Genhis] [1.1.104] Crash generating surface (FloatCast.hpp:129: -3.965784 < 0.000000)
Replies: 3
Views: 347

Re: [1.1.104] Crash when generating surface

Loewchen wrote:
Sun May 05, 2024 11:37 am
You are 3 updates behind, can you reproduce this in the current version?
Yes, same crash
by Natha
Sun May 05, 2024 11:03 am
Forum: Assigned
Topic: [Genhis] [1.1.104] Crash generating surface (FloatCast.hpp:129: -3.965784 < 0.000000)
Replies: 3
Views: 347

[Genhis] [1.1.104] Crash generating surface (FloatCast.hpp:129: -3.965784 < 0.000000)

I created a surface with custom map settings and used frequency 1000 in autoplace_settings.decorative.rock-small Factorio crashed. Generating symbolized stacktrace, please wait ... c:\users\build\appdata\local\temp\factorio-build-iemlsv\src\floatcast.hpp (129): float_cast<unsigned int> c:\users\buil...
by Natha
Fri May 03, 2024 1:07 pm
Forum: Not a bug
Topic: Placing resources under cliffs removes that cliff
Replies: 1
Views: 270

Placing resources under cliffs removes that cliff

When I place a resource entity (map editor or via script) on a position that collides with a cliff, this cliff is destroyed, even if both prototypes have different collision masks. Is this intended? If yes, there should be a prototype property that disables this behaviour.
by Natha
Tue Apr 30, 2024 5:48 am
Forum: Modding help
Topic: How to interpret "probability" property expression?
Replies: 9
Views: 619

Re: How to interpret "probability" property expression?

What is your use case? I want to mirror resources onto another surface. For patches like crude oil, the excat position is not that important but the probability should stay the same. According to prototype stage, crude oil should have a probability of 1/48, which is the blue dots, but after applyin...
by Natha
Mon Apr 29, 2024 9:26 pm
Forum: Modding help
Topic: How to interpret "probability" property expression?
Replies: 9
Views: 619

Re: How to interpret "probability" property expression?

Another thing I just found: when moving after executing the command and executing it again, completely new probability values show up! Apparently the random numbers are influenced by the given position array, which changes the result for one specific position. This is indeed true when a noise expre...
by Natha
Mon Apr 29, 2024 2:38 pm
Forum: Modding help
Topic: How to interpret "probability" property expression?
Replies: 9
Views: 619

Re: How to interpret "probability" property expression?

I would have tried to look at the map for other spot with positive probabilities, and see if there was always 1 pumpjack attached, are some of them moved away ? or removed ? when colliding. I don't know if there are spots outside of whole oil patches with positive probability, but then richness wou...
by Natha
Mon Apr 29, 2024 9:43 am
Forum: Modding help
Topic: How to interpret "probability" property expression?
Replies: 9
Views: 619

Re: How to interpret "probability" property expression?

I wanted to test an hypothesis, because i think i read something one time but couldn't find source that there are special rules for crude oil placement to make sure it is always possible to place a pumpjack and/or a pipe connected to it, in the vanilla generation. Thats a good point. I just tried g...
by Natha
Tue Apr 23, 2024 10:18 pm
Forum: Modding help
Topic: How to interpret "probability" property expression?
Replies: 9
Views: 619

How to interpret "probability" property expression?

I try to replicate crude oil placement. But I don't really know how the probability expression works. The following code prints probability (white) and richness (yellow) values on each position: local calcresult = surface.calculate_tile_properties({"entity:crude-oil:probability", "ent...
by Natha
Sun Apr 21, 2024 8:03 pm
Forum: Modding interface requests
Topic: Disable heat icon when hovering heat pipe or interface
Replies: 0
Views: 165

Disable heat icon when hovering heat pipe or interface

When hovering a heat pipe or heat interface, it shows the heat icon. I request this to be hideable, similar to Fluidbox::hide_connection_info
by Natha
Sun Apr 21, 2024 12:07 pm
Forum: Modding help
Topic: Using on_research_finished to spawn a cargo wagon on a train
Replies: 6
Views: 502

Re: Using on_research_finished to spawn a cargo wagon on a train

You have to spawn the wagon and then use https://lua-api.factorio.com/latest/classes/LuaEntity.html#connect_rolling_stock. But I don't know if creating wagons on the right spots on rails is doable. I'm just not sure if this approach would stop the game from responding to other on_research_finished e...
by Natha
Sat Mar 30, 2024 8:17 am
Forum: Technical Help
Topic: [1.1.103] Error updating to 1.1.104
Replies: 8
Views: 974

Re: [1.1.103] Error updating to 1.1.104

This error now occured every time I wanted to update Factorio (currently 1.1.106). Had to download each vesion manually. I'm using ZIP version.
Every time, it was another file containing unexpected contents.
by Natha
Sat Mar 30, 2024 8:03 am
Forum: Combinator Creations
Topic: Liquid level regulator
Replies: 9
Views: 965

Re: Liquid level regulator

This type of circuit you created is called "Schmitt trigger".
by Natha
Thu Mar 28, 2024 1:54 pm
Forum: Modding discussion
Topic: How is LuaEntity::energy calculated? Compared to energy_usage and max_energy_usage
Replies: 0
Views: 204

How is LuaEntity::energy calculated? Compared to energy_usage and max_energy_usage

What is the difference between LuaEntityPrototype::max_energy_usage and LuaEntityPrototype::energy_usage for "normal" consumer entities? They return the same value, which is the maximum power consumption (in W) - drain and divided by 60 (result is Joules per tick). When calling LuaEntity::...

Go to advanced search