
(ofc the code I needed was ridonkulous easy...)
EDIT.: This is un updated post because I wanted to avoid double posts.
In the last few days I created a mod which is meant to extend vanila content in a decent way. The mod keeps the flavour of the original game, but improves it by balancing and reorganizing content, so it becomes more meaningful and less redundant. Unfortunatly it requires a single lua-functionality I am not capable to create... and without it, the mod makes no sense(at least to me^^) as a lot of balancing is based on this single functionality. I spent several hours created a proper working "control.lua" but till now I am not able to make it work, so I hope somebody can help me.
The functionality I need is simple:
Maybe you know a simpler way to solve this, but the code I worked on was from this forum thread: viewtopic.php?f=32&t=12840A building should lose HP over time, until it finally gets destroyed, and can get rebuild automatically by robots.
It is possible to change "wall regeneration" in a way to make the building(entity) lose health, but when it reaches 0, it wont get destroyed.
I tried to solve this with adding a script which looks like this:
Code: Select all
script.on_event(defines.events.on_entity_died, function(event)
if event.entity.name == "entity-name" then
entity.die()
end
end)
Also I get keeping error messages, while trying different codes. Fact is, I am a total noob in .lua and currently I am not sure if I will make it on my own in the next 20 hours of trying different lines for a single functionality...
Outdated and irrelevant post:
I am thinking about creating a mod and I try to think ahead. Currently I try to improve my modding skills by analyzing BOBs Mods structure(which is very tidy), but to really start Id like to have those 2 questions answered:
1,
Is it possible to create different types of fuels?
For instance:
-You have Fuel X, Y and Z
-Burner A uses fuel Z
-Burner B uses Fuel X, Y
Or does the game limit burner to just "Yes or No"?
What I want to do is to exclude certain fuels for certain burner. If this is not possible, I have to rethink the doctrine of my whole thought concept.
2,
What is to exspect from the Patch 0.13? Does anybody know where I can inform myself about the content(so I can take it into account) and when it is about to come? (the next patch this week isnt 0.13.00 but 0.12.23 and for steam?)
Do you have any experience with mod-patch incompatibility? Is it wise to wait and start modding after a big patch arrives? I dont want to start a mod and 1 week later a new patch makes all my work useless, so I rather do planning and learning in the meantime.