Search found 199 matches

by Natha
Mon Jul 29, 2024 7:33 am
Forum: Ideas and Requests For Mods
Topic: Any mod that creates an underground-pipe-underground entity?
Replies: 8
Views: 735

Re: Any mod that creates an underground-pipe-underground entity?

This is exactly what blueprints are for. iirc there are no more click needed than for normal entities
by Natha
Sat Jul 27, 2024 1:00 pm
Forum: Modding help
Topic: Using Single Autoplace Control for Multiple Resources
Replies: 4
Views: 493

Re: Using Single Autoplace Control for Multiple Resources

If you dig into the code of resource-autoplace.lua, you find the following documented for resource_autoplace_settings(): -- - patch_set_name - name of the patch set; patches sets of the same name and seed1 will overlap; default: name -- - autoplace_control_name - name of the corresponding autoplace ...
by Natha
Wed Jul 24, 2024 7:58 pm
Forum: Modding help
Topic: Using Single Autoplace Control for Multiple Resources
Replies: 4
Views: 493

Re: Using Single Autoplace Control for Multiple Resources

So you just want to add some more resources?

Could you post your code? Just copy-paste the existing resources didn't work?
by Natha
Wed Jul 24, 2024 7:36 pm
Forum: Modding help
Topic: Robots don't throw explosives on minable cliffs
Replies: 0
Views: 180

Robots don't throw explosives on minable cliffs

I have a cliff entity which has it's minable property set but can also be destroyed by explosives.
When marking it for deconstruction, robots deconstruct it the normal way instead of throwing explosives at it. How can I change this behaviour?

Feature suggestion for a flag to be set.
by Natha
Mon Jul 08, 2024 7:06 pm
Forum: Minor issues
Topic: Random penalty noise expression with seed gives non-random results
Replies: 4
Views: 738

Re: Random penalty noise expression with seed gives non-random results

This mod shows what I mean: /test [a, b] [p1, p2, p3] a is calculate_tile_properties once for each position b is calculate_tile_properties with whole position array p1 is a random value noise expression with seed 100 p2 is with map seed variable p3 is with a literal number which represents a map seed
by Natha
Mon Jul 08, 2024 6:41 pm
Forum: Minor issues
Topic: Random penalty noise expression with seed gives non-random results
Replies: 4
Views: 738

Re: Random penalty noise expression with seed gives non-random results

Thanks for the report. How do you get the visualisation and what are X/Y coordinates of the tiles? Ideally I'm looking for something which I can just copy-paste and get the same result. Based on the C++ code, this is very unlikely to happen, so either you hit an edge case or your debug visualisatio...
by Natha
Sun Jul 07, 2024 1:48 pm
Forum: Minor issues
Topic: Random penalty noise expression with seed gives non-random results
Replies: 4
Views: 738

Random penalty noise expression with seed gives non-random results

I implemented this noise expression: { type = "noise-expression", name = "random-value-0-1", expression = noise.to_noise_expression(noise.to_noise_expression{ type = "function-application", function_name = "random-penalty", arguments = { x = noise.var("x&...
by Natha
Sat May 25, 2024 9:30 am
Forum: Modding help
Topic: How to access the used preset at runtime?
Replies: 4
Views: 468

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: 468

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: 2
Views: 519

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: 468

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: 611

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: 531

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: 531

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: Resolved Problems and Bugs
Topic: [Genhis] [1.1.104] Crash generating surface (FloatCast.hpp:129: -3.965784 < 0.000000)
Replies: 4
Views: 814

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: Resolved Problems and Bugs
Topic: [Genhis] [1.1.104] Crash generating surface (FloatCast.hpp:129: -3.965784 < 0.000000)
Replies: 4
Views: 814

[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: 429

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: 1118

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: 1118

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: 1118

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...

Go to advanced search