Results 1 to 16 of 16

Thread: [Tool] EDB and DS Unit Ownership Validator by RedFox

Hybrid View

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

    Default [Tool] EDB and DS Unit Ownership Validator by RedFox

    Export_Descr_Buildings.txt and Descr_Strat.txt ownership validators by RedFox
    Current Version: v1.4

    Supports: Rome-TW, BI and Alex

    Quote Originally Posted by RedFox, HowToUse
    Spoiler Alert, click show to read: 

    Ever been hunted by those tedious bugs? Even though you know its an incorrect unit ownership, you still can't figure out what's wrong without deleting the whole thing! Here's when this little program comes to your resque to find the lines of code that cause the errors and fix them.

    Here's how to use it: Let's assume you have a modfolder named "mymod" Just copy both of the validators into the RTW/mymod" folder
    The validators will read these files:
    - RTW/mymod/data/descr_sm_factions.txt
    - RTW/mymod/data/export_descr_buildings.txt
    - RTW/mymod/data/descr_rebel_factions.txt
    - RTW/mymod/data/export_descr_unit.txt
    - RTW/mymod/data/world/maps/campaign/mycampaign/descr_strat.txt

    -)Type of errors detected:


    EDB Validator:
    -)Produces STOP If:
    -The Stream cannot find the culture of the given faction in sm_factions

    -)Produces ERROR If:
    -A faction in EDB is assigned the right to recruit an unit, but the unit does not belong to the faction.
    -An unit in EDB is not an unit type in the EDU. That means it does not exist. Usually happens if you remove an unit rom EDU and forget to update the EDB.

    -)Produces WARNING If:
    -A faction in EDB can recruit a mercenary unit, but the merc unit does not belong to the faction. This can cause some problems with unit recruitment scrolls in ALX, but does not result in crash.

    DS Validator:
    -)Produces STOP If:
    -The Stream cannot find the culture of the given faction in sm_factions

    -)Produces ERROR If:
    -A faction in DS contains an unit that does not belong to the faction.
    -An unit in DS is not an unit type in the EDU. That means it does not exist. Usually happens if you remove an unit from EDU and forget to update the DS.

    EDB & DS Validator:
    -)Produce an Exception If:
    -Cannot find the required files
    -Cannot read the file data properly

    VersionLog:
    -)v1.1 Changes:
    -Added a STOP error to avoid exception when culture is not found
    -Added a WARNING to merc units in EDB that do not belong to a faction
    -Fixed DS line counter
    -)v1.2 Changes:
    -Fixed STOP error not skipping comment marks ;
    -)v1.3 Changes:
    -Fixed bug where commented lines would be tested
    -Fixed bug where correct faction or culture was not retrieved from the file due to generic placement.
    -EDB Validator now supports unlimited length of file
    -)v1.4 Changes:
    -EDB Validator now checks descr_rebel_factions.txt
    -DS Validator now prompts for your campaign folder


    And that's it! You're ready to go and fix those annoying bugs that you'd never find!

    Signed,
    - RedFox

    Code:
    Validator © by RedFox
    Opening Stream... export_descr_buildings.txt
    Scanning: seleucid...greek...
    Scanning: carthage...greek...
    Scanning: greek_cities...greek...
    Scanning: slavs...greek...
    Scanning: macedon...greek...
    Scanning: romans_brutii...greek...
    Scanning: romans_scipii...carthaginian...
    Scanning: romans_julii...roman...
    >>ERROR! line: 4181, unit: "roman late princeps" is not declared in EDU!!
    Scanning: germans...greek...
    Scanning: egypt...egyptian...
    Scanning: parthia...eastern...
    Scanning: pontus...eastern...
    Scanning: armenia...eastern...
    Scanning: gauls...barbarian...
    Scanning: numidia...barbarian...
    Scanning: dacia...barbarian...
    Scanning: thrace...greek...
    Scanning: spain...barbarian...
    Scanning: scythia...barbarian...
    Scanning: britons...greek...
    Scanning: slave...roman...
    >>ERROR! line:1048, unit:"egyptian archer elite" does not belong to faction:slave
    >>ERROR! line:1093, unit:"egyptian archer elite" does not belong to faction:slave
    
    ------------------------------------------
    Opening Stream... descr_rebel_factions.txt
    Scanning: slave...roman...********************************************
    ****************************************************
    >>ERROR! line:1485, unit:"east persian cavalry" does not belong to faction:slave
    >>ERROR! line:1489, unit:"merc savage zombies" is not declared in EDU!!
    *************************************************************
    
    Task completed! Check ErrorLogEDB.txt for all Errors.
    Press any key to continue . . .
    Code:
    Validator © by RedFox
    Working directory: data\world\maps\campaign\mymod
    No such path
    Working directory: data\world\maps\campaign\emptycampaign
    No descr_strat here
    Working directory: data\world\maps\campaign\mycampaign
    Opening Stream...\mycampaign\descr_strat.txt
    Scanning: romans_julii...roman...
    >>ERROR! line: 1020, unit: "roman late princeps" is not declared in EDU!!
    Scanning: slavs...greek...
    Scanning: macedon...greek...
    Scanning: carthage...greek...
    Scanning: seleucid...greek...
    Scanning: egypt...egyptian...
    Scanning: romans_brutii...greek...
    Scanning: greek_cities...greek...
    Scanning: thrace...greek...
    Scanning: britons...greek...
    Scanning: romans_scipii...carthaginian...
    Scanning: parthia...eastern...
    Scanning: pontus...eastern...
    Scanning: armenia...eastern...
    Scanning: gauls...barbarian...
    Scanning: dacia...barbarian...
    Scanning: spain...barbarian...
    Scanning: scythia...barbarian...
    Scanning: germans...greek...
    Scanning: numidia...barbarian...
    Scanning: slave...roman...
    >>ERROR! line: 8527, unit: "warband axe german" does not belong to faction: slave
    >>ERROR! line: 8528, unit: "warband axe german" does not belong to faction: slave
    >>ERROR! line: 8529, unit: "warband axe german" does not belong to faction: slave
    >>ERROR! line: 8530, unit: "warband axe german" does not belong to faction: slave
    
    Task completed! Check ErrorLogDS.txt for all Errors.
    Press any key to continue . . .
    Tell me what you think:
    NB! Make sure you have WinRar 3.80 or higher if you use WinRar!
    Attached Files Attached Files
    Last edited by RedFox; 04-14-2009 at 20:54.

  2. #2

    Default Re: [Tool] EDB and DS Unit Ownership Validator by RedFox

    Hmm... I'll have to check it out when I get home from work...

    Btw, does it work for both RTW and BI (and Alexander)? How about M2?
    Last edited by HouseOfHam; 04-10-2009 at 23:38.
    RTR VII Developer

  3. #3

    Default Re: [Tool] EDB and DS Unit Ownership Validator by RedFox

    This is meant to work on all versions of RTW, it doesn't matter. It might even work on M2, even though I haven't tested it, if the filenames are the same, the program will not care, since all it does is check the given files in a sequence. Someone should give it a try with M2TW and tell me if it works or not and I'll add a supported TW versions at the top.

  4. #4
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: [Tool] EDB and DS Unit Ownership Validator by RedFox

    I've just tried on M2 - It looks like the DS versus EDU check works and the rebel factions part of the
    EDB checker

    the EDB checker though I don't think is picking up units as they are listed as

    recruit_pool "unit name" 1 0.2 2 0 requires factions { england, hre, spain, venice, sicily, }
    etc

    nice tool for RTW thanks
    for M2TW you do get some of those types of problems reported in the log file anyway but having info in nice compact form from this might be easier if its not too difficult to get it to work?
    Not used mods before? Looking for something small and fun?!
    Download the:

  5. #5

    Default Re: [Tool] EDB and DS Unit Ownership Validator by RedFox

    Yeah, the part of "recruit_pool" messes up the algorithm, since it checks for "recruit " (notice the space there). So it shouldn't work for M2TW. You should add deliberate invalid entries in the EDB and see if that makes any difference. If it does pick up the error in M2TW, then it's cool.
    I don't see a reason to recompile and upload the tool to support M2TW, since I don't have M2TW and as you stated, the M2TW logfile reports those errors already.

    It is meant for those who still love modding RTW, but are annoyed by crashes caused by unit ownership errors.

  6. #6
    Sindarin Elf of Doriath Member Finch's Avatar
    Join Date
    Feb 2009
    Location
    Woodland Realm
    Posts
    33

    Default Re: [Tool] EDB and DS Unit Ownership Validator by RedFox

    oops this is a corrupt file here downloaded the one on twc it works Thanks
    Last edited by Finch; 04-11-2009 at 15:04.

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