Announcement

Collapse
No announcement yet.

PowerSLICs 1.1 for CTP 1.1

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PowerSLICs 1.1 for CTP 1.1

    All,

    Please find attached below some SLIC code. I hope you will find it useful. Special thanks to Dominique (as I have implemented an advanced version of Dom's building MOD in here) and to Mr. Ogre for his visibility and active support in this thread.

    TP


    TP's PowerSLICs 1.1 for Call To Power 1.1 (July 16, 1999)
    ================================================== =======


    DISCLAIMER:
    AS USUAL. IF YOU SCREW UP YOUR HARD DISK, YOUR WIFE, YOUR CAT OR ANYTHING ELSE BEING CAUSED BY THIS DOCUMENT WHICH YOU PERCEIVE AS NEGATIVE,SIMPLY FORGET TO SUE ME - NO WAY. YOU ARE FULLY RESPONSIBLE FOR YOUR COPY OF CTP AND YOUR LIFE. ALSO, I WILL GIVE NO SUPPORT FOR THIS MOD. I AM JUST SHARING THIS SO OTHER PEOPLE DO NOT NEED TO REINVENT THE WHEEL.

    PART OF THIS CODE HAS BEEN FIRST PUBLISHED BY DOMINIQUE. THANK YOU VERY MUCH. I DO NOT WANT TO RAISE THE PERCEPTION THAT I HAVE BEEN STEALING CODE OF OTHER PERSONS. I HAVE USED DOMINIQUE'S BUILDING MOD AND SLIGHTLY ADAPTED IT TO MAKE A GREAT MOD SLIGHTLY BETTER.

    IF YOU FIND BUGS IN THIS CODE, PLEASE POST YOUR COMMENTS IN THE "CTP CREATION" THREAD OF APOLYTON'S FORUM (http://apolyton.net).


    Thomas P. aka TP
    July 16, 1999

    How do I install this ?
    -----------------------
    Simply copy the SLIC code beginning after "SCRIPT.SLC" into your "SCRIPT.SLC" file (there is only one in the original installation of CTP 1.1). Do the same for the remaining code, i.e. copy the string code beginning after "INFO_STR.TXT" into your "INFO_STR.TXT" file (again, there is only one in the original installation of CTP 1.1). Within the "SCRIPT.SLC" you have to delete one part of the original code, however if you forget to do this, nothing major will happen. You will just not be able to enjoy the updated Dominique's Building MOD.

    With what game version will this work ?
    ------------------------------------------
    I have tested it with CTP 1.1 German version. It works with or without CD's MOD 4.2 (which I strongly recommend everyone to have a look at). If you want to localize this MOD into other languages, you just have to translate the strings found in the "INFO_STR.TXT" part of this text. Don't ask me to translate it for you, I won't do it (however it should not be difficult at all).

    What's the benefit, i.e. what is in it for me ?
    -----------------------------------------------
    This small collection of SLIC code has been designed by myself with the objective to make CTP a little bit more informative and to improve the interface. Also, for some of the most annoying bugs I have included workarounds. Here is the list of changes to CTP original.

    1. Updated Dominique's Building MOD
    I was slighthly annoyed by those double messages ("you have build XXX" AND "city queue is empty"). So I changed Dominique's code slightly. Now you will get only one message directly after an improvement has been built (telling exactly this). From the next turn on, you will get the nice note that the queue is empty in case you forgot to build something new.

    2. Public Work reminder
    I belong to those people who do not look constantly on the PW status. So this MOD will give you a nice warm reminder in case you have more than 1500 units of PW unused. Working in Market Research, we like to call such things "opportunity costs". So from now on, CTP will bang on your head as soon as you have too much unused PW.

    3. Disappearing Unit syndrome workaround
    After I found out that this phenomen may be caused due to a UI inconsistency after you have researched a new advance, this SLIC part will force the UI to be updated each time a human player begins its turn. I am not sure whether this really works, but it surely does not negatively effect the game at all.

    4. Warning on spotted bombard-capable enemy units
    As my copy of CTP is not able to autocenter on bombardments of my units, I have established two warning systems (second one follows later): As soon as one of your units or cities spots a bombard-capable enemy unit, you will get a nice warning. Therefore you should be able to "proactively" react. A small eye icon will allow you to center the map to this enemy unit. Note: This message will not be shown if your units spot a bombarding-unit which is currently in an enemy city as this would not be very realistic. For your convenience, you will be informed about the type of the bombard-capable unit and the type of the unit having spotted this enemy.

    5. Warning on bombarding
    **** happens. Therefore you will get a warning as soon as one of your enemies has bombarded one of your units or cities. Unfortunately, the eye icon does not work yet, i.e. you have to go manually to the place where the fight took place. For your convenience, you will be informed about the type of the attacker and the type of the attacked unit.


    *End of document. Following is the code you will have to implement in your game copy*


    ************
    *SCRIPT.SLC*
    ************

    //
    // This has been taken out. An updated version follows later to adapt fully to DOM's MOD
    //

    // messagebox '37CityQueueIsEmpty' {
    // Text(ID_CITY_BUILD_QUEUE_IS_EMPTY);
    // EyePoint(city.1.location, city.owner, 'OpenProductionCallback');
    // Duration(1);
    // MessageType("WASTING_WORK");
    // Title(ID_TITLE_CITY_BUILD_QUEUE_IS_EMPTY);
    // }


    //
    // Warning on too much Public Works (1500) not used currently
    //

    trigger 'TP_T_Warning_Public_Works' when (IsHumanPlayer(g.player) && (player.1.publicworkslevel >= 1500)) {
    Message(g.player, 'TP_M_Warning_Public_Works');
    }

    messagebox 'TP_M_Warning_Public_Works' {
    Title(ID_TP_TITLE_Warning_Public_Works);
    Text(ID_TP_TEXT_Warning_Public_Works);
    }


    //
    // This will force the graphics system to synchronize with the game's internal state (workaround for Disappearing Unit Syndrome; not sure whether it really works though)
    //

    trigger 'TP_T_Catch_Up' when (IsHumanPlayer(g.player)) {
    CatchUp();
    }


    //
    // Warning in case units with bombarding abilities are spotted (workaround for non-autocentering on bombardments)
    // This SLIC does not trigger a message if the sighted unit is in a city. Will give you nice surprises...
    //

    trigger 'TP_T_Warning_Bombarding' when (player.sightedunit && IsBombardingUnit(unit)) {
    incity = 0;
    i = 1;
    position = unit.location;
    while (i < player.cities) {
    SetCitybyIndex(1, player, i);
    if (position == city.location) {
    incity = 1;
    }
    i = i + 1;
    }
    if (incity == 0) {
    Message(unit.2.owner, 'TP_M_Warning_Bombarding');
    incity = 0;
    }
    }

    messagebox 'TP_M_Warning_Bombarding' {
    Title(ID_TP_TITLE_Warning_Bombarding);
    Text(ID_TP_TEXT_Warning_Bombarding);
    EyePoint(unit.2);
    }


    //
    // Warning in case human player got bombarded (workaround for non-autocentering on bombardments)
    // Unfortunately, the EyePoint does not work yet. Can anyone help here ?
    //

    trigger 'TP_T_Warning_Bombarding2' when (special.bombarded && IsBombardingUnit(unit)) {
    Message(unit.2.owner, 'TP_M_Warning_Bombarding2');
    }

    messagebox 'TP_M_Warning_Bombarding2' {
    Title(ID_TP_TITLE_Warning_Bombarding2);
    Text(ID_TP_TEXT_Warning_Bombarding2);
    EyePoint(unit.2);
    }


    //
    // Improvement message (c) Original 1999 by DOMINIQUE, updated by (c) 1999 TP
    //

    trigger 'DOM_T_Building_Built' when (IsHumanPlayer(g.player) && (building.built >= 0) && (city.owner == g.player)) {
    Message(g.player, 'DOM_M_Building_Built');
    }

    messagebox 'DOM_M_Building_Built' {
    Title(ID_DOM_TITLE_CITY_BUILDING_BUILT);
    if (building.built == 0) {Text(ID_DOM_BUILDING_BUILT_Granary);}
    if (building.built == 1) {Text(ID_DOM_BUILDING_BUILT_Capitol);}
    if (building.built == 2) {Text(ID_DOM_BUILDING_BUILT_City_Wall);}
    if (building.built == 3) {Text(ID_DOM_BUILDING_BUILT_Temple);}
    if (building.built == 4) {Text(ID_DOM_BUILDING_BUILT_Courthouse);}
    if (building.built == 5) {Text(ID_DOM_BUILDING_BUILT_Publishing_House);}
    if (building.built == 6) {Text(ID_DOM_BUILDING_BUILT_Marketplace);}
    if (building.built == 7) {Text(ID_DOM_BUILDING_BUILT_Academy);}
    if (building.built == 8) {Text(ID_DOM_BUILDING_BUILT_Theatre);}
    if (building.built == 9) {Text(ID_DOM_BUILDING_BUILT_Aqueduct);}
    if (building.built == 10) {Text(ID_DOM_BUILDING_BUILT_Coliseum);}
    if (building.built == 11) {Text(ID_DOM_BUILDING_BUILT_Bank);}
    if (building.built == 12) {Text(ID_DOM_BUILDING_BUILT_University);}
    if (building.built == 13) {Text(ID_DOM_BUILDING_BUILT_Hospital);}
    if (building.built == 14) {Text(ID_DOM_BUILDING_BUILT_Mill);}
    if (building.built == 15) {Text(ID_DOM_BUILDING_BUILT_Cathedral);}
    if (building.built == 16) {Text(ID_DOM_BUILDING_BUILT_City_Clock);}
    if (building.built == 17) {Text(ID_DOM_BUILDING_BUILT_Factory);}
    if (building.built == 18) {Text(ID_DOM_BUILDING_BUILT_Oil_Refinery);}
    if (building.built == 19) {Text(ID_DOM_BUILDING_BUILT_Movie_Theatre);}
    if (building.built == 20) {Text(ID_DOM_BUILDING_BUILT_Airport);}
    if (building.built == 21) {Text(ID_DOM_BUILDING_BUILT_Drug_Store);}
    if (building.built == 22) {Text(ID_DOM_BUILDING_BUILT_Nuclear_Plant);}
    if (building.built == 23) {Text(ID_DOM_BUILDING_BUILT_Recycling_Plant);}
    if (building.built == 24) {Text(ID_DOM_BUILDING_BUILT_Television);}
    if (building.built == 25) {Text(ID_DOM_BUILDING_BUILT_Computer_Centre);}
    if (building.built == 26) {Text(ID_DOM_BUILDING_BUILT_SDI);}
    if (building.built == 27) {Text(ID_DOM_BUILDING_BUILT_Robotic_Plant );}
    if (building.built == 28) {Text(ID_DOM_BUILDING_BUILT_Security_Monitor);}
    if (building.built == 29) {Text(ID_DOM_BUILDING_BUILT_Micro_Defense);}
    if (building.built == 30) {Text(ID_DOM_BUILDING_BUILT_Aqua_Filter);}
    if (building.built == 31) {Text(ID_DOM_BUILDING_BUILT_Eco_Transit);}
    if (building.built == 32) {Text(ID_DOM_BUILDING_BUILT_Incubation_Center);}
    if (building.built == 33) {Text(ID_DOM_BUILDING_BUILT_Rail_Launcher);}
    if (building.built == 34) {Text(ID_DOM_BUILDING_BUILT_Arcologies);}
    if (building.built == 35) {Text(ID_DOM_BUILDING_BUILT_Beef_Vat);}
    if (building.built == 36) {Text(ID_DOM_BUILDING_BUILT_House_of_Freezing);}
    if (building.built == 37) {Text(ID_DOM_BUILDING_BUILT_Mind_Controller);}
    if (building.built == 38) {Text(ID_DOM_BUILDING_BUILT_Forcefield);}
    if (building.built == 39) {Text(ID_DOM_BUILDING_BUILT_Nanite_Factory);}
    if (building.built == 40) {Text(ID_DOM_BUILDING_BUILT_Fusion_Plant);}
    if (building.built == 41) {Text(ID_DOM_BUILDING_BUILT_Bio_Memory_Chip);}
    if (building.built == 42) {Text(ID_DOM_BUILDING_BUILT_Body_Exchange);}
    Button(ID_BUTTON_LIBRARY) {
    LibraryBuilding(building.built);
    }
    EyePoint(city.1.location, city.owner, 'OpenProductionCallback');
    justbuilt = 1;
    }


    //
    // And now the revised "City Queue is empty" message (no annoying double messages anymore)
    // Important: Please eliminate the original (messagebox '37CityQueueIsEmpty') by putting them in comments.
    //

    trigger 'TP_T_Queue_Empty' when (city.buildingnothing) {
    Message(g.player, 'TP_M_Queue_Empty');
    }

    messagebox 'TP_M_Queue_Empty' {
    if (justbuilt == 1) {
    justbuilt = 0;
    Abort();
    }
    else {
    Text(ID_CITY_BUILD_QUEUE_IS_EMPTY);
    EyePoint(city.1.location, city.owner, 'OpenProductionCallback');
    Duration(1);
    MessageType("WASTING_WORK");
    Title(ID_TITLE_CITY_BUILD_QUEUE_IS_EMPTY);
    }
    }


    **************
    *INFO_STR.TXT*
    **************

    ##
    ## Warning on too much Public Works not yet implemented (see script.slc for SLIC part)
    ##

    TP_TITLE_Warning_Public_Works "Staatliche Bautrupps"
    TP_TEXT_Warning_Public_Works "Es haben sich inzwischen mehr als 1500 Einheiten an Staatlichen Bautrupps angehäuft. Vielleicht sollen wir diese nun einsetzen, anderenfalls wäre es angebracht, die Quote für Bautrupps zu senken, damit mehr Produktion für Stadtverbesserungen und Wunder ausgegeben werden kann."


    ##
    ## Warning on sight of bombarding capable units (see script.slc for SLIC part)
    ##

    TP_TITLE_Warning_Bombarding "[unit.name] gesichtet !"
    TP_TEXT_Warning_Bombarding "Eine unserer Einheiten ([unit.2.name]) hat soeben mit Schrecken ein gegnerische Einheit mit Bombardmentfähigkeit ausgemacht ([unit.name]). Wir sollten jetzt sehr bedacht vorgehen."


    ##
    ## Warning in case human player got bombarded (workaround for non-autocentering on bombardments) (see script.slc for SLIC part)
    ##

    TP_TITLE_Warning_Bombarding2 "Bombardment des Gegners (Täter: [unit.name]) !"
    TP_TEXT_Warning_Bombarding2 "Eine unserer Einheiten ([unit.2.name]) wurde soeben Ziel eines feigen Bombardments einer gegnerischen Einheit ([unit.name]). Dies schreit nach Vergeltung."


    #
    # DOM's Building MOD Strings (see script.slc for SLIC part)
    #

    DOM_TITLE_CITY_BUILDING_BUILT "Stadt-Modernisierung"
    DOM_BUILDING_BUILT_CITY "???"
    DOM_BUILDING_BUILT_Granary "Wir haben jetzt ein Lagerhaus in [city.1.name]."
    DOM_BUILDING_BUILT_Capitol "Der Regierungssitz hat sich nach [city.1.name] bewegt."
    DOM_BUILDING_BUILT_City_Wall "[city.1.name] ist nun mit Stadtmauern bewehrt."
    DOM_BUILDING_BUILT_Temple "[city.1.name] hat nun seinen eigenen Tempel."
    DOM_BUILDING_BUILT_Courthouse "Ein Gerichtsgebäude wurde in [city.1.name]erstellt."
    DOM_BUILDING_BUILT_Publishing_House "Eine Druckerei befindet sich jetzt in [city.1.name]."
    DOM_BUILDING_BUILT_Marketplace "[city.1.name]'s Händler treffen sich ab heute am neuen Marktplatz."
    DOM_BUILDING_BUILT_Academy "Wir haben eine Akademie in [city.1.name] zum Dienste unserer Wissenschaft."
    DOM_BUILDING_BUILT_Theatre "Großer Gönner, wir danken für das neu gebaute Theater in [city.1.name]."
    DOM_BUILDING_BUILT_Aqueduct "[city.1.name] hat soeben sein Adäquat eingeweiht."
    DOM_BUILDING_BUILT_Coliseum "[city.1.name] feiert die Einweihung seines Kolloseums."
    DOM_BUILDING_BUILT_Bank "Die neue Bank in [city.1.name] treibt unsere Geschäfte voran."
    DOM_BUILDING_BUILT_University "[city.1.name]'s neue Universität wird Euren Ruf als Wissensmäzen fördern."
    DOM_BUILDING_BUILT_Hospital "Dank des neuen Krankenhauses sind die Bürger von [city.1.name] wesentlich gesünder."
    DOM_BUILDING_BUILT_Mill "Aufgrund der neuen Mühle wächst die Produktion von [city.1.name]."
    DOM_BUILDING_BUILT_Cathedral "Pilger aus Nah und Fern strömen in die Kathedrale von [city.1.name]."
    DOM_BUILDING_BUILT_City_Clock "Die Geschäfte in [city.1.name] gehen dank der neuen Turmuhrmehr als gut."
    DOM_BUILDING_BUILT_Factory "Erhöhte Produktivität in [city.1.name] dank der neu erbauten Fabrik."
    DOM_BUILDING_BUILT_Oil_Refinery "Mehr Produktion - und mehr Verschmutzung - in [city.1.name], da wir die neue Ölraffineriefertiggestellt haben."
    DOM_BUILDING_BUILT_Movie_Theatre "Der neue Filmpalast in [city.1.name] zieht Stars, Sternchen und viele Zuschauer an."
    DOM_BUILDING_BUILT_Airport "[city.1.name] hat einen neuen Flughafen!"
    DOM_BUILDING_BUILT_Drug_Store "In [city.1.name] wurde eine Apothekte fertiggestellt."
    DOM_BUILDING_BUILT_Nuclear_Plant "Die Kraft der Atome wird ab jetzt in [city.1.name]'s neuem Kernkraftwerkgebändigt."
    DOM_BUILDING_BUILT_Recycling_Plant "Die neue Recycling-Anlage in [city.1.name] wird unserer Umwelt kräftig die Lungen reinigen."
    DOM_BUILDING_BUILT_Television "Auf dem neuen TV-Sender in [city.1.name] wird die erste Vorschau von 'Sid Meier's Civilization III' gezeigt."
    DOM_BUILDING_BUILT_Computer_Centre "Unsere Wissenschaftler in [city.1.name] profitieren ab heute von ihrem Computer-Zentrum."
    DOM_BUILDING_BUILT_SDI "Star Wars wird zur Realität in [city.1.name] mit der SDI-Anlage."
    DOM_BUILDING_BUILT_Robotic_Plant "Unglaubliche Produktion in [city.1.name] - Roboterfabrik erbaut."
    DOM_BUILDING_BUILT_Security_Monitor "1984 in [city.1.name]: Eine Bürgerkontrolle ist soeben aktiviert worden."
    DOM_BUILDING_BUILT_Micro_Defense "Die Bürger von [city.1.name] sind ab heute vor gemeinen Angriffen mit einem Bio-Schutzfilter bewacht."
    DOM_BUILDING_BUILT_Aqua_Filter "Der soeben eingeweihte Wasserfilter in [city.1.name] unterstützt das Wachstum der Stadt."
    DOM_BUILDING_BUILT_Eco_Transit "Die Verschmutzung wird in [city.1.name] durch Ökofahrzeugedramatisch reduziert."
    DOM_BUILDING_BUILT_Incubation_Center "Die neue Inkubationsstätte in [city.1.name] gibt Frauen neue Freiheiten."
    DOM_BUILDING_BUILT_Rail_Launcher "In [city.1.name], eine Startröhre ist bereit zum ersten Einsatz."
    DOM_BUILDING_BUILT_Arcologies "Wir haben jetzt mehr Platz in [city.1.name] dank der neuen Schutzkuppel."
    DOM_BUILDING_BUILT_Beef_Vat "Nahrung für alle - in [city.1.name] wird dies mit dem Fleischtreibhaus Realität."
    DOM_BUILDING_BUILT_House_of_Freezing "Gold, gold, gold ! Die Cryo-Anlage in [city.1.name] is einsatzbereit."
    DOM_BUILDING_BUILT_Mind_Controller "Unzufriedenheit ist kein Thema mehr in [city.1.name], da dort die Gedankenkontrolle wirkt."
    DOM_BUILDING_BUILT_Forcefield "[city.1.name] wird nun durch ein Kraftfeld geschützt."
    DOM_BUILDING_BUILT_Nanite_Factory "Hey, Berufsshopper, wir haben jetzt in [city.1.name] die Nanitenproduktion."
    DOM_BUILDING_BUILT_Fusion_Plant "Der Fusionsreaktor in [city.1.name] wird noch heute hochgefahren."
    DOM_BUILDING_BUILT_Bio_Memory_Chip "Wissen und Civ 47 - alles erhältlich in [city.1.name] mit Hilfe des Wissenimplantats."
    DOM_BUILDING_BUILT_Body_Exchange "Gehen Sie nach [city.1.name] und holen Sie sich, was Sie verdienen - mit dem neuen Körperwandler."

    [This message has been edited by TP (edited July 16, 1999).]
Working...
X