Conquest of Elysium 4

Conquest of Elysium 4

Two event modding bugs
I was trying to set up a conscription event, similar to the Baron's, but with the troops being raised in their respective settlements, rather than being gathered at the player's home citadel. I've run into two bugs so far.

Bug 1: +seasondelay crashes the game on starting a match (after naming your character and before the first turn), whether used with playerevent or squareevent. The error message is: "No event trigger called: seasondelay"

Here are two examples of events that each caused the crash, even when tested individually:

playerevent
+player 0 ## 1st Slot Player
+season 0 ## Summer
+seasondelay 3 ## Early
message -2 "This year's conscripted troops have been raised in their home settlements."
endevent

squareevent
+squareowner 0 ## 1st Slot Player
+season 0 ## Summer
+seasondelay 3 ## Early
+terrain 6 ## Farm
newunits 0 "2*Spearman" ## 1st Slot Player
endevent

I was able to work around this issue by using a global variable and a chain of 13 events to initialize the variable, increment it once per turn, then reset it every 12 turns (with the conscription events firing only when the variable == 12), but it would of course be preferrable just to have a functional +seasondelay trigger.

Bug 2: +squareowner sems to evaluate false when it should be true, and vice-versa.

Here's an example:

squareevent
+squareowner 0 ## 1st Slot
+terrain 6 ## Farm
+varequal 800 12
newunits 0 "2*Spearman" ## 1st Slot Player
endevent

The above event should spawn 2 Spearmen owned by Player 0 on each Farm owned by Player 0. Instead, it spawns 2 Spearmen owned by Player 0 on each Farm NOT owned by Player 0, while ignoring the Farms that are owned by Player 0.

With the currently documented mod commands, I haven't been able to think of a work-around for this issue.

Has anyone else encountered similar issues? Am I overlooking anything? If not, I'll go ahead and report these in the bug thread.
< >
Showing 1-15 of 15 comments
Oya 15 Apr, 2016 @ 1:55am 
Please give us your workaround code as an examble on how to use global variables.
Event modding can be used to create different Map Generation Routines and thus Infinite Replayability. However I have also found that Event modding commands do not always work as intended. An examble:

selectmonster "Demonologist" #Playtest with Demonologist.
scry 100 #To check the results of various events.
scrycost 1

squareevent #event to add resources on the sea squares.
+terrain -43 #Any Sea square.
+turnnbr -1 #In the beginning of the game
+chance 5 #5% chance
alterterrain 45 #Red Corals
endevent

This event adds Red Corals on 50% of the Sea squares rather than 5%. I was able to circumvent this by using this code to change back half of the Red Corals to Sea:

squareevent
+terrain 45 #Red Corals
+turnnbr -1
+chance 50 #50%
alterterrain 27 #Red Corals to Sea
endevent

Writing Code has always unintended consequences. We need as many examples as possible for a deeper understanding of how all this works. Thank You.
Marlin 15 Apr, 2016 @ 3:19am 
Originally posted by Oya:
squareevent #event to add resources on the sea squares.
+terrain -43 #Any Sea square.
+turnnbr -1 #In the beginning of the game
+chance 5 #5% chance
alterterrain 45 #Red Corals
endevent

This event adds Red Corals on 50% of the Sea squares rather than 5%.
Be aware that each squareevent strikes once per player as well as once per square.

If you want the event to happen only once per square, you need to add a +player <player> trigger. For instance
+player 0
Last edited by Marlin; 15 Apr, 2016 @ 4:49am
Per Oya's request, here's the code from my ill-fated conscription experiment, including my +seasondelay work-around using global variable 800:

## This event resets the turn loop variable (800) every 12 turns, on the turn after conscription takes place. playerevent +player 0 ## 1st Slot +varequal 800 12 setvar 800 1 endevent ## The following 11 events increment var 800 by 1 each turn. They're defined in reverse order to help ensure they don't all fire in a chain on one turn. ## This event also prints the conscription message, since the conscription events will fire when var 800 == 12. playerevent +player 0 ## 1st Slot +varequal 800 11 setvar 800 12 message -2 "This year's conscripted troops have been raised in their home settlements." endevent playerevent +player 0 ## 1st Slot +varequal 800 10 setvar 800 11 endevent playerevent +player 0 ## 1st Slot +varequal 800 9 setvar 800 10 endevent playerevent +player 0 ## 1st Slot +varequal 800 8 setvar 800 9 endevent playerevent +player 0 ## 1st Slot +varequal 800 7 setvar 800 8 endevent playerevent +player 0 ## 1st Slot +varequal 800 6 setvar 800 7 endevent playerevent +player 0 ## 1st Slot +varequal 800 5 setvar 800 6 endevent playerevent +player 0 ## 1st Slot +varequal 800 4 setvar 800 5 endevent playerevent +player 0 ## 1st Slot +varequal 800 3 setvar 800 4 endevent playerevent +player 0 ## 1st Slot +varequal 800 2 setvar 800 3 endevent playerevent +player 0 ## 1st Slot +varequal 800 1 setvar 800 2 endevent ## This event initializes var 800 to a value of 1 before the game starts. playerevent +player 0 ## 1st Slot +turnnbr 0 setvar 800 1 endevent ## The remaining events are the conscription events for each terrain type. They fire every 12th turn, when var 800 == 12. ## Note that, because of the +squareowner bug, these work incorrectly. They should affect only what Player 0 owns, but instead affect only what Player 0 does NOT own. squareevent +squareowner 0 ## 1st Slot Player +terrain 6 ## Farm +varequal 800 12 newunits 0 "2*Spearman" ## 1st Slot Player endevent ## Not sure the Baron actually gets anything for a Tent Village normally, but he probably should. Not sure it should be the 2x Spearman I chose. squareevent +squareowner 0 ## 1st Slot Player +terrain 109 ## Tent Village +varequal 800 12 newunits 0 "2*Spearman" ## 1st Slot Player endevent squareevent +squareowner 0 ## 1st Slot Player +terrain 7 ## Hamlet +varequal 800 12 newunits 0 "Knight" ## 1st Slot Player endevent ## Not sure the Baron actually gets anything for a Coastal Hamlet normally, but he probably should. squareevent +squareowner 0 ## 1st Slot Player +terrain 78 ## Coastal Hamlet +varequal 800 12 newunits 0 "Knight" ## 1st Slot Player endevent squareevent +squareowner 0 ## 1st Slot Player +terrain 158 ## Lion Tribe Village +varequal 800 12 newunits 0 "2*Lion Tribe Warrior" ## 1st Slot Player endevent ## Not sure the units gained here are accurate. squareevent +squareowner 0 ## 1st Slot Player +terrain 18 ## Village +varequal 800 12 newunits 0 "2*Spearman" ## 1st Slot Player newunits 0 "Knight" ## 1st Slot Player endevent ## Not sure the Baron actually gets anything for a Market Village normally, but he probably should. squareevent +squareowner 0 ## 1st Slot Player +terrain 206 ## Market Village +varequal 800 12 newunits 0 "2*Spearman" ## 1st Slot Player newunits 0 "Knight" ## 1st Slot Player endevent squareevent +squareowner 0 ## 1st Slot Player +terrain 199 ## Motte and Bailey +varequal 800 12 newunits 0 "2*Spearman" ## 1st Slot Player newunits 0 "Knight" ## 1st Slot Player endevent squareevent +squareowner 0 ## 1st Slot Player +terrain 4 ## Ancient Forest +varequal 800 12 newunits 0 "Unicorn Knight" ## 1st Slot Player endevent

Assuming that all global variables have a default value of 0, I could have saved an event by leaving out the initialization event and having the loop run from 0 to 11 instead of 1 to 12, but I prefer explicit initialization.

Likewise, I might have been able to save a few events by using the negative special terrain numbers to combine a few of the terrains, but those aren't documented as clearly as I would like and I prefer to be explicit.

Hope that helps!
Oya 15 Apr, 2016 @ 9:35am 
Thank you both for your quick responses. Obviously we have much to learn from each other even in our failures. By the way I wonder why we don't use the Event Messages to give a literary flavor to the game. We have only to quote from Fantasy Fiction or the Classics. After all the text in Dominions is worth reading in its own right so why not starting a contest for the best event message in Elysium?
carn112004 15 Apr, 2016 @ 11:19am 
I have this conscription event:

squareevent
+class -2 "Baron"
+class -3 "Baron"
+season 0
+terrain 22
newunits -3 "2*Spearman"
newunits -3 "2*Knight"
endevent

and it works. Gives 2 spears and knights per castle.
Very interesting!

Then, I wonder if I could get the desired effect by replacing my +squareowner 0 with:

+player 0 ## 1st Slot
+player -3 ## square owner

I'll try that next chance I get.

BTW, is +season 0 sufficient to ensure that you get the event once per year and only once? I would have thought it would trigger on each of the three months of summer.

Thanks!
carn112004 15 Apr, 2016 @ 1:20pm 
Originally posted by Colonel Dracula joins the Navy:

BTW, is +season 0 sufficient to ensure that you get the event once per year and only once? I would have thought it would trigger on each of the three months of summer.

Sorry, youre correct, i dhould have tested more
triggers 3 times
Marlin 21 Apr, 2016 @ 6:31am 
Finally got around to actually testing these, and, yes, I can confirm both of them.

The +seasondelay seems to be merely a documentation error, though. Searching through the executable with a hex editor, I didn’t find any “seasondelay”, but I did instead find something called “seasonleft” – and when I tried
+seasonleft 3
it seemed to work as expected.

The +squareowner is just one seriously bugged event trigger. ☹
Marlin, I can't thank you enough for finding +seasonleft. I tested it and can confirm that it also worked for me in the way +seasondelay was supposed to but didn't. So now we have a way to limit an event to one month each year without having to use my global variable and 13 events kludge. Huzzah! ...Seriously, thank you. A lot. :)

I'll go ahead and report the +seasondelay/+seasonleft documentation error in the Event Modding thread and the +squareowner bug in the main bug thread.

In older news:

I got around to a test replacing my +squareowner 0 with:

+player 0 ## 1st Slot +player -3 ## square owner

and the event just never triggered. I don't see an obvious reason why that should have happened.

Next, as a hybrid with carn's method, I tried replacing my +squareowner 0 with:

+player 0 ## 1st Slot +class -3 "Baron" ## square owner

and this did provide the effect I originally expected from +squareowner 0 (i.e. trigger only on squares owned by player 0), albeit with the additional limitation that player 0 must belong to the specified class, in this case Baron. That's probably as close as I can get until and unless +squareowner gets fixed (no big deal; it's close enough for my purposes).
Avendt 21 Apr, 2016 @ 9:04pm 
I have been following many threads on modding this game and I have finally reached a conclusion that this has to be one of the most troublesome modding games that advertise itself as a moddable game! The extent to which a player has to go to find info on modding and the extent to which the modding info does not work and the extent to which the Developer of this game has gone in order to limit the modding of this game...well, I am not going to purchase this game and expose myself to so much frustration! Having had so much problems with CoE3 modding (which I own) and seeing how bad modding is with this new edition of CoE, have forever turned me off this game and this Developer. To all of you who defend and will defend thid game I say: Play this game to your hearts content! Me personally, I want games that give me more pleasure than frustrations! Life is full of frustration as it is and giving yourself a new one is just not worth it!
Juz 21 Apr, 2016 @ 9:22pm 
What an increbably entitled attitude, I've been following Illwinter since Domminions II, they are a VERY small studio and put more effort into modding, modding tools and modding documentation than most trippleA games.

Yeah it's annoying that it's not all complete and there is information lacking, yeah sometimes there are bugs but they don't have to do any of the work they put into making the game moddable, they could drop the game from realease and do nothing to it but again they didn't. I freaken love this game and the Devs put their heart and soul into making their games special, if you can't appcriate that ♥♥♥♥ off.
Avendt 21 Apr, 2016 @ 11:00pm 
What an incredibly intollerant attitude Juz! You use profane words against me because I expressed my own view? Did I tell you or anyone else who likes this game to ef-off? No, I said "Play this game to your hearts content" You yourself admited the failings of this game and yet you attack me for not thinking like you do? I do not care how much Devs did or did not put into a game! I am a consumer who PAYS for the game and expect the game to give me enjoyment (independent of game difficulty) and to meet the claims fully that it is a moddable game without so much frustration. For a small Developer it is even more important for them to make the game meet the expectations of user friendliness, as building the following IS important to them, far more than big studio Devellopers! Just because you are fanatical about them, it gives you no right to be so obnoxious of other people views! You do understand what tolerance means, do you?
carn112004 22 Apr, 2016 @ 3:29am 
Originally posted by Avendt:
I have been following many threads on modding this game and I have finally reached a conclusion that this has to be one of the most troublesome modding games that advertise itself as a moddable game! The extent to which a player has to go to find info on modding and the extent to which the modding info does not work and the extent to which the Developer of this game has gone in order to limit the modding of this game...well, I am not going to purchase this game and expose myself to so much frustration! Having had so much problems with CoE3 modding (which I own) and seeing how bad modding is with this new edition of CoE, have forever turned me off this game and this Developer.

In what way do the developers have intentionally limited modding?

And the rest, i cannot say that coe3 had many modding problems. The modding manual had most commands and one could do a lot of funny mods with those commands.
Marlin 22 Apr, 2016 @ 3:45am 
Originally posted by Avendt:
I have finally reached a conclusion that this has to be one of the most troublesome modding games that advertise itself as a moddable game!
Originally posted by Avendt:
I am a consumer who PAYS for the game and expect the game to give me enjoyment (independent of game difficulty) and to meet the claims fully that it is a moddable game without so much frustration.
On the game’s info page on Illwinter’s own site[www.illwinter.com] I cannot find a single mention of anything with “mod” in it. Neither can I find any such mention in the About This Game on the Steam store page. So your claims that CoE4 “advertise itself as a moddable game” are unfounded.

In fact, when CoE4 was released, it had no modding interface at all, and none was promised either. The customers who originally bought the game got the modding there now is, as well as the map editor and various other features added post-release, as a bonus, for free. And Illwinter continues to work on the game, not only fixing bugs but also adding features.

Now, if you want to dismiss games based on non-advertised, free bonuses added to them post-release not being up to your standards, that’s your prerogative, of course.
Xelos 10 Mar, 2017 @ 4:43pm 
I've been trying to create a new demonlord and what I want to do is spawn a single new custom terrain by altering an existing ash field and put the demonlord inside inferno. Can't seem to get this to work, any suggestions?
< >
Showing 1-15 of 15 comments
Per page: 1530 50