I'm working on this tool that makes it easier to visually browse, edit, and create tuning xml files.
It process all TDESC e XML tuning files to show all elements in a structured tree, cross-referencing tuning and tdesc elements, display descriptions and possible values for tunables, etc ... It think it makes a lot easier to create xml tuning mods.
Finally, it can generate a XML based on the edited fields.

It's at an early development stage, should have some bugs, and I mostly did it to myself for fun, but it is usable right now. If people become interested, I can work a little more on it.

*Ä… As it proccess and indexes hundreds of xml files, expect it to use a fair amount of memory
*Ë› Make sure to load ALL tdesc and xml tuning files to get cross-referencing properly working
*Ë› Sorry my broken english

Thanks

Also, bug report: I had two exceptions:
* One was when trying to expand "Interaction" in the TDesc tree.
* Another was when trying to click on "tests" in the bed_TryForBaby interaction in the instances.
I've attached the stacktraces in a zip.

Also, bug report: I had two exceptions:
* One was when trying to expand "Interaction" in the TDesc tree.
* Another was when trying to click on "tests" in the bed_TryForBaby interaction in the instances.
I've attached the stacktraces in a zip.

Thanks for the feedback.
I messed and broke Fragment (TdescFrag) resolution in the last build.
It's fixed in the version 0.2

That looks like it will be very useful =). I realise I need to read up on, um, modules .. and fragments .. and all those words though =P

Meanwhile, some small suggestions for the UI:

- The "Settings" window can't be X-ed out which I found a bit irritating (shouldn't that work like Cancel under Windows?)
- Would be great if the "Possible Values" list would be sort-able, or if the current value would be highlighted or had a tooltip or something (so that one can see what it is in the vanilla tuning I mean)

Other:

- In the XML tree I cannot open the nodes for situations.service_npcs and situations.bouncer.bouncer_request with no indication as to why

The "Settings" window can't be X-ed out which I found a bit irritating (shouldn't that work like Cancel under Windows?)

Sorry but ... what to X-ed means ?

Quote:

Originally Posted by plasticbox

Would be great if the "Possible Values" list would be sort-able, or if the current value would be highlighted or had a tooltip or something (so that one can see what it is in the vanilla tuning I mean)

Under the value field, you can see a label "Ref:" that displays the current value description reference (the same you see in Knwon Possible Values)

Quote:

Originally Posted by plasticbox

- In the XML tree I cannot open the nodes for situations.service_npcs and situations.bouncer.bouncer_request with no indication as to why

If you can't open the node, it simply means that there is no data under it according to the loaded file. Try selecting the node and clicking "Original XML" to see why.

Quote:

Originally Posted by plasticbox

- The tdesc tree looks borked at one point (see screenshot)

That's because the tool read a tag in some xml file that is not recognized yet (like this Deleted tag, that I couldn't figure out what means )

I meant closing the window by clicking on the X in the upper right corner -- see screenshot!

Quote:

Originally Posted by morgade

If you can't open the node, it simply means that there is no data under it according to the loaded file. Try selecting the node and clicking "Original XML" to see why.

That gives me a Null Pointer exception. See second screenshot!

java.lang.reflect.UndeclaredThrowableException
at org.morgade.s4tt.ui.GenericAction.actionPerformed(GenericAction.java:204)
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.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.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at org.morgade.s4tt.App$1.dispatchEvent(App.java:37)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
Caused by: java.io.IOException: Failed to edit C:\Documents and Settings\User\Desktop\ts4\xml\tun\S4_date_and_time_03B33DDF_00000000_6B89E13D5EC198F5.xml. Error message: A device attached to the system is not functioning.

at sun.awt.windows.WDesktopPeer.ShellExecute(Unknown Source)
at sun.awt.windows.WDesktopPeer.edit(Unknown Source)
at java.awt.Desktop.edit(Unknown Source)
at org.morgade.s4tt.ui.TuningEditorPanel.originalXML(TuningEditorPanel.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.morgade.s4tt.ui.GenericAction.actionPerformed(GenericAction.java:196)
... 38 more

That's because the tool read a tag in some xml file that is not recognized yet (like this Deleted tag, that I couldn't figure out what means )

The deleted tag means that there used to be a tuning value with that name that has later been removed from the game. This probably will be more relevant in the future as they make changes to the game with expansions and such. All the current ones where before the game launch and therefore is not relevant to any of us now.

Sorry, that was a colloquialism =)
That gives me a Null Pointer exception. See second screenshot!

java.lang.reflect.UndeclaredThrowableException
Caused by: java.io.IOException: Failed to edit C:\Documents and Settings\User\Desktop\ts4\xml\tun\S4_date_and_time_03B33DDF_00000000_6B89E13D5EC198F5.xml. Error message: A device attached to the system is not functioning.

The exception was thrown because the tool tried to launch the system default XML editor to open the file and couldn't find one configured or had some failure launching it.
I should handle this error more gracefully.

Installing the Tuning Tool. I'm a noob, what is this Tdesc file I need to point the tool too? I clicked on the link in the window where one points the application to the tdesc files and it opens The Sims forum page. Searched on there and Bing and all that comes up is peeps talking about tdesc files but nothing about how to generate or download them from Maxis.

Have used the Extracting tool and have all these XML files in different folders in special place. These are remade after a patch and backed up.

Edit: Found it. Okay it's in that old modding package I downloaded over a month ago from SimGuruModSquad. The tuning descriptions are contained in the download called "TS4_Custom_Content_Guide".
These don't have to be updated after a patch? interesting.

download the Custom Content Guide the files your looking for are in a .zip file in that download under Tuning Descriptions. Then unzip that archive and walla the .tdesc files your looking for.

Yes I have them. Thank you so much.

One humble suggestion. I'm presently looking at an "Affordance" with a value of 26145. I don't know what that does or what it is checking for. I see the long list of possible values which is just excellent so one may change the value for a mod.
Is there a button or a way to tell the application to go immediately to this value in the list so a person may read the description?
If there isn't that would be a nice spot to the left of "Copy Value" something like "Find Present Value" maybe? Or am I missing something which is very possible. I don't have the best eyesight.

One humble suggestion. I'm presently looking at an "Affordance" with a value of 26145. I don't know what that does or what it is checking for. I see the long list of possible values which is just excellent so one may change the value for a mod.
Is there a button or a way to tell the application to go immediately to this value in the list so a person may read the description?
If there isn't that would be a nice spot to the left of "Copy Value" something like "Find Present Value" maybe? Or am I missing something which is very possible. I don't have the best eyesight.

Hi, thanks morgade for this tool, it really makes tuning mods easier! I'm getting this exception when trying to add a TunableEnum to the ages TunableList under the Trait instance:

Code:

java.lang.reflect.UndeclaredThrowableException
at org.morgade.s4tt.ui.GenericAction.actionPerformed(GenericAction.java:204)
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.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.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at org.morgade.s4tt.App$1.dispatchEvent(App.java:37)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
Caused by: java.lang.IllegalStateException: node does not allow children
at javax.swing.tree.DefaultMutableTreeNode.insert(Unknown Source)
at javax.swing.tree.DefaultTreeModel.insertNodeInto(Unknown Source)
at org.morgade.s4tt.ui.TuningEditorPanel.addChild(TuningEditorPanel.java:216)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.morgade.s4tt.ui.GenericAction.actionPerformed(GenericAction.java:196)
... 38 more

This makes me unable to add the enums for each age without editing the XML after I have exported it. Am I doing something wrong or is this a bug?

Thanks in advance

EDIT: It seems I am getting the same thing trying to add a TunableTuple to a TunableList - perhaps this is a bug with all TunableLists?

EDIT 2: Yes, this seems to be the case. I cannot add any tunables to a TunableList without getting this exception.

EDIT 3: More info: It looks like the Enum is getting added to the XML as when I press generate XML it shows up there with a value of "none", however it doesn't show in the tree, making me unable to edit it. Also, I CAN add to TunableLists on existing instances, I am only getting this exception when I am editing a custom instance.

I'm trying to figure out how to make my own tuning files, and this tool seems very helpful. There are a lot of tutorials, I know, but I'm still figuring out the order of things LOL! But thanks so much for this!