Can you update the mod? The game was updated to Alpha 12 and now everyone can make 3x2 ships, but since the update is changing the same files you have also modified, we either use your mod to have more fleet cap OR we can make 3x2 ships
I've just figured out it's quite easy to do it yourself as thanks to the author we know the exact files we need to tweak.
What you need is to get a Java Bytecode editor. I used dirtyJOE ?(http://dirty-joe.com/). Then you do the same stuff with opening the jar as an archive, find the first file:GUI$SelectedElements$3.class Then look for "bipush 8" (who wonders what that means can check here: https://en.wikipedia.org/wiki/Java_bytecode_instruction_listings) and set the value you want (I used 12 so it goes as C in HEX):
And hit ENTER to save the value and don't forget to save the actual file.
The next step is to patch the second file: SectorMap.class The idea is the same: you look for "bipush 8" in the checkCreateShipState method of the class and change the value:
Then you swap the files as in the install guide and viola! I guess I don't forget anything else but it seems to be working fine:
Hi. I uploaded a new version of the mod based on game version 12.4 and increased ship points to 24. ...took a bit since I didn't find any time the last weeks. Cheers
Thank you SO much for walking me through the process! I updated the Alpha13 class files to "bipush 0A" and I'm now claiming a 2x2 derelict from my 2x3 ship. No need to wait on mod updates when it's explained so well. :-D
hello. i tried everything to mod the ship points but it does not change ingame the size. in both files i changed the bipush from 08 to 18 to get 24 points. but ingame no changes. am i wrong?
Hey all, just wanted to let you know that zCHIP's method of editing the files works flawlessly as of the current version Alpha 14. I'm no coder, or even that good with computers either, so if I can do it you can too.
Still working in Alpha 15 following zChip's steps and the Installation steps on the main page. Here is some clarification for those wanting to do this in the newer version. It took my some time to find the path of the specified files in the .jar file so here they are... 0. ***BACKUP spacehaven.jar*** by copying it to another folder just in case..... 1. Open spacehaven.jar with winrar/7zip 2. Copy \fi\bugbyte\spacehaven\gui\GUI$SelectedElements$3.class to desktop and edit the value a. Save the file back to the Desktop b. Copy it back into the jar file replacing the current one 3. Copy \fi\bugbyte\spacehaven\gui\popups\SectorMap.class to desktop and edit the value a. Save the file back to the Desktop b. Copy it back into the jar file replacing the current one
Thanks for the jar file but I've noticed when you jump to another cluster/system and want to move a ship to the 3x3 grid below the cluster map, that counter is not updated and goes into the negatives. I hope I explained it right.
Has anyone used this mod with alpha 15 yet? I've been trying, even followed zCHIP's method to edit the 2 new files and every time I try to add a new ship the game crashes and gives me the following error:
strange. My advice would be to double check that you picked the right directory holding your spacehaven.jar (maybe double check if you do not have another copy somewhere), revert to your original spacehaven.jar, start over again and try to follow the instructions exactly step by step - also veryfying that the files you drag and drop into WinRar do exist where you drop them in WinRar
Another idea that comes to mind is the "mod loader" that exists for space haven. I do not use it. So if you do, try it without it and let me know if that changes your situation
can anybody else confirm that the mod worked for them? ...just to go sure I did not mix up the files I uploaded with other changes I am running on my own machine
Yeah unfortunately this no longer works as of A13, meaning it won't work for the upcoming A14 either unless it gets updated. Attempting to add more ships after hitting the original max of 8 points crashes out the game. A shame, this would've been fun.
well yes, now I just looked and the modlauncher creates a copy with the original values instead of making a backup copy of the modified file.I will have to see how to modify the game without having to use the modlauncher.Without the launcher this works perfectly.
Hi. Is it possible that you use the "mod loader" for this game or how it is called? This behavior sounds very much like one a mod loader would do. Edit: as far as I know the game itself (the .exe) is not doing anything like this
well yes, now I just looked and the modlauncher creates a copy with the original values instead of making a backup copy of the modified file.I will have to see how to modify the game without having to use the modlauncher. edit: if it can be used with the modlauncher, if it has been played using it, first you have to press the Clear Quicklaunch file to delete the original backup, once this is done you have to launch it as you would normally do and the copy of security will make it from the modified file.
Am just guessing, but probably the mod launcher keeps a copy of the original jar file somewhere... maybe you can get both to work at the same time if you find a way to inject my files into that one instead of the normal spacehaven.jar Good luck! ...and please keep us updated if you find out how to get it to work. I am sure others out there are having similar issues.
If you look for this copy my advice is: don't look for a file with a specific name, instead search for a file that has the right size in and around the folders this mod launcher uses, try making a copy and changing the extension to .jar and opening it with WinRar.
40 comments
What you need is to get a Java Bytecode editor. I used dirtyJOE ?(http://dirty-joe.com/). Then you do the same stuff with opening the jar as an archive, find the first file:
GUI$SelectedElements$3.class
Then look for "bipush 8" (who wonders what that means can check here: https://en.wikipedia.org/wiki/Java_bytecode_instruction_listings) and set the value you want (I used 12 so it goes as C in HEX):And hit ENTER to save the value and don't forget to save the actual file.
The next step is to patch the second file:
SectorMap.class
The idea is the same: you look for "bipush 8" in the checkCreateShipState method of the class and change the value:Then you swap the files as in the install guide and viola! I guess I don't forget anything else but it seems to be working fine:
...took a bit since I didn't find any time the last weeks.
Cheers
Thanks a lot zCHIP
0. ***BACKUP spacehaven.jar*** by copying it to another folder just in case.....
1. Open spacehaven.jar with winrar/7zip
2. Copy \fi\bugbyte\spacehaven\gui\GUI$SelectedElements$3.class to desktop and edit the value
a. Save the file back to the Desktop
b. Copy it back into the jar file replacing the current one
3. Copy \fi\bugbyte\spacehaven\gui\popups\SectorMap.class to desktop and edit the value
a. Save the file back to the Desktop
b. Copy it back into the jar file replacing the current one
For your convenience:
**Don't trust ANYONE sharing random files... Yes even me... ALWAYS scan files with AV before opening for your safety**
Link: https://drive.google.com/file/d/19uV7RmiXv8gkg2icq9oPkG62MYgj9PUR/view?usp=sharing
MD5 Hash: 30CC12C94E5E48959298A13A9873BD61
...
Thread[Thread-1,5,main]
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: fi.bugbyte.spacehaven.gui.popups.SectorMap.<init>(ZZLfi/bugbyte/spacehaven/world/World;)V
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:117)
fi.bugbyte.spacehaven.MainClass$4.run(MainClass.java:455)
java.lang.Thread.run(Thread.java:748)
My advice would be to double check that you picked the right directory holding your spacehaven.jar (maybe double check if you do not have another copy somewhere), revert to your original spacehaven.jar, start over again and try to follow the instructions exactly step by step - also veryfying that the files you drag and drop into WinRar do exist where you drop them in WinRar
Another idea that comes to mind is the "mod loader" that exists for space haven. I do not use it. So if you do, try it without it and let me know if that changes your situation
Edit: as far as I know the game itself (the .exe) is not doing anything like this
edit: if it can be used with the modlauncher, if it has been played using it, first you have to press the Clear Quicklaunch file to delete the original backup, once this is done you have to launch it as you would normally do and the copy of security will make it from the modified file.
Good luck!
...and please keep us updated if you find out how to get it to work. I am sure others out there are having similar issues.