 |
|  |
 |
|
William Keenan
|
 |
New Jersey, USA, Earth, Sol, Milky Way
Sep 1999 time: 00:14
|
|
It looks like you and I are the only ones John.
The fantasy scenario I am building has a number of quests in it requiring the player to explore maps 1, 2 and 3. I felt that the players would get bored searching an entire map so I decided to locate treasure chests in various locations to keep the search interesting and included rewards such as gold, a magic scroll (free advance), and a curse (disables a technology). The problem with this is that it would be fun the first time playing the scenario but thereafter it would detract from the re-playability because the players would learn which chests contained rewards and which contained curses. I decided I wanted the contents of the chests to be randomly determined, to be impossible to predict the contents, to never have more then one chest in a given site, and not to use up allot of heap space doing it.
Here is how I did it.
Each turn several flags of the barbarian civ are seeded with a random value.
@IF
RandomTurn
Denomonator=2
@THEN
FLAG
Who=Barbarian
State=On
Flag=31
@ENDIF
Once set the flags can be examined for an exact match of the mask for equal probability results or as a count producing a bell curve result. I chose to use the bell curve making the scroll and the curse the least likely result.
@IF
UnitKilled
Unit=Treasure Chest
Attacker=anybody
Defender=anybody
@AND
Checkflag
Who=Barbarians
Mask=0xF0000000
Count=4
@THEN
NoBroadcast
TEXT
Within the ancient chest is the treasure of a Lich worth 1000 gold. The Lich pronounces a curse on you and your people forbidding you communication with the denizens of the spirit world.
ENDTEXT
TakeTechnology
Whom=TriggerAttacker
Collapse
Technology=Sorcery
ChangeMoney
Receiver=TriggerAttacker
Amount=1000
@ENDIF
Like it?
|
|
|  |
 |
|
Civfan
|
|
Toronto, Canada
Sep 1999 time: 05:14
|
|
Just curious here. Does anyone have trouble using the events to load movies? I'm having trouble right now with TOT.
This is the command in the events file
@IF
TURN
turn=3
@THEN
PLAYAVIFILE
FIRE.AVI
@ENDIF
William, can you help out?
|
|
|  |
 |
|
|
I have to admit I really don't quite understand the whole flags concept. Is their purpose to serve as many triggers at once? The manual is a bit cryptic as to their function. I tried looking at the events files of the different games, and it seemed like the flags represented already created triggers. Am I off on that guess?
Also, it was said that one of the uses could be to have a civ surrender if a certain number of cities were taken... how would that be done?
|
|
|  |
 |
|
John Possidente
|
 |
Hunt Valley, MD USA
Jun 1999 time: 00:14
|
|
Flags are turning out to be so complex that I'm almost sorry we put them in. 
Seriously, though--we've talked about flags in a few threads here in the past, and I don't want to revisit too much of that discussion. Maybe someone will write an article on them....
Anyway, flags are basically markers you can set to record occurrences for later checks. To use the cities example you mention, you could set up events so that when certain cities were captured (you would have to specify the names of the cities, so if the player changed the names, the events would not work), flags were set. When Paris is overrun, flag 1 gets set; when Tours is captured, flag 2 gets set; and so on.
Then, using a CheckFlag trigger and a Threshold parameter, you could make an event that said, in essence, "When enough of these flags are set, trigger this event". OR you could use the Count parameter to say, "When exactly this many flags are set, trigger the event". OR you could use the Mask parameter to say, "When these specific flags are set (i.e. certain vital cities have been taken), trigger the event".
|
|
|  |
 |
|
Civfan
|
|
Toronto, Canada
Sep 1999 time: 05:14
|
|
John, the use of flags in TOT sounds real good. But, is there a strategy guide out there which deals with them? I'm like most of Civ2 players out there and have no real idea about them. The manual that came with TOT just tells you theres so much that can be done with them but theres no examples in it.
So is there a strategy guide by Micropose that deals with them. I heard that someones making a new strategy guide (I believe you mentioned it in a previous thread) about the new ways of Scenario design for TOT.
|
|
|  |
 |
|
|
Thanks, John. I thought that was what the flags did, I just wanted to be sure that was all they did. Actually, the reference to example of capturing a certain number of cities was how would cause a nation to surrender.
|
|
|  |
 |
|
|
Thanks, John. I thought that was what the flags did, I just wanted to be sure that was all they did. Actually, the reference to example of capturing a certain number of cities was how would one cause a nation to surrender.
|
|
|  |
 |
|
ghosh9
|
|
Beaverton, OR, USA
Oct 1999 time: 05:14
|
|
Along the lines of Civfan's question about strategy guides--
There is no further information on flags in the Civ II TOT strategy guide. However, the programmed events in the fantasy and sci-fi games, as well as the Midgard scenario, are described in detail. So you can read these and decipher what you're looking at in the events.txt.
I am glad this discussion about flags is going on. I had an adventure game construction kit once (Forgotten Realms Ultimate Adventures) that used something simular. I'll keep coming back and rereading these tips until I figure these flags out.
|
|
|  |
 |
|
tobyr
|
|
Princeton, NJ USA
Oct 1999 time: 05:14
|
|
John, PLEASE keep the flags in civ3; don't be sorry you put them in!
The lessons to learn from the flags are:
(1) Name features very carefully according to their meaning. If you had called them memoryFlags or StorgaeBits their function would be clearer.
(2) Include a clear example of the basic uses of the feature in the manual, and in a sample file in the release.
- toby robison
------------------
toby robison
criticalpaths@mindspring.com
|
|
|  |
 |
|
John Possidente
|
 |
Hunt Valley, MD USA
Jun 1999 time: 00:14
|
|
Let me see if I can cover masks simply and briefly...
Say your scenario is going along nicely, and in the course of it, flags are being set. For a particular event, you want to check certain flags--not all of them--but only trigger if all of those certain flags or a certain minimum number of them have been set. That's when you'd use the mask, to control which flags you're checking on.
Example? Hmm... Let's say you have fifteen flags that you're using. Each one is set ON as the result of somebody completing a quest (sounds vaguely familiar...). The quests you've attached to flags 2, 3, 8, and 14 result in the "discovery" of imaginary pieces of an ancient relic--I say imaginary because there's no way for the player to actually have or manipulate these things.
Okay, so you decide that you want this relic to have special powers; when all the pieces have been unearthed, something happens--for our purposes, it doesn't matter what. You need to use the flag mask to trigger an event based on all four of those flags being set. In binary (since I don't do hex), it would look something like this:
@IF
CheckFlag
Who=Everybody
Mask=0b00000000000000000010000010000110
State=ON
@THEN
...and so on
@ENDIF
The mask just tells the CheckFlag trigger not to bother looking at any of the other flag settings--it focuses the trigger on only the flags you care about in this situation.
|
|
|  |
 |
|
|
Sorry for just jupming in here, but I need help (again).
My scenario is supposed to end when Germany conquers 4 key cities, London, Alexandria, Perm and Magnitorsk. Here is the events that I used:
@IF
checkflag
who=Germans
mask=0b0000000000000000000000000001111
count=4
state=on
@THEN
text
^The Third Reich achieves ultimate victory over Europe! The Soviet Union
^has been crippled, England has been smashed, and anything that remains
^is barely a threat. The Führer's dream which he described in "Mein Kampf"
^has become a reality. Long live the fatherland!
endtext
playwavefile
panzersong.wav
@ENDIF
@IF
checkflag
who=Germans
mask=0b0000000000000000000000000001111
count=4
state=on
@THEN
playwavefile
siegheil.wav
endgame
endscreens=yes
@ENDIF
I'm not really sure if that is who I am supposed to use the mask or not... Could that be the problem? Because when Germany conquers those 4 cities nothing happens. When they take london, flag 0 is trigger, Magnitogorsk is flag 1, Perm is flag 2, and Alexandria is flag 3.
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|