Announcement

Collapse
No announcement yet.

[C4:AC][Programming] Mod in PKeers

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

  • [C4:AC][Programming] Mod in PKeers

    Well this is my first attempt at modding Saladin into Lal. So far I've managed to edit it such that at the startup screen where you choose a civ you get the option to select "Peacekeepers". Also most of the related text with the Peacekeepers works as well. Haven't really playtested that much to see if it "works" or not, as the game was CTD'ing on me even before I started mod'ing ....

    Anyways, once I get a little farther along I'll come up with a documentation scheme using this mod. You all then can review it, provide feedback, then I'll incorporate the feedback and then publish the approach.


    D
    Attached Files

  • #2
    Now to just change his favorite civic and second trait.

    Nice start btw.
    He who knows others is wise.
    He who knows himself is enlightened.
    -- Lao Tsu

    SMAC(X) Marsscenario

    Comment


    • #3
      Originally posted by GeoModder
      Now to just change his favorite civic and second trait.
      I think the traits are linked - I'll experiment tonight and find out for sure, then update accordingly. I have changed it so that the Faction selection in the Civlopedia (er, I mean Datalinks! ) now reads "Commissioner Pravin Lal".

      Originally posted by GeoModder
      Nice start btw.
      One small step by the Mod Team! I figured this would be relatively easy as well as give me lots of experience prowling around the various subdirectories and seeing the format of the various XML files. I'll see about putting this into my "How to build a Faction" document.


      D

      Comment


      • #4
        Was I right in my thoughts Darsnan?

        If you figure out how to change each and every property of a leader we can make the first release - cIV with SMAC leaders!
        -- What history has taught us is that people do not learn from history.
        -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

        Comment


        • #5
          Originally posted by binTravkin
          Was I right in my thoughts Darsnan?
          Probably, but I think the items you referenced are in the SDK, as I cannot find a specific reference in any of the Python or XML files. What I have done is removed the linking text and just leave the name proper within the programming text of the XML files. Example:

          < city >TXT_KEY_CITY_NAME_UN Headquarters< /city >

          to

          < city >UN Headquarters< /city >

          Same goes for the leaderhead text.
          So far seems to work fine, but I will probably go back and address this once we get the SDK.

          Originally posted by binTravkin
          If you figure out how to change each and every property of a leader we can make the first release - cIV with SMAC leaders!
          For release v0.01 I'd say just go with modding just one leaderhead, as a) I really can't playtest thoroughly on my machine at present, and b) the method I am using to "make it work" isn't necessarily the best/ most correct from a programming perspective.... Once we get feedback then I can make the necessary corrections (especially if we've got the SDK at that time!) and then go into full production!

          btw what is anyone else working on at present? Reason I am asking is that after this I plan on playing with the Barbarians and seeing if I can replicate the MW's/ Spore Launchers. Not sure how I'll handle the aquatic versions yet, but we'll see!


          D

          Comment


          • #6
            Darsnan, a few remarks (from my experience) :

            Look in the Assets\XML\Text directory.

            For example, the file CIV4GameTextInfos_Objects.xml contains this text:
            Code:
            	{TEXT}
            		{Tag}TXT_KEY_LEADER_SALADIN{/Tag}
            		{English}Saladin{/English}
            		{French}
            			{Text}Sal€adin{/Text}
            			{Gender}Male{/Gender}
            			{Plural}0{/Plural}
            		{/French}
            		{German}
            			{Text}Saladin{/Text}
            			{Gender}Male{/Gender}
            			{Plural}0{/Plural}
            		{/German}
            		{Italian}
            			{Text}Saladino{/Text}
            			{Gender}Male{/Gender}
            			{Plural}0{/Plural}
            		{/Italian}
            		{Spanish}
            			{Text}Saladino{/Text}
            			{Gender}Male{/Gender}
            			{Plural}0{/Plural}
            		{/Spanish}
            	{/TEXT}
            See, for the benefit of translating the game, all text is referenced with TXT_KEY_ ... variables, and these are defined for all languages in other xml files, with added info about the gender and plurals (to change verbs etc accordingly).


            Now, how to easily find this: use editplus ( http://www.editplus.com/ ).

            Whenever you want to find such a TXT_KEY, click search => find in files
            => fill in the TXT_KEY you want to find,
            => set extension to *.xml
            => set the folder to "C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Assets"
            => enable "search in subdirectories"

            Now you see all results in the bottom panel of the main window and you can double click them to open the file (and your cursor is automaticly placed on the word you searched for)
            no sig

            Comment


            • #7
              Since I doubt we could implement SE categories (Probe, etc) without the SDK, here's a shot at what the SMAC leaders would have for traits:

              Miriam: Aggressive & Spiritual
              Yang: Industrious & (Aggressive or Organized)
              Santiago: Aggressive & Expansive?
              Morgan: Financial & (Organized or Creative)
              Deirdre: (Philosophical or Spiritual) & Expansive
              Zak: Philosophical & Financial?
              Domai: Industrious & Expansive
              Aki Z-5: Organized & (Philosophical or Creative)
              Roze: Creative & Spiritual? (they're used to anarchy!)
              Fungboy: Spiritual & something (hard to implement)
              Svensgaard and the aliens can't be emulated with the traits system.
              "Cutlery confused Stalin"
              -BBC news

              Comment


              • #8
                Sure they can - I'd say Agressive for each of them, possibly organised for the two aliens (seeing they dig Planned), possibly expansive for the pirate (YAR!), only because I imagine you'd expand quicker on the ocean than on land.

                Comment


                • #9
                  Some general programming comments

                  OK, still haven't figured out how to eliminate the "TXT_KEY_CITY_NAME_" tag from showing up, so I am moving on for the present and will come back to this later (probably afater someone reviews my updates and says "heah, you need to change this dummy". However one of the comments that bT and I had discussed previously was support for other languages. This was of course before we had our hands on the game and realized that support for other languages was built in and readily available for anyone who wanted to translate from english to any of the other supported languages. So my question now becomes do we strive for leaving the hooks (i.e. the "TXT_KEY_CITY_NAME_" type hooks) in our code so that if someone in the future wants to mod from english the hooks are readily available, or do we mod them out? The plus side is that by leaving the hooks in it then makes it easier for someone to mod it to a different language. The downside is that currently, because a ot of these files are loaded into memory on game startup, that the unsupported language text is then hogging up RAM space that could be utilized elsewhere.


                  As far as how I envision documenting my mods, the following is the format I am thinking of following:

                  How to Modify/ Create a Faction

                  Purpose - the purpose of this procedure is to document the files and steps necessary in order to modify an existing faction to either have different traits or to completely create a new faction.

                  Files Involved

                  Programming - to include subdirectory location

                  Graphics -

                  Audio -

                  Editing Software Required

                  Program Name - needed for editing.....


                  I'll then go into the meat of what needs to be changed in each specific listed file in the "Files Involved" section.

                  Any thoughts on this approach?

                  D
                  Last edited by Darsnan; November 17, 2005, 10:10.

                  Comment


                  • #10
                    I'd say leave the translation hooks in.

                    Your documentation template looks good.
                    no sig

                    Comment


                    • #11
                      This evening's progress

                      Edited the CIV4GameTextInfos.XML file this evening. Here's a pic of the progress:
                      Attached Files

                      Comment


                      • #12
                        Leaderhead graphics

                        It is possible to use .dds images to replace the animated leaderheads. I did a quick .dds conversion of Lal (still poor quality) which is found in the attached .zip file.

                        Replace the "NIF" reference in the "CIV4ArtDefines_Leaderhead.xml" file with "art/LeaderHeads/Pravin_Lal/Pravin_Lal.dds" and, of course, put the .dds file into the proper folder (assets/art/LeaderHeads/Pravin_Lal/).

                        I've had no luck yet assigning a custom leaderhead button to a new faction while still preserving all the default leaderhead buttons.

                        Edit: File removed.
                        Last edited by Rubin; November 21, 2005, 03:34.

                        Comment


                        • #13
                          Colors

                          The files "CIV4ColorVals.xml" and "CIV4PlayerColorInfos.xml" can be used to set the proper colors for the Peacekeepers. I defined a COLOR_PLAYER_PEACEKEEPERS in "CIV4ColorVals.xml" (Red=0.640;Green=0.690;Blue=0.910;Alpha=1.00) and made that the primary Peacekeeper color (white as secondary color and blue as text color).

                          Comment

                          Working...
                          X