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

#1
Help / Weird Surgery Recipe XML
July 29, 2019, 11:43:25 AM
I was trying to get an install Brain as a Surgery, but it never showed up. The code I had was simply based off of other surgeries.
<RecipeDef ParentName="SurgeryFlesh">
    <defName>InstallNaturalBrain</defName>
    <label>install brain</label>
    <description>Installs brain.</description>
    <workerClass>Recipe_InstallNaturalBodyPart</workerClass>
    <jobString>Installing brain.</jobString>
    <workAmount>1200</workAmount>
    <ingredients>
      <li>
        <filter>
          <categories>
            <li>Medicine</li>
          </categories>
        </filter>
        <count>3</count>
      </li>
      <li>
        <filter>
          <thingDefs>
            <li>Brain</li>
          </thingDefs>
        </filter>
        <count>1</count>
      </li>
    </ingredients>
    <fixedIngredientFilter>
      <categories>
        <li>Medicine</li>
      </categories>
      <thingDefs>
        <li>Brain</li>
      </thingDefs>
    </fixedIngredientFilter>
    <appliedOnFixedBodyParts>
      <li>Brain</li>
    </appliedOnFixedBodyParts>
  </RecipeDef>

(Yes I did create a BodyPartDef and ThingDef for Brain.)
It didn't work until I saw that EPOE created an Abstract def called SurgeryNatural
<RecipeDef Name="SurgeryNatural" ParentName="SurgeryFlesh" Abstract="True">
<surgerySuccessChanceFactor>0.8</surgerySuccessChanceFactor>
<deathOnFailedSurgeryChance>0.3</deathOnFailedSurgeryChance>
<recipeUsers>
<li>Human</li>
</recipeUsers>
</RecipeDef>

I believe the important part is <recipeUsers> but I don't know why that's needed simply because vanilla surgeries just use SurgeryFlesh without having that tag.Can anyone explain?
#2
Help / MentalBreaks aren't happening
July 27, 2019, 09:59:23 AM
I'm trying to set off certain mental breaks through C#, such as when a play gets shot by a certain MentalStateGiver m = new MentalStateGiver();
m.mentalState = MentalStateDefOf.Berserk;
m.mtbDays = 0.001f;
p.mindState.mentalStateHandler.TryStartMentalState(m.mentalState, "Debug");
The code does activate the Beserk MentalState but the pawn just stands there doing nothing. Has anyone done this before?
#3
Support / Rimworld Laggy on Fullscreen
July 26, 2019, 05:16:50 AM
I recently noticed that putting Rimworld on Non-Fullscreen makes the game so much smoother. Like night and day difference. I currently have a GTX 960M on my laptop but was wondering if anyone had a fix for this. I'd like to keep my game in Fullscreen because it's just more immersive. Also on non-fullscreen if the window isn't 100% maxed out it also lags.
#4
Help / Drug that removes DrugTolerance?
July 26, 2019, 04:44:22 AM
I would like to make a drug that will negate tolerances of certain drugs such as go juice( Mostly so I can make a pawn never sleep). So far I've seen
<existingAddictionSeverityOffset> But nothing of the sort seems to exist for Tolerances. Is there any way of removing drug tolerances using just XML?
I've thought of using C# to override ChemicalDef and add an existingToleranceSeverityOffset but that seems a bit overkill for a simple mod. Any help is appreciated.
#5
Help / C# Pawn Inventory Help
November 21, 2018, 09:35:11 PM
Hello fellow modders,

I am currently making a mod that requires 2 pawns to "pass off" an item from one to the other. Right now, I'm just making the item disappear from one pawn, but I can't figure out how to magically add it to the other one without spawning the weapon and forcing the pawn to take it.

Any thoughts would be appreciated!
#6
Help / [SOLVED]Player-Only weapons?
November 20, 2018, 10:35:48 PM
I started making a simple stun rifle weapons mod, and while I enjoy it so far, it gets really weird when enemy raiders spawn with this weapon as well (everyone ends up knocked down, they get up, and repeat). What would I put in the weapon's xml file to make this weapon only available for the player to use/craft?

Any feedback would be appreciated!