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

Messages - Boartato

#1
While we're on to feedback:

Merciless
Cassandra
Temperate Forest
Mountains + Coast
Every game lasts at least 3 hours, played a 10 hours stretch recently. Usually survive the first winter or two, so mostly early game.

Food poisoning based on filth chance right now causes a weird kind of immersion breaking (well for me at least) solution. Because cooks won't clean up filth, you *have* to have a huge kitchen to offset the dirty tiles. But because meals are made 1 by 1, walking time is a massive factor, so you shove the stove beside doors to ingredient storages. This is less of an issue at lower difficulties, but at extreme I basically have to micro manage my cook to clean or everyone gets food poisoning (at least this doesn't wipe my colony).

It looks really dumb with a kitchen stuck in the corner of a big room you try to prevent people/animals walking in. And the micromanagement to make a pawn do their job right feels wrong.

I feel like cleaning filth in the kitchen, if we keep this mechanic, should be mandatory as part of the cooking task. Cooking in unfloored rooms or at the campfire keeps the food poisoning from dirt issue, but once you've got a proper kitchen it shouldn't be an issue you have to keep microing.

#2
Highest difficulty only for me is the hallmark of being a Dwarf Fortress vet and a roguelike player. It's what I'm used to playing in games like these, and making it to extreme end game is pretty boring for me. I'm not sure why, but I don't like playing huge colonies. And it's worth noting I'm not amazing at micromanaging this game, so I'm definitely not someone winning those game conditions.

Glorious desperate deaths make for good stories.
#3
Quote from: Mehni on July 25, 2018, 02:45:14 AM
@Haplo -- Don't know how it is in 1.0 but at least in B18 PatchOperationSequences were limited to one XML-file, for some reason unknown to me. All Defs starting with Bow_ reside in one file, whereas the Gun_ is spread out over four. Maybe target the parent instead? Read on:

@Boartato -- tcjaime had the exact same issue one page ago and posted the solution on this page. If you want to target by attribute, such as Name="StandingLampBase", you use @Name="StandingLampBase". The @ is one of the many special symbols in xpath; in this case it targets attributes. * would be a wildcard. See also https://gist.github.com/Zhentar/4a1b71cea45b9337f70b30a21d868782#patching-abstracts

Thanks! I actually ran across that naming convention, but didn't realize why it was being used. That link in particular is awesome, I don't know how I haven't found it but that'll be very useful! And I'll remember haplo's lesson as well :)
#4
After hours of racking my brains, googling and testing:

I can modify workSkill in CookMealSimple
I cannot modify workSkill in CookMealBase (abstract limitation maybe...?)
I cannot modify defaultIngredientFilter in CookMealSimple.

Edit: Found my answer. My tutorials were wrong or I misread them, xpath is not applied after inheritance at all. I still can't modify abstract classes, but the reason why trying to add to the defaultIngredientFilter was failing is because it didn't exist yet (not yet inherited from parent). However if I create one in the CookMealSimple, it adds anything in its filter to the one it inherits from base, so I'll take it. Still feels hacky needing to do it to every meal individually, but eh.
#5
Help / Re: Mass Capacity
July 23, 2018, 10:33:31 PM
Sorry for misreading. Worst case scenario is C# coding in new game functionality then I guess :/
#6
Help / Re: Mass Capacity
July 23, 2018, 08:26:20 PM
https://ludeon.com/forums/index.php?topic=36589.0

I had a hunch it was related to manipulation as well as bodysize due to having brain damaged pawns not be able to haul much.

Haven't done any of that myself, but hope it helps.
#7
<?xml version="1.0" encoding="utf-8" ?>

<Patch>
<Operation Class="PatchOperationReplace">
<xpath>Defs/RecipeDef[defName="CookMealBase"]/workSkill</xpath>
<value>
<workSkill>Intellectual</workSkill>
</value>
</Operation>
</Patch>


Is there some semantics related to abstract classes that's needed for xpath? Changing only CookMealBase to CookMealSimple I can edit things like the labels, but if I try to do it on CookMealBase it errors continually.

https://rimworldwiki.com/wiki/Modding_Tutorials/XML_file_structure

This tutorial seems to suggest that abstract classes cease to exist after loading, and I seem to remember relatively recently that Xpathing happens after loading now instead of before. Would that mean that instead of being able to Xpath an abstract, I will have to xpath each file that inherits the abstract instead?
#8
Thanks again! This was a huge help.
#9
Thank you very much! I was definitely including filenames in the path, I didn't realize they don't count as nodes. That said: Holy crap it works! Taking what you told me, I also got my original experiment to work as well!!!

<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="Human"]/recipes</xpath>
<value>
<li>Boart_InstallPogLeg</li>
</value>
</Operation>
</Patch>


You're the best :)

One thing that confuses me: Why is it /Defs/ThingDef when it's stored in Defs/ThingDefs_Misc/Weapons ? Every tutorial I've read says "where the file is stored" and yet there isn't even a folder called ThingDef. Would recipes like my little surgery mock up be stored in Defs/RecipeDef then?

#10
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>*/RangedIndustrial[defName="Gun_Revolver"]/description</xpath>
<value>
<description>Why doesn't anything work?</description>
</value>
</Operation>
</Patch>


I've been struggling with Xpath for a solid 8 hours. Finally decided to stop trying to do anything meaningful and really see if I could get a basic Xpath down. This code above fails. Every tutorial I've read, if I'm understanding things correctly, says this should work. This tutorial in particular would be the one closest to what I'm trying to do: https://gist.github.com/Zhentar/4a1b71cea45b9337f70b30a21d868782
#11
Thanks for all your help. I'll try posting that thread (have definitely tried what you typed out), it hadn't been posted in for a while so I figured a new topic made more sense than a necro.
#12
With all due respect, I have been looking at every resource I can find. I know this is a basic question, I understand the concept of nodes and child nodes in Xpath. I've read all the rimworld specific Xpath tutorials I can find. If Xpath doesn't give a hoot about folder paths, and it considers XML files to be nodes (which all the tutorials seem to treat them as) I see no reason why this code shouldn't work:

<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>*/Races_Humanlike[defName="Human"]/recipes</xpath>
<value>
<li>*/Recipes_Boart_Surgeries[defName="Boart_InstallPogLeg"]</li>
</value>
</Operation>
</Patch>


It doesn't. I'm telling Xpath to search for a node called "Races_Humanlike", and to add something to the node recipes within the child node Human. I'm telling it to add the def "Boart_InstallPogLeg" from the node Recipes_Boart_Surgeries.

This and several other versions I've tried to make seem to follow all the rules tutorials suggest. But it continues to fail patching.

I'm not asking for more tutorials, I'm asking what I'm doing wrong :/

Edit2: Trying to go even more basic, I can't even replace a description of a revolver... The error message suggests that I'm actually getting the pathing right though.

<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationReplace">
<xpath>*/RangedIndustrial[defName="Gun_Revolver"]/description</xpath>
<value>
<description>Why doesn't anything work?</description>
</value>
</Operation>
</Patch>
#13
Thanks for the tip, really worked on streamlining my code to get the desperate junk I threw in from various sources cleared out. Now having an xpatch issue.

Rimworld>Mods>BoartatoBionics is my root folder, with Defs and Patches inside it. I know I'm having a syntax issue, but without any knowledge of what should work I can't figure it out from the generic "patch failed" error message. I've tried several different pathing options, like including root folders/classes but none of them seem to be the magic combination. Xpatch code is inside Surgery_Inserter.xml and the surgery is inside Recipes_Boart_Surgeries.xml

Surgery_Inserter.xml Code
<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>*/Races_Humanlike[defName = "Human"]/recipes</xpath>
<value>
<li>Boart_InstallPogLeg</li>
</value>
</Operation>
</Patch>


Recipes_Boart_Surgeries.xml code
<?xml version="1.0" encoding="utf-8" ?>
<Defs>

<RecipeDef ParentName="SurgeryFlesh">
<defName>Boart_InstallPogLeg</defName>
<label>install pog leg</label>
<description>Install a pog leg.</description>
<workerClass>Recipe_InstallArtificialBodyPart</workerClass>
<jobString>Installing pog leg.</jobString>
<workAmount>1300</workAmount>
<surgerySuccessChanceFactor>1.30</surgerySuccessChanceFactor>
<skillRequirements>
<Medicine>3</Medicine>
</skillRequirements>
<ingredients>
<li>
<filter>
          <categories>
<li>Medicine</li>
</categories>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>WoodLog</li>
</thingDefs>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>Medicine</li>
</categories>
<thingDefs>
<li>WoodLog</li>
</thingDefs>
</fixedIngredientFilter>
<appliedOnFixedBodyParts>
<li>Leg</li>
</appliedOnFixedBodyParts>
<addsHediff>SimpleProstheticLeg</addsHediff>
</RecipeDef>

</Defs>
#14
Help / Beginner issue: Can't get surgery to appear
July 19, 2018, 03:13:24 PM
I've googled, checked threads on this forum, and looked at other mods. I have no idea what I'm doing wrong, but this practice surgery of installing a "pog leg" doesn't appear. I've tried renaming my definitions, I've tried having it install different body parts, I've tried including base definitions in the file. I tried copying all the code from the Core defs and changed names to try and get a duplicate surgery.

Absolutely nothing works, even though Rimworld only claims that my version is a mismatch when loading.

<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <RecipeDef Abstract="True" Name="Boart_SurgeryFlesh">
    <effectWorking>Surgery</effectWorking>
    <soundWorking>Recipe_Surgery</soundWorking>
    <workSpeedStat>MedicalOperationSpeed</workSpeedStat>
    <workSkill>Medicine</workSkill>
    <workSkillLearnFactor>16</workSkillLearnFactor>
  </RecipeDef>

<RecipeDef ParentName="SurgeryFlesh">
<defName>Boart_InstallPogLeg</defName>
<label>install pog leg</label>
<description>Install a pog leg.</description>
<workerClass>Recipe_InstallArtificialPart</workerClass>
<jobString>Installing pog leg.</jobString>
<workAmount>1300</workAmount>
<surgerySuccessChanceFactor>1.30</surgerySuccessChanceFactor>
<skillRequirements>
<Medicine>3</Medicine>
</skillRequirements>
<ingredients>
<li>
<filter>
          <categories>
<li>Medicine</li>
</categories>
</filter>
<count>1</count>
</li>
<li>
<filter>
<thingDefs>
<li>WoodLog</li>
</thingDefs>
</filter>
<count>1</count>
</li>
</ingredients>
<fixedIngredientFilter>
      <categories>
        <li>Medicine</li>
      </categories>
      <thingDefs>
<li>WoodLog</li>
</thingDefs>
</fixedIngredientFilter>
<appliedOnFixedBodyParts>
<li>Leg</li>
</appliedOnFixedBodyParts>
<addsHediff>Boart_SimpleProstheticLeg</addsHediff>
</RecipeDef>

</Defs>


<?xml version="1.0" encoding="utf-8" ?>
<Defs>
  <!-- Added body parts -->

  <HediffDef Name="Boart_AddedBodyPartBase" Abstract="True">
    <hediffClass>Hediff_AddedPart</hediffClass>
    <defaultLabelColor>(0.5, 0.5, 0.9)</defaultLabelColor>
    <isBad>false</isBad>
  </HediffDef>

  <HediffDef ParentName="Boart_AddedBodyPartBase">
    <defName>Boart_SimpleProstheticLeg</defName>
    <label>Boart's prosthetic leg</label>
    <labelNoun>a prosthetic leg</labelNoun>
    <spawnThingOnRemoved>SimpleProstheticLeg</spawnThingOnRemoved>
    <addedPartProps>
      <solid>true</solid>
      <partEfficiency>0.85</partEfficiency>
    </addedPartProps>
  </HediffDef>

 
</Defs>