As the subject says,
I wonder if it is better a single simple_trigger calling 3 scripts, or 3 simple triggers calling 1 script each.
I mean in terms of effectivness of the engine
Assuming you want to prevent hitches on the campaign map, it's better to have 3 simple triggers calling 2 script each. Warband has a hidden feature where simple triggers with the same interval are staggered, so they don't actually fire all at once.
does your scripts even have any performance impact? Test that first. Unless you have some heavy loops like for_parties it is unlike it will make a difference.
but in the case it would be heavy?
What I am trying to find is a sort of general rule to choose the way to prefer in using those triggers: what is better for performance, 1 box with 2-3 stuff inside or 3 boxes with one single stuff each?
but in the case it would be heavy?
What I am trying to find is a sort of general rule to choose the way to prefer in using those triggers: what is better for performance, 1 box with 2-3 stuff inside or 3 boxes with one single stuff each?
the problem with your question: it doesnt matter if a trigger has 100 lines of code, or if it has 3 lines of code that are 3 script calls. What it matters is what those lines do. Scripts are just reusable pieces of code (good coding).
like mentioned above when you have a trigger like this
插入代码块:
(6, [],[]),
the game will fire it at a random first (so between 0 and 6). So if you have 3 trigger with the same interval, they shouldnt fire at the same time... but .. if you have 100 triggers on your code, how can you know how many are firing at the same time? Yeah, you dont. And it will be different to each savegame. That sort of thingy is great to create random bugs that only a few people will notice it, or lag for just a few players. Because it has no consistency. And you cant reproduce it.
performance is not a easy thingy to test. Dont worry about it too much until you actually have issues. Most mods will never see lag on the world map. IF you do then read on solutions used on modules like VC, 1257AD, etc, which had to change how they do things in the first place.