Space Haven

Space Haven

197 ratings
How to edit savegame (Crew skills/Crew Perks/Cargo)
By ⛧ $P00KY DA $CARY ⛧
In this guide we will go over step-by-step on how to edit your savegame to either balance the game or plain out cheat!
5
4
3
7
3
4
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello there! So you've come here either because you are tired of character skill system, your ship is completely drained of crucial resources, you have seen it all and want to fool around, you want to cheat and last but not least, you're bored.

I personally created this for people like me, that are fed up with their characters never being able to level-up their skills. So, f. ex. if a botanist lvl 3 dies and you only have a botanist lvl 1, well too bad. Your crew will starve to death, unless RNJesus provides you with a suitable crewmember.

But whatever your needs and wishes, I hope i can help you here! :)

[NEW] Save editor!
A handy save editor created by @nuttyCream is now avalable, for simpler faster and safer editing!

Just make shure to remember to back up those saves, just in case!

https://github.com/nuttycream/SH-Save-Editor
Prerequisites for editing
There are many different programs to use to edit and XML file that is the format of our savegames in Space Haven. We can use the simple but messy Notepad.exe that comes with all Windows distros, or we might use my favourite, Notepad++!

Notepad++ is able to destinguish rows, columns and in some other formats able to highlight classes, to make editing a whole lot cleaner, safer and easier. (Link to download below)

But BY FAR the most favourite function is that you can list-search the whole document for your querries, as so:





Either use your favourite program or download Notepad++[notepad-plus-plus.org].
Preparing our savegame for editing
Savegame is found in your steam library, Space Haven game folder.

In depth on how to prepare and find the right savegame.

  1. First you want to right-click on "Space Haven" in your Steam Library, and click on "Properties".
    Once you have the window below should open up.
    Now click on "Local Files" tab, and then click on "Browse Local files".



  2. Now you should arrive here. The root folder of Space Haven. Open up the "savegames" folder.



  3. And we have arrived to the mess that is our savegames. To choose the right one, we have some alternatives.

    1. Go into the game, and manually save our game (either to an existing save (New Haven-1 etc.) or create a new, manual save (RECOMENDED METHOD)).

    2. Look for the most recently edited Folder and then savegame file. (Risky if you don't know what you're doing.)

  4. So, now I have created a new, manual save in New Haven-1. Now we navigate to the folder (Note the time of last logged edit of the folder).



  5. And we look for the MANUAL SAVE folder, since the last save that occured was a manual one. It is called: save.



  6. FINALLY! We are here! The save file we are looking for is the "game" file! (The file I drew over will not be in this folder by default.)

BEFORE EDITING! Backing up savegame
Backing up your savegame:
  1. Ctrl-C or right click on the game file, and click copy. (In Norwegian "Kopier")



  2. Ctrl-V or right click on an empty space in the folder, and click paste. (In Norwegian "Lim Inn")



  3. This will create a "game - copy" file. Now rename the file by double-slow clicking on the name, and name it: game.old. (This will be our backup, incase something goes wrong)



  4. Make shure the name is saved as: "game.old".



  5. PROFIT! Now we have a complete backup incase we edit something that we should not! If you did f*** up, jump to "HELP ME! My save is broken!" section.

Editing Ethics! (Introduction)
Some guidelines to follow whenever you open the game file.
  1. Beware where you click, and push buttons, as one letter is enough to brake the savegame or create glitches.

  2. Never edit a class/section you are not shure of, as this might either outright break your save or create artifacts as you play (could be glitches, empty systems, enemy ships not present etc.). To prevent this read the whole class from the top down, to understand what you are editing. The class ALLWAYS starts and ends as so: <*classname*></*classname*> and these are allways in the same row.

  3. Editing a class, in which you do not understand the purpose and function of, can break the save. BUT! you have to experiment to find new things to do, as i will not write every single edit you can do. What you can to do, is after editing everything you are shure of, test the save, make shure it's all good, and just make a new game file backup. (F.ex.) "game.old.experiment1". This way you can roll back the file to a previous stable edit, if somethig goes awry.
    Experimenting is the heart of all knowledge! :)

    Example:

    Start of the "c" class wich is the "charecter" class. Note the start is in row 4.



    End of the "charecter" class. And the class also ends in row 4.

Credits, money, cash, etc.
To Edit your Credits search for playerBank s="Player" ca="XXXX" (XXXX is the Number of Credits you have) - @FAIL! Chapi's comment which I just simply YOINKED.
Editing skills of our crew
  1. The first step is to double-click on the game file (NOT the game.old) and choosing the program you wish to use. I will be using Notepad++. (MAKE SHURE YOU HAVE MADE A BACKUP BEFOREHAND!)
  2. Now we want to open up the search function. To do so, either Ctrl-F or find "search" tab from the top left menu, and click on "Find..."



  3. As we wish to edit crew skills, we simply search for "skills"! Make shure to click on "Find all in current document". (Or skill as i apparently did in the immage here xD)



  4. Now we have a list of all the search has found in the file. So we see <skills> and </skills>. So we click on the first entry <skills>, and it will take us to the skills of one of our crewmembers.



  5. To check which crewmember we are editing, scroll up until you see <c cid=... in row 4, and look for name=...



  6. Now we can edit Mr. Rashid's skills. We can either give him 3 in all or reffering to the Skill-ID list below define exactly which skill we wish to edit.
    *Remember that we are only interested in editing the marked row.
    **Skill lvl's go from 0-3 (even though the "max" stated is 10, seems like it will be a learning system in the future).



    Now Mister Rashid is superhuman, master of all.
Skill-ID List


sk="1"
Piloting
sk="2"
Mining
sk="3"
Botany
sk="4"
Construct/Maintenance
sk="5"
Industry
sk="6"
Medical
sk="7"
Gunner
sk="8"
Shielding
sk="9"
Operations
sk="10"
Weapons
sk="12"
Logistics
sk="13"
???
sk="14"
Navigation
sk="16"
Research
Editing the attributes (Perks) of our crew.
Check the "Editing the Skills of our crew" to understand how to search!
  1. Search for attr

  2. Each <attr> followed by an </attr> in the search result is one of your crew-members attribute list. Ignore the rest.

  3. Input your desired values.
    *Reffer to the Attribute-ID list (Perks) below to understand what each perk ID means.
    **Perks go from 0-6
    ***To check which crewmember you are editing reffer to: "Editing the Skills of our crew"
Attribute-ID List (Perks)


id="210"
Bravery
id="214"
Preception
id="213"
Intelligence
id="212"
Zest
Editing traits of the crew
HUGE shutout to @PlutonicWave and his guide, which detailed this process.
Also shutout to @Frission for verifying, and bringing the trait system to my attention!



Now to edit the traits, all you have to do is look for this string, under the character you want to edit ("<c" class). It is right after the attribute string ending ("</attr>").

Now we only want to edit the number, to one of the numbers from the Traits list below, in this guide.


<traits>
<t id="####"/>
<t id="1046"/> <--- Edit the number inside the quotations.
<t id="####"/>
</traits>


*Characters can have multiple traits. (Watch out for conflicting traits! Refer to the Space Heaven WIKI[spacehaven.fandom.com] if in doubt!)
Trait-ID List
HUGE shoutout to @PlutonicWave and his guide which the list was yoinked from!

Iron Stomach
1533
Spacefarer
1045
Confident
1046
Hard Working
1041
Antisocial
1037
Nyctophilia
1534
Wimp
655
Clumsy
656
Charming
1048
Bloodlust
1036
Fast Learner
1039
Minimalist
1535
Lazy
1040
Neurotic
1047
Alien Lover
2082
Needy
1038
Peace-loving
1043
Suicidal
1034
Smart
1035
Psychopath
1042
Hero
191
Talkative
1560
Iron-Willed
1044
Gourmand
1562
Character gender and skin colour
Thanks to researcher @Saadiya for finding both of these out!

Gender

In the <c cid> section, just after the character name, edit bs="f" and bh="f" to your chosen gender. "f" for female and "m" for male, obviously. The charecter keeps their current clothing set.

Skin colour

Change "skinSet" number under the charecter class, to one of the following:

White
737
Dark
742
Asian
744
Charecter past occupation + ID's
Big thanks to @lawrencepearsall! Yoinked from his comment here.

Simply edit the bsid="####" under the "c" class for a charecter to one of the desired values below.

1763
Police
1764
Nurse
1765
Doctor
1766
Sales
1767
Cook
1766
Sales
1768
Material Mover
1769
Engineer
1770
Security Guard
1771
Construction Laborer
1772
Sheriff
1773
Lawyer
1774
Medical Assistant
1775
Bartender
1776
Teacher
1777
Computer Programmer
1778
Welder
1779
Firefighter
1780
Telemarketer
1781
Lab Tech
1782
Chemical Engineer
1783
Airline Pilot
1784
Fighter Pilot
1785
Driller
1786
Mining Tech
1787
Geologist
1788
Farmer
1789
Scientist
1790
Blacksmith
1791
Navigator
1792
Florist
Editing Charecter's current conditions/afflictions
Big thanks to @SiteSeer, who discovered this! Yoinked from his comment here.

Look for a <conditions> header under the "<c>" class for each charecter, and simply remove/add these conditions, as you desire.

1053
Hungry
1127
Lonely
1569
Uncomfortable environment
1570
Comfortable
1586
Terrified
2080
Aliens haunt my dreams
2083
Stockholm syndrome
Ship inventory editing
To yoink what @Fail! Chapi has commented here (because I'm extremely lazy):

To edit your Large Storage or any other Storage you have to Search for something what looks like this:

<inv>
<s elementaryId="1932" inStorage="3" onTheWayIn="0" onTheWayOut="0"/>
<s elementaryId="1886" inStorage="9" onTheWayIn="0" onTheWayOut="0"/>
<s elementaryId="1921" inStorage="3" onTheWayIn="0"
</inv>

You can Edit or add Items.
Item ID's
All credit goes to @Doh for this one! A very well organized and crafted list :D Thank you!

https://docs.google.com/spreadsheets/d/1juNSg7yXAVCMRyCG_TLQnjT6yfi2y_jTg7XpV8rSG5A/edit#gid=516401207

For some reason, Steam hates Google Docs and detects it as a malicious site. If for any reason you feel unsure about the link above and below, feel free to look arround in the web for these ID's or in the comments of this guide.

This means, that to open a Google Docs link, you have to manually copy and paste the link into your browser. -.-



OLD LIST
Huge thanks to @Atzu for putting most if not all ID's in to a convinient and sorted list below! All credit goes to this magnificent person.

https://docs.google.com/spreadsheets/d/1uWCom43dMxGbF2AiVJkIdWGkhDwyXjwWr5uzAs6fSlA/edit?usp=sharing
Using Cheat Engine™ for inventory hax
I have not yet been able to determine the class and formating for the ship inventory, so i would recomend using cheat engine as so:
  1. Start the game and load your save
  2. Start cheat engine, select Space Haven from the app-list.
  3. Use 4-byte value (preselected), and input the ammount of the item you wish to edit from a Storage of your choice. (NOTE! Not total!)
  4. Now click on "First Scan"
  5. Go back into the game and tell your crew to empty the resource you scanned for from the Storage of your choice's "Rules" menu.
  6. Pause the game after a few recources have been emptied. (2-6 prefferably)
  7. Input the new value from the storage you are editing, and click on "Next Scan" in cheat engine.
  8. Continue the two previous steps until only 1 adress remains in the list with the exact same value as is in your Storage container.
  9. Double click on the remaining adress.
  10. Double click on the value from the list below
  11. Edit to whatever you wish for
  12. Profit!
Gunnz! System point editing. [Advanced]
Yoinked from @SiteSeer's comment, because I'm fat and lazy. All credit goes to this brilliant person!

This edit, can get a bit tricky for unexperienced haxxxers.

I would recomend to view some tutorials on decompression tools, if you are completely new to this type of editing. Sorry for being too lazy to make some picture-guide style here... Maybe when I come back to this game one day.

*ALLWAYS make backups for any files you edit!*

1) go into your space haven root directory and find 'spacehaven.jar', open with your favorite decompression program.
2) navigate to '\library' directory and find the file 'haven'
3) extract 'haven' and open with your favorite text editor
4) search and replace 4 instances of <systemPoints="2"> into <systemPoints="0">, there are only 4 instances in the entire file
5) save and exit 'haven' and add it back (overwrite) into 'spacehaven.jar' in the correct directory ('\library') with your compression program.
6) go and build that battle ship

I did add a GIF from my favourite space-series ever! The Battlestar Galactica, for your viewing pleasure tho *smile*.
HELP ME! My save is broken!
I really hope you've made the backup, if not reffer to: "Save broke, no backup" section.
  1. Rename the broken "game" to "game.broke" or delete it.

  2. Rename the backup "game.old" to "game"

  3. BACKUP the BACKUP! Repeat the backing-up procedure before editing again from the Savegame Backup section of this guide.
Save broke, no backup

  1. Purchase the prayer-enhancement helmet.

  2. Pray to your preffered religion.

  3. Profit? No? If not, reffer to previous step.
THE WALL OF FAME
  • Honey Badger™ - For finding out what Skill 13 was for.

  • FAIL! Chapi - For the ground-breaking comment about inventory and credit editing.

  • ac19189 - For posting a slew of Item-ID's.

  • SiteSeer - For figguring out how to edit system points for more guns and informing me of a few mistakes I made! Also for figguring out the editing procedures for Conditions/Afflictions of our charecters.

  • Atzu - For adding and organizing ItemID's into a convinient and beautiful table on Docs.

  • Saadiya - For finding out how to edit gender and skin colour!

  • PlutonicWave - For his Steam guide on the trait system, which was integrated into this guide.

  • Frission - For verifying, and bringing the trait system editing to my attention.

  • Pork! - Enligtening me on a wrong Trait-ID.

  • nuttyCream - Creating a save editor to help everyone with editing!

  • lawrencepearsall - For finding out how to edit a charecters past occupation.

  • Doh - For crafting a beautiful, extensive and updated Item ID list. Integrated this instead of the old list from @Atzu or the atrocious one I had on this guide...

    *Ordered by date suggestion was posted*
Suggestions
Please comment your suggestions below, so far I will be partially updating this guide. But I have moved on from this game for the time being, so it might take a while. Check the comments below for some fantastic suggestions people are posting!

All implemented suggestions will be credited on the WALL OF FAME! Yes. I had to break out the Caps Lock for this one.
108 Comments
hurricane 15 Sep @ 7:35pm 
@DandreV You could just copy and paste an existing crew member in the save game file and edit it to whatever you want. Compare settings of prisoners, refugees, and crew members to see what works. Let me know if it works out for your. good luck
DandreV 9 Sep @ 7:31pm 
@Romulus

Is there a way to save edit to make the prisoners crewmembers too? The removal of the PRF line for me just gave them the ability to wander around the ship. Do we have to edit the side--> oside for those too?
Airmanadi 27 Jul @ 7:55am 
What happens if you add the lname line from the NPC code to the player character code?
Would it show the last name like the NPC or break the save?
hurricane 8 Jul @ 8:33pm 
@infra-dan-accelerator unit 84725 Go into the haven file in the spacehaven.jar file, extract it and search for systempoints. you can edit that and play with it to max out to a 9x9 ship.
how do i edit Max Ship points (Fleet Size)
Romulus 21 Nov, 2023 @ 11:03pm 
I thought you guys would be interested in what I just managed to cook up today: what I believe is a complete condition ID to name list. 170 conditions, taken from the core data files inside the SH JAR. This involved doing a lookup between the 'haven' file, where all conditions are defined, and the 'texts' file, where all the language data is.

Have fun

https://romulusnr.htmlbin.net/spacehavenconditions.html
Romulus 21 Nov, 2023 @ 7:01am 
ugh, i literally just figured out how to hack a refugee character to be a crew member.

there's a few doodads you should do like edit their "side" and "oside" and also their faction color patterns. but none of those change the status of refugee-- you can end up editing into a Player faction refugee!

But the important bit is look in the <ai> tag and find an attribute "prf=". Remove the attribute. (Seems like prf=32 is refugee, prf=2 is prisoner, prf=16 not sure... seems to be bitmap value, there's probably one for slave as well.)

To get the character as a crew member just remove the prf="xx" whatever from the line, and bam.
Drezta 12 Nov, 2023 @ 2:17pm 
if the arbitrary limit to the number of system cores bugs you then the property name in "Spacehaven.jar"/haven is coreCanvasPoints.
The lack of symmetry annoyed me.
EurakaLi 25 Jun, 2023 @ 10:39am 
@Sanctuary
As Romulus point out it is possible,

I did move my save version from old save to new save( I cannot find the key to ignore version warning when loading save)

make sure you change the ship name to something very easy to find.

you could move all the crew with you too,I think only the money is store else where I cannot find.

for shuttle ,they are at bottom of the save.

I strongly recommend you finish the save2 game,and start a new game+ with it,the save file will much smaller you can find everything you need with less error.
BluSaber 21 Jun, 2023 @ 6:05pm 
How can you edit your relationship with you crewmate?

It's because my crewmembers are always at each other's throats, even when their overall mood is higher than 90.