Author Topic: CataModder - Tool for editing Cataclysm files (r30 - Recipes Bugfix)  (Read 43887 times)

Offline BMacZero

  • Wiki Contributor
  • Zombie Food
  • ****
  • Posts: 58
    • View Profile
    • Games by Brian MacIntosh
Hello fearless modders,

Over the last week or so I've been developing a tool that can hopefully make editing the game JSON files in bulk a more streamlined and easy process.  It's pretty simplistic right now, but I've gotten far enough that it can edit the properties of existing items and introduce new items to the game from start to finish, so I decided to share it.

I'd love all kinds of feedback at this point - bug reports and feature requests especially.

Here's the download.  Just keep in mind that this is a rough alpha and it's probably buggy.  It might mess up your game's data files, so you should back them up or edit a fresh copy of the game.
The current version is 0.1 r30.  That version is only compatible with stable release 0.8 (Romero).
http://www.brianmacintosh.com/projects/catamodder/CataclysmModder_r30.zip

Alpha5 was the last version that was compatible with Cataclysm 0.7 (Lindqvist):
http://www.brianmacintosh.com/projects/catamodder/CataclysmModder_alpha5.zip

You'll need the Microsoft .NET Framework 4.0 to run this version.
http://www.microsoft.com/en-us/download/details.aspx?id=17851

The project is up on Github, which is a great place to post bug reports and suggestions.
https://github.com/BrianMacIntosh/CataModder

Here, I have written a complete beginner's guide to using the program to add a new item to the game:
http://smf.cataclysmdda.com/index.php?topic=2666.msg56265#msg56265

Here's a picture!


Have fun,
Brian
« Last Edit: October 25, 2013, 08:28:20 AM by BMacZero »
I found a lab, but I had no luck in finding ID cards. So I took the first working car and filled it with gasoline. Then I named it "Science ID Card" and rammed into the lab's wall with it. Felt pretty good.

Offline deadmerits

  • Survivor
  • ***
  • Posts: 475
  • Silence is golding.
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #1 on: August 04, 2013, 05:43:06 AM »
Thank you, I can't wait to try this out. I wouldn't have been able to tell you a single object that needed to be in the game, but now I've got hundreds on my mind. I'll let you know how it works out, but I'm excited to see this kind of support.
All Hailz The C:DDA Dev Team.

Offline Zireael

  • Survivor
  • ***
  • Posts: 1973
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #2 on: August 04, 2013, 09:59:01 AM »
I am very excited. Grabbing this.

EDIT: Two requests: recipes.json and some way to mod mutations!

Offline Vronkio

  • NPC
  • **
  • Posts: 184
  • hi
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #3 on: August 04, 2013, 02:43:29 PM »
I apreciate your effort for this games community. Thanks.

Offline GlyphGryph

  • Administrator
  • Survivor
  • *****
  • Posts: 1488
  • Kreaaaaa
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #4 on: August 04, 2013, 03:15:28 PM »
Yes, very nice! The possibility of something like this being built was a big reason for the switch to JSON. Thanks a lot for the hard work!

Offline CIB

  • Contributor
  • Survivor
  • ****
  • Posts: 303
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #5 on: August 04, 2013, 06:15:26 PM »
Looks like a great tool. Too bad I can't test it.

Offline BMacZero

  • Wiki Contributor
  • Zombie Food
  • ****
  • Posts: 58
    • View Profile
    • Games by Brian MacIntosh
Re: CataModder - Tool for editing Cataclysm files
« Reply #6 on: August 05, 2013, 01:01:53 AM »
Great, that's good to hear!  Recipes are definitely the next thing coming up, though mutations haven't been pushed to JSON and might not be for a while because of how unique they are.

@CIB - Is it because you're on a mac?  Sadly, I don't have the time or tools to support macs for this.
I found a lab, but I had no luck in finding ID cards. So I took the first working car and filled it with gasoline. Then I named it "Science ID Card" and rammed into the lab's wall with it. Felt pretty good.

Offline Otaku

  • Survivor
  • ***
  • Posts: 544
  • People, how very interchangable.
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #7 on: August 05, 2013, 04:34:14 AM »
Looks great.

Hope it works. Have to wait till I get to my PC to test it. Also, you created it for Windows right? So have you tested on any Linux systems? If not I will test on Ubuntu later today (about 8-10 hours from now).
Avatar thanks to her.

Offline BMacZero

  • Wiki Contributor
  • Zombie Food
  • ****
  • Posts: 58
    • View Profile
    • Games by Brian MacIntosh
Re: CataModder - Tool for editing Cataclysm files
« Reply #8 on: August 05, 2013, 04:14:48 PM »
I haven't tested it on Linux, so that prompted me to do some research on Wine, and I discoved that Mono actually has a full implementation of Winforms, the main technology I used to create this.  So maybe Mac and Linux support isn't such a remote possibility
after all.

I have no idea if this version will run under Wine at the moment, so I'm interested in what you find.
I found a lab, but I had no luck in finding ID cards. So I took the first working car and filled it with gasoline. Then I named it "Science ID Card" and rammed into the lab's wall with it. Felt pretty good.

Offline Zireael

  • Survivor
  • ***
  • Posts: 1973
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #9 on: August 06, 2013, 07:51:37 AM »
Use winetricks to install the vb6 runtime(s), and then run CataModder from the command line using wine to determine what dlls you are missing.  Google those dlls and then either add them to wine yourself or add them via winetricks.

And seeing as cataclysm is open source, is CataModder open source too?

Yup it is, it's on GIT .

Offline FunsizeNinja123

  • Survivor
  • ***
  • Posts: 7569
  • Bleeding sand
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #10 on: August 06, 2013, 10:21:17 PM »
THIS IS AMAZING NOW I CAN ADD EVERYTHING I'VE EVER WANTED
But now I have to learn things. Like not putting leg block on guns.
:P
"Pretty, yep." John Candlebury, on herself.
"Dynamic NPCs turns this game into an ASCII DayZ." ~ChristopherWalken
"Ninjas are so tasty." ~Kevin Granade himself
"This ain't Terraria.  Your wings are not powered by the Soul of Flight." ~KA101
"Never has my snake been more solid..."

Offline stone94

  • NPC
  • **
  • Posts: 152
  • Life is far too overpowered
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #11 on: August 08, 2013, 12:57:54 AM »
When i try to use it (I can't load it up from desktop.) I keep getting errors when trying to create items, and loading up the .JSON files similar to this one. also it only loads up version 0.6 for me.

Code: [Select]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at CataclysmModder.Storage.LoadFile(String path)
   at CataclysmModder.Storage.LoadFiles(String path)
   at CataclysmModder.Form1.loadFiles(String path)
   at CataclysmModder.Form1.openRawsToolStripMenuItem_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: 4.0.0.0
    Win32 Version: 4.0.30319.1008 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CataclysmModder
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Perry/Desktop/Game%20Shortcuts/CDDA/0.7/CataclysmModder.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1002 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Web.Extensions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1008
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Web.Extensions/v4.0_4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll
----------------------------------------
System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1008 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1009 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.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.



and this one:
Code: [Select]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'System.String'.
   at CataclysmModder.WinformsUtil.SetChecks(Dictionary`2 itemValues, String key, CheckedListBox field, String id, Boolean mandatory, Boolean material)
   at CataclysmModder.WinformsUtil.ControlsLoadItem(Control control, Object item)
   at CataclysmModder.Storage.LoadItem(Int32 index)
   at CataclysmModder.Form1.entriesListBox_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ListBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ListBox.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: 4.0.0.0
    Win32 Version: 4.0.30319.1008 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CataclysmModder
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Perry/Desktop/Game%20Shortcuts/CDDA/0.7/CataclysmModder.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1002 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Web.Extensions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1008
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Web.Extensions/v4.0_4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll
----------------------------------------
System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1008 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1009 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1009 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.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.

also a save function would be helpful as a visual feel to show that the item has been created,
and an export to individual item would be nice, so we dont wreck our .Json's, and would make it easier for branching on GIT.
You can call me anything you like, just don't call me late for supper.

Offline BMacZero

  • Wiki Contributor
  • Zombie Food
  • ****
  • Posts: 58
    • View Profile
    • Games by Brian MacIntosh
Re: CataModder - Tool for editing Cataclysm files
« Reply #12 on: August 08, 2013, 05:33:25 AM »
I will check out those two things.  Your suggestions are also good ones, and you mirrored Zireael's complaint on Git that the way the program saves is very unfriendly to Git.  I should be able to fix all these things by the weekend, and if that comes together I'll put up a second build then.

After that I'll move on to recipes and maybe a port to Mono to make it cross-platform.
I found a lab, but I had no luck in finding ID cards. So I took the first working car and filled it with gasoline. Then I named it "Science ID Card" and rammed into the lab's wall with it. Felt pretty good.

Offline fishy1234555

  • NPC
  • **
  • Posts: 146
  • "If we don't succeed, we run the risk of failure."
    • View Profile
Re: CataModder - Tool for editing Cataclysm files
« Reply #13 on: August 08, 2013, 09:34:00 AM »
running on windows xp. doesnt open at all
Satan's second choice is root-beer.

Offline BMacZero

  • Wiki Contributor
  • Zombie Food
  • ****
  • Posts: 58
    • View Profile
    • Games by Brian MacIntosh
Re: CataModder - Tool for editing Cataclysm files
« Reply #14 on: August 08, 2013, 04:22:41 PM »
You probably don't have the Microsoft .NET framework.  I'll add a note to the first post and readme.
http://www.microsoft.com/en-us/download/details.aspx?id=17851

Hopefully the Mono version won't require anything like this.
I found a lab, but I had no luck in finding ID cards. So I took the first working car and filled it with gasoline. Then I named it "Science ID Card" and rammed into the lab's wall with it. Felt pretty good.