[1.0] More Scenario Parts - Further control your experience

Started by usagirei, June 01, 2019, 10:59:48 PM

Previous topic - Next topic

usagirei

More Scenario Parts

Want to start a colony of only males? or only females?
Want a world where the raiders, and only the raiders, explode catastrophically on death?
Want mobs to have a 1% chance of dropping a single gold piece on death?
Want to start with specific gear already equipped on your pawns?
Want to make sure all your pawns have blue hair?

If you said yes for any of these questions, then look no further!

Enter More Scenario Parts: Adds more Scenario Parts, also changes some of the vanilla ones to allow finer control over which pawns it applies to, more detailed information below

Downloads:
Source Code at Github
Release at Github

Changelog:

v1.0 - First Release


Filtering


Enhances modifier filtering to allow for finer-grained control than vanilla

Context:

       
  • All Pawns
  • Player Starting Pawns
  • Player Non-Starting Pawns
  • Non-Player Pawns
  • Player Faction Pawns (Starting and new joins)
  • Non-Player Faction
Gender

       
  • All Pawns
  • Only Male Pawns
  • Only Female Pawns
Faction

       
  • Pick a specific faction when using the Non-Player Faction Context
Chance

       
  • Chance of the modifier being applied on a pawn upon generation
Available Scenario Parts


New Scenario Parts

       
  • Pawn Gender

    •       
    • Ensure pawns are of a specific gender, where applicable
  • Pawn Hair Color

    •       
    • Assigns random color from allowed red, green and blue ranges
  • Pawn Skin Color

    •       
    • Assigns random skin tone from allowed range
  • Inventory

    •       
    • Start with equipped gear / item stack in pawn inventory
Vanilla Reworks - Enhances some of the vanilla scenario parts with the extended filtering options

       
  • Allowed age range

    •       
    • Note: just like vanilla filter, may spew a few harmless errors if it fails to generate a pawn after so many tries
  • Forced health condition
  • Forced trait
  • Naked
  • Need level
  • On pawn death explosion

    •       
    • Also allows for more damage types to be chosen from
Compatibility


Tested with: RimWorld 1.0
Requires a new save to make use of the new scenario filters
Incompatibilities unknown as of now, but should be compatible with any mods.

XML Patches:

       
  • Adds a ThingComp def to BasePawn
  • Replaces the default scenario classes with the modded ones
Harmony Patches:

       
  • PawnGenerator: TryGenerateNewPawnInternal, GeneratePawn
  • GameInitData: PrepareForMapGen

usagirei

Reserved for future use to unclutter main post when necessary

oneilmw


usagirei

To some extent, yes.
It applies the modifiers when the characters are generated, before prepare carefully gets to edit them. You can still make changes with prepare carefully, but after the pawn is generated its off-hands from the scenario parts (except for the death on explosion, which is activated when a pawn dies regardless)

Edit:

Also, modifiers for non-starting pawns (raids, random joins, etc) will be applied too, since they are generated after the game is started

Snowpig

This one seems to be incompatible with FactionControl. As soon as I add restrictions to a faction, the faction is not generated on the map.

Vehicular_Zombicide

Does the age range enhancements include pawns spawned in-game? For example, could I make it so ALL pawns (raiders, caravans, refugees, colonists, etc) are within a certain age range if I wanted to keep all potential colonists in their prime?