Announcement

Collapse
No announcement yet.

Help with xml files

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

  • Help with xml files

    Hi guys,

    Could you please help me tweak REF growth rates? Do I have to tweak this line in Civ4HandicapInfo.xml?

    200

    If yes, how?

    Somehow confused by Dale's comments as he mentions the standard is 100, but on my files its 200. It is 180 in his AoE II mod, 200 at original file and 200 at Snoopy/Dale patchmod.

    Would 100 translate as a linear increase? Whatever above 100 would mean a superlinear increase?

    Also how can I tweak the starting force (eg. x3)?

    A general question, in the GlobalDefines.xml what is the difference between variable which are named as THRESHOLD and THRESHOLD_INCREASE?

    I can understand threshold increase as how much more you need to generate of an arbitrary quantity in order to trigger one more level of another arbitrary quantity (eg tax increase, REF increase, points for immigration etc)...

    If this is correct, what is the threshold then?

    Sorry for shooting so many questions!

    Thanks!
    Coling since 1994... :)

  • #2
    Civ4HandicapInfo.xml only refers to difficulty specific attributes. REF growth is not primarily determined by difficulty. It is a combination of bells * master value (GlobalDefines) * difficulty value (by default is 200). In AoD2 I made changes to that value to make difficulty more of a factor.

    There is a value in GlobalDefines.xml which is the master control of REF growth. Look there for the values to edit.

    Starting size of the force is determined by Civ4CivilizationInfos.xml. Do a compare between AoD2's file and the vanilla file to see where I tripled the size of the starting REF.

    THRESHOLD values are the trigger amounts, THRESHOLD_INCREASE is the percentage change of the threshold when the trigger is made. EG: Cross threshold is 5 with 20% threshold increase. When 5 crosses are made, the next threshold == 5 * 120% == 6. The count is reset and you must accumulate to the new threshold again.

    Comment


    • #3
      Thanks Dale!

      At GlobalDefines.xml I tracked this change:

      @ Vanilla - Patchmod:
      REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE
      10

      REVOLUTION_EUROPE_UNIT_THRESHOLD
      75

      @ AoD II:

      REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE
      20


      REVOLUTION_EUROPE_UNIT_THRESHOLD
      150

      Is that it? It looks to me both quantities have been doubled.

      Also CIV4CivilizationInfos.xml seems to contain info only about cities, classesm units and nations. Are you sure it has info about REF starting size?
      Last edited by PrinceMyshkin; December 6, 2008, 10:42.
      Coling since 1994... :)

      Comment


      • #4
        Dale,

        I did some further testing and reading. My knowledge on REF and LBs comes from this site:

        http://forums.civfanatics.com/showthread.php?t=293730

        I think you have a slight mistake in your code. You have increased the REVOLUTION_EUROPE_UNIT_THRESHOLD from 75 to 150, which will cause less frequent REF increases, but also to balance it (I suppose) you've increased the REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE from 10 to 20.

        Based on these facts, I've written my own code to calculate the REF increase in both cases.

        The results are shown at the attached a graph. As you see one effect is canceling the other, and AoD II has less frequent increases, but of a higher amplitude...
        Attached Files
        Coling since 1994... :)

        Comment


        • #5
          Here is my code, LBs magnitude is taken from one of my games... well roughly, LB code is simplistic, but you get my point....

          REF is not actual REF, but the LB factor scaling REF...

          LB=0;
          REVOLUTION_EUROPE_UNIT_THRESHOLD=150;
          REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE=1.2;
          LB=1;
          LB_GATHERED=0;
          REF=1;

          TURNS=[1:1:450];

          for TURN=TURNS

          LB=LB+4;
          LB_GATHERED=LB_GATHERED+LB;

          if LB_GATHERED>=REVOLUTION_EUROPE_UNIT_THRESHOLD
          REF=REF*REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE;
          REVOLUTION_EUROPE_UNIT_THRESHOLD=REVOLUTION_EUROPE _UNIT_THRESHOLD*REVOLUTION_EUROPE_UNIT_THRESHOLD_I NCREASE;
          LB_GATHERED=0;
          end

          REF_TURN(TURN)=REF;
          LB_TURN(TURN)=LB;

          end
          Coling since 1994... :)

          Comment


          • #6
            You have to remember that REF grows at each jump. Therefore since there are half as many jumps in AoD2 then the REF grows half as many times. The average offset being that in AoD2 you get half as big REF than in vanilla.

            To counter this, the REF will start three times the size. So in AoD2 the REF starts bigger but grows much slower than the other two. Resulting in smaller REF's by end game.

            Comment


            • #7
              In Civ4CivilizationInfos.xml look up one of the Europe nations and check this field: FreeUnitClasses

              That's what determines initial REF size.

              Comment


              • #8
                Dale you rock man! How on earth do you know these kind of info?! Teach me please!

                I mean free units is not self explanatory, thought it was some kind of bonus at low level stuff... :P

                Regarding AoD II, that's coming in my graph as well. But I think you have also increased "REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE" from 10 to 20.

                This will increase the REF size by 20% at a time and not 10%, as it is in vanilla, canceling the increase of "REVOLUTION_EUROPE_UNIT_THRESHOLD" from 75 to 150, which as you mentioned causes less frequent increases.

                At least I think...
                Coling since 1994... :)

                Comment


                • #9
                  Originally posted by PrinceMyshkin
                  Dale you rock man! How on earth do you know these kind of info?! Teach me please!

                  I mean free units is not self explanatory, thought it was some kind of bonus at low level stuff... :P
                  3.5 years working with Firaxis on Civ4 + XP's + C4C.

                  That and you can check the actual code (SDK) to see what the game does with that tag.

                  Regarding AoD II, that's coming in my graph as well. But I think you have also increased "REVOLUTION_EUROPE_UNIT_THRESHOLD_INCREASE" from 10 to 20.

                  This will increase the REF size by 20% at a time and not 10%, as it is in vanilla, canceling the increase of "REVOLUTION_EUROPE_UNIT_THRESHOLD" from 75 to 150, which as you mentioned causes less frequent increases.

                  At least I think...
                  Actually no, it doesn't increase the REF by 20%. It increases the threshold by 20%. So by increasing the threshold more it means you can produce more bells before hitting the next threshold level (and triggering a REF growth). The threshold only determines how many bells you can produce till it triggers a REF growth. It doesn't determines the size of the REF growth.

                  So AoD2 is in fact tripling inital REF size, but halving the number of times it grows. Thus making it harder to defeat early, but easier later.

                  Comment


                  • #10
                    Wow I am impressed! Do they have another job there for a crazy gamer?

                    Dale according to this:

                    http://forums.civfanatics.com/showthread.php?t=293730

                    After 75 bells the King will increase the REF, reset the bell "counter", and the next REF increase will require 10% more bells. There's a bit of a twist though, in that the next REF increase will also add 10% more units to the REF.
                    So it increases the threshold by 20% and the REF for 20%; canceling the effect.

                    Is my source wrong?
                    Coling since 1994... :)

                    Comment


                    • #11
                      True, but you can't compare AoD2 REF calculation directly to vanilla REF calculation. I've changed many things which leads to a more balanced REF the longer you go on in the game.

                      The only real way to see the difference is to play games of vanilla noting down REF sizes at various turns, and then play a game of AoD2 the same way and compare.

                      Besides, since I've changed heaps of other things too in AoD2 it really is unreasonable to directly compare both REF growth methods.

                      EG: In AoD2 it's easier to maintain a bigger standing army than vanilla, and other things.

                      Comment


                      • #12
                        OK thanks!

                        Damn AoD2 appears very buggy for me!

                        Wish I could play it! But since, I cannot I am trying to mod patchmod to my preferences... I wouldn't be able to do it without you!

                        I have made some calculations, and I think I will drastically change REF size, and its growth rate!
                        Coling since 1994... :)

                        Comment


                        • #13
                          What do you think about that?

                          Only techinical problem is increasing 25 times the starting REF! Will be fed up copying and pasting 25 times the initial force, I guess! :P

                          Got to playtest it as well! :P
                          Attached Files
                          Last edited by PrinceMyshkin; December 6, 2008, 19:55.
                          Coling since 1994... :)

                          Comment


                          • #14
                            OK I gave the King 150 man-o-wars, 300 regulars, 200 dragoons and 200 cannons.

                            May need to scale it up a bit more! And I will be looking for about 50-70% increase during 300 turns... Let's see how it goes!
                            Coling since 1994... :)

                            Comment


                            • #15
                              Be very careful how it scales for small maps and fast time frame.

                              Comment

                              Working...
                              X