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 > Scenario League / Civ2-Creation -Archive > Help wanted - Engineer AI and batch files
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
ravagon is offline ravagon
King
Australia
Sep 1999
time: 13:18
Question  Old Post 26-03-2002 10:46
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Help wanted - Engineer AI and batch files Support Apolyton, buy Civilization: The Boardgame

Hi all,

I've been playing around with the idea of a scenario based around the HG Wells classic "The War of the Worlds" for ToT and I've run into a stumbling block.
This was intended for play as the humans (ie: British) defending against the Martian invaders in the year 1898.
One aspect I very much want to model is the spread of the Martian "Red Weed" as it was known and I've pretty much decided on making grassland/plain terrain transformable into this by the Martian engineer unit (Humans will not have engineers so will not be able to do this. Furthermore as it was extremely toxic to humans, no human city will be able to use red weed terrain for resources - house rule. Too hard to implement otherwise).
I did think of using flags to randomly change the terrains around Martian-held cities but this is rather inimical to any human/martian units on said terrain at the time.

Has anybody done anything similar with engineers before, "transforming" grassland/plain? Is it just a matter of making grs/pln less attractive than the red weed or do I have to exchange the positions of the grs/pln terrains for desert/jungle or somesuch for it to work. As this would involve fairly major work to the map its something I want to resolve before beginning placing cities, etc.


The second part involves whether or not it is possible to use batch files or similar to alter my rules.txt file at certain times in a non-linear fashion. For example: If the British research "heat resistant armour" to counter the martian heat rays, could a batch file be used to open rules.txt, search for the particular unit string, "armoured track layer" a/d/m = x/y/z and save it again as a/d/m ---> x/y+1/z?
This could then be followed at a later time by researching "enhanced powder" ---> x+1/y+1/z
or "ablative armour" ---> x/y+2/z. ie consecutive advances "build up" your forces abilities as you wish?
And similarly of course for the Martians when they aquired certain breakthroughs.

Input greatly appreciated

hardjoy is offline hardjoy
Warlord
Odense, Denmark
May 2001
time: 06:18
  Old Post 26-03-2002 11:03
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Re: Help wanted - Engineer AI and batch files Got spare money?

quote:
Originally posted by ravagon
One aspect I very much want to model is the spread of the Martian "Red Weed" as it was known and I've pretty much decided on making grassland/plain terrain transformable into this by the Martian engineer unit (Humans will not have engineers so will not be able to do this. Furthermore as it was extremely toxic to humans, no human city will be able to use red weed terrain for resources - house rule. Too hard to implement otherwise).
I did think of using flags to randomly change the terrains around Martian-held cities but this is rather inimical to any human/martian units on said terrain at the time.

Has anybody done anything similar with engineers before, "transforming" grassland/plain? Is it just a matter of making grs/pln less attractive than the red weed or do I have to exchange the positions of the grs/pln terrains for desert/jungle or somesuch for it to work. As this would involve fairly major work to the map its something I want to resolve before beginning placing cities, etc.


My guess would be that the "desirable terrains" are hardcoded to some extent. But if relying on the AI changing the terrain doesn't work, you could put in the desired terrain, when the AI wishes to do irrigation or mining (this it usually will always do when/if possible) -say, grassland will change to red weed before one can do irrigation. This will affect settlertype units too, but you can easily make the time needed totally unreasonable for settler type units, so that in reality only engineers will be able to do it without getting killed.

Case is offline Case

King
The backlash starts here
Feb 2000
time: 15:18
  Old Post 26-03-2002 11:24 Visit Case<br><a href=/members><img src=/forums/images/supporter-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Got spare money?

You could use global warming to change the terrain

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:18
  Old Post 26-03-2002 11:50 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Help yourself to an AD-FREE life

Here's something to consider. You can set a minimum government level for the AI to perform irrigation. Suppose you make the Martians a Fundamentalist civ. For a selected type of terrain, say desert, set the level for irrigation/mining at 4. Change 'yes' to the type of terrain you've selected to represent Red Weed (I'm sure I tried some of that back in the sixties ), say Tundra. Now only Martian units will be able to irrigate desert squares, and when they do, the terrain will be transformed to Red Weed.

; ai = Minimum govt level necessary for
; computer player to want to perform irrigate/mine
; 0 Never
; 1 Despotism
; 2 Monarchy
; 3 Communism
; 4 Fundamentalism
; 5 Republic
; 6 Democracy
;
@TERRAIN
Desert, 1,2, 0,1,0, Tun, 1, 5, 4, yes, 1, 5, 3, Pln, no, ; Drt

Obviously, the human civs will need to be restricted to gov't levels of communism or lower. You can't prevent human civs from taking advantage of the food provided by RW. But you can give it a low food value and then make the supermarket improvement available to the Martians only. They will then be able to expand as more and more terrain gets converted, while human civs decline. You'd have to tinker to find the right factors.

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:18
  Old Post 26-03-2002 12:18 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Re: Help wanted - Engineer AI and batch files Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by ravagon

The second part involves whether or not it is possible to use batch files or similar to alter my rules.txt file at certain times in a non-linear fashion. For example: If the British research "heat resistant armour" to counter the martian heat rays, could a batch file be used to open rules.txt, search for the particular unit string, "armoured track layer" a/d/m = x/y/z and save it again as a/d/m ---> x/y+1/z?
This could then be followed at a later time by researching "enhanced powder" ---> x+1/y+1/z
or "ablative armour" ---> x/y+2/z. ie consecutive advances "build up" your forces abilities as you wish?
And similarly of course for the Martians when they aquired certain breakthroughs.

Input greatly appreciated


I'm not sure I follow this exactly. Do you mean changing the characteristics of EXISTING units as new techs become available, rather than making them obsolete? There's no reason why you couldn't do as you suggest using Batch files, it's just that you'd have to save, run the BAT file and reload manually each time.

Of course, you can do this for one (only) civ easily enough, by using Leonard's Workshop to automatically upgrade units.

Another idea is to see if you can speed up the disbanding of obsolete units by the AI by using the TakeTechnology event, eg:

@IF
Received Technology
receiver=English
technology=32(ablative armour)
@THEN
TakeTechnology
whom=English
technology=31(heat resistant armour)
@ENDIF

I really don't know if taking the pre-req tech accelerates the disbanding of units beyond just making them obsolete, but it might be worth experimenting with.

I hope this helps.

ravagon is offline ravagon
King
Australia
Sep 1999
time: 13:18
Post  Old Post 26-03-2002 14:09
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Help yourself to an AD-FREE life

Thanks for the responses so far.
To clarify a bit.

My concern re: the terrain is mainly based on whether or not the AI would actually do anything (other than irrigate which it seems to have no problem doing - even when there's no water nearby and it doesn't have any units to irrigate with ) to grs/pln-type terrains.
As these occupy the only 2 particular terrain slots upon which AI's build cities I don't know whether it is intrinsically capable of doing anything other than irrigating them regardless of how favourable I make it.
I didn't want to use the irrigate option as this would prevent the British from irrigating/farming the same terrain.
Mine would be another option instead of transform but again, as the AI in the standard game doesn't perform this operation on pln/grs terrain, I don't know if it would here either (plus then the player-controlled British would technically be able to ignore my nice house rules and start red weed farming all over the place. Human players = )

There would be only two civs, the AI Martians and the player-controlled British (So no other human civs that spread red weed around). The Martians are going to be in Fundy (good call tec ) and the British in either Monarchy or (Renamed) Communism.
The transform would be set at a low enough level that the Fundy govt would definately be able to perform it.
Map is basically just the UK so no desert/jungle terrains. I didn't really want them "weeding" the forests/hills as the British wouldn't be able to change these back to the original types if they retook a city.


Re: The batch files. I did want to change the characteristics of existing units rather than upgrading as otherwise I could very quickly run out of unit slots and I did want to do the same for both the Brits and the Martians. Techs would only be discovered every 5-10 turns so the reload thing shouldn't be too much of a bother.
Didn't really explain it very well but what I wanted to do was to run a script to find the lines of one (or several) units, find a particular column representing a parameter and add something to the number (or reduce it if it happened to be the humans defense value and the Martians discovered armour penetrating heat rays ) whatever the (variable) number was and re-save. This would become enormously (exponentially) complicated if done with set rules.txt files with even just 2 civs and a few units affected on each side by a few different techs.
I've never seen it done before and I'm not sure its possible using normal tools...

[Damn, have to go as we're having a server shutdown. Back tomorrow. cheers ]

techumseh is offline techumseh
King
of the frozen North.
Apr 1999
time: 22:18
Lightbulb  Old Post 27-03-2002 12:09 Visit techumseh's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Full PM-box? Change here!

Re: the transform issue. I'm not sure what factors influence the AI to transform terrain, if any. Sorry.

Re: the BAT file issue. One possiblity is Angelo Scotto's CSPL program. It has never to my knowledge been used in a scenario, but it's potential is enormous. It's a program which does hex editing to the game file, WHILE THE GAME IS GOING ON. It's programmable in the same general way as events are.

Here's the description:

CSPL is a C++ library used to access Test of Time memory while ToT is running. You can see CSPL as a new events language very powerful (and complex...) to realize new scenarios, anyway, since CSPL simply modifies Tot memory you can also use it to realize in-game utilities or mod-packs which drastically changes civ game rules. As you can imagine the only drawback is that you need to know a bit of C language to code CSPL programs. (CSPL should be used with Borland C++ 5.5 compiler which can be downloaded for free from borland web site)

You can download it from the Cradle of Civ site, here: http://coc.apolyton.net/utilities/index.shtml

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:18.
Apolyton Time is 00:18.
    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.0336 seconds (87.06% PHP - 12.94% 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