Tilted Mill Community
Tilted Mill / Medieval Mayor /Nile Online / Mosby's Confederacy / Hinterland / Children of the Nile / SimCity Societies / Caesar IV


Go Back   Tilted Mill Community > Children of the Nile - Official Forums > Editing

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2004, 01:59 PM
Matt Zimmitti Matt Zimmitti is offline
Shopkeeper
 
Join Date: May 2004
Location: Brighton, MA
Posts: 214
Send a message via AIM to Matt Zimmitti Send a message via Yahoo to Matt Zimmitti
Arrow Lesson Six -- Military Sites and (gasp) Triggers

We’re almost there folks. We essentially have a working(ish) scenario. It has a lot of loose ends which we’ll shore up soon. First though, we need to add a little bit of military in to spice things up. We’re also going to start playing with triggers and in doing so we’ll make the world level a little more dynamic. Also, I’m assuming you have read pages 9 & 10 of the Editor Manual. Let’s get underway.

1) Basic Military Sites
Military sites are essentially just trade sites with a few small differences. We’re going to make a Bandit Fort and have it get revealed when the player explores south. The military in this scenario will be optional, so this first site will not send raiders. If the player decides they want to attack the raiders, then things will get more interesting once the player has attacked them. Here’s what I did after hitting the “New Activation Site”.
- Site Category: Enemy Site
- Cost Category: Citizens
- Cost Type: deactivation
- Resource: designated spearmen
- Cost: 10
I then added 10 archers and 600 food as deactivation costs. Fill in text and labels the same as you would a trade site. Move it to where you want it on the map, uncheck Visible and Active and you’re done. Just make sure you set “Exploration Up The Nile” to reveal your new site.

The site I’ve just created will require 10 archers, 10 spearmen and 600 food to deactivate. Well, if I was a bandit and someone “deactivated” my fort, I’d be pretty angry. We want there to be some sort of repercussions so upon defeating the fort, we’ll have more sites open up.

2) Raiders (our first trigger!)
I went in and made another military site called “Desert Raiders”. I used the graphic called “D. Enemy Camp” and made sure to check Spawn Raiders. I think I’ve mentioned this before but, just to reiterate, the Spawn Raiders checkbox does not spawn the raiders. It only puts the icon in the world level UI so that the player can determine what site is responsible for the raiders. We need to go in and set up a trigger to make the raiders show up. What we want to do is say that if the Desert Raiders site is open (the condition), send raiders every year (the effect).

a) Hit the Triggers button at the bottom of the screen (it’s just above the World Level button).

b) Create the Condition
- Press Condition then New
- Type of Condition: World Site
- It should now say “World Site Condition Details” in the bottom left of the UI. First select the name of the site you want to have responsible for the raiders (Desert Raiders in this case) from the first drop-down and select the state you want to check for (Is Open).
- Now give the condition a name that makes sense and press the enter key. I named mine “Raider Camp Open”.

c) Create the Effect
- Press Effect then New
- Set Type of Effect to Player
- It should now say Player Effect on the bottom-left
- Select Event from the first drop-down labeled “Action”
- For Player, select Player 1 (I’m 99.9978% sure that whenever you are asked to enter a player you should enter Player 1)
- Select Raiders Libyan under Event. There are other raider events with different cultural tags. These simply dictate the graphic used for the raiders that enter the map.
- Once again, name it appropriately. If you fail to enter a name, the editor will autogenerate a name that tells you very little about what is actually going on. When you only have a couple of triggers/conditions/effects the names don’t matter much. Down the road you will lose your mind if you don’t label these things.

d) Create the Trigger (finally)
- Press Trigger then press New
- Make sure Trigger Is On is checked. If this is left unchecked, then the scenario will start with the trigger inactive. You only do this latter case if you are planning on having a different trigger activate this one.
- Check Conditions True For and enter 960 seconds. There are 20 seconds in a game week and 48 weeks in a game year (20 * 48 = 960 seconds @ 1.00 speed).
- Check Looping. Looping triggers will continue to check after they have been fired. In this case, we want our raiders to show up yearly as long as the site is open. By making this a looping trigger we are saying once you fire, start counting again.
- Below, we enter our condition and our effect from the previous two steps.
- Finally, name the trigger.

What we now have is a trigger that checks to see if our Desert Raiders site is open. If it remains open for 960 seconds, it will send raiders and immediately start counting to 960 again. How many raiders? Every time a raider event fires, 3-6 show up at the edge of the map. If you want more aggressive attacks, fire the raider event off multiple times. We’ll do this with another site later.

3) Site Dependence
Triggers can be used to affect other sites. Our Desert Raiders site isn’t very tough, so what I’m going to do is make it return as long as it is supplied. I made another military site called “Supply Camp”. It’s a tougher site with significantly higher requirements. What I’ll do next is set up a trigger than reopens the raider camp as long as the supply is open.

a) Create a Condition that can be checked to see if the Supply Camp site is open (just like step 2b)

b) Now we will make two effects. One that makes the Desert Raiders site open and one that makes it visible. The Type of Effect in both cases will be World Site. One effect will have Open Site as its Action and the other will have Make Site Visible.

c) Now for the trigger.
- Hit Trigger then New
- Check Trigger is On
- Check Conditions True For and enter 480 (half a year)
- Check Looping
- Below, enter the condition that checks if the supply is open.
- Enter the first effect we create (open site)
- Next to that first effect there is a drop-down that presently says “End”. Select “And” from that drop down. A second effect drop-down should now appear. Select our second effect (make visible).
- If you like, you can add more effects to the statement in the same manner. I chose to add a raider attack event as well (the same event we cooked up in 2c) so that when the Desert Raiders site reopens it sends a group of raiders to say hi. I intentionally do no have it check to see if Desert Raiders is already open.

Note: I later went back and checked “No Open Message” for the Desert Raiders site. What this does is prevent the generic site open message from popping up each time the site gets reopened.


4) The Swap Out (a.k.a. “Bait and Switch”, “The Shell Game”, Compound Sites)
One technique used regularly in the campaign involves having two versions of the same site. A military site is always a military site. Well, what if you want the player to actually “take over” the site? What we did to solve this is to swap out the military site with a government owned site using triggers. Here’s how this works.

a) I created a trade site called “Conquered Supply”. It imports armor, kopeshes and food. It exports some gold. It will eventually reveal the city of Balat, but we’ll cross that bridge when we get to it. I placed it at the same X/Y location as the original supply site. I also unchecked Active and Visible for the site. It’s just going to sit there for a while.

b) I then made a condition that checks if the original Supply Camp site “Is Dead”. This is done in the same manner as making a condition to see if a site “Is Open”. Is Dead conditions check to see if the player has defeated a site with military. Therefore, this condition only applies to military sites.

c) Next I created an effect to make Conquered Supply visible (I called the condition “Vis Conquered Supply”). We’re talking about the new site from 4a here. It’s been there the whole time, just sleeping.

d) We need to get rid of the old Supply site so we’ll use the World Site effect called “Make Site Invisible”. It’s in the same drop-down we used in 4c.

e) Now for the trigger.
-The only think we’ll check off under the name of the trigger is Trigger Is On. We want the swap to be instantaneous so no need to check Conditions True For. This swap will also only happen once so there is no need to loop it.
-Select your condition from 4b
-Select your effects from 4c AND 4d

This trigger will now hide the original supply site and replace it on the map with a new government owned one in its place when you defeat it. The player will never see the swap and never know the better. This technique was used all over the place in the Grand Campaign. A good example of this is the world level basalt quarries. The quarry operation is actually two separate sites. When you upgrade it, it swaps in an entirely new site with different requirements and text. Pretty sneaky stuff.


Are you still with me? Good. There’s one more thing I’d like to cover in this lesson. For certain triggered events, you may wish to pop up a message box. I’ve done so in Akhetaten in a couple of spots. Here’s how they work.

5) Messages
- In Triggers, select Effect
- Type of Effect: Media
- Action: Send Dialogue
- Message Title: this is what appears at the top of the message box
- Message: the text in the box
- Sound (path and extension): I’ve never actually used this. Presumably you can add your own sound files and have them fire with the message.
- Display: Significant. This setting makes the big message box pop up in the middle of the gameplay area. Setting Display to Standard will have the message appear at the bottom of the screen.
- Category: Local Event. I’ve only ever used this setting.

Once you create a message effect you can AND it with other effects in a trigger. Whenever the trigger fires it will send the message.

-------------------------------------

I went in and added more triggers than just the ones listed above. I suggest going into the editor and taking a look at the triggers/conditions/effects that are now in Akhetaten. There is now a relationship between Cyprus, Lebanon and Traders of the Sinai. The Balat site sends multiple raider groups with a message.

There are certainly more types of triggers than what this lesson covers. This should get you started. Once you get familiar with the UI and trigger syntax things get a lot easier. I realize this lesson is a lot to digest so if anything is unclear let me know and I’ll go in to a little more detail on this thread.

Next lesson we’ll clean this scenario up significantly. Things like starting year, starting resources, patron god and a ton of text will be added. Bye for now.
Attached Files
File Type: scn Akhetaten.scn (1.10 MB, 546 views)
Reply With Quote
  #2  
Old 12-07-2004, 02:56 PM
sitearm's Avatar
sitearm sitearm is offline
Commander
 
Join Date: Aug 2004
Posts: 1,432
Send a message via Skype™ to sitearm
Default

Aha! So this explains why some messages pop up and others don't!
* taps nose knowingly *

Quote:
Originally Posted by Matt Zimmitti
... Messages... Display: Significant. This setting makes the big message box pop up in the middle of the gameplay area. Setting Display to Standard will have the message appear at the bottom of the screen...
Reply With Quote
  #3  
Old 12-18-2004, 03:00 PM
dreamsoftwilight's Avatar
dreamsoftwilight dreamsoftwilight is offline
Commander
 
Join Date: Aug 2004
Location: Michigan
Posts: 686
Send a message via AIM to dreamsoftwilight
Default

*listens to William Shatner screaming KAAAHN again*
Reply With Quote
  #4  
Old 12-23-2004, 02:47 PM
Raccoon_TOF's Avatar
Raccoon_TOF Raccoon_TOF is offline
Overseer
 
Join Date: Nov 2004
Location: Tyngsboro, MA
Posts: 576
Send a message via ICQ to Raccoon_TOF Send a message via AIM to Raccoon_TOF Send a message via MSN to Raccoon_TOF Send a message via Yahoo to Raccoon_TOF
Default

Figured I should repost this response here for anyone else that might be having problems with military sites and the army getting stuck:

Quote:
Originally Posted by Matt Zimmitti
Hiyo,

I took a quick look at the triggers you have going and I’m pretty sure I know what is going on. If you have a military site reopen via trigger, you need to do a check to make sure that it is not already open. Here’s why…

When you send soldiers off to a site, the site’s state changes so that the game knows that you have mustered and sent soldiers to the site. This prevents you from sending soldiers to multiple sites etc. If a trigger activates that site while it is in the “troops on the way” state, then that state gets wiped. This leads to problems if you in fact had troops headed there at the time the site was reactivated.

All you should need to do is check that the sites you will reopen are indeed closed and you should be ok. Let me know if this fixes things and you have my apologies for not noting it in my lesson on military sites.
Hopefully that will keep other people from making the same mistake I did when trying to reduce the number of triggers used, lol...
Reply With Quote
  #5  
Old 12-23-2004, 02:57 PM
Raccoon_TOF's Avatar
Raccoon_TOF Raccoon_TOF is offline
Overseer
 
Join Date: Nov 2004
Location: Tyngsboro, MA
Posts: 576
Send a message via ICQ to Raccoon_TOF Send a message via AIM to Raccoon_TOF Send a message via MSN to Raccoon_TOF Send a message via Yahoo to Raccoon_TOF
Default

On another note, when using a mixture of AND and OR in triggers, what order do they get evaluated in? For example, if my trigger has

If {condition a} AND {condition b} OR {condition c} AND {condition d}
Then {effect x} AND {effect y}

Which of the conditions below does the trigger fire under:

1: (a and b are both true) OR (c and d are both true)
2: (a is true) AND (b or c is true) AND (d is true)
3: ((a and b are both true) OR (c is true)) AND (d is true)
4: (a and b and d are all true) OR (c is true)
5: Some other combination...

Last edited by Raccoon_TOF; 12-23-2004 at 03:02 PM. Reason: clarification with parentheses
Reply With Quote
  #6  
Old 12-27-2004, 07:28 AM
Matt Zimmitti Matt Zimmitti is offline
Shopkeeper
 
Join Date: May 2004
Location: Brighton, MA
Posts: 214
Send a message via AIM to Matt Zimmitti Send a message via Yahoo to Matt Zimmitti
Default

4: (a and b and d are all true) OR (c is true)

I believe that the triggers function just as the goals do in regards to AND/OR. AND statements are necessary (relative to the other AND statements). OR statements are sufficient (on their own w/o regard for any other statements). They do not evaluate to complex statements based on order etc. I am 90% sure of this. However, we kept our condition statements pretty simple so I could be wrong.

(how's that for taking a decisive answer, qualifying the daylights out of it and rendering it to hearsay?)

Honestly, I'm reasonably sure it works that way.
Reply With Quote
  #7  
Old 12-27-2004, 02:59 PM
Raccoon_TOF's Avatar
Raccoon_TOF Raccoon_TOF is offline
Overseer
 
Join Date: Nov 2004
Location: Tyngsboro, MA
Posts: 576
Send a message via ICQ to Raccoon_TOF Send a message via AIM to Raccoon_TOF Send a message via MSN to Raccoon_TOF Send a message via Yahoo to Raccoon_TOF
Default

*chuckles* Ok, I was afraid that was how it worked, that a single OR could override all of the AND requirements in a single trigger. Looks like I'm going to have to be having some real messy sets of nested triggers, and triggers checking other triggers, to get some of the effects I want...
Reply With Quote
  #8  
Old 01-05-2005, 05:36 PM
Honour_Shogun Honour_Shogun is offline
Vagrant
 
Join Date: Dec 2004
Posts: 24
Default

Is there a way through triggers to set it up so that if you build a fortress, it reduces the amount of troops needed to take an enemy capital? For example, you open Fort A, and because of that you don't need 400 spearmen, but only 200 instead. I am completely lost trying to figure out how to do this.

Thanks in advance from a struggling scenario builder.
Reply With Quote
  #9  
Old 01-05-2005, 10:23 PM
Raccoon_TOF's Avatar
Raccoon_TOF Raccoon_TOF is offline
Overseer
 
Join Date: Nov 2004
Location: Tyngsboro, MA
Posts: 576
Send a message via ICQ to Raccoon_TOF Send a message via AIM to Raccoon_TOF Send a message via MSN to Raccoon_TOF Send a message via Yahoo to Raccoon_TOF
Default

Yes, you can do it, but not "directly". What you have to do is make two sites for the enemy site, one (we'll call it EnemyA) that has the normal requirements, and a new one (we'll call it EnemyB) that has the lowered requirements. Place both of them in the exact same spot on the world level (manually enter the coordinates into EnemyB so that they match EnemyA's coordinates). Then you have to create a set of triggers that when the Fort is activated, you Inactivate (not Deactivate, as that will count as them being defeated...) EnemyA, Hide EnemyA, Activate EnemyB, and Visible EnemyB. Then, to get EnemyB to send raiders, you need to duplicate the raider triggers that you had for EnemyA, but set them based on EnemyB being active instead of EnemyA.

This really isn't reducing the costs to deactivate the enemy site, it's really just replacing one site with the other. But if they are in the same location, with the same names, text, etc. then as far as the PLAYER can tell, the cost has been reduced by activating the Fort, as was the desired goal. Just remember to keep any triggers that depend on the status of EnemyA clear in the fact that it IS still a separate site from EnemyB as far as the GAME is concerned...
Reply With Quote
  #10  
Old 04-02-2007, 11:54 AM
kITIARA kITIARA is offline
Vagrant
 
Join Date: Apr 2007
Posts: 1
Default

1) Is there a way to establish in with place raiders will come into my city.
2) Is there a way to disable default message that pop up when raider event is starting ("Raiders are approaching, intent on stealing what they can ...").
Reply With Quote
  #11  
Old 04-02-2007, 05:49 PM
Azeem's Avatar
Azeem Azeem is offline
Noble
 
Join Date: May 2004
Location: Hetepsenusret
Posts: 3,664
Default

1) Not that I know of. It appears to be random.
2) No. But you can create a customized message when the raider trigger occurs.
Reply With Quote
  #12  
Old 04-03-2007, 09:50 AM
Karter's Avatar
Karter Karter is offline
Overseer
 
Join Date: Dec 2004
Location: Portland, Oregon
Posts: 469
Send a message via MSN to Karter Send a message via Yahoo to Karter
Default

Quote:
Originally Posted by kITIARA
2) Is there a way to disable default message that pop up when raider event is starting ("Raiders are approaching, intent on stealing what they can ...").
NOTE: when creating the site on the World Map

also, in addition to Azeems comment, the check box for raiders on the world map portion (when creating the site)
the only thing the check mark does, is either displays/or not display the city name/site location in the popup raider message
Reply With Quote
  #13  
Old 01-26-2009, 08:32 AM
setokaiba's Avatar
setokaiba setokaiba is offline
Villager
 
Join Date: Jan 2009
Posts: 28
Default Kudo's to you and Tilted Mill

I managed to figure out lesson 1 - 4 out buy myself. ^_^ It took a while estpecially with clay.

I'm not a big "sprite" fan. when i play i build up some farms and brick makers and then I run around the map deleating all usless stuff that just confuses me. Hate them... make some nice bricks in the process.

So when building i only use resources. I'm also not a big fan of landscapes. Don't pay much attention to it. I also never use a lot of space and find that most scenarios are way to big. I usually build everything on top of each other. I never build military or labours apart as suggested. I always manage to have perfect happiness with them in my citiy, maybe keep them on the outskirst of with a Ra, Set and city patron shrine and their own hospital(....they love to go to the hospital ) and their own baker (boy can the moan about bread). Who said a noble couldn't live next door to a solider. ^_^ I guess I do that becuase my first 3 plays I ended up with 20 - 40 vagrants all being labourers and soldiers. I'm just no good at it. Lessons 1 - 4 were no good to me. ^_^ Flat land, no sprites and small maps....that's my thing. You'll be surprised how easy it is to fit 10 nobles, 16 labourers and 120 troopers into one little space and keep them all happy with divinity prestige.

Lesson 5 - 7 however are fantastic. I got lesson 5 like 80% down on my own through opening up other scenarios and taking a peek. Big time playing around, nearly messed up a good senario Abu i think it was.... ^_^ But there were still a few tips here and there that i didn't know and well worth knowing. ^_^ thanks.

Then i started triggers and lost my head. The concept was easy enough to understand but getting the concept to work.... was a whole new ball game. Lesson 6 is fantasic, really tied up loose ends for me. Thanks a mill. I'm still playing around so if anything crops up I'll be happy to fill it in somewhere. Going through lesson 7 to see if can refine my creations a little more. ^_^

This is definatly the best simulation game I've played, it rocks. I'm making a campaign.....but i'm not very accurate on history so I've just gone silly and called things randomly - Pharo Oli XD (Oliveville), Friends (allies), Barbarrians (randomness at the top of egypt) and Enemies (lots of battles at the bottom XD), together with lots and lots of nonsense in between I'm fond of Marty's Monkey's....., and haphazardly stumbling upon barbarians outcaset camp.
Reply With Quote
  #14  
Old 01-26-2009, 09:00 AM
Tinkerbell Tinkerbell is offline
Noble
 
Join Date: Sep 2007
Location: San Diego, California
Posts: 5,583
Default

Howdy, setokaiba!

I & I'm sure that it is also a "We" cannot wait to see you in the User-Created Scenario section.

Good Luck on your journey with the excellent but sometimes tricky COTN Editor & please be sure to share your scenarios with us! They don't have to be great (just look at mine ) & they don't have to be perfect.

Thank You so much!
Reply With Quote
  #15  
Old 01-27-2009, 06:39 AM
setokaiba's Avatar
setokaiba setokaiba is offline
Villager
 
Join Date: Jan 2009
Posts: 28
Default

Quote:
Originally Posted by Tinkerbell View Post
Howdy, setokaiba!

I & I'm sure that it is also a "We" cannot wait to see you in the User-Created Scenario section.

Good Luck on your journey with the excellent but sometimes tricky COTN Editor & please be sure to share your scenarios with us! They don't have to be great (just look at mine ) & they don't have to be perfect.

Thank You so much!

Thanks, I'll go take a look ^_^. Once I'm done (I don't know when, just started studying again, got 7 novels for litriture to read ^_^) I'll be more than happy to upload for everyone to have a good laugh at. ^_^ I really made it very silly.
Reply With Quote
  #16  
Old 01-27-2009, 02:59 PM
Malandra Malandra is offline
Villager
 
Join Date: Dec 2008
Posts: 38
Default

Quote:
Originally Posted by setokaiba View Post
I'm not a big "sprite" fan. when i play i build up some farms and brick makers and then I run around the map deleating all usless stuff that just confuses me.
I found myself nodding as I read this... the first thing I do when I start a new game (as a player, I haven't tried any editing) is pause and delete absolutely everything that isn't a resource.

I feel kinda bad for the scenario designers when I do it, though... all that hard work making things look pretty and I just blow it all away!
________
ANGELINA JOLIE NUDE

Last edited by Malandra; 03-24-2011 at 05:45 AM.
Reply With Quote
  #17  
Old 01-27-2009, 05:11 PM
tomnobles's Avatar
tomnobles tomnobles is offline
Commander
 
Join Date: Aug 2007
Location: Albuquerque, New Mexico
Posts: 1,225
Post

Don't feel bad. I did it myself with an older machine. I try to think of those when I build the map now, but sometimes I just get carried away. So, go ahead and delete everything, and don't worry you can't delete resources, just certain decorative sprites.
Reply With Quote
  #18  
Old 01-28-2009, 08:11 AM
sakasiru's Avatar
sakasiru sakasiru is offline
Scribe
 
Join Date: Jan 2008
Location: Germany
Posts: 2,003
Default

That´s the reason why I now make things pretty with ressources
Reply With Quote
  #19  
Old 01-28-2009, 10:47 AM
Malandra Malandra is offline
Villager
 
Join Date: Dec 2008
Posts: 38
Default

Quote:
Originally Posted by tomnobles View Post
Don't feel bad. I did it myself with an older machine. I try to think of those when I build the map now, but sometimes I just get carried away. So, go ahead and delete everything, and don't worry you can't delete resources, just certain decorative sprites.
My machine can handle it, just not my brain. And yes - I was quite happy when I discovered that the clear trees/buildings tool ignores resources.

Sakasiru - /cheer! That is all.
________
Buy Roor Bongs

Last edited by Malandra; 03-24-2011 at 05:45 AM.
Reply With Quote
  #20  
Old 02-08-2010, 04:06 PM
Punchackale's Avatar
Punchackale Punchackale is offline
Vagrant
 
Join Date: Feb 2010
Posts: 7
Default

Man i was wondering, if you have like 2 raider camps and both send raiders, is there anything do do to specify wich of the raiders attack when raiders are invaiding tghe city?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:20 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.