I admit it - I love to drop the odd disaster on the unsuspecting player, nothing more satisfying then a malicious giggle while typing away at the script For like minded souls I have put my findings together in this thread.
I admit it - I love to drop the odd disaster on the unsuspecting player, nothing more satisfying then a malicious giggle while typing away at the script For like minded souls I have put my findings together in this thread.
It seems to me there is one more disaster - storm.
As for historic events and event_counters I just use " historic_event abc_event" and "set_event_counter", nothing else, everything works fine. And plague event works without event message.
Not sure why I forgot storm - getting old I guess. Tested it right now and couldn't make it work - not over land or over sea, over settlements or ships, region or co-ordinate based. And I could have sworn I made it work before...
You are right about plague - it does work without message but then there is absolutely no message, not even a generic one like with the earth quake.
Updated the OP accordingly.
Excellent. Didn't know about the need to make it visible to the player faction, nor the region parameter. Brilliant.
There is also "fire". I could never get it to do any damage/killing but it does show the smoke animation which can be a handy visual effect. This works in script - can't recall if I've tried it in descr_disasters.
"date" - I thought the value(s) are years, not turns.
Also pretty sure that "historic" increments (adds 1 to) the associated event counter. So if you issue that historic event a second time then its counter will now be 2, unless you reset it back to 0 beforehand. historic_event certainly behaves that way but not sure about "event historic".
Something else to bear in mind is that "date 0" doesn't work with some turns-per-year values: http://www.twcenter.net/forums/showt...ot-not-working I assume it's for all event types, not just historic.
Updated the OP with the info. Tried fire and updated as well.
You can also use seasons (summer \winter) in connection with the date according to the docudemons - will have to test that and will update.
However, it still says that "date 1" will be next turn. And it's "range of years" not "range of turns". The actual turns depends on the mod's TPY. e.g. In 4TPY "date 1" = 1 year = 4 turns. (Tested and confirmed.) In vanilla "date 2" will be next turn, as vanilla is 2 years-per-turn (0.5 TPY). I don't know what happens if you use "date 1" in vanilla as that equates to half a turn. And, assuming that it doesn't accept decimal values, there's no way to make it for next turn in something like 4TPY because that would need it to be "date 0.25".
Also confirmed: event historic does increment the event counter, just like historic_event does. It will always add 1 to whatever the event counter currently is, which of course means making it 1 on the first usage (but only if script has not already set that event counter to something else, in which case it will not be 1 but whatever it was + 1).
I discovered that plague doesn't appear in besieged city. I had a good idea for that, but now have to find a way to solve this issue for my goal.
I had an idea to force player for attack besieged city, and not maintain siege. I made sieging expensive 2.5k gold per turn and next idea is about epidemic factors - first I wanted to cast plague on besieging army if siege goes more than 4-5 turns (as it was in real history, not plague but in M2TW we have no other diseases), but it failed. Then I wanted to cast plague for besieged garrison after 4-5 turns of siege (they have no water and too many dead bodies inside settlement ) but it failed too.
I couldn't get it to work either and only just found this comment. Could the OP be updated with this until somebody figures out how to get it working?
Some other findings...
Volcano: TATW has used this for ages but without a "scale" parameter. No message is shown, no deaths, just the animation. I added a scale and now there are deaths too and behaves in one of two ways:
1) If a custom message is specified - event volcano {historic_event_name} - then the animation is the sparkle effect and no death numbers are displayed in that message though it still tells you if "important figures" were killed in a separate scroll(s?).
2) If no custom message is specified - event volcano - then the animation is the smoke/lava effect and the default message is shown - disaster_volcano in event_titles/strings - which does contain character/soldier/citizen death numbers.
Earthquake: the animation isn't seen until the position button is clicked.
Thanks for the detailed info - OP updated. Also added movie info\details.
Tried once more with the storm event and it appears utterly randomly: used princess Cecilia's co-ordinates and causes a storm over Nottingham, but couldn't repeat it. Same with a character standing at the coast.
Edit: eventually found out why the short cuts in the 'compare' plug-in of Notepad++ do not work (a tool I use frequently) - they conflict with shortcuts of the main menu (#158-161) in settings\shortcut mapper\main menu. I don't use that in the main menu so I cleared the entries there and all works fine in the compare add-in.
Didn't know about the movie parameter. Nice. Useful if you have a movie to show and want a zoom/position button as well. historic_event can't provide that button.
Storm: partially working then. Better than not at all I guess.
Something else came to mind: the problem of this script (add_events) not working for "date 0" under some TPYs (e.g. 12tpy) is apparently also a problem on Linux (and Mac?) always. "date 0" doesn't work. Not for 4tpy at least, the only one I've tried. Not that I have Linux M2TW myself but one of our testers does and he wasn't seeing any of the historic events shown with this method, nor the volcano erupting (all using "date 0").
We're also using the BC time period at some stage in the campaign and I found that "date 0" didn't work there either (Windows, 4tpy). That might be due to how we're using it though, so could be a false alarm.
Im a little bit confused here, specially because english is not my manin language.
Can the fire efct be permanently displayed from the start of the campaign?
I just want a chimney, no need for messages, damage or storic events happening.
Also, is there any thext file where we could edit the effect like we do to battlemap effects?
Im curious, in case I wanted to add lot of them and make them very frequent, such as the fires, would it possibly be delaying turn times or being too demanding of the performance?
And btw, are you not missing "climate" and "warning" parameters, or those work only with generic events in descr_disasters?
EDIT
Though, does descr_disasters even work? Didnt manage to get stuff working in it (eventho they worked fine via deccr_events) Perhaps it only works for plague, and possibly stuff like floods/storms with only some parameters...
Last edited by Jadli; January 26, 2021 at 08:08 AM.
descr_disasters certainly works - it's just a matter of the frequency. climate and warning are not required for the script command - after all you can trigger a simple historic_event and then have a delayed disaster. And climate is of no use - you are defining the location of the event in the script version which would simply ignore that setting.
Unlike in the descr_events file where it's a matter of random chance, there the warning makes sense and climate as well as region will restrict the location.
Seems that I dealed with storms - they're vital for my mod.
Event fires only with one line of coordinates scripted + named_character near. The coordinates of storm and named character shouldn't match, he should be near by in same region.
Doesn't fire with region condition. Doesn't fire with any other character instead. Doesn't fire with admiral only fleet (didn't tested with army aboard).