ware amount as trigger condition

Discussion and help with creating scenarios and campaigns in the Editor
sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

ware amount as trigger condition

Postby sakasiru » Sun Feb 01, 2009 1:31 am

I want a trigger to spring when an amount of wares is reached. There is a way to set a condition to
ware >= [amount]
It works with things in dops, but it doesn't work with things stored in shops like papyrus and weapons.

Any workarounds?

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Sun Feb 01, 2009 1:36 am

I doubt it, sakasiru on wares in buildings (wares = common & lux ~ probably an English/German translation thingie).

However, you cannot get a condition to work on papyrus & weapons? You should be able to do conditions on anything that shows on the Resource Report. Now papyrus in a Priest's Home would not work, but papyrus in a papyrus maker should.

The exception would be leather. That would have to be in a DOP. Leather in buildings is not counted on the Resource Report.

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Sun Feb 01, 2009 1:50 pm

With ware I mean the ressource the player needs a certain amount of.

I have two conditions:

player 1: ressource / turquoise >= 100

player 1: ressource / armor >= 80


The first one works, the second one not. I suspect this is because the armor is stored in the armor shops, and the turquoise in dops. :confused:

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Sun Feb 01, 2009 3:13 pm

There is probably a different way to do the armor. Keep looking & good luck, sakasiru. So far, every time we have concluded something is not possible, someone proves us wrong. The COTN Editor is totally amazing in its possibilities.

I could do the Lab also, but I'm kinda busy right now. Hopefully, someone else will jump in with a solution.

I'll try to find some time next week to add my Lab.

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Sun Feb 01, 2009 9:08 pm

sakasiru,

Check whether you can assign that attribute to a building. You will need an object or type "Armor Workshop," or whatever its name is in the editor. Maybe "Military Equipment Maker." You will need the checkbox "find on map" or whatever it is checked.

Then, set a condition that says "Object: Armor Workshop" has "Armor >= 80."

You might have to select the object via an Area, which is the whole map. Some of the other guys probably have more concrete ideas how to do this.

Also, there might be a condition in the tutorials that checks to see if a building has resources or goods. Is that right?

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Sun Feb 01, 2009 9:31 pm

Yahya,

I will try this. However, I fear that the X amount in $building condition only works to the limit of the building store (=12 armors). Will see. Otherwise, I require to send the stuff to a world site...

I will also look at the tutorials, but I can`t remember storing papyrus or weapons there. Does anyone remember a scenario where such a thing was required? That would help a lot!

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Tue Feb 03, 2009 2:50 am

Sakasiru, try this...
You do not have the required permissions to view the files attached to this post.

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Tue Feb 03, 2009 1:45 pm

Oh, interesting. That's worth checking into. Always wondered what "variety" did. Never thought to check it, because I never need it (really) when I see it. LOL

Tinkerbell
Posts: 5415
Joined: Fri Sep 07, 2007 3:42 am
Location: San Diego, California
Contact:

Postby Tinkerbell » Tue Feb 03, 2009 1:51 pm

"Yahya" wrote:Oh, interesting. That's worth checking into. Always wondered what "variety" did. Never thought to check it, because I never need it (really) when I see it. LOL


It is how I triggered mah seven earthquakes in Children of the Nile

:D

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Tue Feb 03, 2009 4:08 pm

Would you care to elaborate on that, maybe via PM?

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Tue Feb 03, 2009 7:31 pm

Thanks, this works! :D

Can anyone tell me how I define a variable like in
effect: player - set variable - player 1 - var0 - reduce: amount X

Instead of "var0" I'd like to have papyrus, but I don't know how to set this (or am I getting this completely wrong?)

Karter
Posts: 469
Joined: Wed Dec 29, 2004 4:07 am
Location: Portland, Oregon
Contact:

Postby Karter » Thu Feb 05, 2009 7:26 am

"sakasiru" wrote:Thanks, this works! :D

Can anyone tell me how I define a variable like in
effect: player - set variable - player 1 - var0 - reduce: amount X

Instead of "var0" I'd like to have papyrus, but I don't know how to set this (or am I getting this completely wrong?)


if you still need, i can give a detailed discription
I use player variables extensively
But, are you just trying to keep track of the amount of Papyrus?
because that can be handled another way
Last edited by Karter on Thu Feb 05, 2009 7:44 am, edited 1 time in total.

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Thu Feb 05, 2009 12:21 pm

It would be nice if to explained them. I'm not sure I understand what they are for...

What I want to do is to check if a player has a certain amount of papyrus (through another trigger) and then take that amount away from him, as if it was spent.

I tried to do this through an object effect, but I have to assign it to an object, and I'm not sure how to do it if the papyrus amount needs multiple papyrus makers :o

Karter
Posts: 469
Joined: Wed Dec 29, 2004 4:07 am
Location: Portland, Oregon
Contact:

Postby Karter » Fri Feb 06, 2009 10:23 am

Drat!! my editor is not functioning properly so I am unable to test these
The last time I used it was for my Scenario The Keep
I haven't used it since the new version came out and I am uncertain which patch I have installed

I am going to only address Variables in this post, (I don't have visuals)
after this, if needed I can demonstrate the use for the Papyrus and I did create visuals for that.

So, with that said lets begin
Variables are place holders that hold a numeric value
you can increase, decrease or set an exact amount to these

You have a total of 20 variables, 10 for each player
Player1 [Var0, Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8, Var9]
Player2 [Var0, Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8, Var9]

Even though the game is really just a single player game, and you are always Player1
you can still manipulate data for a Player2

Unfortanely you can not assign a Player element, like Papyrus = Player1 [Var0]
however you could do a function like
IF Player[Var0] >4 THEN Papyrus = 5

They come in handy if you want to keep track of conditions that happen in the game

As an example, I use them to keep track of a Victory Status
Lets say for a Win Scenario you must defeat a total of 7 enemy camps

you would first setup up a victory effect
Effect > New > Player > Victory > Player 1 [NAME: probably call it Victory]

Next you would set up an effect to increase a variable by 1
Effect > New > Player > Set Variable > Player 1 > PlayerVar0 > increase by 1 [NAME: something like Victory tracker +1]

in the above Player 1 or Player 2 can be set and with the drop down menu you can select which variable to use
a drop down menu allows you to select increase, decrease or set exact amount and you enter a numeric value

So for each enemy site you would you would create a trigger to increase the Victory tracker by 1, example;
Trigger > New >
IF CONDITION <dead EnemyCamp1 >
THEN EFFECT <Victory Tracker+1>

This would cause Player1[PlayerVar0] to increase by 1, so it's value would be 1

You then create a trigger for all the other camps
Trigger > New >
IF CONDITION <dead EnemyCamp2 >
THEN EFFECT <Victory Tracker+1>

So, Player1[PlayerVar0] is increased by 1 again, so it's value is now 2

You then set up a condition to check to see if Player1[PlayerVar0] has reached 7 (the number or dead camps)
Condition > New > Player-Attribute > Player1 > Other Stats > PlayerVar0 = 7 or > 6 [NAME: something like Victory obtained]

Lastly you create a Trigger to force the victory
Trigger > New
IF CONDITION <Victory obtained>
THEN EFFECT <Victory>

I hope all of that made sense to you,
of course you could use the Victory tracker for any type of items, different sites opened, materials obtained, or Temples built etc.
and Variable value for victory could be any number, lets say you track 7 enemy sites and a cult temple then the victory number would increase to 8
it just allows you greater flexibility within the game

NOTE:
If I were only trying defeat enemy sites I probably wouldn't use the variables
I would just use something like
Trigger > New >
IF CONDITION <dead EnemyCamp1> AND <dead EnemyCamp2> AND <dead EnemyCamp3> etc
THEN EFFECT <Victory>

but my scenarios usually have more complex issues to track and thats where variables really shine

questions?
Last edited by Karter on Sat Feb 07, 2009 1:01 am, edited 5 times in total.

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Fri Feb 06, 2009 12:35 pm

Thanks! At least now I know what they are for :) although I have to try this myself to fully grasp its usefulness... I have to tell you I already learned a lot about the editor through looking in your scenarios :o

It would be nice if you also help me with the papyrus reduction problem. :o

Karter
Posts: 469
Joined: Wed Dec 29, 2004 4:07 am
Location: Portland, Oregon
Contact:

Postby Karter » Mon Feb 09, 2009 1:41 pm

so sorry for the delay
I have not forgotten you, please see PM

Karter
Posts: 469
Joined: Wed Dec 29, 2004 4:07 am
Location: Portland, Oregon
Contact:

Postby Karter » Sun Feb 15, 2009 9:36 pm

Finally I am back with the living, I think I have gotten over my cold (what a nightmare)

Now, unfortunately I have done some checking and I have to eat crow :(

Tinkerbell was correct in using Variety instead of Resource to check you Papyrus
and
I thought you could decrease and increase the amounts, (but it has been 2 years since I used the editor)
and it appears you can not do this... Sorry, the only way to eliminate papyrus, that I can see is to actually destroy the Papryus Mills.
I could have sworn there was another way, but I have tried every way I know of, and to no avail.

Sorry, I will just keep my big mouth shut until, I actually test things first.

again I apologise for the long delay

sakasiru
Posts: 1968
Joined: Thu Jan 17, 2008 12:26 am
Location: Germany

Postby sakasiru » Mon Feb 16, 2009 1:57 pm

:(

I guess I will set up a world level site then where the player can send the stuff.

Thanks for trying anyway, Karter! Your help is appreciated! :) Hope you feel better now!

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Thu Apr 29, 2010 2:15 pm

Digging up this old thread while reading about variables.

I'm pretty sure you can set the attribute of an object, and therefore change the level of papyrus or whatever.

I know you can do it with citizens, because I've done it. And you can do it with DOPs, because I just tested that, so gold could be used as currency instead of food.

I'll have to run a test on that, because I'm almost positive that if I set attribute on an object, I can reduce to whatever I want. But it would have to be each object.

Yahya
Posts: 1544
Joined: Tue Jul 20, 2004 11:09 pm
Location: The Ocean State

Postby Yahya » Fri Apr 30, 2010 1:51 am

Okay, I've had a chance to look at this. It might be far too late (more than a year LOL) but I wanted to check it.

Interesting. My tests work with other buildings, but not with armor workshops. I didn't try the other workshops, though.

But what I did was define an object that had the number of homes I wanted, and had it non-dynamic. I first had it set bricks to 100 (brickworks) and then set them to 0. Worked like a charm.

I placed 8 brickworks on the map, and set the level of reed bricks to 100 in 6 of them. I then set the number of reed bricks to 0 in six of them, and it worked without problem.

Armor had no effect. I used the same triggers and effects, but the armor level was never set to 12 like I set. So I assume the "armor" item is incorrect. Or maybe something else.


Return to “Editing”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 5 guests