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

#1
Releases / Re: [1.0 unstable][B18] Karthas's Mods
August 09, 2018, 02:00:58 PM
The errors in the 1.0 version are known, but I haven't had time to really look at what methods changed that broke it. Hopefully I'll be able to get that fixed this weekend.
#2
You're not going to be able to do this with just defs. You'd need to write a custom bill class in C#.
#3
Help / Re: Make implant / bionic part removable?
July 31, 2018, 02:05:21 AM
So apparently the recipes to remove Hediffs go through an entirely separate process, and only Recipe_RemoveBodyPart actually triggers SpawnThingsFromHediffs to create the spawnThingOnRemoved. At the moment, I can't think of any way to make an implant re-spawn on being removed without making a custom recipe class that inherits from Recipe_Surgery.
#4
Just throw that conditional if inside the patch. If the thing you're looking for is true - change the __result, and if it's not - leave it alone.


//annotations here
HarmonyPatch
{
    static void Postfix(ref bool __result)
    {
        if (Bill_Medical.Contains("Medical_Bill_123")
        {
            __result = true;
        }
    }
}
#5
Help / Re: Harmony patching on specific event?
July 29, 2018, 01:47:42 AM
What exactly is the behavior you're looking for? Are you concerned about the extra checks in the patch slowing down the game? Even if it's something that's being called all the time, unless you have a lot of extra code being processed it shouldn't be a problem.
#6
What exactly are you hoping to do with the name of the billDoer? Do you need to be able to cancel the bill or otherwise control its execution? More information would make it easier to offer a potential solution.
#7
Help / Re: So this happened, help?
July 19, 2018, 02:01:54 AM
Putting aside the sheer volume of config errors that are thrown while your mods are loading (which implies there are several mods which are not formatted correctly for B18 compatibility), there is a large section of the error log that says that there are terrain components that are null or missing data, as well as several NullReference exceptions when generating the terrain. Some mod that either adds terrain or patches terrain generation is absolutely broken, or incompatible with another mod you have.
#8
Help / Re: How to prevent quest rewards?
July 17, 2018, 04:30:55 AM
There is no way to prevent the game from generating an item or minified building using only XML.

Unfortunately each of the different types of quests has their own version of ItemCollectionGenerator_Rewards. The only way you could safely remove it from all quest rewards would be to either patch ItemCollectionGeneratorUtility.Reset() to keep it out of the main list, or patch each of the quest types to reject it as a possible reward. There really should be a tag that you can apply to let the game know that an item or minified building should be exclusively craftable.
#9
Help / Re: baseMoodEffect over time?
July 14, 2018, 03:05:39 AM
Alcohol has a specifically coded c# classes that cause AlcoholHigh to create a Hangover Hediff once it reaches the third stage, and then hide it until the AlcoholHigh one is gone. So if you want to replicate that process, you'd have to calculate how long it will take for AlcoholHigh to fall from the minSeverity of stage 3 all the way to nothing, and how much of the Hangover severity would be left at that time.
#10
Help / Re: baseMoodEffect over time?
July 13, 2018, 04:47:58 PM
Short perusal of the code: If there are fewer mood stages than Hediff stages, it will continue using the last mood for an extra stage. For the Inebriated ThoughtDef this means the hammered stage is used during the blackout stage. For Hungover, (which actually has 4 moods but only 3 stages), the extra mood appears to go entirely unused, but might be a holdover from a different way of making the thought invisible until AlcoholHigh faded?

If short, if you just make the number of mood stages match the Hediff stages, it should work out.
#11
Help / Re: Psychite Pekoe?
July 12, 2018, 01:16:20 AM
Psychite Pekoe is made at the Crafting Spot. (recipeUsers in Psychite_Pekoe.xml) It's one of the few random ThingDef's that make use of recipeMaker tag to declare recipeUsers within the ThingDef instead of having it in a separate RecipeDef.
#12
Help / Re: Make implant / bionic part removable?
July 12, 2018, 01:10:37 AM
Take a look at the recipe for ExciseCarcinoma. You need a surgery recipe that removes the Hediff of the implant/bionic part. As long as spawnThingOnRemoved is set, you'll get the part back. (Implants use the workerClass Recipe_InstallImplant to preserve the existing part, where bionic parts use Recipe_InstallArtificialBodyPart to replace the part and any sub-parts).
#13
For some arcane reason, animals have their PawnKindDefs inside the race files, while Mechanoids have a file called PawnKinds_Mechanoid within PawnKindDefs_Humanlikes. If I had to take a guess at the problem you're facing, it comes from the fact that bodyGraphicData is per lifeStage, and the default deer has a specific thing for it's adult lifeStage where it has both bodyGraphicData and femaleGraphicData. Mechanoids have only one lifeStage (Fully Formed), so I'd double check all your references for lifeStages between the PawnKindDef and the ThingDef for your Dara to make sure they line up, and are pointing at a regular bodyGraphicData.
#14
The Deer ThingDef in Races_Animal_Temperate looks for a BodyDef called QuadrupedAnimalWithHooves. When you got rid of the Antlers, you probably didn't change the race's ThingDef back to the base QuadrupedAnimalWithHooves instead of the custom Dara BodyDef.
#15
Help / Re: Badassanimal Tag
July 08, 2018, 10:47:22 PM
LifeStages.xml gives details about how bodySize is affected by age. Combat power is not directly affected by age, but bodySize does affect health. maxPreyBodySize is a binary check limiting the maximum size of an animal that predator will hunt (If it's greater than that size, isAcceptablePreyFor() immediately returns false). The last thing the utility checks is the relative fitness of the potential prey vs itself (taking into account both combatPower and SummaryHealthPercent). A simplified version of the formula is approximately: is the predator's combatPower*health at least 85% of the potential prey's combatPower*health.