Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site forums as they ran on Ultimate Bulletin Board, 1998–2001. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 2005 site & forums

  Apolyton Civilization Site Forums
  CtP2-Creation
  Help needed! Adding unit categories.

Post New Topic  Post A ReplyPost A Reply In A New Window

profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   Help needed! Adding unit categories. Format for Better Printing
WesW
King
Huntsville, Al., USA
b.02-15-99
posted December 02, 2000 05:31   Click Here to See the Profile for WesWClick Here to Email WesW  send a private message to WesWSend a Message to UIN: 84799350 Visit WesW's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Here are a few of the lines in strategies.txt that set the percentages of unit types that the AIs build. The problem is that there are only five of them, these three below for land units, and one each for sea and air units.
I think this explains why I never saw the AI build anything other than Submarines and Bombers in my beta games. (No Battleships or Destroyers, no Intercepters).
There are another set of categories for building a set number of settlers, transports and other special units, so that is why you see those units.

// Unit Percents must total to 1 (100%)
DefensiveUnitsPercent 0.15
OffensiveUnitsPercent 0.10
RangedUnitsPercent----0.15

Anyway, I tried adding new categories, but these "tokens" are hard-coded into the executable file, and if the game finds one in strategies.txt that doesn't match one in the exe file, then it crashes.
This was not how it was in Ctp1. Five categories for all conventional units is totally inadequate, unless the game looks at something else in deciding what to build.

What I need are instructions on how to add new categories to the game, either by modifying the exe file, or maybe something in slic.
Or, if an Activisioner could explain how the five categories are sufficient to provide a well-balanced AI force, I would be very interested to hear that as well.
[This message has been edited by WesW (edited December 02, 2000).]

Azmel2
Activision
Santa Monica, CA USA
Aug 2000
posted December 04, 2000 15:07   Click Here to See the Profile for Azmel2   send a private message to Azmel2
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only

WesW,

Each category has a corresponding build list. You can specify as many different build lists as you want by adding new entries to the UnitBuildLists.txt file.
If you wanted the AI to adopt a strategy inwhich it focused on submarines, you could create a trigger to load a new strategic state that redefined the SeaUnitList from UNIT_BUILD_LIST_SEA (the generic sea unit list) to UNIT_BUILD_LIST_SEA_SUBMARINES.

The default build lists we use provide a good mix of units, but obviously a human player will be able to discern much more subtle distinctions of unit category. If as a mod maker you wish the AI to use more categories than the ones provided, you will have to do it by detecting when a situation exists that requires a special purpose build list and triggering
a new strategic state to load it.

In CTP1 you really had no categories at all. It was just a bunch of unit build lists with priorities. The AI would try to build off the highest priority build lists first, but interleave them with lower priority build lists as it became satisfied.

Using the CTP1 system you had to practically graph out the build lists and priorities to get it to interleave units properly. Do you really prefer that system over the current one? I think few people did and that our new system will make it possible for more people to customize the AI.

You also had to use the .fli system to load in different AIP files to adjust the priorities of unit build lists. This is equivalent to the loading of new strategic states in CTP2 using SLIC as I described above.

I hope this helps clarify how to use the CTP2 build lists system.

Best wishes,

-- Richard


quote:

Originally posted by WesW on 12-02-2000 05:31 AM
Here are a few of the lines in strategies.txt that set the percentages of unit types that the AIs build. The problem is that there are only five of them, these three below for land units, and one each for sea and air units.
I think this explains why I never saw the AI build anything other than Submarines and Bombers in my beta games. (No Battleships or Destroyers, no Intercepters).
There are another set of categories for building a set number of settlers, transports and other special units, so that is why you see those units.

// Unit Percents must total to 1 (100%)
DefensiveUnitsPercent 0.15
OffensiveUnitsPercent 0.10
RangedUnitsPercent----0.15

Anyway, I tried adding new categories, but these "tokens" are hard-coded into the executable file, and if the game finds one in strategies.txt that doesn't match one in the exe file, then it crashes.
This was not how it was in Ctp1. Five categories for all conventional units is totally inadequate, unless the game looks at something else in deciding what to build.

What I need are instructions on how to add new categories to the game, either by modifying the exe file, or maybe something in slic.
Or, if an Activisioner could explain how the five categories are sufficient to provide a well-balanced AI force, I would be very interested to hear that as well.


WesW
King
Huntsville, Al., USA
b.02-15-99
posted December 04, 2000 23:29   Click Here to See the Profile for WesWClick Here to Email WesW  send a private message to WesWSend a Message to UIN: 84799350 Visit WesW's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Thanks for your reply, Richard, though it is disappointing to hear that slic will be required to do what was a simple addition to the aips in Ctp1.
Am I interpreting your comments corretly to mean that there can never be more than five categories active at any one time?

Yes, I do prefer the Ctp1 system. The priorities in Ctp1 were like the goals in Ctp2. You could set whether an AI built offensive or defensive units first, and more importantly what supporting and special units were built before others. You based the numbers of each type upon the number of cities, so all I had to do was ask myself "About how many Battleships do I usually have when I have about 15 cities?" Divide this number by 15, and there you have it. You didn't have to figure out how many offensive units you had compared to flanking units, and all other types, and making this sum to 100% like in Ctp2. (I ended up with specifying 01% Paratroopers in my proposed Ctp2 model.) And again, you could specify as many unit categories as you wanted.
Whomever designed the flis and aips tried to construct a very elaborate and elegant system. With the flis, they bit off more than they could chew, so to speak, but I found that the aips worked very well once you understood them, and that the elegance was largely achieved.

One thing I do like about the new system is the unit count token, where you can specify an exact number of certain units to build. This was sorely needed in Ctp1 for settlers.

Locutus
Prince
Apolyton Borg Hengelo/Enschede, The Netherlands
Nov 1999
posted December 05, 2000 07:23   Click Here to See the Profile for LocutusClick Here to Email Locutus  send a private message to LocutusSend a Message to UIN: 52912776 Visit Locutus's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Well, I for one like the new system better. I agree it would have been nicer to have more than 5 build lists active at the same time, but linking the AI files to SLIC probably made it much more powerful. One example is being able to specify the exact number of units: if it wasn't possible already, you could have used SLIC to make it possible, which wasn't the case in CtPI. Though I agree that the CtPI system was very good and could have been even better if it had been more worked out and refined, I think the CtPII system will be even more powerful.

The thing is that in CtPI you could improve the AI by just experimenting a lot, more or less randomly try different values for different settings and see how it affects the AI in the game. With the CtPII system, you'll much more have to *design* the AI. First, carefully think about how you want the AI to behave under certain circumstances and then program it in (with SLIC). In the end, this gives you much more control over what you're doing and over your results.

The only problem with this is of course that it will require more thinking and (relatively) less experimenting and that you'll have to either learn SLIC yourself or 'hire' someone to do the dirty work for you

------------------
"The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents." - Nathaniel Borenstein

Apolyton Civilization Site Forums
> > > CtP2-Creation Forum

next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | Hodadian Award Central | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War