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 > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Terrain fields
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:25
  Old Post 10-02-2003 08:34
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Terrain fields Inflate your Upload Space

Can anybody explain why those terrains that can be terraformed have an EnableAdvance field and a RemoveAdvance field, even though both advances are exactly the same?

Consider ...


TERRAIN_BROWN_HILL {
TilesetIndex 18
Icon ICON_TERRAIN_BHILLS
InternalType: BrownHill
CanDie

AddAdvance ADVANCE_EXPLOSIVES
TransformAdd {
Time 2
Materials 1600
}

RemoveAdvance ADVANCE_EXPLOSIVES
TransformRemove {
Time 3
Materials 600
}

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:25
  Old Post 10-02-2003 10:07
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Quite simple it indicates when you can transform terrain to brown hill (AddAdvance) or from brown hill (Remove Advance).

ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:25
  Old Post 10-02-2003 19:14
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Tired of ads?

quote:
Originally posted by Dale
Quite simple it indicates when you can transform terrain to brown hill (AddAdvance) or from brown hill (Remove Advance).


Oh, I feel so stupid.

I was focusing on the word "Advance" thinking you had the "added" ability when you got the advance. And the ability was "removed" when you lost it. But obviously that didn't make any sense.

Thanks Dale!

itsamic is offline itsamic
Settler

Feb 2003
time: 06:25
  Old Post 14-02-2003 01:19
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Increase Your PM Length

I have a problem with terraform.slc from mymod ( OK, I use it in a normal game) . The AI terraforms swamp and dessert to plains or grass land (should be OK), but it also changes wood to plains and (and this makes no sense w/o a mine) plain to brown hill. Would it help to increase materials for such changes? I tried to understand the slc but without any success...

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:25
  Old Post 14-02-2003 04:51
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Actually, terraform.slc is based on an earlier program that I wrote. player1 improved and expanded it, but, although I haven't checked it looks like he was using a different version of tileimp.txt.

Where it says, for example,

code:
Event:CreateImprovement(city[0].owner,theLoc, 24,0); //change to grassland


the "24" is supposed to be the tileimp.txt data base index (it's position in the file, "0" is first) of TILEIMP_TERRAFORM_GRASSLAND. But 24 gives TILEIMP_TERRAFORM_BROWN_HILL, it should be "28" for grassland and "32" for plains.

And, as Martin G later pointed out, a better way of doing it (this makes it independent of whatever version of the tileimp.txt and terrain.txt files are being used) is to use the TerrainImprovementDB(...) and TerrainDB(...) functions. So where you want to change swamp at theLoc (the location) to grassland you'd have:

code:
if ((TerrainType(theLoc)==TerrainDB(TERRAIN_SWAMP)) && HasAdvance(player[0], ID_ADVANCE_INDUSTRIAL_REVOLUTION)) { // 6=swamp pw_level = pw_level + 1200; SetPW(player[0], pw_level); //add pw Event:CreateImprovement(city[0]. owner,theLoc,TerrainImprovementDB(TILEIMP_TERRAFOR M_GRASSLAND),0); //change to grassland }


or, where you want to change tundra or desert into plains,

code:
if ((TerrainType(theLoc)==TerrainDB(TERRAIN_TUNDRA) || TerrainType(theLoc)==TerrainDB(TERRAIN_DESERT)) && HasAdvance(player[0], ID_ADVANCE_CONSERVATION)) {//this restriction is probably unnecessary // 2=tundra, 5=desert pw_level = pw_level + 1000; SetPW(player[0], pw_level); //add pw Event:CreateImprovement(city[0].owner,theLoc, TerrainImprovementDB(TILEIMP_TERRAFORM_PLAINS),0); //change to plains }


Or, you can do whatever you want. I'll leave you the fun of doing the editing, but if you have any problems either post here or e-mail me.

itsamic is offline itsamic
Settler

Feb 2003
time: 06:25
  Old Post 15-02-2003 04:05
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Inflate your Upload Space

I have removed "if TerrainType(theLoc)==0" for terraforming wood and replaced the terrain number with the TerrainImprovementDB(TILEIMP_TERRAFORM... statement and it produces no error message. A good start . Now I want to test it. Have I to start a new game or can I use a saved game started with the unmodified terraform.slc? And a second problem: I think it would be a good idea to terraform wood and hills if there are to much tiles of it. I want to include a counter like : if (TerrainType(theLoc)==0 then w = w+1 and then if ((TerrainType(theLoc)==0) && HasAdvance(player[0], ID_ADVANCE_AGRICULTURAL_REVOLUTION) && w>2)) then terraform (with higher values for w if city size > 6 and a second parameter for the second terrain. Is something like this already available?

MrBaggins is offline MrBaggins
King

May 1999
time: 05:25
  Old Post 15-02-2003 04:29
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

I'm currently working on a system which completely replaces the AI's terraforming and terrain improvements (excluding non-misc/transportation improvements.)

In the initialization, you manually enter data into arrays, to define how you want the system to work:

You define personalities. E.G. Agressive Settler
Personalities have (multiple) Strategies E.G. Smallest Cities, LeastProductive Cities, Highest growth cities, in that order.
Strategies have (multiple) Virtual Improvements - just numeric indexes
Virtual Improvements are defined- they have requirements (like the terrain, the technologies, whether there can be existing improvements, whether the improvement is intended to upgrade another improvement, which improvement to upgrade, its cost) and effects (what improvement or terraforming to actually do.

The system will take into account the tiles that a city is actually working, rather than assuming all tiles around it are available.

Its taking a while, because I've been refining the data structures used to define the data... and creating a system to guarantee tile ownership by a particular city, is not easy.

It is however, intended to be completely flexible, allowing human like priority definition and allow SLIC to encourage specific TI behavior from AI players... based on the personality set for that AI.

MrBaggins

Last edited by MrBaggins on 15-02-2003 at 05:50

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:25.
Apolyton Time is 00:25.
    top of page
Rate This Thread:
archivepost
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.0359 seconds (88.27% PHP - 11.73% MySQL) with 31 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