Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Ziehn

#1
The Non-Senescent gene still allows pawns to gain Hearing Loss which is an age related illness. Non-Senescent should prevent this according to its description, but is missing in the list of immunities and confirmed to be gained when aging up via dev-mode.
#2
Releases / [1.0] More Slaves
January 30, 2019, 02:24:09 AM


Tired of calling in a slaver only to find that they bring one slave?

Not only do they bring one slave but this slave is also a pessimistic pyro with a heart condition?!

Well now you have more options, i've increased trader slave count by roughly 3-5x and removed slaver stock population cap.


Download
Steam Workshop

Want more slaver shenanigans?
[1.0] Simple Slavery


Compatible with existing saves.

Should be compatible with all mods.


Disclaimer: I am not responsible if you get 10 Depressive Volatile Very Neurotic Pyros
  :P
#3
Releases / [1.0] Simple Slavery
January 26, 2019, 12:00:21 PM
                                                                                                       
                                                                                             Allows the player to take captured prisoners as slaves.

                                                                                Original mod by Thirite, updated to 1.0 by Ziehn. Uploaded with permission.

How to Capture a Slave
   You'll first need to make a Slave Collar at either the Smithy or Crafting Spot, then in the Prisoner Tab, select the new option, "Enslave". After that your warden will fasten it to their neck, and presto! They're now a useful member of your slave-driving colony. Slaves typically won't be happy about their situation and will make repeated escape attempts until their willpower has been broken. You can get a general idea of how low their willpower is from checking the negative mood effect of their "Enslaved" thought: it starts at a -15 mood penalty and rises from there. When a slave attempts to escape, you'll have to send out a pawn to catch them; assuming you're successful, they'll be carried to a prison cell where they will be interned for a few hours. After that they will resume their duties as a slave.

What Can Slaves Do?
   Currently they function very similarly to a normal colonist-- able to perform typical jobs, be designated colonist beds, may be drafted, etc. Of course they will probably still try to escape.

Emancipating Slaves
   Toggle on the "Emancipate" gizmo after selecting a slave. A warden will then autonomously set them free, or you may prioritize it like most other orders. Once this is done, they will be considered a released prisoner and leave for home. However, if you emancipate a slave while they are in a prison cell, they will stay as your prisoner- though freed of slavery.

Buying and Selling Slaves
   Slaves can be purchased from the same traders as in vanilla- but will now maintain status as a slave when they join your colony. You may also sell any slave in your colony in the same way you would sell a prisoner. Slaves purchased from a trader will already have their willpower broken, and will typically not attempt to escape (with the exclusion of Iron willed pawns).

F.A.Q.
Q. Is this compatible with Prison Labor?
A. Yes, I haven't used Prison Labor much myself but this takes a different approach. It pretty much comes down to which roleplaying flavor you prefer, Prison Labor makes it feel like your running a prison camp while Simple Slavery does better at playing being a slaver. They can be used at the same time.

Q.My normal colonists keep equiping the slave collars, why?
A.Collars are still just normal apparel, thus need to be forbidden in your outfit settings. I suggest making an outfit just for slaves too.


Q.I can't unequip collars, help!
A.If you are using the Rpg Inventory mod click the "Show List" button to view and unequip collars.

Note
   This is still a work in progress, but it seems pretty stable from my quick tests. It should be suitable for normal (non-debugging) gameplay but I'm sure the balance is likely in need of refining.

Disclaimer
   This mod is not meant to condone real world slavery, whether past or present. If you can't differentiate between a videogame and real life then you shouldn't be playing RimWorld to begin with.

Not enough slaves?
Download some more! More Slaves

Changelog

[5/25/2019 @ 5:08pm]
Fixed animals not showing on list of things to sell

[5/11/2019 @1:29PM]
Fixed failed looping enslave attempts, unconscious pawns can no longer refuse enslavement - Thanks to Keeper for the final clue I needed to finally find this bug

[4/12/2019 @ 3:06pm]
Russian translation updated

[4/10/2019 @ 7:11pm]
New Collar - Crypto Collar
Requires Cryptosleep research to craft. Freezes wearer in place when activated allowing for non-violent arrests.
Code optimizations

[4/7/2019 @ 9:29pm]
Fixed slaves not joining colony on emancipation

[4/5/2019 @ 12:34am]
Fixed slave selling in player caravans (World map)

[3/29/2019 @ 11:26am]
Added a mask to explosive/electric collars so the component parts color will be consistent
Russian Translation by xRg

[3/20/2019 @ 3:36pm]
Fixed error on arresting Wild pawns
Fixed arrest chances for slaves not being calculated - lower willpower = Higher arrest chance
Fixed Med Care settings not being saved
Lowered Slave Labor thought debuff from -10 -> -5

[3/14/2019 @ 11:46am]
New Collar, Electric Collars. Zzzt!
Requires Microelectronics researched
Causes burns to the neck
Small risk of Heart Attacks increasing with age

[3/14/2019 @ 4:29am]
Fixed Alien slaves spawning in caravans without Slave Collars

[3/9/2019 @ 12:39am]
Fixed Change Dresser mod compatibility

[3/4/2019 @ 8:52pm]
Colonists no longer think Slave Collars are a fashion statement and will not auto-equip them
Slaves will now auto-equip a new collar if not wearing one and they are not forbidden in outfit policies

[2/28/2019 @ 4:13pm]
Fixed bug where multiple pawns tried to reserve Collars to haul/enslave throwing errors

[2/21/2019 @ 2:02am]
Updated Portuguese-BR translation - Translator: Aramati

[2/20/2019 @ 11:48pm]
Fixed cooldown for mental break on explosive collar arming not ending

[2/19/2019 @ 4:38pm]
The Not-So-Simple Slavery update:

DID YOU KNOW THAT NINETY-SEVEN PERCENT OF ALL LIVING THINGS ON RIMWORLD AREN'T EXPLODING RIGHT NOW? THAT'S BULLSH*T, EXPLOSIVE COLLARS! BOOM!!! Hehehehe.
Collateral damage possible. Possibility of mental break on arming collar.
New Tribal Slave Collar texture
Changed mood alert for slaves to "Miserable Slaves"
More advanced collars now lower slave escape chances
Escape chance is now affected by mood, happy slaves = less escapes
Colonists now care less about slaves dying, slaves will get worried if fellow slaves die and don't care about colonist deaths
Bug Fixes

[2/17/2019 @ 11:24pm]
Added Tribal Collars to Tailor benches
Added Portuguese-BR translation - Translator: Aramati

[2/4/2019 @ 5:15pm]
New Icon for "Shackle" button

[2/4/2019 @ 9:12am]
Fixed Job Priorities not saving
Fixed Enslaving your own colonists not working first time
Fixed Restricted Areas not saving - Thanks again to Thirite

[2/1/2019 @ 7:21am]
Fixed translation for Slave Escaping letter

[2/1/2019 @ 3:54am]
Fixed "Execute" being replaced with "Enslave" prisoner interation, window now dynamically resizes to amount of options in Prisoner window - Thanks Thirite

[1/29/2019 @ 3:40am]
Halved Stuff cost of Collars 50 -> 25
Removed Gold Collar spawn chance from world spawned slaves

[1/28/2019 @ 9:13am]
Added negative event letter (yellow) to slave escape event

[1/27/2019 @ 4:18am]
Slave Collars now visible on pawns, use with Show Hair With Hats mod to keep hair


Requires Hugslib

Safe to add to existing saves.

Should be compatible with all mods.

Download for 1.0
Steam Workshop

A17/B18 versions can be found here - Original Topic

Credits
Thirite - Original Author, Continued Updates
Ziehn - 1.0 Update, Continued Updates
Proxyer - Japanese Translation
Aramati - Portuguese-BR Translation
xRg - Russian Translation
And you - For playing
#4
Releases / [1.0] Milkable Colonists
November 12, 2018, 06:54:08 PM
Makes colonists and prisoners milkable using a drug.

Craft Lact-X at the Drug Lab
Craft Lact-MAX at the Drug Lab for permanent lactation
Compatible with pregnancy mods
Modifiers for mod that adds breast sizes
Does not work on animals.

Safe to add to saves
(A new drug policy is required for it to add Lact-X)


FAQ
Q. What the fuck?
A. Randy made me do it under threat of manhunting squirrels.

To-do list:
-Balance/tweaks
-Add a drug for permanent lactation
-Pregnacy Compatiblity

Mod races supported
(Let me know if you want a race added)
If you think a race should produce something other than milk let me know!

I have now figured out how to add conditional patches to allow for items from other mods to be added as a milkable produce, so items from other mods that aren't in the parent mod are now fair game.
-Callistan
-Astoriel
-Fantasy Goblins
-LotR Dwarf (Produces Beer)
-LotR Elf
-LotR Hobbit
-Orrassan
-Ratkin
-Twilek
-Zabrak
-Androids (Produces Chemfuel)
-Avali (Produces chicken eggs, female only)
-Argonian
-Naga (Produces chicken eggs, female only)
-Asari
-Rimhammer 40k
-Ferrex
-Xenn
-Leeani
-Fenii
-Frijjid
-Gnoll
-Equium
-Drow
-Mantodean (Produces Insect Jelly)
-Android Tiers (Produces Nutrient Solution)
-Crystalloid (Produces Crystal)
-Logann
-Arachne
-Ferian
-Cutebold
-Orc Invasion
-Xenohumans
-Avian Races
-Kilhn
-Kurin
-Elder Things (Produces Nutrient Paste Meals or Black Ichor Meals if you have Cults installed)
-Star Wars Races
-Apini (Produces Honey)
-Quarian
-Yabils
-Beast Man Tribes
-Rimcraft
-Kijin
-Warhammer"ish": Dryad
-Warhammer: Daemonettes
-Warhammer: Skaven
-Hisa
-Kija - Creatures of Ki
-Yautja
-Thrumbo Race
-Humanoid Project
-Dragongirls
__________________________________________________________________________________
Steam Workshop
__________________________________________________________________________________
Direct Download- Milkable Colonists
#5
Help / WorkGiver w/ Prisoners (Solved)
November 09, 2018, 05:46:13 PM
I'm trying to get this WorkGiver to include prisoners as target along with my colonists but can't seem to figure out how. ???

    public abstract class WorkGiver_GatherHumanBodyResources : WorkGiver_Scanner
    {
        protected abstract JobDef JobDef { get; }

        protected abstract CompHasGatherableBodyResource GetComp(Pawn animal);

        public override IEnumerable<Thing> PotentialWorkThingsGlobal(Pawn pawn)
        {
            List<Pawn> pawns = pawn.Map.mapPawns.SpawnedPawnsInFaction(pawn.Faction);
            for (int i = 0; i < pawns.Count; i++)
            {
                yield return pawns[i];
            }
            yield break;
        }

        public override PathEndMode PathEndMode
        {
            get
            {
                return PathEndMode.Touch;
            }
        }

        public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            Pawn pawn2 = t as Pawn;
            if (pawn2 == null || !pawn2.RaceProps.Humanlike)
            {
                return false;
            }
            CompHasGatherableBodyResource comp = this.GetComp(pawn2);
            if (comp != null && comp.ActiveAndFull && !pawn2.Downed && pawn2.CanCasuallyInteractNow(false) && pawn2 != pawn)
            {
                LocalTargetInfo target = pawn2;
                if (pawn.CanReserve(target, 1, -1, null, forced))
                {
                    return true;
                }
            }
            return false;
        }

        public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false)
        {
            return new Job(this.JobDef, t);
        }
    }
#6
Help / Updating mod to 1.0
October 21, 2018, 04:24:47 PM
I'm trying to get Thirite's https://ludeon.com/forums/index.php?topic=33631.0 Simple Slavery mod up to date, got everything working with 1.0 except one bit of Harmony patching. Kinda reluctant to say "hey can you do this for me?" but i run up against a wall when it comes to anything Harmony. :(

Getting an ambiguous matching error with the new code making a bunch of references to what the patcher was original doing.
// Changes the label of a pawn to slave if applicable
[HarmonyPatch(typeof(GenLabel), "BestKindLabel")]
public static class GenLabel_BKL_Patch{
[HarmonyPostfix]
public static void BestKindLabel_Patch(ref string __result, ref Pawn pawn, ref bool mustNoteGender){
if(mustNoteGender && pawn.gender != Gender.None && SlaveUtility.IsPawnColonySlave(pawn)){
__result = "PawnMainDescGendered".Translate ( new object[] { pawn.gender.GetLabel(), "LabelWordSlave".Translate()});
}
}
}

B18 Source Code (Rimworld.GenLabel)
// Token: 0x06003146 RID: 12614 RVA: 0x00171820 File Offset: 0x0016FC20
public static string BestKindLabel(Pawn pawn, bool mustNoteGender = false, bool mustNoteLifeStage = false, bool plural = false, int pluralCount = -1)
{
bool flag = false;
bool flag2 = false;
string text = null;
Gender gender = pawn.gender;
if (gender != Gender.None)
{
if (gender != Gender.Male)
{
if (gender == Gender.Female)
{
if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelFemalePlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelFemalePlural;
flag2 = true;
flag = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelFemale != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelFemale;
flag2 = true;
flag = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelPlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelPlural;
flag2 = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.label != null)
{
text = pawn.ageTracker.CurKindLifeStage.label;
flag2 = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && pawn.kindDef.labelFemalePlural != null)
{
text = pawn.kindDef.labelFemalePlural;
flag = true;
}
else if (pawn.kindDef.labelFemale != null)
{
text = pawn.kindDef.labelFemale;
flag = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && pawn.kindDef.labelPlural != null)
{
text = pawn.kindDef.labelPlural;
}
else
{
text = pawn.kindDef.label;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelMalePlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelMalePlural;
flag2 = true;
flag = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelMale != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelMale;
flag2 = true;
flag = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelPlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelPlural;
flag2 = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.label != null)
{
text = pawn.ageTracker.CurKindLifeStage.label;
flag2 = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && pawn.kindDef.labelMalePlural != null)
{
text = pawn.kindDef.labelMalePlural;
flag = true;
}
else if (pawn.kindDef.labelMale != null)
{
text = pawn.kindDef.labelMale;
flag = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && pawn.kindDef.labelPlural != null)
{
text = pawn.kindDef.labelPlural;
}
else
{
text = pawn.kindDef.label;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelPlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelPlural;
flag2 = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.label != null)
{
text = pawn.ageTracker.CurKindLifeStage.label;
flag2 = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
else if (plural && pawn.kindDef.labelPlural != null)
{
text = pawn.kindDef.labelPlural;
}
else
{
text = pawn.kindDef.label;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pluralCount);
}
}
if (mustNoteGender && !flag && pawn.gender != Gender.None)
{
text = "PawnMainDescGendered".Translate(new object[]
{
pawn.gender.GetLabel(),
text
});
}
if (mustNoteLifeStage && !flag2 && pawn.ageTracker != null && pawn.ageTracker.CurLifeStage.visible)
{
text = "PawnMainDescLifestageWrap".Translate(new object[]
{
text,
pawn.ageTracker.CurLifeStage.Adjective
});
}
return text;
}

1.0 Source Code (Rimworld.GenLabel)
// Token: 0x06003831 RID: 14385 RVA: 0x001ABE78 File Offset: 0x001AA278
public static string BestKindLabel(Pawn pawn, bool mustNoteGender = false, bool mustNoteLifeStage = false, bool plural = false, int pluralCount = -1)
{
if (plural && pluralCount == 1)
{
plural = false;
}
bool flag = false;
bool flag2 = false;
string text = null;
Gender gender = pawn.gender;
if (gender != Gender.None)
{
if (gender != Gender.Male)
{
if (gender == Gender.Female)
{
if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelFemalePlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelFemalePlural;
flag2 = true;
flag = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelFemale != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelFemale;
flag2 = true;
flag = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pawn.gender, pluralCount);
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelPlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelPlural;
flag2 = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.label != null)
{
text = pawn.ageTracker.CurKindLifeStage.label;
flag2 = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pawn.gender, pluralCount);
}
}
else
{
text = GenLabel.BestKindLabel(pawn.kindDef, Gender.Female, out flag, plural, pluralCount);
}
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelMalePlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelMalePlural;
flag2 = true;
flag = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelMale != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelMale;
flag2 = true;
flag = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pawn.gender, pluralCount);
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelPlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelPlural;
flag2 = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.label != null)
{
text = pawn.ageTracker.CurKindLifeStage.label;
flag2 = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pawn.gender, pluralCount);
}
}
else
{
text = GenLabel.BestKindLabel(pawn.kindDef, Gender.Male, out flag, plural, pluralCount);
}
}
else if (plural && !pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.labelPlural != null)
{
text = pawn.ageTracker.CurKindLifeStage.labelPlural;
flag2 = true;
}
else if (!pawn.RaceProps.Humanlike && pawn.ageTracker.CurKindLifeStage.label != null)
{
text = pawn.ageTracker.CurKindLifeStage.label;
flag2 = true;
if (plural)
{
text = Find.ActiveLanguageWorker.Pluralize(text, pawn.gender, pluralCount);
}
}
else
{
text = GenLabel.BestKindLabel(pawn.kindDef, Gender.None, out flag, plural, pluralCount);
}
if (mustNoteGender && !flag && pawn.gender != Gender.None)
{
text = "PawnMainDescGendered".Translate(pawn.GetGenderLabel(), text, pawn.Named("PAWN"));
}
if (mustNoteLifeStage && !flag2 && pawn.ageTracker != null && pawn.ageTracker.CurLifeStage.visible)
{
text = "PawnMainDescLifestageWrap".Translate(text, pawn.ageTracker.CurLifeStage.Adjective, pawn);
}
return text;
}
#7
Help / Harmony Help
May 25, 2018, 11:14:08 PM
I have a fairly poor working knowledge of C# just enough to read and edit existing code, so learning how to deal with Harmony is being a bit challenging. I've looked at many examples and they all seem to use different methods so what i got is probably a hot mess. After many hours of doing my best impression of a monkey on a typewriter this is what i got  :-[
using Harmony;
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using Verse;
using RimWorld;

namespace More_Slaves
{
    [StaticConstructorOnStartup]
    public class Main
    {
        static Main()
        {
            var harmony = HarmonyInstance.Create("com.More_Slaves");
            harmony.PatchAll(Assembly.GetExecutingAssembly());
        }

        [HarmonyPatch(typeof(StockGenerator), "More_Slaves", null)]
        [HarmonyPatch("More_Slaves")]
        [HarmonyPatch(new Type[] { typeof(StockGenerator_Slaves) })]
        public class StockGenerator_Slaves_Patch
        {
            public class StockGenerator_Slaves : StockGenerator
            {
                public override IEnumerable<Thing> GenerateThings(int forTile)
                {   //
                    //Trying to Change this so traders will ignore population restrictions.
                    //
                    if (Rand.Value <= Find.Storyteller.intenderPopulation.PopulationIntent)
                    //
                    //
                    //
                    {
                        yield break;
                    }
                    int count = this.countRange.RandomInRange;
                    for (int i = 0; i < count; i++)
                    {
                        Faction slaveFaction;
                        if (!(from fac in Find.FactionManager.AllFactionsVisible
                              where fac != Faction.OfPlayer && fac.def.humanlikeFaction
                              select fac).TryRandomElement(out slaveFaction))
                        {
                            yield break;
                        }
                        PawnKindDef slave = PawnKindDefOf.Slave;
                        Faction faction = slaveFaction;
                        PawnGenerationRequest request = new PawnGenerationRequest(slave, faction, PawnGenerationContext.NonPlayer, forTile, false, false, false, false, true, false, 1f, !this.trader.orbital, true, true, false, false, false, false, null, null, null, null, null, null, null);
                        yield return PawnGenerator.GeneratePawn(request);
                    }
                    yield break;
                }

                public override bool HandlesThingDef(ThingDef thingDef)
                {
                    return thingDef.category == ThingCategory.Pawn && thingDef.race.Humanlike && thingDef.tradeability != Tradeability.Never;
                }
            }
        }

    }
}