InitTool Build 11 Progress

Progress reports and musings from the developers on the current gaming tools.

Moderators: dorpond, trevor, Azhrei

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

InitTool Build 11 Progress

Post by jay »

Build 11 is almost ready. There are 2 big changes to this build. The first is the new add combatant dialog. It allows new combatants to be entered in a table format instead of the current parsed text field. It allows the custom properties to be typed in along with the rest of the data. It allows everything but the icons to be added right in the table. It turns out that this is the exact same data stored for combatants in a group, so the group editor will now work this way. I will be interested to here how you like editing the combatants this way.

The second change is the addition a lookup file for combatants. This can be done from the new add combatants dialog and the group editor. The combatants are saved in an XML file. The file contains a set of named data values for each combatant. Init Tool will match the data fields in the file with the custom properties defined for your encounters. When a combatant is chosen, all of the combatant and custom properties are set from the data in the file. That allows the data to be tailored to any game.

This first release will have some limitations; no icons in the xml file, no xml file editor, the data has to be described expicitly, only one xml file can be loaded at a time, and no sorting or filtering. I hope to fix these in later releases. I've created a sample xml file for D&D monsters which I created with Andargor's SRD 3.5 Database. You can get the sample xml file here: D&D SRD Monsters. Take a look and see if I am missing anything in it. It has 2 parts, the first part describes the data and the second part contains all of the monsters. I'll get more details out on the file structure eventually, if you have any questions post them here or send me a personal message.

I'll try to get this build out in the next couple of days.
Last edited by jay on Mon Jan 01, 2007 4:13 pm, edited 1 time in total.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

The new add combatant dialog sounds like a good idea. Looking forward to seeing it in practice.

Gonna have to hunt down a critter list for DQ that can be massaged into the correct format for combatants lookup file. That will be really handy to have in IT.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

I'm digging the new combatant entry method. Much more efficient.

Under Edit Settings, Custom Property Names needs Up/Down buttons like the Phases area. For people like me who always want to change the order after I put them all in.

Can't figure out how to use the that sample xml file. I go into Edit Settings and click on the "..." button. Select that sample xml file and get an Exception. Of course since that didn't work the Lookup buttons also generate Exceptions. Am I missing a step?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Phergus wrote:Under Edit Settings, Custom Property Names needs Up/Down buttons like the Phases area. For people like me who always want to change the order after I put them all in.
Currently the properties are not ordered. I will add a tracker for this.
Phergus wrote:Can't figure out how to use the that sample xml file. I go into Edit Settings and click on the "..." button. Select that sample xml file and get an Exception. Of course since that didn't work the Lookup buttons also generate Exceptions. Am I missing a step?
That sounds right. Could you post the exception or send it in a pm? Thanks for the debug help.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Here is the exception. This happens after I select the xml file and then click on Save to close the Edit Settings dialog.

Is it because I have Custom Properties that don't match what is in the file? (Goes to check...)

java.lang.NullPointerException
at net.rptools.inittool.ui.SettingsDialog.setItem(SettingsDialog.java:508)
at net.rptools.inittool.ui.SettingsDialog.actionPerformed(SettingsDialog.java:289)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at net.rptools.inittool.ui.InitToolActions$32.actionPerformed(InitToolActions.java:807)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at de.muntjak.tinylookandfeel.TinyMenuItemUI.doClick(TinyMenuItemUI.java:569)
at de.muntjak.tinylookandfeel.TinyMenuItemUI$MouseInputHandler.mouseReleased(TinyMenuItemUI.java:421)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Annoying Bug/Feature:

The only way out of Edit Settings is via Save or Cancel. Save overwrites your current settings file without giving you the option to rename it. Cancel of course cancels the changes.

It should allow you to change settings and only apply them to the current session or prompt before overwriting your existing settings file.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Phergus wrote:Annoying Bug/Feature:

The only way out of Edit Settings is via Save or Cancel. Save overwrites your current settings file without giving you the option to rename it. Cancel of course cancels the changes.

It should allow you to change settings and only apply them to the current session or prompt before overwriting your existing settings file.
I'm in the process of updating how the settings are saved. Currently they are all saved in the preferences, which limits them to one set. In build 12 the games specific properties will be saved in XML files and you can have as many as needed. The idea is to build one of these files per game and then post them someplace as a start for new users.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Phergus wrote:Here is the exception. This happens after I select the xml file and then click on Save to close the Edit Settings dialog.

Is it because I have Custom Properties that don't match what is in the file? (Goes to check...)
That shouldn't matter. It only loads a property value from the file if it has the same name as a custom property. All the other values are ignored.

Looking at the exception, it is a bug in my validation code. I forgot to check something. :roll: Which really sucks, since everybody is going to have this problem. I'm in the process of re-writing all of that right now, so I can't even fix it. I can tell you how to fix the problem by editing some java preferences by hand, but that ain't very pretty. Are you using windows or linux?

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

Using Windows. I ain't afraid of no stinking java preferences. :)

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

jay wrote:That shouldn't matter. It only loads a property value from the file if it has the same name as a custom property. All the other values are ignored.
Is it case sensitive? If the Custom Property is PS will that match:
<property display="PS" name="ps">Physical Strength</property>

I notice the lookup file requester appears to have a filter for "RPTools Data Files" as it doesn't show the .xml files what is it looking for?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Phergus wrote:Using Windows. I ain't afraid of no stinking java preferences. :)
You asked for it :twisted:

On windows you have to use regedit. Just go to Start->Run, type in regedit and click ok. Regedit has an exlporer like interface. Go to the folder named 'HKEY_CURRENT_USER\Software\JavaSoft\Prefs\RPTools\InitTool\component\InitToolFrame'. This path should already exist for the other saved init tool preferences. Right click this folder to get the popup menu and then select New->String Value. Type in the name 'combatant/Lookup/File', and yes you need the stupid slashes. Right click the new value and select Modify. In the dialog that pops up enter the text '/C:///Documents and /Settings' with all of the slashes in it (I hate windows). Restart init tool, select File->Edit Settings and then choose your data file in the Combatant Lookup field.

Sorry about making you go through this crap :oops:

Edit: Fixed the procedure above
Last edited by jay on Thu Jan 18, 2007 12:48 am, edited 1 time in total.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

No big deal dealing with registry entries. Have plenty of experience with it.

Unfortunately know I have a different error when trying to use the Lookup function.

java.lang.IllegalArgumentException: There is no table named 'CREATURES'
at net.rptools.inittool.db.PropertyTable.<init>(PropertyTable.java:269)
at net.rptools.inittool.ui.AddCombatantDialog.actionPerformed(AddCombatantDialog.java:217)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

Is the example XML you posted up to date?

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Phergus wrote:Unfortunately know I have a different error when trying to use the Lookup function.

java.lang.IllegalArgumentException: There is no table named 'CREATURES'
The creatures are loaded into an internal database, to make sure I didn't do it a bunch of times, I store what I think is the right file name in the preferences. Since you added the file name directly to the preferences it thinks the file is already loaded. I didn't create a way to reload the tables if the underlaying file changes. I'll add that in the new game settings. I think the easiest way to fix it from the state you are in is to rename the file you want to load and then go to the edit settings panel and enter the name of your new file. I'll also go and edit my instructions above. I should have told you to enter an invalid file name in the registry. I'm really sorry for all of this hassel. I've got the codebase all torn up or I'd issue a patch build.
Phergus wrote:Is the example XML you posted up to date?
I checked my file, and I was able to load it into the init tool available on webstart. You will get a dialog if the file structure is invalid.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Post by Phergus »

jay wrote:I'll also go and edit my instructions above. I should have told you to enter an invalid file name in the registry.
Well that's a horse of a different color.
jay wrote:I'm really sorry for all of this hassel. I've got the codebase all torn up or I'd issue a patch build.
No worries. The joys of development.

And after all of that it works like a champ.

Way cool.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Post by jay »

Phergus wrote:Is it case sensitive? If the Custom Property is PS will that match:
<property display="PS" name="ps">Physical Strength</property>
It is case senstivie. The value in the name attribute of the property element must match the name of a custom property entered in the File->Edit Settings dialog.
Phergus wrote:I notice the lookup file requester appears to have a filter for "RPTools Data Files" as it doesn't show the .xml files what is it looking for?
I'm changing all of the data files in init tool to XML. I was afraid that if I didn't give the names different file extensions, it would be a pain to figure out if a file was an encounter, group, settings or data file by just looking at it. For build 11 I've made the file extension .rptd. But I need to talk with the other developers before I can finalize that.

Post Reply

Return to “Developer Notes”