Results 1 to 16 of 16

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

  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.

  7. #7

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

    It works fine.

  8. #8
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

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

    Quote Originally Posted by RedFox View Post
    It works fine.
    That may very well depend on who is using it. To give you an example of what I mean, this is how the .zip shows for me and what comes up when I double click the 'unknown' file ....



    So in this case, it does not work ....
    (and its the same with the other 2 validators you recently posted)

    Kudos for putting in the effort, but without a beter description on how to use it its clearly not something for the everyday modder, I think ...

  9. #9

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

    What version of Winrar are you using? I've 3.41 and it reads the posted zip just fine.
    RTR VII Developer

  10. #10
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

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

    Quote Originally Posted by HouseOfHam View Post
    What version of Winrar are you using? I've 3.41 and it reads the posted zip just fine.
    v3.61 ...

  11. #11

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

    Windows XP can extract a .zip file without any need for WinRar, just right click -> Open With -> Compressed (zipped) Folders and copy what you need. The archive is compressed with WinRAR 3.80. It won't hurt to download the new version and not post about your inability to open a simple .zip archive.

  12. #12
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

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

    edit: 'spur of the moment' reply removed ...
    Last edited by Red Spot; 04-14-2009 at 17:01.

  13. #13

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

    I just hope you were able to fix your problem and found the tool even a little bit useful. I'm just trying to make the world a better place here; one validator at a time...

    I just found the claim that the file is corrupt as spreading incorrect information for others. Do my sarcastic comments really matter, as long as you get a new tool and learn how to use .zip files at the same time? :)

    Cheers

  14. #14
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

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

    Sorry, but I dont use it. I just posted in an effort to be helpfull and provide you some feedback as to why people might have an issue with it not working for them.

    Next time when you do post comments like this: "It won't hurt to download the new version and not post about your inability to open a simple .zip archive."
    Use a smilie at the end .. as in all honosty I did took offense the moment I read it ;)

  15. #15

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

    Hehe, no offense was intended :P I guess I should've used a smiley indeed. Sorry for offending you - I'm used to people not making a huge deal of it and just hitting back with a good comeback like or shrug it off.. ;)
    Anyways, this is getting off-topic. No need to spam the forums, now is there?

  16. #16
    Notepad user Member Red Spot's Avatar
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    491

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

    But I love spam ... :s

    Anyway, I do suggest you add a comment to the first post saying people should make sure to use an up to date version of winrar if the archive shows anything but an .exe(?). Even if its just to prevent further discussions wether the tool works or not. I think the screenshot I posted shows enough about the confusion it can potentially cause, as you more or less already said yourself, its easy enough to unpack archives. People expect some error pop-up if its a version issue and if the archiver can unpack it its quickly seen as your tool that has the issue.

    (back oftopic, no problem. As I dont really know you I could only see it as some sort of attack cause you might not be able to take the 'positive' criticism, but as I am not that easily intimidated I wasnt insulted, I only 'saw' it as somewhat offensive comment ... case closed :))

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