Conquest of Elysium 4

Conquest of Elysium 4

Singular Event Frequency
I'm coding randomly occurring singular events that happen in a game to add some comedic background to a player's forces occupying larger settlements. So I've been using this coding path:

playerevent
+chance 3
+player -3
+class -3 "CLASS-NAME"
+terrain -29 #hamlet or larger
+squareowner -3
message -3 "A rambling vagrant loudly voicing obscenities about your rule has armed himself with a pitchfork. Your men are shaking in their snakeskin boots, obviously."
newunits 16 "1*Angry Peasant"
endevent

-but I'm not sure if the event will happen in ALL hamlets or larger settlements the player owns, or just one of them. What I want is a 3% in any single hamlet or larger settlement each month for this single rambling vagrant to appear. I do not want a vagrant to appear in more than one settlement everytime the event is triggered. I just want him in a single settlement square when the event happens. So one square, one vagrant, not a chance for every hamlet to have a vagrant when the event happens. Just like the Unexpected Hero event in the base game, except with a vagrant.

Did I code this block right, or do I need to modify it? I appreciate any help!
Last edited by HospitallerInaBoat; 1 Jan, 2021 @ 1:03pm
< >
Showing 1-2 of 2 comments
Oya 2 Jan, 2021 @ 2:44am 
Hi there! No way to limit how many times an event will trigger on a given turn. Are you aware of the possibility of playtesting your own event code? Here is how it is done.

selectmonster "Demonologist"
passwall
scry 200
scrycost 1

You create a game as Demonologist and hit the turn button a few times. Then you reveal the whole map at one go and see how your events have played out. You can see other planes too, the possibilities are endless. Hope that helps.
Originally posted by Oya:
Hi there! No way to limit how many times an event will trigger on a given turn. Are you aware of the possibility of playtesting your own event code? Here is how it is done.

selectmonster "Demonologist"
passwall
scry 200
scrycost 1

You create a game as Demonologist and hit the turn button a few times. Then you reveal the whole map at one go and see how your events have played out. You can see other planes too, the possibilities are endless. Hope that helps.

Awesome! Alright, lemme' give it a try and I'll see if there's anything wrong.
< >
Showing 1-2 of 2 comments
Per page: 1530 50