Sword of the Stars: The Pit

Sword of the Stars: The Pit

View Stats:
 This topic has been pinned, so it's probably important
Oliarco Jul 19, 2018 @ 4:43pm
MODDING GUIDE: Anyone Can Mod!
I made a thread time ago but nobody is been able to explain me how to mod the game so i took all my will and discovered it by myself :)

I don't like know "how to mod" when the info for mod this game on the internet are almost nothing so i'll share whit you the solution i found.

1) Download the tools for mod the game:
https://drive.google.com/open?id=1z8dUH0We-jnJdxuCN5AWNpFusEWb6Dkv

2) After you downloaded the rar decompress it in C:
It's important, you have actually to decompress it exaclty there. Or else it won't work.

3) Now copy in the folder "#XNB_The_Pit_Files" these 3 folders:
"data"
"data.core"
"dlc"
You'll find them in the game path:
C:\Program Files (x86)\Steam\steamapps\common\The Pit\Content

4) Double click "#Unpacker.bat".
You'll find the unpacked files in the "Unpacked_Files" folder.

5) Time to mod them whit the yuor favorite text edit program. It won't be easy, you have to open the files and search for what you want change blindly. Eventually i'm sure you'll find what you want change.
NOTE: use the FIND function, many text edit program have it and will help you a lot.

6) Time for repack the files. Double click "#Repacker.bat".
You'll find the repacked files in the "Repacked_Files" folder.

7) Now you have to copy the repacked file you changed back in the original path game:
C:\Program Files (x86)\Steam\steamapps\common\The Pit\Content

8) Start the game and check if you succefully modded the game :)



1st VIDEO) {LINK REMOVED}
Here a video i made for lead you step by step, just in case you need extra help :)



2nd VIDEO) {LINK REMOVED}
Here another video where i show you how to create a simple mod that change the movement of the striker to 2. It's just an example for show you something you can do. Of course you won't use this mod, will you? :)



Credits:
All credits for these tools go to MZ0125 Kerberos Forum User. I just modded them a bit for make them easier to use.

EDIT 05/07/2020
Here i provide you a link to all the changes i made to the game since i understood how to mod it. There are also mods of the .exe file but since i didn't explained how to mod it, just don't consider them for now.
The original idea was to release these changes as a standlone mod, but i'm still dissatisfied with my work, so for now i just release them here for better help you create your own mods.

All My Changes Link:
https://drive.google.com/file/d/1pgHlqRgi60e8ZDKlDAKbSQZtqqJ28nxX/view?usp=sharing
Last edited by Oliarco; Apr 22, 2021 @ 5:43pm
< >
Showing 1-15 of 25 comments
Nicholizard Jul 19, 2018 @ 9:02pm 
Nice job!
thank you
Oliarco Jun 23, 2020 @ 5:39pm 
I'm glad my guide helped you, besides if you tell me what you want to mod i may further help you.

I well know how this game can be a lot funnier when modded, so ask me freely :)
Last edited by Oliarco; Jul 5, 2020 @ 10:40am
KotoMaxibon Jul 5, 2020 @ 8:34am 
Omg i was looking for this for a long time. Thanks a lot!
Oliarco Jul 5, 2020 @ 10:41am 
You are welcome.
I added a link with my notes about all the changes i made to the game for better help you and all the folks who love modding :)

I add it here too just because:
https://drive.google.com/file/d/1pgHlqRgi60e8ZDKlDAKbSQZtqqJ28nxX/view?usp=sharing
Last edited by Oliarco; Jul 5, 2020 @ 11:27am
KotoMaxibon Jul 6, 2020 @ 7:04am 
I was trying to unpack files from the "Fan mod", but it doesent unpack at all. Any idea why?
Also, do you know how to mod the .exe file like the fan mod does? Seems like all the juicy stuff like psionics mechanics is in there and i want to modify some of that.
Oliarco Jul 7, 2020 @ 9:06am 
I Uploaded a video where i unpack The Pit FAN Mod, it should help you but if you happen to experience still problems, tell me.

VIDEO LINK:
https://drive.google.com/file/d/1EkLtoDBAEhmXfJf2Qv5QnrwC1GTJoH5w/view?usp=sharing

About modding the .exe file the matter is a bit more tricky.

Roughly 2 years ago i happened to have this conversation with... An user, who i thought a comrade Modder:

Oliarco
22/10/2018
If for you isn't an issue would you mind to explain me how you manipulate the .exe file in the ****** mod? because as far as i understand the only changes of the mod are for ThePit.exe whitout changing other files.
***************
24/10/2018 (2 Days later)
Hi @Oliarco I'm really sorry but Kerberos asked me not to explain how to mod the .exe
Oliarco
24/10/2018 (The same day)
Why would they do that? It doesn't make any sense. Since you know how to manipulate it what's could be wrong in sharing this knowledge?
Oliarco
21/11/2018 (28 Days later)
@*************** I need to put the word “end” to this thing. I waited yuor message for too much time… I even tried convince myself that i don’t needed yuor answer but i was merely lying. The question is the same, as before, how can i mod the .exe file of Sots: The Pit? Since i don’t want to be in any way a burden for me would be enough a video of you working on anything related to mod the .exe file (like an update of ****** for example) i may look it for 1, 10, 100... as many times as i need for understand the logic. I don’t want you to waste time explaining me how to do it since i’m sure you can spend yuor time better. If you preffer keep it a secret as kerberos asked you… So be it! I won’t judge you bad for this, actually i won’t judge you bad anyway. Since you may ignore the message because you are too busy or because you just don’t care i’ll need anyway a clear answer for… free myself from this situation basically, so i’ll presume a “No” as asnswer in case of no-answers for 7 days.
***************
22/11/2018 (1 day later)
Hey Oliarco, sorry I didn't mean to ignore you. I do intend to honor my word to Kerberos. However if you have any programming experience you should be able to figure out how to do it. The game is written in c# so you'll need ****** ****** *** * ********** to get the source code. It's because it involves accessing their source code which is their intellectual property that I can't share it with people without Kerberos' consent. That would be illegal and antagonize a company I really like. *********** are free if you google them though

This Statement:
"It's because it involves accessing their source code which is their intellectual property that I can't share it with people without Kerberos' consent. That would be illegal."

Makes me think i may have problems sharing publicly here how to mod the .exe file. Although I have not documented myself about the matter so it may be a ♥♥♥♥♥♥♥♥ (probably it is).

But as the saying goes: "Better safe than sorry". so for now i'll avoid to share how to mod the .exe file here for avoid an eventual retaliate from kerberos (Mecron in particular).

Anyway. If you or someone else will send me a friend request, i may accept it and then something after that may will happens... Who Knows :)

P. S.
The same "Illegal" thing may apply to unpacking the .XNB files too but since this discussion is still up. There are 2 possibilities:
1) Kerberos is tolerant (Mecron tolerant?)
2) The guide is fine.
Well... Draw your conclusions :)
Last edited by Oliarco; Jul 7, 2020 @ 9:08am
im curious on making and infinite system isntead of just 40 floors
Oliarco Jul 16, 2020 @ 2:53am 
There is already an infinite mode where new levels are generated forever until you die or get bored and leave.

So, what would be the difference between that and what you want to create exactly?
Last edited by Oliarco; Jul 16, 2020 @ 2:56am
VampireOfDeathMoon Jul 16, 2020 @ 10:18pm 
Originally posted by Oliarco:
There is already an infinite mode where new levels are generated forever until you die or get bored and leave.

So, what would be the difference between that and what you want to create exactly?
oh lol sorry i'm only just coming back to the game since about 2013 my ex gf's brother just got me the game 4 days ago as a surprise as i originally played the demo a lot in like 2012-2014 (and eventually forgot about this jewl until now) so i've still got a lot to learn i thought there was only 40 floors, my apoligies just ignore my noob question

edit: lets put it this way i'm so noob i only found out about the pit inifity 2 days ago so now i'm super exited for covid-19 to go away so that once i got a job again i can get myself it
Last edited by VampireOfDeathMoon; Jul 16, 2020 @ 10:22pm
Darth Nihilus Jun 27, 2023 @ 10:58am 
+1
小海豚 Jul 7, 2023 @ 8:10am 
Appreciate the guide, am actually having fun now that i get to use those weapons. Question though, some of them causes the game to crash on start if added to the character files, any idea how that happened?
Oliarco Jul 8, 2023 @ 8:37am 
Originally posted by 小海豚:
Appreciate the guide, am actually having fun now that i get to use those weapons.
So you are modding weapons. I’m happy that you are having fun with modding. :)

Originally posted by 小海豚:
Question though, some of them causes the game to crash on start if added to the character files, any idea how that happened?
Strange.
If you add “Equipment: [Item_ID]” to the starting items list of a character, it should work with any item (weapons included).

E.G.
Directory: C:\#SOTS_TP_Modding_Tools\Unpacked_Files\dlc\02_jnaut\data\d02.txt
Mercenary VANILLA Starting Items list
Equipment: weapon_warhammer_tarka Equipment: weapon_heavy_pistol Equipment: weapon_kakurdu_sal Equipment: item_hcal_rounds(80) Equipment: item_f_rounds(200) Equipment: armor_impact Equipment: item_bypass_circuit(5) Equipment: item_lockpick_set(2) Equipment: item_tarka_warbread(5) Equipment: item_lobstercake(3) Equipment: item_stonecrab(3) Equipment: item_breaching_charge(5) Equipment: item_digital_assistant Equipment: item_ballistic_repair_kit Equipment: item_digital_interpreter Equipment: item_hiver_multitool Equipment: item_damper_patch(3) Equipment: weapon_grenade(5) Equipment: weapon_emp_grenade(5) Equipment: item_tarkan_field_surgery Equipment: item_antibiotics(5)
Mercenary MODDED Starting Items list
Equipment: item_ez_cooker Equipment: weapon_warhammer_tarka Equipment: weapon_heavy_pistol Equipment: weapon_kakurdu_sal Equipment: item_hcal_rounds(80) Equipment: item_f_rounds(200) Equipment: armor_impact Equipment: item_bypass_circuit(5) Equipment: item_lockpick_set(2) Equipment: item_tarka_warbread(5) Equipment: item_lobstercake(3) Equipment: item_stonecrab(3) Equipment: item_breaching_charge(5) Equipment: item_digital_assistant Equipment: item_ballistic_repair_kit Equipment: item_digital_interpreter Equipment: item_hiver_multitool Equipment: item_damper_patch(3) Equipment: weapon_grenade(5) Equipment: weapon_emp_grenade(5) Equipment: item_tarkan_field_surgery Equipment: item_antibiotics(5)
Did you perhaps use the “Display Name” instead of the “Item ID”? (it would be “EZ Cooker” in our example)

Feel free to provide me with more information so that i can eventually better help you.
小海豚 Jul 8, 2023 @ 7:46pm 
Appreciate the quick reply too, and yea the modding really brings new life into this game. RNG is not something i would prefer personally.

On the subject, i'm confident that the ID and naming is correct as i've Ctrl-C/Ctrl-V'ed them from their respective lists. Considering the process worked for other weapons i've added i'm certain i copied the correct field too.

But i've since discovered that adding said weapon to another character works perfectly. So the current solution is to do gunrunning with them to the next blue locker and continue from there.

For context, i tried to add the Heavy Machine Gun to Striker, the game CTD'ed seconds after start. but when i added it to the Scout, it was perfectly fine. perhaps it has something to do with the weapon's race origin? I've not tested this with every weapon, but most weapon with Morrigi origins works fine while the Human ones doesn't.

Maybe i could try the reverse, adding Crow guns to the original three and see what happens.
Oliarco Jul 9, 2023 @ 8:25am 
Originally posted by 小海豚:
Appreciate the quick reply too, and yea the modding really brings new life into this game. RNG is not something i would prefer personally.

On the subject, i'm confident that the ID and naming is correct as i've Ctrl-C/Ctrl-V'ed them from their respective lists. Considering the process worked for other weapons i've added i'm certain i copied the correct field too.

But i've since discovered that adding said weapon to another character works perfectly. So the current solution is to do gunrunning with them to the next blue locker and continue from there.

For context, i tried to add the Heavy Machine Gun to Striker, the game CTD'ed seconds after start. but when i added it to the Scout, it was perfectly fine. perhaps it has something to do with the weapon's race origin? I've not tested this with every weapon, but most weapon with Morrigi origins works fine while the Human ones doesn't.

Maybe i could try the reverse, adding Crow guns to the original three and see what happens.
Thanks to your information I've managed to replicate the crash event.

This is the crash report:
Version: 1.6.2 S ThePit.InvalidContentException: Character 'morrigi_striker': InnateWeapon 'weapon_machinegun_heavy' has race penalty. at ThePit.CharacterClass.CheckRacePenalty(IItemClass itemClass) at ThePit.CharacterClass..ctor(ContentManager content, CharacterClassDescription desc) at ThePit.Data.InitializeCore(ContentManager content) at ThePit.Data.Initialize(ContentManager content) at ThePit.Game1.LoadContentNow() at ThePit.Game1.Update(GameTime gameTime) at Microsoft.Xna.Framework.Game.Tick() at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e) at Microsoft.Xna.Framework.GameHost.OnIdle() at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame() at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e) at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Microsoft.Xna.Framework.WindowsGameHost.Run() at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun) at Microsoft.Xna.Framework.Game.Run() at ThePit.Program.MainCore() at ThePit.Program.Main(String[] args)
I’ve no idea why the crash talks about the ‘weapon_machinegun_heavy’ (Heavy Machine Gun) in the terms of an “InnateWeapon” since i added it as “Equipment: weapon_machinegun_heavy” and not as “InnateWeapon: weapon_machinegun_heavy”. Nonetheless, the part immediately afterwards seems to state that the problem has to do with the weapon having a race penalty.

So i think that your guess about the crash having something to do with the weapon's race origin is correct.

A trick i found to “solve” your issue was to mod the “race” of the problematic weapon to “none”
Weapon { Name: weapon_machinegun_heavy DisplayName: Heavy Machine Gun SpeechSotsDex: dex_vo_item_wep_hvymachgun Description: A usually tripod mounted heavy machine that can only be fired effectively on the move by a being in powered armor. Race: None Skill: skill_heavy_weapon WeaponType: Ballistic InventorySize: Medium MuzzleSensorRangeAdj: +2 RequiresWeaponMount: true Health: 100 ShortRange: 2(10) MediumRange: 12(35) LongRange: 17(25) Penetration: 90 Damage: 10-15 AttacksPerMoment: 2 ShotsPerAttack: 5 ShotCapacity: 80 AttackMode: shoot,burst UserAnimationName: shoot_rifle ReloadWith: item_hcal_rounds(1) ReloadTime: 4 Modules: 6 MinStats: M(80) MuzzleSound: wep_gun_hvmach_fr ReloadSoundPerMoment: wep_gun_rifle_rl ReloadSoundEnd: wep_gun_rifle_rl_nd NoAmmoSound:fx_notify_outofammo Icon: heavy_machine_gun_icon InventoryIcon: heavy_machine_gun_inventory_icon EntityIcon:heavy_machine_gun_entity_icon SpriteLibrary: items\weapon_sprites.csv UserAnimationName: shoot_rifle Animation { Name: bullet FrameName: pistol_bullet IsDirectional: false } }
This should let you start the game and add any weapon you want to the starting items of any character without crashing. However, it has the drawback of changing the balance of these weapons, which may or may not be what you want.
< >
Showing 1-15 of 25 comments
Per page: 1530 50