[1.3] [KV] Weapon Storage [ModSync RW]

Started by Kiame, September 05, 2017, 05:46:47 PM

Previous topic - Next topic

Kiame

Stores weapons and allows weapons to be assigned to pawns for use in the field.

Weapon Storage
-Build Menu: Furniture
-Size: 1x1
-Cost: 40 steel + 40 wood/stone/steel
-Stores: Weapons (ranges and melee)

Repair Attachment
-Build Menu: Misc
-Size: 1x1
-Cost: 250 steel + 6 components + 20 wood/stone/steel
-Energy: 10 W (not in use) or 1000 W (in use)
-Place within 6 squares of a Weapon Storage to have weapons automatically repaired
-Research Required: Mending & Multi-Analyzer
-Mending Mod not required (highly recommended though)]

Using Grenades:
To assign grenades select any Weapon Storage then Manage Shared Weapons
-From the new window create a new filter and call it something like "emp frag"
-In the list select the grenades you want available to colonists, like "frag grenade" and " EMP grenade"
-Close the Filter window
-Assign colonists to the "emp frag" group

Now when you select a colonist that's assigned "emp frag" they can equip either frag or emp grenades (if there are any stored in Weapon Storage)

Load Order
-Combat Extended
-Weapon Storage
-Weapon Storage Combat Extended Patch



Compatible with:
Save Storage & Outfit Settings - https://ludeon.com/forums/index.php?topic=34075.0
Change Dresser - https://ludeon.com/forums/index.php?topic=30973.0


Direct Download:
1.3

A17
B18
B19
1.0
1.2

Use ModSync RW to know if/when there's an update


Steam

GitHub: https://github.com/KiameV/rimworld-weaponstorage


If the storage crate is destroyed all stored weapons will drop on the floor. Assigned weapons will not drop on the floor though and will still be usable by the pawns the weapons are assigned to. To change or access the assigned weapons, use any other weapon storage crate.

Items stored in a weapon storage will not show up in merchant screens. To make them available for sale use the "Empty" button to cause all the items to fall on the floor.

Instructions for assigning weapons:

  • Load one or many Weapon Storage containers with weapons
  • Select a Weapon Storage
  • Select the Assign Weapons button
  • Select the pawn to assign weapons to
  • Select the weapons to assign to the pawn

When a weapon is assigned to a pawn, that weapon is no longer stored in that container. Instead the weapon will exist in a pocket dimension (think bag of holding  ;) ) that is accessible by any other Weapon Storage and by the assigned pawn

The pawn can, when drafted, switch to any assigned weapon by reaching into their pocket of holding and place whatever weapon they were holding into the other dimension.

Some cases/behaviors to consider - these are not hard coded but just how the mod works. If there's strong feedback regarding any of these I will consider changing them.

  • If a pawn drops a weapon which they are assigned to, they are no long assigned to that weapon.
  • If a pawn picks up a weapon, they are now assigned with that weapon.
  • If a drafted pawn is carrying something in their primary equipment slot that is not a weapon, instead of placing the item in their pocket of holding they will place it on the ground.


Forming Caravans
Stored weapons will be available for caravans. Until the pawns in the caravan either exit the map or are told to cancel the caravan, the weapons will remain scattered around the storages. If something goes wrong and the items are not collected, let me know and click the "Collect" button on the weapon storages.

As of now if the Cancel button is used from the Form Caravan window, the weapons will not be collected. This will likely remain the case for the time being due to limitations in modding tools.

This can be fixed by either using the Collect button or forming another caravan and either allow it to leave the map or cancel the caravan

Repair Attachment
Will detect if weapons within attached Weapon Storages need to be repaired.
Each Repair Attachment can only repair one weapon at a time.
More than one Repair Attachment can be attached to one or more Weapon Storages (many-to-many relationship)




Like my mods? Consider supporting me!

faltonico

So, this would be effectively an option to simple sidearms?
Sometimes i want my pawns to shoot things to the face and not punch it (an orassan LMG is that good!), nor i want them to look for their weapons as soon as the can walk again.
I'm getting this! thanks!

SpaceDorf

Good Question.

Does this mod enable pawns to carry multiple weapons or are they required to exchange their weapons from the box ?
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Kiame

#3
<I was looking for something like the side arms mod but i hadn't found it and so i made this  ;D >

The main difference between the side arms mod and this mod is the pawn does not need to carry the weapons they are assigned with. This mod also adds a place to store all those weapons from that last raid!

Pawns never have to interact with the storage box except when they put a weapon into it for storage.

There is no limit (that i've set in the code) to how many weapons a pawn can be assigned with. In my testing I had a pawn assigned with 10 assault rifles, a few bows, and a few long swords. Pointless? Yes. It work though  :P

Steps:

  • Load one or many Weapon Storage containers with weapons
  • From the different Weapon Storages, assign weapons to the pawns

    • When a weapon is assigned to a pawn, that weapon is no longer stored in that container. Instead it exists in a pocket dimension (think bag of holding  ;) ) that is accessible by any other Weapon Storage
  • The pawn can, when drafted, switch to any assigned weapon by reaching into their pocket of holding and place whatever weapon they were holding into the other dimension.
Some cases/behaviors to consider - these are not hard coded but just how the mod works. If there's strong feedback regarding any of these I will consider changing them.

  • If a pawn drops a weapon which they are assigned to, they are no long assigned to that weapon.
  • If a pawn picks up a weapon, they are now assigned with that weapon.
  • If a drafted pawn is carrying something in their primary equipment slot that is not a weapon, instead of placing the item in their pocket of holding they will place it on the ground.

Kiame

Quote from: faltonico on September 05, 2017, 11:43:35 PM
...nor i want them to look for their weapons as soon as the can walk again.
I'm getting this! thanks!

This is one thing i didn't consider. Maybe I'll add some code to have assigned weapons go back to the pocket dimension when the pawn either dies or is disabled.
I'll play around with this in my game. Maybe have this as a Mod Setting.

SpaceDorf

It's Hammerspace !

Awesome :)

Final and most important question : Do Caravans have access to the Gunstorage ?
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Canute

Extra dimensional pocket space, TARDIS, why not create a caravan storage box.

The idea is neat, but the result is not very satisfying in my point of view.
Some hauler put into the weapon storage at the homebase, and the soldier 200 tiles away can swap it.

SpaceDorf

A Transporter as endgame tech would be a nice addition :)

That is what I like about the simple side arms mod ..
a fully equipped pawn struts arround with 125kg ..

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Kiame

#8
Quote from: Canute on September 07, 2017, 06:47:54 AM
Extra dimensional pocket space, TARDIS, why not create a caravan storage box.

The idea is neat, but the result is not very satisfying in my point of view.
Some hauler put into the weapon storage at the homebase, and the soldier 200 tiles away can swap it.

Basically. I like it as it's less micro management or if I forget to have one pawn grab one weapon before they leave i can correct that mistake. This is the same functionality as the Change Dresser mod. This is the nice thing about mods, if someone thinks it's OP or doesn't fit in their world/sand box they don't need to use it  :D

Quote from: SpaceDorf on September 07, 2017, 03:41:40 AMFinal and most important question : Do Caravans have access to the Gunstorage ?

Yes. From any map a pawn will have access to assigned weapons. There is no access from the wold map though.

Kiame

Update:
-When assigning weapons to pawns the pawn's equipped weapon is now displayed
-The Assign Weapon window will now list the contained weapons before selecting a pawn

Kiame

Sep 10, 2017
-Fixed an issue where the first weapon in the lsit was not showing up.
-General code cleanup for better support in the future.


Kiame

Quote from: Expresso on September 12, 2017, 02:36:34 PM
Your mod is compatible with ?
https://ludeon.com/forums/index.php?topic=32497.0

Not sure, haven't tried. They both do more or less the same thing though.

WeaponStorage (this mod) stores the weapons for the pawns so the pawns don't have to carry them around though.


Expresso

It is a pity of course, if they do not perceive each other.

Weapons of vinyl used perfectly, but how about CE. Storage and use of cartridges?

Kiame

This will support any modded weapons. No idea regarding cartridges (didn't even know there were mods w/ cartridges tbh)