Results 1 to 3 of 3

Thread: Editing stats of existing tables - The right way to do it?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Editing stats of existing tables - The right way to do it?

    Now, after reading many tutorials and watching few videos, i'm not sure what is the "right" way to do it.


    I edited stats of Egyptian Infantry in land_units table. Removed all other units in it, then changed the name of the table with added prefix. Loaded up the game, everything went fine. Went to custom battle and Egyptian Infantry had my modified stats. Started the custom battle, and tooltip still shows my edited stats. No crashes or anything.

    What confuses me is that, tutorials and some posts say that when you edit something and are not adding new stuff, you should not rename the table and leave everything in there and just change what you want changed. So your table replaces the vanilla table.

    So which is the right way to do it? Is there any drawbacks in my way?

    I did not change the key of the unit (Egy_Infantry), so to my understanding my mod _should_ just overwrite the vanilla unit and the stats it got in vanilla land_units table. And also be compatible with mods that would want to touch the same table. I am yet to test what happens when i do the same with main_units, since you got unique index in that table. But at least my way edited the right unit and did give it the right stats, without crashing, so don't really know.

  2. #2
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Editing stats of existing tables - The right way to do it?

    Only when removing entries (ie. if you wanted to remove an ability from Egyptian infantry) from a table do you have to not rename it. Every other occurance (editing/adding), it's best to rename the table to improve compatibility with other mods.
    Quote Originally Posted by Vilu View Post
    So which is the right way to do it? Is there any drawbacks in my way?
    Not in this circumstance, and your mod will now seamlessly work with other mods which edit land_units
    Quote Originally Posted by Vilu View Post
    unique index
    Because you are editing an existing entry, so long as the edited index matches the original you wont have a problem. You only need to change it for new units (to make it unique)
    Last edited by crzyrndm; January 04, 2014 at 02:28 PM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  3. #3

    Default Re: Editing stats of existing tables - The right way to do it?

    Thank you!

    Got another question in my mind; With quick glance in variantmesh files, i noticed that only cloaks and tunics seems be using the mask option. So i take it that if i want to edit the color of armors or helmets, i have to do it in gimp, or do the masks work for them?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •