[V1] Cherrypepper's Mods - Suicide Vest, add Gizmos from Apparel, more

Started by randolphcherrypepper, July 30, 2017, 06:36:56 PM

Previous topic - Next topic

randolphcherrypepper



Randolph Cherrypepper's Suicide Vest

Need to put some of those incapable colonists to good use? Is your human leather hat collection overflowing?

Put your best meat shields on the front line with the suicide vest! Guaranteed to take out at least one pawn!




Recommends the Remove From Anything Outfit mod from Randolph Cherrypepper. Without RFAO, you might want to modify your outfits so that the default Anything outfit does not allow the Suicide Vest. What do I know? I'm not your boss. Do what you wanna.

Requires the Apparel Gizmos From Comps mod from Randolph Cherrypepper.

Compatibility note: This should mix with other mods without issue.

Mod Order: Anywhere below AGFC.

Feel free to leave a comment if you run into a problem.

Steam Download:
V1 http://steamcommunity.com/sharedfiles/filedetails/?id=1272186441

GitHub Download, A17-V1:
https://github.com/RandolphCherrypepper/SuicideVest/releases/






Randolph Cherrypepper's Remove From Anything Outfit

This mod is meant for XML modders.

There is an outfit in RimWorld called Anything. It is the default outfit assigned to all pawns. At game start, all apparel in the defs is added to the Anything outfit.

RFAO will prevent the Anything outfit from initially allowing apparel with RemoveFromAnything in the defaultOutfitTags list. This is mostly useful for mods with apparel that might be dangerous to wear.

RFAO only affects the initial Anything outfit generated at game start. The player can still modify the Anything outfit to allow apparel with RemoveFromAnything in the defaultOutfitTags list.

Requires HugsLib for Harmony.

Compatibility note: RFAO applies a Postfix patch to RimWorld.OutfitDatabase.GenerateStartingOutfits(). In other words, it should be safe to mix with other mods without issue.

Mod Order: Anywhere below HugsLib.

Feel free to leave a comment if you run into a problem.

Steam Download:
V1 http://steamcommunity.com/sharedfiles/filedetails/?id=1272186038

GitHub Download, A17-V1:
https://github.com/RandolphCherrypepper/RemoveFromAnythingOutfit/releases/






Randolph Cherrypepper's Apparel Gizmos From Comps

This mod is meant for Code modders.

If you pick up a weapon, a button appears to melee or ranged attack. That's a Gizmo associated with equipment used by a colonist. Unfortunately, RimWorld will not show Gizmos (buttons) associated with any apparel worn by a colonist. This is sad for modders.

AGFC defines an abstract ThingComp called CompWearable which provides CompGetGizmosWorn(). If apparel is worn by a selected colonist, Gizmos returned from CompGetGizmosWorn will be displayed.

Requires HugsLib for Harmony.

Compatibility note: AGFC applies a Postfix patch to RimWorld.Apparel.GetWornGizmos(). In other words, it should be safe to mix with other mods without issue.

Mod Order: Anywhere below HugsLib.

Feel free to leave a comment if you run into a problem.

Steam Download:
V1 http://steamcommunity.com/sharedfiles/filedetails/?id=1272185463

GitHub Download, A17-V1:
https://github.com/RandolphCherrypepper/ApparelGizmosFromComps/releases/




This is as good a place as any to shoot out thanks:

  • roxxploxx for documentation, otherwise I would not have been able to climb the learning curve
  • Unlimited Hugs for HugsLib and more documentation
  • Andreas Pardeike for Harmony (just wow)
  • Fluffy that art FluffierThanThou, from whence I stole the mod banner design
  • The modding community for making amazing content
  • Tynan for making a game I keep coming back to

randolphcherrypepper

Added Beta 18 mod updates to original post by popular request on Steam.

Not so much attention here though. This post will be a raindrop in the ocean on a stormy day.

Harry_Dicks

Could you give an example of what kind of comps you would have on apparel with AGFC?

randolphcherrypepper

#3
An example of AGFC is seen in Suicide Vest:

When you wear the suicide vest, a "Detonate" gizmo appears (with the other gizmos down at the bottom, near Draft). That lets you activate the Suicide Vest and explode it at will.

You can see the Detonate Gizmo in the very first screenshot on the main post of this thread.

The screenshots on the Steam link for AGFC show where in the code it is used in image form. You can pop over the Github and check out the source code for Suicide Vest, searching for CompWearableExplosive and CompGetGizmosWorn to see how to add a gizmo to apparel.

Basically this is something that was possible with weapons (add a gizmo using a comp), but not with armor. There was an empty piece of code in A17 that suggested this should be possible with armor too, except the code was ... empty. I simply patched that empty bit of code to do something. Maybe B18 allows apparel comps now? I haven't checked.

Harry_Dicks

Ahh, makes sense. So you could have say firefoam popper belts with this, yeah?

OMG. I just checked the list of comps. So you are telling me I can add THESE to armor?! glowRadius, glowColor, and storedEnergyMax? So I can make power armor glow?!?!?! And I could have a "battery" suit, that recharges things around them? I realize that I might have to "reconnect" things to the person. But this is now possible? If so, I think I might need to try and make my first mod for release. My idea! I claimed it first! ::)

Got to run and do some errands real quick, but I am DEFINITELY going to check this out in a bit when I get back!

randolphcherrypepper

Haha I'm glad to see the enthusiasm.

I don't think my mod will let you use any Comp with Armor. You could extend the Comp you want and also CompWearable, and if you put things together right it might work.

What I really did was added Gizmos to Armor using CompWearable. That is probably the most concise explanation. If you have any gizmos you want to add to armor, then you can.

For example, you should be able to make a gizmo to burst a firefoam popper. Then you can add that Gizmo to a "belt" (apparel) by extending CompWearable. If the character is wearing a firefoam popper belt, then you could click a button to manually activate the popper.

randolphcherrypepper

I updated the Steam Workshop to host B19 instead of B18 for all three mods. At some point I'll remove the A17 versions from Steam Workshop.

GitHub has releases of each mod for A17, B18, and B19.

randolphcherrypepper

I updated the Steam Workshop to host V1 instead of B19 for all three mods.

GitHub has releases of each mod for A17, B18, B19, and V1.


Sonsalt

Suicide vests would be great for the AI to use :D

Maybe a strange cult....

Cl3arSky

im thinking this will go well with Cults (Cthulhu mod) where i'll have my cultists, perform the ultimate sacrifice hmm