You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Taunt to Trigg - Everything you need to know
posted 11-28-03 07:39 PM CT (US)   
I've noticed a lot of questions on the 'Taunt to Trigg' system lately. Hopefully, this post will clear things up for some people. Those who are able feel free to throw in your input and I'll include it in the main post. Many parts of this are from an article I have written but I have added more detail in this post as well as sprucing things up.

Later tonight I will attach a download for a pre-written script to save you the hassle of writing your own.

» Part I - The Script

Here is a section cut out from a sample script.

(defrule
(taunt-detected 1 1
=>
(acknowledge-taunt 1 1)
(cc-add-resource wood 40)

(defrule
(taunt-detected 1 1)
This part of the script detects the taunt being entered. Hence the "taunt-detected". The first number displayed is the player number in game. The second is the taunt you want to type and have a corresponding event. These can be altered to you liking. It is important to remember that you must have the script written to a player other than 1.

=>
(acknowledge-taunt 1 1)
This acknowledges the taunt you typed and the player number. Let me put it like this; this would be like the 'condition' part of a trigger in AoK

(cc-add-resource wood 40) Going along with the idea above this could be thought of as the 'effect'. This is how the script gets incorporated into the triggers. For example; Taunt number 1 should be 40 wood. For number 2 you want it to be 39 wood and so on.

» Part II - Trigger Setup

It is important to remember to set the script to the player before going any further.

The trigger set up below is only for taunt number 1. For a different number just increase or decrease the Accumulate Attribute condition and the tribute effect.

Condition 0 - Accumulate Attribute; 40 wood; The Player you have the AI set to. In this case player 2.

Effect 0 - Tribute; 40 wood; To player 2. It is important to remember to make this effect the very first one in the list.

The next effect(s) are up to you. Add an attack increase for a weapon being equipped etc...

» Part III - Examples for Use

So if you say 1 (Yes) the AI file will tribute 40 wood to player 2 and the condition of Accumulate Attribute - Wood Stockpile 40 will be met.
Next in order to be able to use the trick again you will need to tribute all of player 2's wood so it is set back to 0.

You will then need to set up 3 Triggers for this to work properly.

One for the Question
One for the Yes answer
One for the No answer

When the player answers the question use an effect in both answers to deactivate the one that wasn't used that way it won’t trigger when a player uses the taunt in a different location.

So if the player says Yes to buy a chain mail use an effect in the Yes trigger to deactivate the No triggers. If the player says No use an effect to deactivate the Yes answer and reactivate the question so when the player comes back the blacksmith will ask him again.

If you use the "Select Object" condition for the question make sure you change the ownership of the object to player one and back in the No answer so it doesn't keep repeating the question if the object is selected. Changing the ownership of the object to player one and back will deselect the object.

What is this trick good for? Well let's say you have an RPG where you want the player to be able to reply to questions. This trick is exactly how you can do that.
For example the player goes to a blacksmith and he says, "Would you like to buy a chain mail? (1=Yes) (2=No)"

The player can then use taunts to answer the question. Make sure you put the timer of display instructions on for a long time because if it just goes away there is no need to actually answer the question and the AI wont work properly.

» Part IV - Further Information

There is another method of using the taunt to trigg system by replacing cc-add-resource with set-signal. I opt to use the resource method for several reasons.

First, 'set-signal' has been known to cause save game bugs in which the taunt will not work at all. There is no way to fix this other than having an alternative to entering numbers.

Also, set-signal does not allow you to use the same number taunt more than once. If everything is done correctly with the resource method taunts can be looped countless times. Keeping in mind that they are not activated at the same time.

Make note that if the player uses any taunts during game play when they are not supposed to it will make the AI send the tribute at any time it is used. This creates problems because when the player does go to a shop that requires taunts it will be automatically answered. So make sure you explain this in your scenario and keep triggers deactivated until use.

[This message has been edited by Dark_Warrior_1_ (edited 11-29-2003 @ 06:06 PM).]

Replies:
posted 11-28-03 08:13 PM CT (US)     1 / 10  
If you're not going to have a huge amount of taunts, it can be good to assign each taunt to 1 of each resource for several of the computer players. That's 28 taunts right there, and it's way easier to do. It also substanitally decreases the chances of error.

_________________.##@@$$$@@##._____________
______________,##@$::%$$%%::$@##.__________
____________#@$:%%000000000%%:$@#_________
___________#@$:%00'___________'00%:$@#_______
__________#@$:%0'_______________'0%:$@#______
_________#@$:%0__________________0%:$@#_____
posted 11-29-03 01:17 AM CT (US)     2 / 10  
The Golden Age of Scenario Design: this forum is cranking out great new articles every week now. Wow.

[ Your quote could be here! ]*

* Contact information included separately

posted 11-29-03 11:02 AM CT (US)     3 / 10  
*Builds a temple featuring statues of Ingo, TDS, and Shadows with an enourmous HG statue in the center*

*Sacrifices animals to designing*


(¯`·._.~RayofLightSword~._.·´¯)
(¯`·._.~Official Unnofficial Forum Uber-1337 King of +1~._.·´¯)
"The Goddess Fortune is the devil's servant, ready to kiss anyone's ass".-William Blake
posted 11-29-03 12:06 PM CT (US)     4 / 10  
Pathetic.

/// (¬, (¯\ (¯¹ ¯)¯ (¯) )¬,
\\\ ==============
/// AoKH Forumer

posted 11-29-03 12:10 PM CT (US)     5 / 10  
*Sacrifices Raptor to designing*

(¯`·._.~RayofLightSword~._.·´¯)
(¯`·._.~Official Unnofficial Forum Uber-1337 King of +1~._.·´¯)
"The Goddess Fortune is the devil's servant, ready to kiss anyone's ass".-William Blake
posted 11-29-03 01:24 PM CT (US)     6 / 10  
Hey dark warrior i tried putting in the script(not the one u have cuz it looks like u left some stuff out)but for some reason when i press enter and put in the # it doesnt do anything heres what i have for the ai script:
(defrule
(taunt-detected 1 255)
=>
(acknowledge-taunt 1 255)
(cc-add-resource stone 100)
)
when i test it it doesnt work do u know any solution to this?
posted 11-29-03 05:42 PM CT (US)     7 / 10  
You are pressing 255 and not # arn't you?
Make sure you are "chatting to all" in the chat menu (Little trumpet top right of game screen), also try using a lower taunt number 255 is close to the maximum number and sometimes doesn't work. I've also heard that sending chat messages with a taunt over 100 can have problems.
Check your triggers, and if this fails check your email
posted 11-29-03 05:55 PM CT (US)     8 / 10  
Good article.

Quote:

MagicEngine GOLD2.5

So that's what that AI sitting in my folder is from, Wotdl?


No. Bad Jarl. Bad Bad Jarl. NO Penis ASCII.
-Andy.
posted 11-29-03 06:09 PM CT (US)     9 / 10  

Quote:

Hey dark warrior i tried putting in the script(not the one u have cuz it looks like u left some stuff out)but for some reason when i press enter and put in the # it doesnt do anything heres what i have for the ai script:
(defrule
(taunt-detected 1 255)
=>
(acknowledge-taunt 1 255)
(cc-add-resource stone 100)
)
when i test it it doesnt work do u know any solution to this?

Skull, as Beserker said, check over your triggers again. Also, make sure that your AI script is set to the correct player that corresponds with your tribute triggers. If all else fail send the scen to me and I'll have a look.

Edit: Yep, that's where it's from Kelar.

[This message has been edited by Dark_Warrior_1_ (edited 11-29-2003 @ 06:11 PM).]

posted 12-05-03 03:11 AM CT (US)     10 / 10  
Has it been proven that this method will always work again after a saved game, even if you shut down your computer? If so then I'm an instant convert. Not that I don't already use this method heheh...
Age of Kings Heaven » Forums » Scenario Design and Discussion » Taunt to Trigg - Everything you need to know
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames