[TOOL] (Alpha 6) Save Editor v0.9.6.7 - Updated 8/22

Started by Neurotoxin, August 11, 2014, 09:54:08 PM

Previous topic - Next topic

Do you use the update checker?

Yes
44 (60.3%)
No
15 (20.5%)
I tick it to check then untick it - I prefer manual update checks
14 (19.2%)

Total Members Voted: 73

Neurotoxin

#60
That makes me wonder if they STAY a villager, let me go find out.

Edit: They do. Apparently Colonists spawned by that incident have a villager kindDef, next update I'll add a check for that as well. Thank you for the reports.

Kiba1177

Hey there.  Clicking anything on the mod actually seemed to give me an issue, just messing around to see if I could figure it out I got this

QuoteLast login: Wed Aug 20 18:16:20 on console
Robins-MacBook-Pro:~ RTT$ mono Users/RTT/Downloads/Rimworld/RimWorldSaveEditor.exe
Cannot open assembly 'Users/RTT/Downloads/Rimworld/RimWorldSaveEditor.exe': No such file or directory.
Robins-MacBook-Pro:~ RTT$ Users/RTT/Downloads/Rimworld/RimWorldSaveEditor.exe
-bash: Users/RTT/Downloads/Rimworld/RimWorldSaveEditor.exe: No such file or directory
Robins-MacBook-Pro:~ RTT$ /Users/RTT
mono-bash: /Users/RTT: is a directory
Robins-MacBook-Pro:~ RTT$ mono /Users/RTT/Downloads/Rimworld/RimWorldSaveEditor.exe
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldSaveEditor.Form1.GetSelectedPawn () [0x00000] in <filename unknown>:0
  at RimWorldSaveEditor.Form1.button1_Click_1 (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0
Robins-MacBook-Pro:~ RTT$

I'm doing the latest release.  Not sure what could be going wrong.  Not very tech savvy.

Neurotoxin

#62
@Kiba, I'm going to guess you hadn't loaded a save file at that point? It crashed because it needed to have a pawn selected but since there wasn't a pawn TO select... I forgot to disable those controls. If you HAD loaded a save then there's a big problem but if not, then just don't click anything other than load until you've loaded something haha. I realize there's several issues with the prerelease at this point So I'll bump getting a fix out up on my list and then worry about the Refactor. I don't know if I'll be able to get to it tonight for certain but I'll do my best.

As for your original problem, I'm thinking Mac might not want to play nice with bundled resources when you're loading your save. I'll attach a copy of the current build with the resources externalized in a moment and let me know if you can actually load a save.

[attachment deleted by admin: too old]

Kiba1177

Really appreciate the fast reply!  You're awesome for helping me out, sorry about this.  The second problem makes sense, I didn't know if it was related or not, sorry!  Redownloaded the new file you attached, got another problem, not sure if it's the same.  Same thing as the first time, went to load my most recent save, and immediate crash.

QuoteRobins-MacBook-Pro:~ RTT$ mono /Users/RTT/Downloads/Rimworldd/RimWorldSaveEditor.exe
System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorldSaveEditor.Form1.RefreshBackstories () [0x00000] in <filename unknown>:0
  at RimWorldSaveEditor.Form1.colonistListBox_SelectedIndexChanged (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ListBox.OnSelectedIndexChanged (System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ListBox+SelectedIndexCollection.Add (Int32 index) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ListBox.set_SelectedIndex (Int32 value) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ListBox.OnDataSourceChanged (System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ListControl.set_DataSource (System.Object value) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ListControl:set_DataSource (object)
  at RimWorldSaveEditor.Form1.openFileButton_Click (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0
Robins-MacBook-Pro:~ RTT$

Again, appreciate the help! 

Neurotoxin

#64
hmm yeah, stacktrace is the same. So, it wasn't packed resources. I think I MIGHT know what's maybe causing that. Gotta love my positivity there. I think what's happening is the index of the colonist selection box is changing when it loads, on my system that doesn't cause a problem, but on yours it seems it's trying to access data before it's actually there. I'm not sure how to fix this but maybe I'll get it during the refactor, actually it wouldn't surprise me since I plan on Making absolutely sure data gets loaded before you even have an option of loading a save, to guarantee that its there.


Oh and no need to apologize, it's a bug in my code somewhere, I'd rather be ahem.. bugged.. about it then let it slip through the cracks. Now that I got the other bits sorted out I can hopefully crack down on that bug IF compiling against the mono Libraries didn't fix it.

Neurotoxin



I've squished the trait bug. Working on fixing the trait list not populating right away now, and I'm 99% sure I've fixed the Zmobie mod related bug along the way. There will be a fix out tonight!


MonkeyWithAWrench

Now, I know this isn't super helpful at the moment but I made a little addition myself. I wanted to just start with something small to play around with the code a bit, so I created a "splash screen" of sorts.

It's a new first tab that will display first when the program starts, with a big logo image on it. My main idea with it is that once a save is loaded, the logo will disappear and be replaced by a summary of various information from the save file. Things like planet name, maybe the grid location, colony name, number of colonists, etc., etc.

This isn't too helpful right now, but since the plan is to expand this with more and more features, it might be helpful to have a spot to print summary information down the line.

I also put together a logo for it with a name I came up with. I felt it did a good job representing the Rim-whatevs feeling, so I ran with it. If you don't like the name then we don't have to use it for the project, no biggie.

Anyway, there should be a pull request pending so please take a look.

Neurotoxin

#68
Alright I'll take a look shortly, I actually just got a set up with a working Mono profile for VS to hopefully try and resolve potential cross-compatibility issues. If you want information on this, this was the most clearly written solution I found http://nbevans.wordpress.com/2013/02/13/targeting-mono-in-visual-studio-2012/

Re: Summary info you mean like a debug output or just like a status text? Either one is easily doable, as a matter fact I occasionally slap a extra list box on and print debug info to it when I'm hunting. But you can also use Debug.Assert(condition, "message") and it will popup anytime the condition is false, if it's a debug output you're looking for.

Also, I merged your commit and pushed a couple updates of my own if you want to pull the changes.

Neurotoxin

#69
Update to v0.9.6.6 - Should fix Trait NRE's and comboboxes not being populated right away
Compiled against mono framework to hopefully fix cross-compatibility

edit: should also work with Mods that change the class and/or kindDef of Pawns (e.g Zombie apocalypse)

MoparGamer

#70
Saw the update and decided to play around with it, so far I've found that the "Remove Selected" button removes the trait but not it's listing from the "Perks" text box, it does allow the listing to be replaced by a new trait though.

Ex. I remove Psychically sensitive, It's listing stays in the text box but when I add any other trait it replaces the Psychically sensitive listing.

Everything else checks out, I haven't tested the random joining villagers yet but yeah..

Edit: It also seems to think that every colonist of mine was a "Abandoned child" at childhood & Adulthood, I checked the save file and none of them were.


Neurotoxin

#71
Quote from: MoparGamer on August 22, 2014, 09:06:36 AM
Saw the update and decided to play around with it, so far I've found that the "Remove Selected" button removes the trait but not it's listing from the "Perks" text box, it does allow the listing to be replaced by a new trait though.

Ex. I remove Psychically sensitive, It's listing stays in the text box but when I add any other trait it replaces the Psychically sensitive listing.

Everything else checks out, I haven't tested the random joining villagers yet but yeah..

Ok, when I was cleaning up I must have missed a refresh call to the box. I was so focused making sure ADDING working I forgot to check that I didn't mess up removing. Once again, thanks for the report. I'll throw a fix up for that shortly.

Edit: Update to fix trait box not refreshing on removal out <- ignore that I don't know how it got there. Also fixed an unreported bug with the thought adder.

MoparGamer

#72
More bad news :)
With version 0.9.6.7

Been having a number of odd issues today, I think they're all related to the refreshing stuff you mentioned.
The first issue is editing multiple colonist priorities (minor/major/none) of skills, It seems that it's resetting to its original values after switching to a different colonist and then back, It appears to still save them as set by the user though. (The data is set, but original values are displayed)

The second issue I mentioned in the edit of my last post,
QuoteEdit: It also seems to think that every colonist of mine was a "Abandoned child" at childhood & Adulthood, I checked the save file and none of them were.
There's also a small edition to this; When either backstory is set it stays to that backstory in the selection box regardless if you edit/select a colonist with a different backstory.



And a small feature request... Healing injuries/limbs
I've been doing a bit of manual save editing while playing with your editor, mainly with the <healthTracker> section, I've managed to fix broken limbs and such while doing this and was wondering if you could make a quicker version of what I've been doing.

What I do:
Open save file, locate colonist with a search for either their name or "kinddef>C"
Scroll down to find <healthTracker>
Replace contents from <healthTracker> to </healthTracker> with the following (A clean bill of health):

<healthTracker>
<pawnHealth>100</pawnHealth>
<bodyModel>
<injuries />
<nonlocalInjuries />
<missingParts />
<maxPainLevelMultiplier>1</maxPainLevelMultiplier>
</bodyModel>
</healthTracker>

Neurotoxin

#73
Hmm, jeez, fix one thing, break another right?

Let me address this in reverse:
Health - I've been intending to add this for a while but I want to get the editor a clean bill of health first, at the point it's at, and do some internal changes. I suppose I could stick a "Heal this colonist" button in there somewhere, but I was looking to have a bit more detail to it though that would make a good temporary measure.

backstory, I actually think I know what's causing that, and it's because I changed the way the box displays data. Rather than adding each *possible* entry to the list I switched to a data binding, which gives me more flexibility but I didn't account for the fact that I'd have to change how that data gets refreshed for display, and the same thing goes for the passions/ I'll work on it tonight, and THOROUGHLY test it myself before putting it out there this time. I usually do (e.g. previous - non prerelease releases)  but the last 2, I've been rushed getting the fixes out as I've been a bit busy but didn't want to leave you guys hanging.

I appreciate your patience with this and all the good bug reports. Btw, try seaching for Controller>. You'll always get a Colonist, and you'll be about one block up from the healthTracker. It's important to have the closing brace there though. It's how I'm searching for Colonists now to solve the class/kindDef issue when modding a modded save.

Edit: well now that's strange. Got the Passions working as expected, working on the backstory (adulthood, childhood) and.. I've managed to make it select them at random. I'm one step closer. Edit 2: Apparently BindingLists don't like when their Combobox is sorted. Got that fixed up.

MoparGamer

#74
Just a heads up, I won't be able to bug test for the weekend.

Also, thanks for the hard work, It's been awesome seeing fixes roll out within a couple hours of posting.