Announcement

Collapse
No announcement yet.

DOCUMENT: Miscellaneous source findings and thoughts

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

  • #31
    Just from the snippets you've posted here it looks like you're increasing the attack rating every time a battle takes place...

    My preference would be to alter the code in ComabtUnit::GetOffense and CombatUnit::GetDefense so that they checked the veteran status. Veteranness is a property of the unit, not the battle, and so if possible the code pertaining to it should be contained within the unit definition.

    Comment


    • #32
      Dunno... I thought then that ExecuteAttack is when the stats are loaded for the battle... but I haven't checked it much.

      Will recompile with changes to CombatUnit.
      Solver, WePlayCiv Co-Administrator
      Contact: solver-at-weplayciv-dot-com
      I can kill you whenever I please... but not today. - The Cigarette Smoking Man

      Comment


      • #33
        John is right.

        The offense and defense would be increased each turn by that method.

        The alternative to to add the vet modifier to the damage and hitchance lines. They are local variables, so that should work fine.

        As is mentioned we could also modify things on the GetOffense / Defense end. This will require us to look through the code to remove extra multipliers on top, and more importantly, check that no other parts of code cheat and access the unitDB directly to get attack strength.

        Comment


        • #34
          I'd rather alter the GetOffense and GetDefense, because the AI might access them when deciding how to compose its armies, and other similar things. You're right that checks would be required to see where they and other related quantities are accessed, however.

          Comment


          • #35
            On an unralated subject, if anyone wants to alter the healing rate of forts (so that they heal at the same rate as cities, for instance, rather than instantly) you need to alter UnitData::EndTurn.

            Comment


            • #36
              Command line parameters

              I've been looking at the command line parser, and there are some handy command line parameters which, so far as I know, are mostly otherwise undocumented.

              Here is a list with a few of my current interpretations (some of which are almost certainly wrong):

              -l[Save game name]
              Loads the specified save game (We knew about this one - used for PBEM)

              -s[Scenario name]
              Use the specified scenario (Could be very handy)

              nointromovie
              Skips the intro movie

              age1
              age2
              age3
              age4
              age5
              These are related in some way to the option in userprofile.txt about CheatAge. They only work on a debug build.

              And some more about which I don't have any idea beyond what little you can deduce from what they say:

              notimeslice
              noshell
              noexitaction
              nonexclusive
              hidetaskbar
              noassertdialogs
              runinbackground
              eventlog
              multimon
              autoalttab
              Last edited by J Bytheway; November 2, 2003, 17:27.

              Comment


              • #37
                Originally posted by Solver
                I wonder if anyone who gets the compiled game to actually run can test this code, which is supposed to fix the veteran bug.
                I prefer to have files attached to a thread so that I don't have to paste the code myself into the files. Espeacilly if you consider that by using this board code could be altered take the big grin smily or angel brackets for instance. But to avoid floating source files around I opened a new
                thread for alterd source files. Of course if you think your code should be tested more before you add it there, you can post it here as well. Or any other thread that is about the code in question.

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

                Comment

                Working...
                X