I have been trying to modify the recruitment costs and upkeep of a number of additional unit mods, specifically ToonTotalWar's - Continental, British, Hessian, Spanish, French and Indian Armies mods for American Revolution. A number of these mods will respond to alteration of upkeep and recruitment cost but a few do not. If I were to attempt to alter the upkeep cost of the British mod I would be unable to save my progress due to an apparent "Unhandled Exception". The error message reads as follows:
Unhandled exception has occured in your application. If you click continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Object cannot be cast from DBNull to other types"
Now as you might have realised I have little to no idea what the hell I am doing. ETW is the first game I have ever attempted to modify and I am woefully inept at doing so. So could someone be kind enough to explain exactly what is happening here? Is there anyway to resolve this issue? Should I be posting this in ToonTotalWar's thread instead?
I'm having a similar problem with editing unit cost/maintenance with the AUM mod. Tried your fix above and still received an error:
Spoiler Alert, click show to read:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
at System.Data.DataSet.FailedEnableConstraints()
at System.Data.DataSet.EnableConstraints()
at System.Data.DataSet.set_EnforceConstraints(Boolean value)
at System.Data.DataTable.EndLoadData()
at DBEditor.DBDataSet.readTable(DataTable table, BinaryReader reader)
at DBEditor.DBDataSet.ReadDB(DataTable table, Byte[] DBByteArray)
at DBEditor.DBEditorForm.readPackedDB(PackedFile file, DataTable table, Boolean initialize)
at DBEditor.DBEditorForm.DBTablesComboBox_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ToolStripComboBox.HandleSelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.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)
************** 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.
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.
Also, whenever I edit recruitment cost the changes aren't reflected in game upon starting a new campaign. I tried removing all mods and deleting my pref. and user files and still no change. I tried increasing campaign difficulty to VH and still, the values for recruitment cost aren't even close to my settings which makes me suspect that the recruitment costs aren't being validated, for whatever reason, although the unit upkeep costs are successfully modified.