Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization II > Civ2-Test of Time > Will someone please explain flags to me?????
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
29.Jul: MOVING UP ON REVISED `TOP 100` INDEX
29.May: GAME MECHANICS REFERENCE BOOKLET
06.Mar: DROPPING FROM SECOND TO THIRD

bottom of page
  - CIVILIZATION 2 from $6.95 - CIVILIZATION 2 from $4.25 - CIV2: TEST OF TIME from $2.50 - CIV2: MULTIPLAYER GOLD EDITION from $4.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Dracon
Guest

Not Yet
time:
Question  Old Post 16-12-1999 16:47
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Will someone please explain flags to me????? Support Apolyton, buy GURPS/ Alpha Centauri

What's the go with flags, and why isn't there a design tip on it? I want to know what flags are, how, when, and where to use them. Can someone please tell me?

------------------
http://www.alladvantage.com/home.asp?refid=HES908 - Click here if you want, I'm not spamming
http://www.epipo.com/signup_form.asp?Ringo_Starr - Click here if you want, I'm not spamming.

http://modasylum.cjb.net
"And well might we say 'may God save the Queen because nothing will save the governor general'"
Gough Whitlam - November 11 1975 on Parliament House steps.


John Possidente is offline John Possidente
Prince
Hunt Valley, MD USA
Jun 1999
time: 00:14
Post  Old Post 16-12-1999 18:39
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Help yourself to an AD-FREE life

I thought William Keenan was going to write something up about this.

Seriously, we went over flags pretty well in a thread in this forum about a month ago. Search through a ways and you should be able to find it. If you still have questions after reading that, I'll try...

William Keenan is offline William Keenan
Prince
New Jersey, USA, Earth, Sol, Milky Way
Sep 1999
time: 00:14
Post  Old Post 16-12-1999 23:09 Visit William Keenan's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton buy from Amazon

well ... they're made of canvas and come in many colors ...

William Keenan is offline William Keenan
Prince
New Jersey, USA, Earth, Sol, Milky Way
Sep 1999
time: 00:14
Post  Old Post 16-12-1999 23:57 Visit William Keenan's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Help yourself to an AD-FREE life

Here is a excerpt from my upcoming tip on flags,
quote:
Everyone is familiar with the decimal number system, the base ten number system we use every day. The decimal number system is composed of ten digits: 0; 1; 2; 3; 4; 5; 6; 7; 8; and 9.

One digit in the decimal system can express ten different values, from 0 to 9.
Two digits together can express one hundred values - from 00 to 99.

Computers use the binary number system, the base two number system. The binary number system is composed of two digits: 0 and 1.

One digit in the binary system can express two different values, from 0 to 1.
Two digits together can express four values - 00, 01, 10, and 11.

Q. What is a Flag?
A. A flag is one binary digit.

Q. Why call it a flag?
A. It's a programmer lingo thing. It's on or off like a flag is up or down.

Q. What is a Mask?
A. A mask is two or more binary digits. 1100 is a mask made up of four flags.

Q. Why call it a mask?
A. Since programmers tend to hide behind their binary digits they decided to call them masks.


Well, the truth is that the above is not an excerpt ... it is the entire work in progress. The small amount of progress have made on this paper is probably due to the fact that I find writing about binary digits slightly more exciting then poking myself in the eye.

Civfan is offline Civfan
Prince
Toronto, Canada
Sep 1999
time: 05:14
Cool  Old Post 17-12-1999 08:52 Visit Civfan's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Increase Your PM Length

ummmmm guess I'll be checking the dummies version for this one..... Correct me If I'm wrong but my understanding of flags allows you to combine events in a game. Say I want a unit built when three cities have been conquered. City 1 will be called Rome, city 2 called Paris and 3 called Toronto.

To begin creating this event I would start by turning on a flag.

@IF
CITYTAKEN
city=Rome
attacker=YOu
defender=HIM
@THEN
TURNFLAG 000000001
@ENDIF

@IF
CITYTAKEN
city=Paris
@THEN
TURNFLAG 000000010
@ENDIF

@IF
CITYTAKEN
city=Toronto
@THEN
TURNFLAG 000000100
@ENDIF

Though this isn't in correct format in dealing with TOT, the picture is clear. It's been set up.

The last part would be something like this.

@IF
FLAG
000000111
@THEN
CREATEUNIT
unit=Mario
homeecity=?
location
11,33
233,44
ENDLOCATIONs
@ENDIF


SO binary thing. 0= OFF 1= ON

Is this sorta right?

I haven't tried it yet as TOT is off my system for now, working with FW scenario but is that right. Someone correct me If i'm wrong.... Thankx

Civfan........

William Keenan is offline William Keenan
Prince
New Jersey, USA, Earth, Sol, Milky Way
Sep 1999
time: 00:14
  Old Post 17-12-1999 11:19 Visit William Keenan's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

You definately have the concept right Civfan. The syntax of the statements is off but the concept is correct.

The correct syntax would be as follows

@IF
CITYTAKEN
city=Rome
attacker=YOU
defender=HIM
@THEN
FLAG
who=YOU
state=On ; 0000000000000001
flag=0 ; this flag turned ON ^
@ENDIF

@IF
CITYTAKEN
city=Paris
attacker=YOU
defender=HIM
@THEN
FLAG
who=YOU
state=On ; 0000000000000010
flag=1 ;this flag turned ON ^
@ENDIF

@IF
CITYTAKEN
city=Toronto
attacker=YOU
defender=HIM
@THEN
FLAG
who=YOU
state=On ; 0000000000000100
flag=2 ;this flag turned ON ^
@ENDIF

@IF
CHECKFLAG
Who=You
Mask=0b0000000000000111
Count=3
State=On
@THEN
CREATEUNIT
unit=Mario
homecity=Civfanville
LOCATIONS
11,33
233,44
ENDLOCATIONS
@ENDIF

And, yes the binary thing. 0= OFF 1= ON
also
0 = False 1 = True
0 = Clear 1 = Set

In the begining of the mask you will see that there is a 0b in front of it. This tells the computer that the number after the 0b is binary. The 0b is required and is not part of the 32 digit number itself. The reason for this is because the computer will also except hexidecimal (0x) and octal (0o) number systems.

Dracon
Guest

Not Yet
time:
Talking  Old Post 17-12-1999 15:54
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Help yourself to an AD-FREE life

Thanks guys. I hope to implement this in my upcoming title. I look forward to seeing the design tip :-)

Civfan is offline Civfan
Prince
Toronto, Canada
Sep 1999
time: 05:14
Post  Old Post 17-12-1999 21:01 Visit Civfan's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Avatar Enlargement: We've got the solution

Thanks William for clearing that one up. One question though about the flags. It says theres 32 flags for each Civ (I think thats right) what does that mean? I know theres 16 binary digits in the flag and *2 =32 but does that mean I can use that example above, say for all 7 Civs? If 0000000000000111 was turned on, I can create a unit for each?

Thanks..
CIvfan....

P.S. Wait a minute.... Just going over your comment again. "WHO=You" 00000000000000001
means I can use each flag per civ right?
So If I had something I like this.


Turn on Flag
WHO=Romans
FLAG 0000000000000001
would create a unit in Germany

TURN oN FLAG
WHO=Russsians
FLag 0000000000000001
Could give the Russians a new technology.

is that right? 00000000000000001 FLAG if used can mean different things for each civs. If thats right, damn the possiblities are endless...... and would make this the best purchase I made since Warcraft II
[This message has been edited by Civfan (edited December 17, 1999).]

William Keenan is offline William Keenan
Prince
New Jersey, USA, Earth, Sol, Milky Way
Sep 1999
time: 00:14
  Old Post 18-12-1999 05:40 Visit William Keenan's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Increase the size of your Attachments

Yes there are 32 flags for each civ and each flag is one binary digit. I did a shorthand above that has confused you, the mask should look like this:

@IF
CHECKFLAG
Who=You
Mask=0b00000000000000000000000000000111
Count=3
State=On
@THEN
CREATEUNIT
unit=Mario
homecity=Civfanville
LOCATIONS
11,33
233,44
ENDLOCATIONS
@ENDIF

with 32 positions. Because the first 16 were zeros I left them off, which is fine by the computer. Like the decimal number system leading zeros are not necessary, for example you could write the number one hundred like this 00000100, but we don't we just type 100. The same is true of binary.

Each civ has it's own set of 32 flags, including the barbarians. That means eight sets of 32 flags.

I agree with your closing remark
quote:
If thats right, damn the possiblities are endless ...... and would make this the best purchase I made since Warcraft II


Civfan is offline Civfan
Prince
Toronto, Canada
Sep 1999
time: 05:14
Wink  Old Post 18-12-1999 09:21 Visit Civfan's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Full PM-box? Change here!

ummmm searching here for that CD........... Found it..... installing now.... TOT is back on line..... Now thinking of what to create with so much possibilities..... another day though

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:14.
Apolyton Time is 00:14.
    top of page
Rate This Thread:
Forum Jump:
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
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0417 seconds (89.55% PHP - 10.45% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net