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 - O Negative

#1
Help / Re: Improved Turret Research (Old Alpha Idea)
October 19, 2022, 08:45:17 PM
Solved:

<ResearchProjectDef>
        <defName>GunTurretCooling</defName>
        <label>gun turret cooling</label>
        <description>Gun turrets fire four shots in a burst instead of three.</description>
        <totalCost>400</totalCost>
    <researchMods>
      <li>
        <specialAction>ResearchModsSpecial.GunTurretCooling</specialAction>
      </li>
    </researchMods>
    </ResearchProjectDef>




Credit: Aelanna
#2
Help / Improved Turret Research (Old Alpha Idea)
October 19, 2022, 07:58:49 PM
Long ago, there was an alpha with research that made turrets shoot bursts of 4 bullets instead of 3 bullets. I believe it used an xpath patch in the .dll, but I don't remember exactly how it worked.

Does anyone remember how this was done? I'm interested in exploring changing stats using research.

If anyone knows if the old alphas from like 2014/2015 are open source or not, I would like to ethically dissect them and find what I'm looking for.

Any help is appreciated.
#3
Help / Re: Hauling error
December 07, 2020, 02:33:51 PM
When Lilu is trying to smelt a slag steel chunk to the electric smelter, there's an error in the job toil.

It looks like you're looking for a mod called "Vacuum Is Not Fun"? Let me know if this helps at all.
#4
Help / Re: Help making a special melee weapon
December 07, 2020, 02:30:42 PM
Just for clarification, does the weapon apply the plague to people or does it do more damage to people who already have the plague? :o

If you want the weapon to add the plague hediff, that's easy and can be done with xml. For the second one, you're going to need to write a special damage worker with C# that checks to see if the target has the plague on-hit, and that's where the calculations are going to take place.
#5
Help / Head Graphic Change
December 07, 2020, 02:01:10 PM
I'm trying to set the head graphic of a pawn. I'm starting by trying to reference the head graphic of another pawn.

I saw on another question to use something like this:
pawn.Drawer.renderer.graphics.headGraphic = pawn2.Drawer.renderer.graphics.headGraphic;

Any ideas on what might be going wrong here?



Thanks in advance
#6
Mod bugs / Re: Facial Apparel Make Pawns Bald
March 29, 2020, 06:52:39 AM
Thank you for this, I was completely unaware :)
#7
Mod bugs / Facial Apparel Make Pawns Bald
March 27, 2020, 03:40:41 PM
Hello,

Currently, there's no way to make facial apparel that doesn't make the pawn go bald. For example, a pair of glasses that only cover the eyes will still cause the pawn to go bald when worn due to the "overhead" layer being necessary to use for it to appear on the pawn's face when worn.

An additional layer for the head which does not interfere with hair rendering would be greatly appreciate by modders, such as myself :)

While there are mods out there that allow for hair to be rendered while wearing "hats", it should not be necessary to have ALL hats render hair if I want my colonists to be able to wear a pair of glasses and not be bald. I really do think a lot of potential opens up for unique apparel items if a second head apparel layer were to be created.
#8
Help / Re: Custom Apparel Stat Def Question
March 08, 2020, 08:14:42 PM
Solved on Discord. Mods, please delete :)
#9
Help / [SOLVED] Custom Apparel Stat Def Question
March 08, 2020, 06:11:10 PM
Hi,

I'm looking to make a custom apparel stat def, but it isn't working properly. Am I missing something?

XML

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

  <StatDef>
    <defName>customStatDef</defName>
    <label>custom stat def</label>
    <description>The ability of this equipment to prevent healthy individuals from getting sick.</description>
    <category>Apparel</category>
    <defaultBaseValue>0</defaultBaseValue>
    <minValue>0</minValue>
<toStringStyle>PercentZero</toStringStyle>
    <showOnPawns>true</showOnPawns>
<parts>
      <li Class="StatPart_Quality">
        <factorAwful>0.2</factorAwful>
        <factorPoor>0.5</factorPoor>
        <factorNormal>1</factorNormal>
        <factorGood>1.1</factorGood>
        <factorExcellent>1.2</factorExcellent>
        <factorMasterwork>1.3</factorMasterwork>
        <factorLegendary>1.4</factorLegendary>
      </li>
    </parts>
    <displayPriorityInCategory>501</displayPriorityInCategory>
  </StatDef>

</Defs>



<?xml version="1.0" encoding="utf-8" ?>
<Defs>
  <ThingDef ParentName="ApparelMakeableBase">
    <defName>Apparel_CollarShirt</defName>
    <description>A nice-looking collared shirt with buttons.</description>
    <label>button-down shirt</label>
    <snip>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <WorkToMake>2700</WorkToMake>
      <Mass>0.3</Mass>
      <customStatDef>500</customStatDef>
      <StuffEffectMultiplierArmor>0.2</StuffEffectMultiplierArmor>
      <StuffEffectMultiplierInsulation_Cold>0.26</StuffEffectMultiplierInsulation_Cold>
      <StuffEffectMultiplierInsulation_Heat>0.10</StuffEffectMultiplierInsulation_Heat>
      <EquipDelay>1.5</EquipDelay>
    </statBases>
    <snip>
  </ThingDef>
 


In the game, the apparel will show this customStatDef with the appropriate percentage. However, when you access the pawn's stats through the information panel, it shows 0%. How do I get this to update in the pawn's information panel?

Any help is greatly appreciated.
#10
I don't really plan on adding all of the things Thirite did, unfortunately. After playing with this mod, I think pregnancy would be a nice base function and mods would be good for expanding on it (adding still-birth, deformities, health abnormalities, etc.) and aging treatments, as you've suggested.

This mod shouldn't have any incompatibilities with EPOE, unless they've added clothing since I've last looked at it?

The problem with "disabling" non-vanilla clothing is that I don't know of a way to prevent them from equipping something, I only know how to make them drop what they're already wearing. So, that's not very user friendly... You know?

#11
Children and Pregnancy [Experiment]

Introduction
Hello, and welcome to my experimental children and pregnancy mod. This mod is a mediocre attempt to replicate what I imagine a RimWorld update would look like if children were added to the game. The mechanics are incredibly basic, but functional.

Basics
Human pawns have "Gonads" which are responsible for determining their fertility stat. Gonads are susceptible to damage during combat, and damaged gonads will make it harder for your pawns to reproduce. Fertility can also be influenced by surgery (neuter) or drugs (birth control, fertility treatment).

When a child is born, their appearance is reset based on the physical characteristics of the parents. Skin color is the first thing you'll notice, which I've attempted to simulate as a polygenic trait as best as I could. Hair color is a random dice-roll between mother and father. Their automatically generated story is wiped clean. No backstories, no passions, no skills, no traits. Over time, the pawn will grow up and start to gain these things. Think of it as a form of character development.

Body Types and Clothing
Children have custom body types, which means custom clothing textures. I've gone ahead and made the base-game textures necessary, but any mods that add apparel won't play nice with this unless they also include the necessary textures. These custom body types are necessary for babies to not look like full-grown adult humans, unfortunately. It also helps toddlers and children not look like they've already gone through puberty (Female breasts, Male hulking bodies)

Relationships
One of my main concerns regarding this topic revolves around romantic relationships being formed randomly. I don't like the idea of toddlers forming romantic relationships with adults and potentially lovin' and getting pregnant. So, the work-around that I've implemented is a simple check for age in my own InteractionWorker and an XML change to the appropriate interaction def.

Child Encounters
You will NOT encounter any children that are not produced by your own colony. Other factions will not use children to defend their bases, because that would put the player in a situation where they are forced to kill children to accomplish a successful raid, and that's just poor game design... They will also not appear in trade caravans or raids.

Health
Mothers that give birth have a small chance of dying due to bloodloss; However, that is incredibly unlikely. I added bloodloss as a complication of child birth because I thought it was weird how mothers could get up immediately after childbirth and get back to work. With this, they now have at least a short resting period before they can get back to their daily duties.

Newborns are born with a hediff called "Human Development", which is my way of getting the game to call my methods which are responsible resetting/setting a pawn's story/stats.

Older pawns will ALWAYS develop infertility eventually. I initially wanted to go for "Menopause" for women and "Andropause" for men. However, I couldn't get my custom HediffGiver to work properly with specific genders; That's not the game's fault, I'm just not a great coder ;D

Time Scale
One of the biggest arguments I've heard in the past in opposition to children in the game is that they don't fit with the time scale. However, I think this argument is made by those that tend to play at higher difficulties, exclusively. I'm personally a bit more of a casual player, who plays to survive on the planet for as long as possible and not speed run to the spaceship escape ending(s).

For me, personally, children have added a layer of story development I didn't previously have.

Issues/Bugs
THOUGHTS: Babies and toddlers have thoughts they really shouldn't. It's something that really bothers me, but I don't have enough control over all of the thought workers and the thought workers added by mods to fix this issue in the way I'd like to. Ideally, these thoughts wouldn't happen in super young pawns...

TRAITS: Pawns sometimes gain traits with descriptions that don't always make sense. For instance, the Cannibal trait suggests they've eaten human flesh, but that doesn't always happen before that trait get inherited with the way I have things laid out... This kind of thing can be very immersion breaking.

APPAREL: More body types means more work for apparel modders... I know the pain of trying to make a mod like this, and can only imagine how frustrating it would be to have to make SIX more textures for one piece of apparel...

Future Updates/Plans
I have absolutely NO plans to expand on this idea more than I already have. I feel like it's really easy to expand this kind of thing too far, and make it more frustrating than interesting.

Feedback and Conversation
Feel free to converse on the topic of children in the game here, but make sure you stick to the forum discussion guidelines.

Download
You can download the mod here.
I have opted to NOT upload this to Steam.
#12
Help / Re: Mass carried stat
January 08, 2019, 03:53:00 PM
I've tried messing with that also, but with no luck. The only way I've been able to increase that value is by increasing the bodySize or a pawn, which also makes that pawn easier to hit while in combat, and also yield more butcher products...

Sorry my answer wasn't super helpful, but wanted you to know that you're not alone! Haha
#13
Help / Re: Adding Trait Does Not Disable Work Type/Tag
January 07, 2019, 06:16:31 PM
Ugh, you're 100% RIGHT...

I was using the wrong stupid method...

I was using pawn.story.trait.AllTraits.Add(...); Instead of pawn.story.traits.GainTrait(...);

To think, I spent hours trying to figure out what was going wrong T-T
#14
Circumstances: Vanilla (No Mods)

What Happened: Debug Tool - Give Trait was used to add a trait (Pyromaniac) to a pawn. The pawn was unable to fight fires, however the work settings allowed me (the player) to "check" firefighter as enabled.

What I Expected to Happen: A pawn that gains a trait should not be able to be assigned work types which are supposed to be disabled by said trait.

Steps to Reproduce:

  • Enable Dev-Mode
  • Load/New Game (Doesn't Matter)
  • Spawn colonists until you have at least one colonist who is capable of the firefighting work type
  • Use the dev-mode command to "Give trait..."
  • Select Pyromaniac
  • *Click* pawn to give trait
  • Open the pawn's bio tab
  • Note that the pawn's trait list has been updated, as has the "Incapable Of" list...
  • Open up the general work tab (bottom of screen)
  • Notice that the box to be assigned firefighting is still there and can be selected/deselected.

IMPORTANT NOTE:
If the gave is saved after the pawn has been given the trait, and then reloaded, the work settings seem to finally register the change, and the box is gone, as it should be.




This isn't such an issue for general gameplay, but this is a problem for modders such as myself who are looking for ways to effectively develop characters over a period of time :)
#15
I've found that using the debug tool to add a trait to a pawn doesn't add the disabled worktags, and the same thing applies to methods that Add traits to pawns.

These method calls also don't do the trick:
pawn.skills.Notify_SkillDisablesChanged();
pawn.workSettings.Notify_GainedTrait();

What am I missing here?

Note: Dev Mode (Give trait...) also has the same issue...