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 - LegendaryMinuteman

#1
Releases / [1.3] Inspired Conversion
August 19, 2022, 11:05:37 PM
Inspired Conversion   Steam

Adds an additional inspiration to the game that functions like Inspired Recruitment but for ideological conversion.

Inspired pawns gain an ability called Instant Convert which functions nearly the same as the regular Convert ability held by pawns with the "Moralist" title. Using Instant Convert on a pawn will drop their conviction down to 0% immediately converting them to the Inspired Pawns Ideoligion.

Once the ability has been used or the inspiration expires, the ability will be removed from the pawn.
#2
I just had this idea as a passing thought and have been doing a bit of RimWorld modding recently so I thought I'd see if a little expert opinion could shed light on this topic.  I have used RimWorld source code to write a lot of "new" C# but have a spottier record with Harmony patches.

Anyway, the concept is simple, when selling your colony, could it be made into an independent settlement of your faction rather than the civil outlander faction?  Or could I clone the Archonexus mechanic and make a secondary one where at any time beyond a certain size your settlement could be made autonomous and your chosen group sets out to start a new one?

It seems like it could be a very cool way to grow your faction into a player on the world stage.

Just a thought.  Anyone have any insights on the matter?  I'll see what I can do on my own but I appreciate any input, even on where things like this are managed in the code or XML.  Thanks!
#3
Fallout: Retro Weapon Pack   Steam
A complete "Retro Falloutization" of the weapon system in RimWorld, balanced and fully realized in graphics and sound.
Based on the original Black Isle Fallout games, the mod features 50 original weapons balanced in price and efficacy with RimWorld's existing weapons.

Age Reversing Mech Serum   Steam
Adds a new valuable mech serum which removes ten years of biological aging (to a minimum of twenty years old.)
To maintain balance, this serum doesn't remove any specific chronic conditions that may have developed as a result of aging. It only reduces the biological age.

DisfigCured   Steam
Adds a couple of surgical solutions to mitigate the disfigured debuff.
All mitigate the disfigured opinion penalty from other people and can be made as other prosthetics/bionics.

Simple Ivory   Steam
Manufacture ivory from tusks and thrumbo horn and use it like jade.
Works like stone for the purposes of crafting furniture/walls/weapons/art.

Crikey, It's a Croc!   Steam
Adds alligators and crocodiles to a few biomes.

Planetside Politics   Steam
Adds political ideologies as traits which create harmony or conflict among pawns.
Colonists (almost always) possess one of nine principal ideologies which determine their worldview and how they view their fellow colonists.

Planetside Politics and Religions   Steam
Adds political ideologies and religious beliefs as traits which create harmony or conflict among pawns.
Colonists (almost always) possess one of nine principal ideologies and one of twenty religious beliefs which determine their worldview and how they view their fellow colonists.

Get the mod pack:
GitHub
#4
Help / [Solved] Troubleshooting Error in my Mod
January 03, 2020, 04:04:58 AM
My Planetside Politics (and/or Religions) mod has been up for quite a while and I while receiving occasional reports of errors I initially attributed them to mod conflicts until I eventually encountered the error.  I've since narrowed down the issue to the harmony patch and specifically to the PawnKindDef type SpaceRefugee.

The harmony patch is used to check when a pawn is created whether or not it should get a specific political or religious trait and it works for tribes people, pirates, outlanders, ancient marines, in fact it works in every instance except for when generating Space Refugees.  I'm at a loss for understanding what is the cause of the error or parsing the language of the debugger.

The debug log error report looks like this:

RimWorld 1.0.2408 rev747
Verse.Log:Message(String, Boolean)
RimWorld.VersionControl:LogVersionNumber()
Verse.Root:CheckGlobalInit()
Verse.Root:Start()
Verse.Root_Entry:Start()

Loading game from file Autosave-2 with mods Core, PPR Backup
Verse.Log:Message(String, Boolean)
Verse.SavedGameLoaderNow:LoadGameFromSaveFileNow(String)
Verse.Root_Play:<Start>m__0()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
at PoliticsandReligions.HarmonyPatches/Patch_GainTrait.Prefix (RimWorld.TraitSet,Verse.Pawn,RimWorld.Trait) <0x00166>
at (wrapper dynamic-method) RimWorld.TraitSet.GainTrait_Patch1 (object,RimWorld.Trait) <0x00026>
at Verse.PawnGenerator.GenerateTraits (Verse.Pawn,Verse.PawnGenerationRequest) <0x00a56>
at Verse.PawnGenerator.TryGenerateNewPawnInternal (Verse.PawnGenerationRequest&,string&,bool,bool) <0x0066d>
at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest&) <0x003b0>
at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest) <0x007bb>
at Verse.PawnGenerator.GeneratePawn (Verse.PawnGenerationRequest) <0x0009b>

Verse.Log:Error(String, Boolean)
Verse.PawnGenerator:GeneratePawn(PawnGenerationRequest)
Verse.PawnGenerator:GeneratePawn(PawnKindDef, Faction)
Verse.<DoListingItems_MapTools>c__AnonStorey36:<>m__0()
Verse.DebugTool:DebugToolOnGUI()
Verse.DebugTools:DebugToolsOnGUI()
RimWorld.UIRoot_Play:UIRootOnGUI()
Verse.Root:OnGUI()

Root level exception in OnGUI(): System.NullReferenceException: Object reference not set to an instance of an object
at PoliticsandReligions.HarmonyPatches/Patch_GainTrait.Prefix (RimWorld.TraitSet,Verse.Pawn,RimWorld.Trait) <0x00166>
at (wrapper dynamic-method) RimWorld.TraitSet.GainTrait_Patch1 (object,RimWorld.Trait) <0x00026>
at Verse.PawnGenerator.GenerateTraits (Verse.Pawn,Verse.PawnGenerationRequest) <0x00a56>
at Verse.PawnGenerator.TryGenerateNewPawnInternal (Verse.PawnGenerationRequest&,string&,bool,bool) <0x0066d>
at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest&) <0x003b0>
at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest) <0x007bb>
at Verse.PawnGenerator.GeneratePawn (Verse.PawnGenerationRequest) <0x0009b>

Verse.Log:Error(String, Boolean)
Verse.Root:OnGUI()


The harmony patch looks like this:
using Harmony;
using RimWorld;
using System.Linq;
using System.Reflection;
using UnityEngine;
using Verse;

namespace PoliticsandReligions
{
    [StaticConstructorOnStartup]

    internal static class HarmonyPatches

    {
        private static HarmonyInstance harmony = HarmonyInstance.Create("PoliticsandReligionsMod");

        static HarmonyPatches()
        {
            HarmonyPatches.harmony.PatchAll(Assembly.GetExecutingAssembly());
        }

        [HarmonyPatch(typeof(TraitSet), "GainTrait")]
        private static class Patch_GainTrait
        {
            [HarmonyPriority(Priority.First)]
            private static bool Prefix(TraitSet __instance, Pawn ___pawn, Trait trait)
            {

                if (trait.def is TraitDef_PoliticsTrait)
                {
                    TraitDef_PoliticsTrait traitPoliticsTrait = trait.def as TraitDef_PoliticsTrait;
                    if (traitPoliticsTrait.isTribalIdeology == false)
                    {
                        if (___pawn.Faction.def.techLevel == RimWorld.TechLevel.Neolithic)
                        {
                            return false;
                        }
                        else
                        {
                            return true;
                        }
                    }
                    else if (traitPoliticsTrait.isPirateIdeology == false)
                    {
                         if (___pawn.Faction.def.defName == "Pirate")
                         {
                            return false;
                         }
                         else
                         {
                            return true;
                         }
                    }
                    else
                    {
                        return true;
                    }
                }
                else if (trait.def is TraitDef_ReligionsTrait)
                {
                    TraitDef_ReligionsTrait traitReligionsTrait = trait.def as TraitDef_ReligionsTrait;
                    if (traitReligionsTrait.isExotheology == true)
                    {
                        if (___pawn.Faction.def.techLevel == RimWorld.TechLevel.Neolithic)
                        {
                            return false;
                        }
                        else
                        {
                            return true;
                        }
                    }
                    else
                    {
                        if (___pawn.Faction.def.defName == "PlayerColony")
                        {
                            return false;
                        }
                        else
                        {
                            return true;
                        }
                    }
                }
                else
                {
                    return true;
                }

            }

        }

    }

}


I can deduce from the "object reference not set to an instance of an object" that that is the crux of the error but I don't understand why it only occurs in this specific reference and what can be done about it when it is otherwise functioning correctly.

Any help resolving this issue would be greatly appreciated.
#5
Releases / [1.2] Planetside Politics and Religions
July 31, 2019, 03:31:23 AM
Planetside Politics and Religions          GitHub          Steam
Adds political ideologies and religious beliefs as traits which create harmony or conflict among pawns.

Colonists (almost always) possess one of nine principal ideologies and one of twenty religious or non-religious beliefs which determine their worldview and how they view their fellow colonists.

Colonists with vastly divergent politics and religions will loathe their time together while colonists with very similar or the same beliefs will find life easier to manage together. Neolithic tribes and pirates also have more limited typically anarchistic or autocratic political opinions which can put them at odds with more civilized brethren. There are also indigenous faiths to the Rim World and Earth religions for intergalactic pawns.

As long as you are willing to invest the time, political opinions and religious beliefs are not set in stone. Intellectual pawns can be committed to writing persuasive propaganda which are crafted from leather at a crafting spot or the new writing desk. While not guaranteed to work, less intelligent pawns are frequently swayed by propaganda of higher quality. Also, during moments of great duress, a colonist may have a crisis of confidence in their ideology or religion and change opinions as well.

For some mod images and a bit more information, or a "lite" version with politics only, check out the original release here.


Get the mod:
GitHub
Steam

Very special thanks to helpful Ludeon Forums members Mehdi and LWM for helping me out with some of the code.  Without you this mod would never have been finished so thank you both very much.

A special thank you to Basarab as well.

Perhaps you'd rather have an ivory statue, a pet crocodile, or a glass eye? Check out my other mods!

Enjoy the mod!
#6
Releases / [1.2] Planetside Politics
April 21, 2019, 06:49:55 AM
Planetside Politics          GitHub          Steam
Adds political ideologies as traits which create harmony or conflict among pawns.

Colonists (almost always) possess one of nine principal ideologies which determine their worldview and how they view their fellow colonists.

Colonists with vastly divergent politics will loathe their time together while colonists with very similar or the same politics will find life easier to manage together. Neolithic tribes and pirates also have more limited typically anarchistic or autocratic political opinions which can put them at odds with more civilized brethren.

As long as you are willing to invest the time, political opinions are not set in stone. Intellectual pawns can be committed to writing persuasive "polemics" which are crafted from leather at a crafting spot or the new writing desk. While not guaranteed to work, less intelligent pawns are frequently swayed by a polemic of higher quality. Also, during moments of great duress, a colonist may have a crisis of confidence in their ideology and change political opinions as well.


Consider the journey of democracy in the "demo" below:
Shrew Tol was exiled from his tribe and left naked and alone in the swaying grass and blistering sun of the savanna.  Yet over the years his home became the fortress of White Rock, carved from a great spire of limestone deposited by the receding of an ancient ocean whose last wave lapped the shores of his home planet billions of years in the past.  Here he established his tribe the Gacha of the Desert and here he tried to build a better community than the one that cast him out.

Here he met Hokojin "Jet" Buraku, who grew up enslaved in a junkyard and who ran away to join the military as soon as she was old enough.  Alas, her ship was destroyed in the atmosphere of Shrew's planet and there she crashed to the ground just outside the wooden palisades that would one day be replaced by the magnificent white walls of White Rock.  She and Shrew became fast friends and once she explained democracy to Shrew, he insisted that she explain it to everyone else at the Gacha as well.

Jet went to work immediately at the writing desk in Twiddle's room.  While Twiddle would rather the Gacha organize itself as a free republic, she nevertheless was more than happy to let her do her writing in her room, well lit, remote and free from the distraction of wandering cave alpacas.


Feeling the pressure, Jet understood that the fate of democracy on this small and turbulent planet could possibly rest on her very shoulders.  After a little effort, she finished her latest piece.  It was certainly not her best work but it was an adequate polemic written on the finest thrumbo vellum.  She then went to find her friend Tomato and insist he retrieve it and read it as soon as possible.



Tomato read the book later that evening.


As it happened, Tomato was not perturbed by the average quality of the work but rather found Jet's polemic on the virtues of democracy to be a very compelling work.  Immediately, from that moment forth Tomato fancied himself a proponent of democracy, and now that he knew Jet also subscribed to that worldview, they surely would get along better knowing that they had a common vision of the future.



Get the mod:
GitHub
Steam

Perhaps you'd rather have an ivory statue, a pet crocodile, or a glass eye? Check out my other mods!

Very special thanks to helpful Ludeon Forums members Mehdi and LWM for helping me out with some of the code.  Without you this mod would never have been finished so thank you both very much.

Enjoy the mod!
#7
    public class CompUseEffect_CustomEffect : CompUseEffect
    {
        public override void DoEffect(Pawn user)
        {
            Random rnd = new Random();
            int intCheck = rnd.Next(1, 20);
            // CompQuality quality =


I have an item that on use has a probability of success and I'd like to somehow access the quality of the item being used in order to influence the probabilities.

Is it possible?
#8
Help / Backstories, traits and mods - HELP!
April 16, 2019, 05:03:40 PM
Hello RimModders,

First off, bona fides, I'd say I'm a 70-80% proficient modder for RimWorld.  As well as making new animals and weapons on the simpler xml end, I've wrestled with C# and have compiled my first assembly for my mod Planetside Politics available on Steam Workshop.  I've also worked on modifying Castor's existing mod Religions of RimWorld.

So now I have always present political and religious priorities for my pawns greatly complicating pawn social interaction as desired.  The mods are great.

Now, "The Problem."

I would like to limit planet indigenous tribes to certain religions and limited political ideologies like theocracy and monarchy and away from "post-industrial" ideology and likewise for religion.  I don't want space colonists starting with rim planet tribes' religious beliefs and I want pirates to have despotic politics and sinister religious practices, etc.

Knowing that backstories are somewhat hidden for kickstarter reasons, etc etc, is there a convenient way that I can tie traits to backstories?

The solution as I see it is to create a new C# class as a list to add to PawnKindDefs with something like <ForcedTraits> which would require them on character creation but I'm not entirely sure how to inject that into the character creation process so that the data actually gets used.

At the moment I'm attempting to reverse engineer from Rainbeau Flambe's Editable Backstories and Names 1.0 mod but his mod has a much more significant scope so extracting what is of use to me from his wall of code is a bit difficult and as I'm not attempting to reinvent the wheel, just make sure a certain hubcap goes with each one, it seems like I'm making it more difficult for myself than I really am.

So long story short, I have new traits.  I'd like tribals and pirates and outlanders and all the default classes to start with specific traits and never start with others.  Any suggestions?

Thanks for any help in advance!
Cheers,
LM