Page 1 of 2 12 LastLast
Results 1 to 20 of 34

Thread: EDB validator

  1. #1
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default EDB validator

    Originally developed for RTW, now extended to support MTW2.

    Main discussion/bug reporting thread: http://www.twcenter.net/forums/showthread.php?t=282662

    Current version is 1.2.8 (Oct 16, 2012)

    Download link: http://www.twcenter.net/forums/downl...o=file&id=2559

    Checks EDB for:

    - possible syntax errors (too many to list here)
    - invalid unit type references
    - invalid faction/culture names
    - invalid religious belief references
    - invalid hidden_resource references (also checks to make sure the limit on the number of hidden resources has not been exceeded)
    - references to non-existent buildings/building levels

    How to use:

    Requires Java 6 runtime environment to be installed on your box. If you don't have it,
    you can download it here: http://java.sun.com/javase/downloads/index.jsp

    1. Double-click on the "EDB Validator" shortcut to start the program

    2. Select which game the mod is for (RTW/BI/Alex or M2TW/Kingdoms) and configure options (check boxes)

    3. Click on the "..." button, browse to the location of your mod, and select it.

    4. Click on Validate

    Assumptions:

    - The validator assumes agent types have not been modified (in other words, vanilla types are hard-coded).

    Notes:

    - Plugins validation is not supported. All plugin defitions will be skipped and won't be included in the "Generate prettified EDB" output.
    - Faction and cultures types are cross-checked with descr_sm_factions.txt and descr_cultures.txt
    - Unit types are cross-checked with EDU
    - Checks export_buildings.txt: for buildings, it checks for {id_name}. For levels, checks for {id}, {id_desc}, and {id_desc_short}
    - (RTW) Religious beliefs are checked against those listed in descr_beliefs.txt, if found. If not found, assumes that vanilla religious
    beliefs are used and checks against those.
    - (MTW2) Religions are checked against descr_religions.txt

    Files the program reads:

    - text\export_buildings.txt
    - export_descr_buildings.txt
    - export_descr_unit.txt
    - descr_cultures.txt
    - descr_sm_factions.txt
    - descr_beliefs.txt (RTW, if present) / descr_religions.txt (MTW2)

    Other than EDB itself, these files are not parsed completely, but are only quick-scanned for lines containing ids.

    To-do list for future versions:

    - Cross-check agent types with descr_characters.txt

    What this validator does NOT check (other than what's on the to-do list):

    - loops in building levels, i.e. upgrade paths that form a loop
    - unit ownership (use RedFox's validator for that, though: http://www.twcenter.net/forums/showthread.php?t=247668)
    - presence/absence of building cards
    - references to normal, non-hidden resources
    - syntax errors in files other the EDB
    - for MTW2, it does not check event_type references against descr_events.txt

    Change history:

    v1.2.8
    - Added a shortcut for the default location of java.exe on 64-bit system

    v1.2.7
    - Changed program locale settings to English. This fixes floating point number parsing (for example, in M2TW recruit_pool
    capability lines) for users whose computers' default locate is set to use something other than dot for decimal separator.

    v1.2.6
    - Added support for weapon_artillery_mechanical capability type for M2TW

    v1.2.5
    - Fixed a bug with parsing descr_sm_factions.txt and descr_cultures.txt when faction/culture id is immediately followed by a semicolon
    - (M2TW) Added support for a few building capabilities that I previously wasn't aware of

    v1.2.4
    - When a plugin definition is detected, will give a warning and skip over it, rather than abort with error.

    v1.2.3
    - Interface clean-up
    - Minor bug fix in handling intermixed delimiters (both tabs and spaces) when set not to report tabs as errors
    - Now will remember last used settings when you restart the program (settings are saved when you run a validation)
    - Now works with RS2-like folder structure

    v1.2.2
    - When reporting errors found in export_buildings.txt, show that the error is in that file rather than in EDB
    - Added an optional check for tabs. When enabled, leading/trailing tabs are still considered ok, but tab in the middle of the line are flagged as errors
    - Added a check to catch the use of building_present/building_present_min_level requirement condition in recruit capability lines (known cause of CTDs)

    v1.2.1
    - Fixed the requires port condition. It was already defined as a requirement type, but wasn't being checked for when parsing requirements. Reported by MasterOfNone.
    - Fixed the max number of buildings in EDB to be 128 for MTW2. Reported by Augustus Lucifer.

    v1.2.0
    - Added support for validating MTW2 EDB

    v1.1.1
    - Fixed a bug that caused an error to be reported when EDB has exactly 64 hidden resources

    v1.1.0
    - Added code to detect references to non-existent buildings/building levels
    - If there is no descr_cultures.txt in the modfolder, will look for it in the vanilla folder
    - Minor UI tweaks

    v1.0.4
    - Added a check to make sure the maximum allowed number of hidden resources (i.e. 64) has not been exceeded
    - Added detection of references to non-existent hidden resources

    v1.0.3
    - Now checks references to religious beliefs against those listed in descr_beliefs.txt (previously only worked with vanilla religions).

    v1.0.2
    - Replaced checkEDB.bat with a shortcut, so now you'll get no DOS pop-up window in the background when starting the program.
    - Fixed a bug in the "Generate prettified EDB" functionality where the generated output missed requirements for all but the very first building level. Thanks to Redfox for spotting this one.

    v1.0.1
    - Fixed a bug that caused an error to be reported if there was a comment
    at the end of the line. Thanks to dvk901 for reporting it.

    v1
    - Original public release
    Last edited by HouseOfHam; October 16, 2012 at 03:24 PM.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  2. #2
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: EDB validator

    I've tried this tool but it just stops on first "recruit_pool" line saying that "Incomplete capability definition. Missing recruiting pool growth rate.". The thing is that growth rate is there. The tool doesn't recognize such growth values like "0.4" etc. Whenever I change it to "1" the tool analyzes only to second line and then saying the same. What is wrong?

    Under the patronage of m_1512

  3. #3
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    As I mentioned in the other thread, I don't have M2TW, so when I added support for it, my testing was done based on sample files someone sent me. I'll need your mod's files (all the files listed in the 1st post) to see what's going on.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  4. #4
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: EDB validator

    Here are the files. Thanks for help.

    Under the patronage of m_1512

  5. #5
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Quote Originally Posted by wudang_clown View Post
    Here are the files. Thanks for help.
    Ran it on your files. The only things it complained about was missing entries in export_buildings.txt:

    {convert_to_castle_name}convert_to_castle_name
    {convert_to_city_name}convert_to_city_name
    {temple_pagan_name}temple_pagan_name
    {hinterland_hagiasophia_name}hinterland_hagiasophia_name
    {hinterland_kaaba_name}hinterland_kaaba_name
    {hinterland_drock_name}hinterland_drock_name
    {hinterland_sepulchre_name}hinterland_sepulchre_name
    {hinterland_hwisdom_name}hinterland_hwisdom_name
    {hinterland_umosque_name}hinterland_umosque_name
    Are you sure you're using the latest version?
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  6. #6
    wudang_clown's Avatar Fire Is Inspirational
    Join Date
    Jan 2009
    Location
    Poland
    Posts
    7,357

    Default Re: EDB validator

    I'm using EDB validator v. 1.2.1.

    Under the patronage of m_1512

  7. #7
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Version 1.2.2 posted.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  8. #8
    Gorrrrrn's Avatar Citizen
    Join Date
    Jan 2007
    Location
    here
    Posts
    5,546

    Default Re: EDB validator

    HoH
    - thanks for updating this
    will add to my modding toolbox
    --
    minor gremlin - file path for java runtime 6 on my system is:
    Program Files (x86)\Java\jre6\bin\javaw.exe - need to amend default path to get it to run.
    Last edited by Gorrrrrn; December 12, 2010 at 07:12 PM.

  9. #9
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Quote Originally Posted by Rozanov View Post
    minor gremlin - file path for java runtime 6 on my system is:
    Program Files (x86)\Java\jre6\bin\javaw.exe - need to amend default path to get it to run.
    Not much I can do about that. There is no guarantee java bin folder is in the path at all, so the best I can do is set it to the most common location, i.e. %windir%\System32\javaw.exe
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,123
    Blog Entries
    35

    Default Re: EDB validator

    Moved to correct thread.
    Last edited by Gigantus; December 27, 2010 at 10:42 AM.










  11. #11

    Default Re: EDB validator

    Same as wudang_clown.
    Using the latest 1.2.6. version on an Stainless Steel 6.4 edu and getting the same error for all fractions in recruit_pool lines. As soon as I change it to whole numbers, it works.

    Author of the ---== Knights Templar Mod ==---
    Creator of the ---== Lord Calidor's Weapon Pack 1 ==---
    Member of the ---== Dominion of the Sword ==--- and ---== C.B.U.R.P ==---

  12. #12
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Please attach the files read by the validator.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  13. #13

    Default Re: EDB validator

    There you go. From Stainless Steel 6.4 mod for Kingdoms.

    Author of the ---== Knights Templar Mod ==---
    Creator of the ---== Lord Calidor's Weapon Pack 1 ==---
    Member of the ---== Dominion of the Sword ==--- and ---== C.B.U.R.P ==---

  14. #14
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Couldn't open that zip with neither windows explorer, nor winrar.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  15. #15

    Default Re: EDB validator

    2nd try, with winrar:

    Author of the ---== Knights Templar Mod ==---
    Creator of the ---== Lord Calidor's Weapon Pack 1 ==---
    Member of the ---== Dominion of the Sword ==--- and ---== C.B.U.R.P ==---

  16. #16
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    nvm
    Last edited by HouseOfHam; September 13, 2011 at 02:00 PM.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  17. #17
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Well, I don't see any recruit_pool errors, but there are few other problems:

    - 11 places where there is a space missing before the closing curly brace. Strictly speaking, it would still work, but it's bad style, so I flag them as errors. For example, line 775:
    Code:
            recruit_pool "Chivalric Knights"  1   0.15   2  0  requires factions { spain, sicily,} and event_counter FULL_PLATE_ARMOR 1 and not event_counter first_watch 1
    - Error parsing line 1667: Missing event counter value.
    Code:
            recruit_pool "Imperial Guard"  1   0.67   2  0  requires factions { kwarezm, } and event_counter HALF_PLATE_ARMOR
    - Error parsing line 3271: Missing event counter value.
    Code:
            recruit_pool "Portuguese Arquebusiers"  1   1   5  1  requires factions { papal_states, sicily, } and event_counter first_watch 1 and not event_counter pike_and_shot
    - Error parsing line 8633: Found a definition for building level 'mercenary_barracks' that is not in the list of levels -- remove commas from that line
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  18. #18

    Default Re: EDB validator

    Hm, I don't get it. This is my Validator log:

    Code:
    Scanning files in D:\Gamez\Medieval II Total War\mods\SS6.3\data ...
    
    Reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\descr_sm_factions.txt
    Finished reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\descr_sm_factions.txt
    Reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\descr_cultures.txt
    Finished reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\descr_cultures.txt
    Reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\export_descr_unit.txt
    Finished reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\export_descr_unit.txt
    Reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\text\export_buildings.txt
    Finished reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\text\export_buildings.txt
    Reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\descr_religions.txt
    catholicorthodoxislampaganhereticFinished reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\descr_religions.txt
    MTW2 EDB syntax:
    Reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\export_descr_buildings.txt
    Finished reading D:\Gamez\Medieval II Total War\mods\SS6.3\data\export_descr_buildings.txt
    Parsing EDB...
    Hidden resources:
    hrs[0]=Constable
    hrs[1]=Iqta
    hrs[2]=Constantinople
    hrs[3]=Khassaki
    hrs[4]=river
    hrs[5]=silk_road
    hrs[6]=crusader
    hrs[7]=crusade
    hrs[8]=jihad
    hrs[9]=horde_target
    hrs[10]=no_pirates
    hrs[11]=no_brigands
    hrs[12]=wonder1
    hrs[13]=wonder2
    hrs[14]=wonder3
    hrs[15]=wonder4
    hrs[16]=wonder5
    hrs[17]=wonder6
    hrs[18]=wonder7
    hrs[19]=wonder8
    hrs[20]=venice
    hrs[21]=scotland
    hrs[22]=england
    hrs[23]=france
    hrs[24]=portugal
    hrs[25]=spain
    hrs[26]=aragon
    hrs[27]=moors
    hrs[28]=milan
    hrs[29]=papal_states
    hrs[30]=sicily
    hrs[31]=hre
    hrs[32]=norway
    hrs[33]=denmark
    hrs[34]=poland
    hrs[35]=russia
    hrs[36]=lithuania
    hrs[37]=cumans
    hrs[38]=kwarezm
    hrs[39]=turks
    hrs[40]=jerusalem
    hrs[41]=prussia
    hrs[42]=egypt
    hrs[43]=byzantium
    hrs[44]=hungary
    hrs[45]=kievan_rus
    hrs[46]=ireland
    hrs[47]=teutonic_knights_chapter_house
    hrs[48]=montesa_chapter_house
    hrs[49]=knights_of_santiago_chapter_house
    hrs[50]=templars_chapter_house
    hrs[51]=st_johns_chapter_house
    Error parsing line 81: Incomplete capability definition. Missing recruiting pool growth rate.
    checkEDB.ExportDescrBuilding.readAndParseMtw2EDB(ExportDescrBuilding.java:1514)
    checkEDB.ExportDescrBuilding.run(ExportDescrBuilding.java:74)
    
    
    Note: Only the first detected error is reported. Fix, then try validating again.
    Line 81 looks like this:
    Code:
            recruit_pool "Papal Guard"  1   0.25   2  0  requires factions { papal_states, }
    This is the 1st recruit_pool in EDB. If I change 0.25 to 1, 2 or other whole number, it works, although it reports the same error on the next recruit_pool line which also has fractions in it.

    Author of the ---== Knights Templar Mod ==---
    Creator of the ---== Lord Calidor's Weapon Pack 1 ==---
    Member of the ---== Dominion of the Sword ==--- and ---== C.B.U.R.P ==---

  19. #19
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: EDB validator

    Erm.. I've tried it both at home and it work and I can't replicate that error. Out of the several hundred people who have downloaded it, you two are the only ones who seem to be having this issue, so the question is, what's different about your system? What OS and version of Java do you have?
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  20. #20

    Default Re: EDB validator

    Also tried it @ home & work, both it's a no-go.
    Home is win7 x64, I'll look for Java ver. when I come from work.
    Work is XP Pro x86, Java ver 6 update 26 (build 1.6.0_26-b03)

    I'll try reinstalling Java.

    Author of the ---== Knights Templar Mod ==---
    Creator of the ---== Lord Calidor's Weapon Pack 1 ==---
    Member of the ---== Dominion of the Sword ==--- and ---== C.B.U.R.P ==---

Page 1 of 2 12 LastLast

Posting Permissions

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