i am having a problem editing the unit statistics ... they are not bold so they are read only? why is that?
i am having a problem editing the unit statistics ... they are not bold so they are read only? why is that?
Does anyone know how to convert a xml file to xsd file?
Got an update file that shows all the columns for unit stats land tables but can't get it to work with dbe 1.85 but i can with PFM 2.15
Today i am getting this....
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: not a pack file
Parameter name: filepath
at Common.PackFile.Open(String filepath)
at Common.PackFile..ctor(String filepath)
at DBEditor.PackLoadingDialog.fillModListView()
at DBEditor.PackLoadingDialog.removeDirectoryButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
DBEditor
Assembly Version: 1.8.0.0
Win32 Version: 1.8
CodeBase: file:///C:/Users//Downloads/DBEditor%201.8.5/DBEditor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5462 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Common
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users//Downloads/DBEditor%201.8.5/Common.DLL
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
xmav34qv
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
please someone help me. my db editor always crashes. i downloaded .net framework 4 and still crashes.
object cannot be cast to DBNull.
This is my .net error message.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.InvalidCastException: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value)
at DBEditor.DBDataSet.writeTable(DataTable table, BinaryWriter writer, Int32 version)
at DBEditor.DBDataSet.WriteDB(DataTable table, Int32 version)
at DBEditor.DBEditorForm.saveFileTable(DataTable fileTable)
at DBEditor.DBEditorForm.saveCurrentDataTable()
at DBEditor.DBEditorForm.saveToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
DBEditor
Assembly Version: 1.8.0.0
Win32 Version: 1.8
CodeBase: file:///C:/Users/Nicholas.INH-HP/Desktop/Modding/Nicolas/Desktop/DBEditor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5462 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Common
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Nicholas.INH-HP/Desktop/Modding/Nicolas/Desktop/Common.DLL
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
wj5n3omw
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Allow me to present DBEditor 1.9. A rather sorely need update to an exceptional program, including several critical updates, as well as a schema update (from PietroMicca), some cosmetic changes, and one new feature.
This may require .Net Framework 4.0, which can be found at http://www.microsoft.com/en-us/downl....aspx?id=17851.
Full Changelog:
I'm sure that last one has you scratching your heads, so here is a quick rundown (I intend to give my Tutorial an update to go in depth on the feature, it is mine after all!).Code:DBEditor 1.9 -Added Patch4.pack and Patch5.pack to Official CA Pack List for automatic loading. -Included PietroMicca's updated DB.xsd schema from DBEditor 1.8.5. -Modified Table loading order to read the patch files properly. -Introduced Double Buffering to eliminate visible repainting on scrolling. -Increased Font size in Tables view to make Read Only (Light Grey) tables more visible. -Added what Pack File each table comes from in the Table List. -Made Table List ComboBox resize itself according to window size and length of table names to avoid incomplete table names with increased font size. -Pack Files in Load Order List of PackLoadingDialog will now bold when their directory is chosen, like in the pack file list. -Added Apply Expression Items to Edit Menu and Right-Click Column Context Menu for mass transformation of numeric cells based on a mathematical expression.
If you right click a Column header or visit the Edit Menu with several numeric cells (integer or floating point) you can select the Apply Expression item. The one in the Column header right click menu applies to the entire column, the Edit menu version to selected cells (can be a combination of int and float) either from clicking, shift-clicking, or ctrl-clicking. It will bring up a little popup that has "x = " and a blank field, you can either type in a number to set all affected values to 1 number (setting upkeep costs in unit_table to 0 enmasse for instance) or input something like "x * 2" to multiply all affected values by 2. Basic operators are of course: + (add), - (subtract), * (multiply), / (divide), parenthesis work as well for precedence, and integer values will automatically round if a divide results in a decimal for an integer field.
I also have a question for you guys, would there be any interest in a version of the DBEditor for Napoleon TW and/or Shogun 2 TW? If so, I can start working on it.
Last edited by Jinarik; August 04, 2012 at 01:05 AM.
fantastic jinarik
are you able to create a version for napoleon?
anyway we should definitively update Empire tables
I will work to update schema
Thanks! I've already started resurrecting the tool and overhauling its directory recognition to enable use for both Napoleon and Shogun 2, will need to make sure the xsd schema works for both. Napoleon will be up first since I haven't picked up all the DLC for Shogun 2 yet.
Jinarik.........Good work........i can see that you have filled in all the columns headings.
Have started to do it for the schema.xml for pack file manager 2.15. http://www.twcenter.net/forums/showt...494248&page=29
Is there a simple way, i hope, to convert your db.xsd to schema.xml?
In projectiles_tables you have 1 column less then the old db1.85 and PFM 2.15....keeping can_bounce column and bounce_angle column gone....is this correct ?.....
unit stats naval experience bonuses table
<table name='unit_stats_naval_experience_bonuses_tables'> <field name='Experience_Level' type='string' /> <field name='melee_attack_bonus' type='int' version_start='1' /> <field name='melee_defense_bonus' type='int' /> <field name='core_gunner_loading_skill' type='int' /> <field name='core_gunner_marksmanship' type='int' /> <field name='morale' type='int' /> <field name='mp_fixed_cost' type='int' /> <field name='mp_experience_cost_multiplier' type='float' /> </table>
some columns above to fill in what you have missed
Main.pack experience level column is wrong....you can see when you open it in db....reads the whole column as 1 when it should be 0, 1, 2, 3 to 9 for each row from top to bottom
All the XSD work is thanks to PietroMicca.
Back when I was helping Lt. Chambers with the program I was mostly involved with bug fixes, GUI updates, and new features, the underlying data architecture was never really something I had to get involved with until now. But looking at your schema.xml and DB.xsd side by side there is a definite syntax similarity, enough that i could potentially create a utility to transform one to the other, or just rewrite the program for the schema.xml, though the XSD has the advantage of including Key columns and required fields within itself.
First I need to get the program to even look for both Napoleon and Shogun 2, but that is fairly simple, have already almost finished. Once that's done I'll look into the schema to make sure all data is loading properly, then with an updated schema I can update the reading of data for the expanded pack files of NTW and S2.
Edit:
Just gave the tables a quick look, PietroMicca's just updated XSD fixes the unit_stats_naval_experience table.
Last edited by Jinarik; August 04, 2012 at 04:50 PM.
Last version....or latest version
campaign map playable areas tables
unknown is onscreen_name
units stats land tables
can fire while hiding is sniper
men is unit size
man entity is infantry battle entity
That's all...checked dbe out and all worked smoothly......about time too.
an example of raw data for units stats land provided by CA
so men is menCode:<key>12_lber_howitzer</key> <unit_class>artillery_foot</unit_class> <men>24</men> <horse>0</horse> <guns>4</guns> <officer>euro_officer2</officer> <soldier_model>euro_foot_artillery</soldier_model> <man_entity>infantry_euro_medium</man_entity> <man_animations_table>rider_sabre</man_animations_table> <equipment_theme>x_euro_sword</equipment_theme> <armour>2</armour> <armour_audio>leather</armour_audio> <man_health>1</man_health> <mount_entity>horse_medium</mount_entity> <mount_animations_table>mount_horse</mount_animations_table> <mount_model>horse_artillery</mount_model> <mount_armour>0</mount_armour> <mount_health>0</mount_health> <articulated_entity>gun_train_2_horse</articulated_entity> <ammo_caisson_entity>ammo_caisson_small</ammo_caisson_entity> <ammo_caisson_model>limber_model</ammo_caisson_model> <siege_gun>0</siege_gun> <artillery_model>Howitzer_howitzer_12lb</artillery_model> <gun_type>howitzer_12_pounder</gun_type> <core_marksmanship>45</core_marksmanship> <core_loading_skill>25</core_loading_skill> <primary_missile_attack>0</primary_missile_attack> <firing_mechanism>matchlock</firing_mechanism> <ammo>30</ammo> <skeleton_missile>cannon_crew</skeleton_missile> <melee_weapon_type>sword</melee_weapon_type> <melee_attack>6</melee_attack> <charge_bonus>6</charge_bonus> <melee_bonus_vs_cavalry>0</melee_bonus_vs_cavalry> <melee_defence>2</melee_defence> <shield_bonus>0</shield_bonus> <skeleton_melee>one_handed</skeleton_melee> <grenades>0</grenades> <pistols>0</pistols> <skirmish>0</skirmish> <unit_drill_set>drill_set_artillery</unit_drill_set> <unit_training_level>trained</unit_training_level> <morale>3</morale> <rank_depth>1</rank_depth> <close_formation_spacing_horizontal>8</close_formation_spacing_horizontal> <close_formation_spacing_vertical>12</close_formation_spacing_vertical> <loose_formation_spacing_horizontal>16</loose_formation_spacing_horizontal> <loose_formation_spacing_vertical>16</loose_formation_spacing_vertical> <dismounted_formation_spacing_horizontal>1.5</dismounted_formation_spacing_horizontal> <dismounted_formation_spacing_vertical>3</dismounted_formation_spacing_vertical> <base_density>7</base_density> <tropics_effect>-5</tropics_effect> <desert_effect>-5</desert_effect> <snow_effect>-4</snow_effect> <guard_mode>0</guard_mode> <can_dismount>0</can_dismount> <can_place_stakes>0</can_place_stakes> <cannot_run>1</cannot_run> <can_rally>0</can_rally> <hide_medium_woodland>1</hide_medium_woodland> <hide_scrub>0</hide_scrub> <hide_long_grass>0</hide_long_grass> <hide_buildings>0</hide_buildings> <can_stalk>0</can_stalk> <can_snipe>0</can_snipe> <does_fire_mounted_by_default>0</does_fire_mounted_by_default> <tree_spot_distance>50</tree_spot_distance> <scrub_spot_distance>75</scrub_spot_distance> <long_grass_spot_distance>100</long_grass_spot_distance> <campmap_stealth>0</campmap_stealth> <campmap_policing_bonus>0</campmap_policing_bonus> <disciplined>0</disciplined> <impetuous>0</impetuous> <scares_horses>0</scares_horses> <scares_enemies>0</scares_enemies> <inspire>0</inspire> <fatigue_resistant>0</fatigue_resistant> <siege_ladders>0</siege_ladders> <heat_resistance>0</heat_resistance> <cold_resistance>0</cold_resistance> <can_do_formed_attack>0</can_do_formed_attack> <pike_wall>0</pike_wall> <pike_square>0</pike_square> <can_fire_mounted_whilst_moving>0</can_fire_mounted_whilst_moving>
can hide while firing is can hide while firing
man entity is man entity
there's a problem with campaign map playable areas tables, unknown can't be onscreen name
anyway yes
my latest version
I've got the raw raw data by CA too.....but in some tables they were outdated.......not 100% reliable.
Units sounds better than men....after all some women did fight to defend their homeland.......cavalry are both men and horses....it's up to you.
unknown can't be onscreen name
According to CA it comes after sea trade....but the data suppose to be east indies, america, europe , etc....for some reason db and pfm shows a boolean column....why?..i don't know
Alright, so I've just finished a version of DBEditor that will recognize and load the pack files of Napoleon and Shogun 2. The tables won't populate since the db.xsd doesn't have the expanded fields from those games, but an updated version of it that includes all the new fields should be all that's keeping it from being completely compatible with Napoleon. Shogun 2 on the other hand messes with the pack file header information, so that is going to require some more work.
A quick side by side glance at the raw data from CA and the current xsd suggests that quite a bit of information is flat out missing or out of order, yet is still being displayed in DBEditor correctly (technologies table for example). Will dive into this aspect tomorrow, hopefully I can get it working for Napoleon fairly soon.
Jinarik
Look into this schema file.....it does have the extra lines for shogun and napo (i think) using 'version start' and has nothing to do with ETW.
schema.zip
PietroMicca
I inputted false instead of true in that unknown column....the game CTD at the loading stage....the column could be 'playable area - warning do not change any values'.....a warning be good to stop others from having CTDs
PietroMicca, you might want to hold off on updating the XSD for now, I've just finished a utility for converting Coolgit's schema.xml into XSD format, and it's starting to look like merging the data might be a little more hit and miss than I thought. I'm just about to try the ported XSD with DBEditor, will report back with how it goes.
Last edited by Jinarik; August 05, 2012 at 09:45 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)