Thread Tools
Old August 24, 2000, 13:48   #1
Harris
Settler
 
Local Time: 06:03
Local Date: October 31, 2010
Join Date: Apr 2000
Location: SDC #3
Posts: 8
SDC#3 entrants beware: ToT events bug
After several weeks of getting ToT flags to work in my scenario and failing I came to the conclusion that there is a logic bug in the events parser.

When using a CHECKFLAG statement with the COUNT parameter the trigger returns a true condition when the count is equal to or greater than the COUNT. It is only supposed to return a true when the number of FLAGS in the MASK is equal to the COUNT.

For example, if you have two statements where one is a CHECKFLAG, COUNT=1 and other is a CHECKFLAG, COUNT=2. If only one FLAG is ON then only the COUNT=1 trigger returns a true. However, if both FLAGS are ON then both statements return a true, not just the COUNT=2 statement. Which is, of course, the bug

This hold true no matter how many flags you are testing. If ten FLAGS in the MASK are ON and you are checking for a COUNT of any number less then ten it will still return a true result.
Harris is offline  
Old August 24, 2000, 14:33   #2
Miner
Prince
 
Miner's Avatar
 
Local Time: 07:03
Local Date: October 31, 2010
Join Date: Jul 1999
Location: of London
Posts: 375
Are you sure you are not using the threshold parameter?
Miner is offline  
Old August 24, 2000, 14:38   #3
Xin Yu
Apolytoners Hall of Fame
King
 
Xin Yu's Avatar
 
Local Time: 22:03
Local Date: October 30, 2010
Join Date: Dec 1969
Location: Emeryville, CA, USA
Posts: 1,658
I think:
Suppose the bug is really there, you can still do an exact number checking by using two sets of flags. The second set of flags will be the opposite events of the first ones. For example you have 10 flags for 'true' conditions, then 10 flags for 'false' conditions. When you need 4 conditions to be true, check 'N=4' in the true set then 'N=6' in the false set. only if both are satisfied it triggers the event.
Xin Yu is offline  
Old August 24, 2000, 14:46   #4
Miner
Prince
 
Miner's Avatar
 
Local Time: 07:03
Local Date: October 31, 2010
Join Date: Jul 1999
Location: of London
Posts: 375

Ignore previous post! Sorry to have doubted you!

I have just ran a testcase, setting 2 flags and seeing which checkflags fired and both do. This is a bummer of a bug...

Typical, Xin beats me to the post...
[This message has been edited by Miner (edited August 24, 2000).]
Miner is offline  
Old August 24, 2000, 23:23   #5
Harris
Settler
 
Local Time: 06:03
Local Date: October 31, 2010
Join Date: Apr 2000
Location: SDC #3
Posts: 8
Miner, don't let the settler thing in my profile fool you. Harris is my SDC#3 ID. I'm using it instead of my real handle to maintain my anonymity concerning the contest.

Xin Yu, that is of course a valid work around. The problem with it is however, that it uses both conditions of the @IF leaving no room for another trigger such as UNITKILLED or CITYTAKEN, etc. in the event structure.

In anticipation of your counter-point, Xin; yes, you could have flags set by using UNITKILLED and CITYTAKEN statements and then include those flags in the CHECKFLAG statement. The problem with that logic is that one flag would need to be dedicated to each condition. In other words, every time you wanted to use a UNITKILLED it would use up one of your flags. With only 32 flags per civ you would run out real fast.

In anticipation of your counter-counter-point, using the flag sets of the barbarians and other civs that are not active in the scenario to extend the number of flags available sounds like a good idea, I'm glad you brought it up. I tried it and found, much to my chagrin, that the game ignores any CHECKFLAG statements that involve civilizations that are not active in the scenario.
[This message has been edited by Harris (edited August 24, 2000).]
Harris is offline  
 

Bookmarks

Thread Tools

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 On

Forum Jump


All times are GMT -4. The time now is 02:03.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team