Conquest of Elysium 3 is an old school fantasy strategy game. You explore your surroundings conquer locations that provides the resources you need. Resources needed vary much depending on what character you are, e.g. the high priestess need places where she can gather human sacrifices, the baron needs places where tax can be collected and where iron can be mined. These resources can then be used for magic rituals and troop recruitments. The main differentiator for this game is the amount of features and special abilities that can be used. The game can be played on Windows, Linux (x86 and raspberry pi) and Mac OSX (intel and powerpc).

Forum Thread
by member
  Posts  
this ALMOST works (Games : Conquest of Elysium 3 : Forum : Modding Discussion : this ALMOST works) Locked
Thread Options
Mar 14 2013, 1:24pm Anchor

code that ALMOST works:

code:

#===== Crazy Cat Lady world event
event
recurringevent 1
 hasmonevent 1 1 10 "Nushi"
  chainevent 2 -1 -1 10 "Black Cat Familiar"
  chainevent 2 -1 -1 10 "Black Cat Familiar"
  chainevent 2 -1 -1 10 "Black Cat Familiar"
  chainevent 2 -5 -5 10 "Black Cat Familiar"
  chainevent 2 -5 -5 10 "Black Cat Familiar"
  chainevent 2 -5 -5 10 "Black Cat Familiar"
  chainevent 2 -3 -3 10 "Black Cat Familiar"
  chainevent 2 -3 -3 10 "Black Cat Familiar"
  chainevent 2 -3 -3 10 "Black Cat Familiar"
  chainevent 7 -2 "The undead Crazy Cat Lady is still sending out cats."
endevent # unfortunately this second part only seems to happen once

event
classterrevent "nil" 163 1 -1
 chainevent 1 -5 -5
 chainevent 2 -5 -5 10 "Nushi"
 chainevent 3 "Eleanor Abernathy" #renames
 chainevent 2 -5 -5 10 "Black Cat Familiar"
 chainevent 3 "Arrrriaiar"
 chainevent 2 -5 -5 10 "Black Cat Familiar"
 chainevent 3 "Eeby Jeeby"
 chainevent 7 -2 "A Crazy Cat Lady has decided to loose her cats onto the world."
endevent
 


I am banging my head on many many efforts at doing events and quests in this game. The more I work on it, the more I think we will end up with another SemiRand program like we did for Illwinters other game Dominions 3.

The idea for this event is that a crazy cat lady starts making cats appear randomly all over the map. They arent too dangerous but they will take your property if it is unguarded, and slow your armies as they move. I have other events planned which are more challenging but I dont want to give away what is coming. :)
The release of cats onto the world is supposed to continue until someone kills her. Maybe a reward such as all of the remaining cats join whoever takes her out. Simple enough for an event/quest.

What the code DOES do so far is this:
> classterrevent "nil" 163 1 -1
every turn there is a one percent chance to check and see if nil (no player) happens to "own" terrain-tile 163 (Skull Cave)
Then it kills whatever is there, places a Nushi which is a witch woman assigning her to the AI player 10 which is the horrors, names her Eleanor Abernathy, gives her 2 personal cats, then messages everyone in the game that she is loose.

The other bit of code does this:
> recurringevent 1
> hasmonevent 1 1 10 "Nushi"
This is before the placement code so that it fails the first time. On the turn AFTER the Nushi is placed it will then check to see if player 10 owns a Nushi. If it still exists then it will scatter many more cats, and then message all players that the event is still occuring.

But what I get is one placement event, and one follow-on event. The has-monster check only works once. The re-occuring event line will not chain to the hasmon line.

I could do multiple has-mon lines.
> hasmonevent 1 1 10 "Nushi"
> chainevent 2 -3 -3 10 "Black Cat Familiar"
> hasmonevent 1 1 10 "Nushi"
> chainevent 2 -3 -3 10 "Black Cat Familiar"
> hasmonevent 1 1 10 "Nushi"
> chainevent 2 -3 -3 10 "Black Cat Familiar"
> hasmonevent 1 1 10 "Nushi"
> chainevent 2 -3 -3 10 "Black Cat Familiar"
Except that then they all check at the same time so it doesnt space out the results.

I could also do a check of:
> ownsterrevent 1 55 10 153
but that is the same result. One time, or if I make multiple lines then they all kick in at once.

I could do a trick of putting a specific name on a unit as a marker. Such as giving her a cat named "kitty1", and looking for kitty1 to scatter a bunch of cats and give her "kitty2", then look for kitty2 and scatter a bunch of cats while creating kitty3. The problem with that is that I cant seem to give HER a cat. I can check for her existance but I cannot find her.

> comlocevent 13 13 10 666 "Kitty1" 2 -1 -1 10 "Black Cat Familiar"
> chainevent 3 "Kitty2"
will look at location 13 13 range of 666 squares for a commander named Kitty1. Since that is bigger than any map can be its a good way to search for Kitty1 existing at all. But the command is designed more for looking to see if a hero has entered a lair that is at a specific location. It apparently will find Kitty1 but the follow-on command lands at the check location 13 13. The variables -1 -1 (last location) and -5 -5 (trigger location) do not reset to the location that Kitty1 actually was found. So I can find Kitty1 and randomly place a Kitty2 and look for Kitty2 etc etc but the problem with that is that they can land on an owned mine or an ancient forest where they fight and die so the entire event will run for a random length of time (good enough for some events) but it might end before or run later than the Nushi Crazy Cat Lady is killed.
And Im back to the fact that I can check for Nushi instead but I cant do that multiple times.

Maybe I could do alittle more if I use map flag codes. I could place an invisible flag on the site and use check commands for that flag. But placing maps is a map-creation thing only. It cant be done by map commands at game time, and therefore cannot be done by mod. I havent really played with the flag commands much because of that.

So I am back to maybe getting it all to work if I KNOW the location the whole time but that means I can make Crazy Cat Lady work for one downloadable map. That is ok for making a map with quests and campaigns but it would get old since you would always know where to find the Crazy Cat Lady each time. And it would not work in the Events Mod that I am trying to create where I want them all to work pretty well and pretty randomly on any map played on.

Again.. maybe a SemiRand program that can rewrite a map each time so that things stay fresh?

Mar 15 2013, 2:27pm Anchor

As far as I can tell, you cannot combine triggers for more complicated coding. Thus this combo:

> recurringevent 1
> hasmonevent 1 1 10 "Nushi"

Is just a recurring event that happens every turn but does nothing, followed by a line for a has monster event, which is a type of event that can only happen once. It seems that the only events that can happen multiple times are recurringevent, classterrevent, and ritualevent (and chainevent and maybechainevent after one of those three). But I think you already figured that part out.

Now how to hack this to work hmm?

Can a classterrevent work for the Horrors player? Probably not, but try:
> classterrevent "Horrors" 153 100 -1 7 -2 "The undead Crazy Cat Lady is still sending out cats."

If Horrors is identified as a class, and the Nushi is immobile, then this would be an event at the location of the skull cave, so you could add random cats and cats at the skull cave.

Assuming that doesn't work, you can work around part of the problem by making a custom monster that spawns cats every turn. I think this would do that:

newmonster "Crazy Cat Lady"
copystats "Nushi"
spawnnextmon 400 #400% chance means 4 cats a turn
newmonster "Kitty Kitty"
copystats "Black Cat Familiar"

Then you can set up a series of triggers (example assumes she spawns 4 cats a turn at her location):
> hasmonevent 4 7 10 "Kitty Kitty"
> chainevent 2 -3 -3 10 "Black Cat Familiar"

> hasmonevent 8 11 10 "Kitty Kitty"
> chainevent 2 -3 -3 10 "Black Cat Familiar"

This would let you spawn Black Cat Familiars at random locations every turn, for a finite number of turns (as many time as you copy and paste the event with updated monster quantities). If they kill off the Cat Lady before this, she'll stop spawning Kitties and Black Cats will stop appearing. If the Cat Lady loses a portion of her cats, you'll stop seeing new Black Cats until she has replenished her numbers and hit new ones.

That's the best I can think of right now for an event that makes random cats every turn and is tied to the life of a monster. Events would be much much more powerful if you could combine the triggers for more logic.

Mar 15 2013, 8:30pm Anchor

Excellent thoughts.
But I have tried every word I can think of in classterr.
I DID manage to discover "nil" which seems to translate as owned by no-player. But I cannot get it to recognize the AIs of Horrors, Special Monsters, Independents separately. (interesting to note that this test does work on sites that cannot be actually "owned" by others so it can be used to find a desert or hills or plains)

I havent gotten into actual modding yet. Im still trying hard to bring the quests, campaigns, events capability of the map commands to fruit. So my modding has gone as far as event/endevnt. But that was a very interesting example you give. It will be very handy when I finally create my "Does a Bear" in the woods.

Reply to Thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.