Announcement

Collapse
No announcement yet.

CTP MODIFICATION: ACTIVISION FAQ

Collapse
X
Collapse
  •  

  • CTP MODIFICATION: ACTIVISION FAQ

    How to stagnate growth and technology

    "When you create scenarios, will you be able to stagnate growth? For example, if I wanted to create a Viking scenario would you be able to ensure the tech level remains the same for that time period as opposed to being able to develop nuclear weapons? In Civ 2 that was one of the things that bothered me most. Someone creates a WW2 scenario and it quickly turns into a Desert Storm scenario."
    You can "stagnate" technology through three routes:

    1. Edit the Advance.txt and make the cost (i.e. ADVANCE_COST 20) for new technologies astronomical.
    2. Edit the govern.txt file and reduce the amount of science generated by each government. To do this, set KNOWLEDGE_COEF to 0000000.1, or some such small number.
    3. Edit the Advance.txt and remove unwanted technologies. Watch out though--you must change the index at the top of the file to reflect the new number of Advances.


    These files are found in ctp_data\default\gamedata. Beware, changing these files changes the default game as well. You should make copies of your files before you edit them so that you can revert without re-installing.
    When we release the scenario support, this will become considerably easier.

    - William Westwater, Lead Designer


    How to edit the Great Library, Sounds, and Sprites

    IMPORTANT: PLEASE BACK-UP ANY FILES YOU ARE CHANGING OR YOU MAY BE FORCED TO UN-INSTALL AND THEN RE-INSTALL THE GAME.
    AS ALWAYS, EDITING TEXT FILES IS DONE AT YOUR OWN RISK AND IS NOT SUPPORTED BY ACTIVISION.

    Great Library:

    If you want to edit or create your own text entries for anything in the Great Library, you must first decide which type of entry (Unit, Wonders, etc.) you wish to change. To find the filename used in the Great Library, open the respective *ICON.TXT file in \CTP_DATA\DEFAULT\GAMEDATA\. For example, open UNITICON.TXT to find the filenames used by the Legion (Unit) in the Great Library.

    Each item in the *ICON.TXT files has several filenames associated with it. The .TGA is used for the still image. The .AVI is used for the rotating image. The .TXT files beginning with "GAME" are displayed in the Gameplay section of the Great Library. The .TXT files beginning with "HIST" are displayed in the Historical section of the Great Library. The .TXT files beginning with "PREQ" are displayed in the upper-left section of the Great Library. The .TXT files beginning with "VARI" are displayed in the upper-right section of the Great Library. The .TXT files beginning with "STAT" are displayed to describe the gameplay features of the item in the Production Tab.

    Once you have found the proper filename, you may create your own file using the same file type and filename as the original. Create .TGA using 160x120 pixel size. Create .AVI files with 160x120 pixel size (use 15 frames per second and Indeo 5.10 compression for best results). After creating your file, place it in the proper directory to be used in the game. Place .TGA files in \CTP_DATA\DEFAULT\GRAPHICS\PICTURES. Place .AVI files in \CTP_DATA\DEFAULT\VIDEOS. Place .TXT files in \CTP_DATA\ENGLISH\GAMEPLAY\GL. The original files are stored in the .ZFS files. Do not try to change or open those files. Any file outside of a .ZFS has priority and will be used instead of the original. To revert back to the original files, simply delete your files.

    Sounds:

    If you want to create your own sound files for Units, you must first decide the action and filename for which you wish to create a .WAV file. Refer to the SOUNDS.TXT in \CTP_DATA\DEFAULT\GAMEDATA\. Each Unit has several sounds, one for each of the actions that the Unit may perform. Match the Action and Unit to find the filename. For example, to learn the .WAV filename used for the Death of a Legion, open SOUNDS.TXT and search for "Legion". The filename "GUVV78.wav" is listed after the entry reading "SOUND_DEATH_LEGION."

    Some items have different names than those displayed in the game. For example, the Mounted Archer Unit appears as "Chariot" in the text files.

    To use your own .WAV file, name your file the same as the filename found in SOUNDS.TXT. Then place your .WAV in \CTP_DATA\DEFAULT\SOUND. The original .WAV files are stored in the "SOUND.ZFS" file. Do not try to change or open that file. Any file outside of the .ZFS has priority and will be used instead of the original. To revert back to the original files, simply delete your files. Use 22mHz, 16bit mono when creating .WAV files.

    Unit Sprites:

    To change the sprite used for a Unit, open SPRITEID.TXT, which is located in \CTP_DATA\DEFAULT\GAMEDATA. Then you decide on two things. First, decide which Unit you wish to change. Then decide which other Unit's sprite you wish to replace with the first Unit. Simply change the number of the first Unit to the same number listed after the second Unit. You should write down the original number of the Unit you are changing so that you can change it back at a later time.



    Beta Map Editor for German version

    The Beta Map editor is intended for use with the English version of Civilization: Call to Power only. When the final version is released, it will be localized into other languages. If you simply can't wait to try the Map Editor, the following tip has been submitted to make it run with the German version (Thanks Lars3loff). Note that Activision technical support will not help you with any problems that are encountered in this process. It is highly recommeded that you backup all files prior to attempting this hack:
    1. Rename the cctpbetamapeditor.exe into cctpbetamapeditor.zip
    2. Unzip cctpbetamapeditor.zip
    3. Rename the directory ../ctp_data/german/ into ../ctp_data/english/
    4. Copy all files in the correct directory structure overwrite!
    5. Open ../ctp_data/english/gamedata/strings.txt and delete the third line (import "add_str.txt" # Addon: String additions should temporarily reside here. Strings should be moved from here to where they belong. This file should be gone by the time we CR.)
    6. Now it shold work. please make a backup of all files that the patch will replace


    Reviving unused functions

    Which of the unused functions would still work and are bug free? How can I revive them? I have noticed the following in CTP's files:
    • RUSTLE
    • DEFUSE_MINES
    • NULLIFY_WALLS
    • ASSASSINATE
    • BOMB_CABINET
    • INVESTIGATE_READINESS
    • THROW_PARTY
    • AIRLIFT
    • HEAR_GOSSIP
    • PATROL
    • TERROR_HACK


    Unfortunately, while the code is still in there for most of them, there's no way to actually do them from the interface. The buttons and keyboard shortcuts were removed from the code. But SLIC (our scripting language) is just slightly shy of being able to activate them, so there's a chance some of them will be possible to use via slic messages after the patch.
    HEAR_GOSSIP may actually still do something as is, but we stopped tesing it long ago. DEFUSE_MINES is totally gone. PATROL is totally gone. TERROR_HACK is gone. The rest are action we may look into reviving in the future.

    - Joe Rumsey, CTP programmer



    Unused flags

    "Are there any additional unused flags that have been programmed in but don't appear in any files (for wonders and units and such that didn't make the cut)? For instance "ignore city walls" and "ignore terrain" were important Civ2 flags that appear to be missing from CTP."

    No.

    - Joe Rumsey, CTP programmer



    New flags

    "Can I make my own flags for wonders and so on? It would appear that the .slc files used in making the tutorial are some kind of event language written in C programming. Perhaps this could be used to make new flags?"

    Yes, in fact, if you are clever, you can do some interesting things with SLIC. I'll throw this one out as an example. These two objects should create a nuclear missile in every one of your cities when you build the Sphinx (assuming that Sphinx is wonder index #1, which it is in the released wonder.txt):

    Code:
    trigger 'GiveFreeNukes' when (wonder.finished && wonder == 1) {
       aCity = 0;
       while(aCity < player.1.cities) {
          // Loop through all cities belonging to the player that
          // built the wonder.
          Message(player.1, 'GiveFreeNukeToACity');
          aCity = aCity + 1;
      }
    }
    
    // Put a nuclear missile in the city with index from the variable aCity
    // Note that putting this code inside the while loop above WON'T WORK.
    // Why not is something I'll leave for actual SLIC documentation.
    messagebox 'GiveFreeNukeToACity' {
       Abort(); // Means this "message" doesn't actually display anything
       AddCityByIndex(player.1, aCity);
       CreateUnit(player.1, UnitType("UNIT_NUKE"), city.2.location, 0);
    }
    I'll say a few things about this. The messagebox with an immediate Abort() is a pretty ugly hack, but it's something that's going to be used a lot to overcome the lack of real functions. It should be possible to create wonders with lasting effects by setting a variable when a wonder is built and then making use of city.beginturn and player.beginturn triggers.

    - Joe Rumsey, CTP programmer



    Do I need to program in C to make events?

    It isn't C. It is C-like in the bodies of its objects, but really implements only a very small number of constructs: function calls (of built in functions only - can't write your own functions), expressions, while loops, if statements, button descriptions for messages. The stuff you can put in the "when (...)" for triggers and all the various functions are what need the most documentation.

    It does help to know C, but I think with a few more examples (and the tutorial is one enormous example, though it doesn't quite use everything in the language) most non-C-programmers will be able to get started and mostly just work by filling in the blanks.

    - Joe Rumsey, CTP programmer



    Is it possible to have more than one Caravan type unit?

    Yes, but they will all be the same thing. The only marginally useful thing this would get you would be making caravans cost a different amount to build after certain advances are discovered.

    - Joe Rumsey, CTP programmer



    How does the ELECTRONIC_COMBAT_FACTOR flag it uses work?

    I doesn't.

    - Joe Rumsey, CTP programmer



    What's the difference between the orders PILLAGE and PILLAGE_UNCONDITIONALLY?

    PILLAGE_UNCONDITIONALLY is a special order that's called from one of the alertboxes in script.slc when you try to pillage tile improvements on your own land. It avoids asking you the question about whether you really want to pillage your own land and just does it.

    - Joe Rumsey, CTP programmer



    How can the values of rivers (movement, defense, etc) be changed?

    Each terrain type in terrain.txt has a section named ENV_RIV_CUR. Changing values in there changes the values for that terrain with a river. Defense can't be changed for rivers, but the rest of the values can. The same goes for roads and mines, by the way.

    - Joe Rumsey, CTP programmer



    Could I have a terraform function adding a river to a square (i.e., a canal)?

    No, sorry.

    - Joe Rumsey, CTP programmer



    What are POWER_POINTS in the units.txt file?

    An obsolete feature, doesn't do anything.

    - Joe Rumsey, CTP programmer



    What does the flag ONLY_BUILD_ONE used by Settlers mean? Isn't it possible for a city to build more than one?

    Normally a city will keep churning out the last unit in the queue. This flag makes it build just one and then stop. Has nothing to do with how many you can build, just changes the interface's behavior.

    - Joe Rumsey, CTP programmer



    Why do some units have two techs that make them obsolete? For instance the Legion which is obsolete with both Gunpowder and Cannon-making, even though Gunpowder is a prerequisite for Cannon-making.

    You can have multiple obsoleting advances. But even using your example, it IS possible to acquire cannon-making before gunpowder through diplomacy or espionage (including just capturing a city from someone who has cannon-making.

    - Joe Rumsey, CTP programmer



    Is it possible to use at least some wonder flags for improvements and vice versa?

    No. They are two separate sets of flags.

    - Joe Rumsey, CTP programmer



    I like the MOVEMENT_TYPE_MOUNTAIN function and would like to create other movement limitations like MOVEMENT_TYPE_DESERT and/or expand which terrains use the MOVEMENT_TYPE_MOUNTAIN. Is this possible, and if so, how?

    There's a small chance you might be able to get close to what you want via SLIC, but it would be complicated and prone to loopholes, so for practical purposes the answer is no. The distinction between mountains and regular land is too deeply ingrained in the code, we don't have a general mechanism accessible from the text files for doing it.

    - Joe Rumsey, CTP programmer



    How can I made an improvement that is only buildable in coastal cities such as a Harbor? Or only buildable on a river like a Dam? Would a Coastal Fortress (City Walls against naval units) be possible?

    No. But SLIC is really close to allowing a pretty cheesy way of doing it, all it's missing is a function to check and see if a city is next to water or on a river. We'll look into adding that for the patch, it would be a good thing and not hard. Thanks for the idea.

    - Joe Rumsey, CTP programmer



    What is the difference between IMPROVEMENT_FLAG_IS_RELIGIOUS and IMPROVEMENT_FLAG_CATHEDRAL used by both the Temple and Cathedral?

    Wonders can be set to have an effect on buildings with the RELIGIOUS flag set and with buildings with the CATHEDRAL flag set. They don't have any direct effect on the building they're attached to.

    - Joe Rumsey, CTP programmer



    Why are many costs expressed in odd numbers? For instance, 5780 production to build the Emancipation wonder or 135 to build a Diplomat?

    Because our balancing showed that 134 was too little for a diplomat and 136 too much :-)

    - Joe Rumsey, CTP programmer

      Posting comments is disabled.

    Latest Articles

    Collapse

    • CTP MODIFICATION: MAKING UNIT GRAPHICS
      by Harlan
      Get the Full version of this guide with images and unit.txt example

      Here is what I have so far on a file to help explain how to make non-animated unit graphics. I'm going to add some more (such as an additional section on how to make shadows) but this is the basic part. When I post it, I will include a couple of files that will help the user make files easier. For now if you want to try this out, use the text I included earlier in this thread for the text file, and open up one of the cow pictures that comes with the graphics editor patch to start your graphic off from (deleting the cow, of course).
      ...
      March 5, 2012, 17:43
    • CTP MODIFICATION: AIP COMMENTS
      by Celestial_Dawn
      I think I've managed to figure out how the AIPs work. The AIPs certainly have a lot of information about the inner workings of the AI. Read and enjoy. AIP COMMENTS (based on default.aip) Default.aip is the first aip loaded at game start and contains a number of strings which are not found in the other personality aips. If repeated in the other aips, the new values take precedence over the default. // The next line was used in Dark Reign to specify a likelihood that a spy // would be seen... We can use that stuff in Civ3, too int infiltrator_period = 2; No clue. ...
      March 5, 2012, 17:33
    • CTP MODIFICATION: SET_FOOD_OR_PROD.FLI and SET_RESOURCE_DESIRE.FLI COMMENTS
      by Celestial_Dawn
      SET_FOOD_OR_PROD.FLI and SET_RESOURCE_DESIRE.FLI COMMENTS For all non-barbarians: 1. If cities = 0-1 and total population is 1, Maximise growth ratio (minimise turns to next pop) Pay as much wages as needed, minimise rations, average workday No PW Minimum workers on production tiles Maximum workers on food tiles Opening game strategy (this means explore more, and don't build roads yet - this is the same for all entries in this FLI so I won't repeat it) ...
      March 5, 2012, 17:27
    • CTP MODIFICATION: BEGINTURN.FLI&OUTPUTS.FLI COMMENTS
      by Celestial_Dawn
      BEGINTURN.FLI(S) COMMENTS beginturn.fli is a template that is unused by the game. The settings for the various personalities are: Barbarian settle_dense, science_slow, diplomacybarbarians //Barbarian Cleric settle_dense, science_fast, diplomacypeacebackstab //Religious SciFew settle_loose, science_fast, diplomacypeaceloyal //Agreeable SciMany settle_dense, science_fast, diplomacypeaceloyal //Peaceful Slaver settle_dense, science_fast, diplomacywarbackstab //Slaver WarFew settle_loose, science_slow, diplomacywarloyal //Aggressive WarMany settle_dense, science_slow, diplomacywarbackstab //Militant Note that both science_fast and science_slow are identical, Activision decided to set them all to a fast science rate, but differentiated them according to their research goals - i.e. do you research war branches rather than development brances of the tech tree. I think this approach is just fine....
      March 5, 2012, 17:23
    • CTP MODIFICATION: AIPLOADER.FLI COMMENTS
      by Celestial_Dawn
      AIPLOADER.FLI COMMENTS OUTPUT primary_loaded is only in aiploader.fli primary_loaded is to make sure that the AIPs are loaded in the correct order. This is to ensure that survival_mode.aip and citywall.aip are only loaded after the personality aips have first been loaded. Personality AIPs are always loaded on the first turn (turn 0). Otherwise, not relevant...
      February 13, 2012, 19:07
    • CTP MODIFICATION: ACTIVISION FAQ
      by Mr Ogre
      How to stagnate growth and technology

      "When you create scenarios, will you be able to stagnate growth? For example, if I wanted to create a Viking scenario would you be able to ensure the tech level remains the same for that time period as opposed to being able to develop nuclear weapons? In Civ 2 that was one of the things that bothered me most. Someone creates a WW2 scenario and it quickly turns into a Desert Storm scenario."
      You can "stagnate" technology through three routes:...
      February 11, 2012, 21:16
    Working...
    X