cliff and resource generation

Place to get help with not working mods / modding interface.
Post Reply
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Tue Apr 17, 2018 9:55 am
Contact:

cliff and resource generation

Post by rhynex »

hello,

a simple question but maybe more directed towards devs or to people who worked with cliffs or resources.

I am generating cliffs with script and it works good until the chunks have some resource generated as well. in that case my cliffs are either not created or destroyed later (seems latter because my script always returns valid cliffs).
my cliff generation is like this:
- chart generated by game
- hook on_chunk_generated calculates a probability and then registers a special operation to do in tick +10 to be sure
- at that tick +10 (handled by on_tick event) I generate my cliffs.
- since it is at an away chart (in fog of war), I walk to the chunk and realize some cliffs are missing, abruptly cut

since I realized my cliffs are not generated properly I added another tick +120 proof check and I realized my script creates cliffs but game silently deletes them if they are over resource patches. in proof check I catch the missing ones and generate them but still sometimes some cliffs are gone completely, or again and again. also I do not get any events about my cliffs being destroyed. (my cliffs are a different type of cliffs, copy of game cliffs so I can understand if game is destroying them but I do not get any event)

anyone knows how the resource and cliff generation works? I would understand if game wants to clear patches of cliffs since cliff explosives is far away but what if I want to put cliffs on map then?
what do you suggest I should continue with this? nth tick event?

Post Reply

Return to “Modding help”