Announcement

Collapse
No announcement yet.

CtP Unit Updater

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CtP Unit Updater

    Madd_Mugsy has designed a Unit Updater for his home made mod. I am currently working on the unit arrays in order to adapt them to the Original Game and to the Apolyton Pack.

    I have finished working on the Update Paths for the Original Game but as I am new to CtP, I would like to read the opinion of the veterans.

    Here are the update paths for the original game:

    Spy > Cyberninja

    Hoplite > Legion > Pikeman > Musketeer > Machine Gunner > Marine > Plasmatica

    Archer > Mounted Archer > Cavalry

    Knight > Cavalry > Tank > Fusion Tank

    Cannon > Artillery > Mobile SAM > War Walker

    Fighter > Interceptor > Stealth Fighter

    Bomber > Stealth Bomber

    Trireme > Longship > Troop Ship

    Greek Fire Trireme > Ship of the Line > Battleship > Plasma Destroyer

    Destroyer > Plasma Destroyer

    Submarine > Stealth Submarine

    Paratroopers > Swarm


    Should the Stealth Bomber upgrade to the Space Bomber?



    Before designing the update paths of the Apolyton Packs I have a few questions. I have noticed that there are new units and that some of them even bear the same name as units from the original game:


    UNIT_GREEK_FIRE_TRIREME "Fire Galley"
    UNIT_TROOP_SHIP "Transport"
    UNIT_SPY_PLANE "Spy Satellite"
    UNIT_SPACE_MARINES "Space Marine"
    UNIT_FUSION_TANK "Hovertank"
    UNIT_NOBLE "Noble"
    UNIT_SIEGE_ENGINE "Siege Engine"
    UNIT_HORSE_ARCHER "Horse Archer"
    UNIT_CRUISE_MISSILE "Cruise Missile"
    UNIT_HELICOPTER "Helicopter"
    UNIT_MISSILE_CRUISER "Missile Cruiser"
    UNIT_ALPHA_TRANSPORTER "Alpha Transporter"


    Could someone confirm me if those units are coming as a replacement (like it seems to be the case with the "Hovertank" replacing the "Fusion Tank") or as an addition to the original units (like the "Horse Archer" and the "Siege Engine")?
    Last edited by Tamerlin; May 19, 2004, 19:38.
    "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

  • #2
    Wow!

    0 "view" and 0 "reply" so far... is no one caring for a unit updater? Is the forum dead?
    "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

    Comment


    • #3
      Originally posted by Tamerlin
      Wow!

      0 "view" and 0 "reply" so far... is no one caring for a unit updater? Is the forum dead?
      In that case your decision about the update paths is correct. For your second question, it is obvious that these units were replaced the only question is, if you just have to do it with different names, or also with different units with different properties.

      -Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #4
        Re: CtP Unit Updater

        Originally posted by Tamerlin
        Should the Stealth Bomber upgrade to the Space Bomber?
        Certainly not. Otherwise, your upgrade paths look fine.

        This forum is always very slow. I think there's only a handful of people who check it regularly (e.g. I only look every 3 or 4 days, usually...). If you want responses you could go post a link to this thread in the CTP multiplaying cafe.

        Comment


        • #5
          Thanks Martin & J Bytheway, your opinion is welcomed... and much appreciated.

          The next step is... the arrays.
          "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

          Comment


          • #6
            I have finally made the unit arrays for the original game and the Apolyton Pack. I now have to test the Updater to track down the bugs and/or typos.

            Though I don't know if it is related to the Original game, the Apolyton Pack or the French version only the triggers are not correctly written as they are returning STRING and SLIC errors.

            Instead of being written like this:

            Code:
            trigger 'IronWorking_trigReplaceUnits' when (HasAdvance(g.player, ID_IRON_WORKING) )
            Each trigger needs to be written this way:

            Code:
            trigger 'IronWorking_trigReplaceUnits' when (HasAdvance(g.player, ID_[B]ADVANCE_[/B]IRON_WORKING) )
            "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

            Comment


            • #7
              Here are the Update Paths for the Apolyton Pack :

              Spy > Cyberninja

              Hoplite > Legion > Pikemen > Musketeers > Machine Gunner > Marines > Plasmatica

              Archer > Musketeers

              Mounted Archer > (Horse Archer) > Cavalry

              Knight > Cavalry > Tank > (Hovertank)

              (Siege Engine) > Cannon > Artillery > Mobile SAM > War Walker

              Interceptor > Stealth Fighter

              Bomber > Stealth Bomber

              Trireme > Longship > (Transport)

              (Fire Galley) > Ship of the Line > Battleship > Plasma Destroyer

              Destroyer > Plasma Destroyer

              Submarine > Stealth Submarine

              Paratroopers > Swarm


              Note: The new units of the Apolyton Pack are those in brackets.
              "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

              Comment


              • #8
                I am a regular visitor/monitor to CTP Creation as I love modding and scenario making

                I have been away in Honduras building a church for my Lord as well as the primary reason of establishing relationships for HIM!

                Glad to be back and look forward to your posts

                I will comment on as many as I see!

                I love CTP and yes I have a small problem and looks like you are addressing it!

                I enjoy how in CIVII your units become updated...

                The only resolve I had was to disband and get some of the production back in a city..

                Keep up great work!

                Peace

                Grandpa Troll
                Attached Files
                Hi, I'm RAH and I'm a Benaholic.-rah

                Comment


                • #9
                  I hope I will meet your expectations Grandpa... but it is not yet ready.

                  Mad_Mugsy, I would need some help as I am not sure how the Updater is working.

                  It seems that the "[" and "]" keys are not working properly. Can a unit be upgraded after it has received an order. Can a unit be upgraded after the turn you discovered the advance triggering the update process?

                  May be I have not fully understood how the updater is working.

                  It seems that the AI is not upgrading its units before you upgrade at least one of yours.

                  The message box does not seem to display the informations properly...

                  Here is the message:
                  Attached Files
                  "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                  Comment


                  • #10
                    Mad_Mugsy, could you have a look at the SLIC code... perhaps have I made a mistake.

                    I know I have to change the order of the unit arrays so that the older units are upgraded first.
                    Attached Files
                    "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                    Comment


                    • #11
                      Have you changed DebugSlic from No to Yes? You need to do that for the messages to work properly.

                      (I know, it's confusing because it's the opposite of CTP2, but we just have to live with it...)

                      Comment


                      • #12
                        No, I haven't.
                        "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                        Comment


                        • #13
                          Thanks J Bytheway, I have started a new game with DebugSlic=Yes and that's far better as the messages are now correctly displayed.
                          "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                          Comment


                          • #14
                            Originally posted by Tamerlin

                            It seems that the "[" and "]" keys are not working properly. Can a unit be upgraded after it has received an order. Can a unit be upgraded after the turn you discovered the advance triggering the update process?
                            By default, upgrade messages are turned off. So you'll need to press "[" or change the code from:

                            Code:
                            trigger 'trigStartUp' when (IsHumanPlayer(g.player) && (g.year == 0)) {
                              	DisableMessageClass(987);
                            	DisableMessageClass(789);
                            	SetActionKey(1,"[");
                            	SetActionKey(2,"]");
                            }
                            to:

                            Code:
                            trigger 'trigStartUp' when (IsHumanPlayer(g.player) && (g.year == 0)) {
                              	EnableMessageClass(987);
                            	EnableMessageClass(789);
                            	SetActionKey(1,"[");
                            	SetActionKey(2,"]");
                            }
                            Also, pressing either key only takes effect on the next turn. It will not remove an existing notification/message.

                            Yes, a unit can be upgraded after receiving an order, thus allowing for extra movement. Not sure of a way around this w/out looping through all the units again - The CreateUnit function doesn't return the unit it created (I don't think - it's be a while since I looked into this). It'd be nice to replace the new units orders with the old units orders, thus automatically fortifying all your new pikemen, for example.

                            Yes, a unit can be upgraded the same turn you discover the advance. But, because of the fact that there are only global variables and that I didn't want to write a million lines of code to make separate upgrade functions for each unit/tech, you can only upgrade one type of unit each turn. If you choose not to upgrade, it will prompt you again next turn.

                            Originally posted by Tamerlin
                            It seems that the AI is not upgrading its units before you upgrade at least one of yours.
                            This is definitely not the case, as when I wrote and tested the AI upgrades, I did not myself perform any upgrades and the AI was still able to do so without difficulty. You can sometimes tell when it's upgrading, as there will be a loud death cry/explosion between turns as all it's old units are killed off. This probably screws up the score though

                            On a separate note, I found the other bug I initially mentioned but could not remember in the other thread. If you upgrade units that are together (part of an army) you will only get one new unit, and you will lose your whole army. It treats the army as a single unit. Ie: My army has three interceptors, two stealth bombers - I upgrade the interceptors to space fighter. Whoops, now instead of 5 units, I have one. So split up your armies before upgrading. Let me know if anyone finds a way around this, because it can be a pain in the ass, if you forget to split 'em up.

                            L8r.

                            Comment


                            • #15
                              Originally posted by Madd_Mugsy


                              By default, upgrade messages are turned off. So you'll need to press "[" or change the code from: ...

                              Also, pressing either key only takes effect on the next turn. It will not remove an existing notification/message.
                              Thanks a lot, I was actually afraid of having done something wrong.

                              Yes, a unit can be upgraded after receiving an order, thus allowing for extra movement. Not sure of a way around this w/out looping through all the units again - The CreateUnit function doesn't return the unit it created (I don't think - it's be a while since I looked into this). It'd be nice to replace the new units orders with the old units orders, thus automatically fortifying all your new pikemen, for example.
                              The problem is the same with the CtP2 Updater2, a new unit being created in the process, the said unit can receive a new order.

                              Yes, a unit can be upgraded the same turn you discover the advance. But, because of the fact that there are only global variables and that I didn't want to write a million lines of code to make separate upgrade functions for each unit/tech, you can only upgrade one type of unit each turn. If you choose not to upgrade, it will prompt you again next turn.
                              I was actually mislead by the fact the "[" and "]" keys only come into effect the turn after they are selected.

                              This is definitely not the case, as when I wrote and tested the AI upgrades, I did not myself perform any upgrades and the AI was still able to do so without difficulty. You can sometimes tell when it's upgrading, as there will be a loud death cry/explosion between turns as all it's old units are killed off. This probably screws up the score though
                              I was once again mislead by the way the Updater is working as it is as if it were creating a unit a few tiles away before moving it to the place where the older units was.

                              On a separate note, I found the other bug I initially mentioned but could not remember in the other thread. If you upgrade units that are together (part of an army) you will only get one new unit, and you will lose your whole army. It treats the army as a single unit. Ie: My army has three interceptors, two stealth bombers - I upgrade the interceptors to space fighter. Whoops, now instead of 5 units, I have one. So split up your armies before upgrading. Let me know if anyone finds a way around this, because it can be a pain in the ass, if you forget to split 'em up.
                              By splitting an army do you mean that "unlocking" the units in the same tile is enough?

                              Thanks for your help Madd_Mugsy.
                              "Democracy is the worst form of government there is, except for all the others that have been tried." Sir Winston Churchill

                              Comment

                              Working...
                              X