Results 1 to 7 of 7

Thread: Perl script to count all units in a saved game

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member afrit's Avatar
    Join Date
    Jun 2004
    Location
    USA
    Posts
    321

    Default Re: Perl script to count all units in a saved game

    Suraknar,
    I'm curious. Why do you need to count the models in descr_model_battle?

    A simple text search shows 235 type declarations and 360 skeleton declarations.
    The plural of anectode is not data - Anonymous Scientist

    I don't believe in superstition. It brings bad luck. - Umberto Eco

  2. #2
    The Philosopher Duke Member Suraknar's Avatar
    Join Date
    Dec 2002
    Location
    Navigating the realm of Ideas
    Posts
    707

    Default Re: Perl script to count all units in a saved game

    Hrm...

    Maybe for the same reason that your script counts the types in EDU? I mean a simple Text Search can do it there too, yes? ;)

    Seriously, you worked on something, and I am trying to find a use for it that is all. If it can help modders in some way, the way that I see is that, as there are some limits here to work with, and I am working on integrating new models and units mainly, so for me it would be handy to keep track in this way, rather than dismiss your good work, by doing simple text searches...

    Duke Surak'nar
    "Η ΤΑΝ Η ΕΠΙ ΤΑΣ"
    From: Residing:
    Traveled to: Over 70 Countries, most recent: and

    ~ Ask not what modding can do for you, rather ask what you can do for modding ~
    ~ Everyone dies, not everyone really fights ~

  3. #3
    Member Member afrit's Avatar
    Join Date
    Jun 2004
    Location
    USA
    Posts
    321

    Default Re: Perl script to count all units in a saved game

    Suraknar,
    thanks for your interest. My script needed the names of all units so that it can look them up in the .SAV file (to avoid counting non-unit names such as buildings).

    The only thing I'm using my script for now is to check on the AI and see if it is making units of a certain type, and when. It is A LOT faster to run the script on a saved game than to toggle_fow and activate perfect_spy.


    My goal is to be able to edit the .SAV file to introduce interesting aspects in the game. e.g have the AI faction destroy buildings I know it doesn't use, or spawn armies outside of cities etc...


    Too bad very little is known about the saved game format.

    The plural of anectode is not data - Anonymous Scientist

    I don't believe in superstition. It brings bad luck. - Umberto Eco

  4. #4

    Default Re: Perl script to count all units in a saved game

    Another possible use is when you mod a unit that is already on the camp map. Lets say for example you change a merc unit and completely replace it with another one...simple change should be able to run your saved game....oops the computer has that particular unit but you did not know it. So when you load your save game it crashes with no error. You could track it down fairly quick, I would think.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO