Ludeon Forums

Ludeon Forums

  • July 15, 2020, 08:49:31 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

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.

Messages - O Negative

Pages: [1] 2 3 ... 51
1
Mod bugs / Re: Facial Apparel Make Pawns Bald
« on: March 29, 2020, 06:52:39 AM »
Thank you for this, I was completely unaware :)

2
Mod bugs / Facial Apparel Make Pawns Bald
« on: 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.

3
Help / Re: Custom Apparel Stat Def Question
« on: March 08, 2020, 08:14:42 PM »
Solved on Discord. Mods, please delete :)

4
Help / [SOLVED] Custom Apparel Stat Def Question
« on: 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
Code: [Select]
<?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>

Code: [Select]
<?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.

5
Unfinished / Re: [V1.0] [O-NEG] Children and Pregnancy [EXPERIMENT]
« on: January 16, 2019, 01:10:10 PM »
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?


6
Unfinished / [V1.0] [O-NEG] Children and Pregnancy [EXPERIMENT]
« on: January 12, 2019, 01:43:46 PM »
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.

7
Help / Re: Mass carried stat
« on: 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

8
Help / Re: Adding Trait Does Not Disable Work Type/Tag
« on: 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

9
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 :)

10
Help / [SOLVED] Adding Trait Does Not Disable Work Type/Tag
« on: January 06, 2019, 03:04:40 PM »
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...

11
Help / Re: Enable/Disable Work Type (Capable vs Incapable)
« on: January 03, 2019, 07:10:24 PM »
AH! I forgot all about traits! I think I'll definitely be using that for the initial "Make Incapable" I'm looking for with certain pawns. However, when I go to make them capable again, I've found the method needed to do so after quite a bit of playing in Visual Studio.

Code: [Select]
// This will make a pawn incapable of the work type given as the argument, and disable associated skills.
pawn.story.DisabledWorkTypes.Add(WorkTypeDef w);

// This will make pawns capable of the work type given as the argument, but will NOT enable associated skills.
pawn.story.DisabledWorkTypes.Remove(WorkTypeDef w);

// This will make pawns capable of every work type again
pawn.story.DisabledWorkTypes.Clear();

I've found that when enabling work-types, it is necessary to re-make the SkillRecord of all associated re-enabled work-types. If that makes sense xD So, what I do, is this:

Code: [Select]
// Disable the work-type of "Warden"; Effectively disables the "Social" SkillRecord, making it so that the pawn cannot learn the skill at all.
pawn.story.DisabledWorkTypes.Add(WorkTypeDefOf.Warden);

// It's just good practice to implement checks before removing things from lists :P
if(pawn.story.DisabledWorkTypes.Contains(WorkTypeDefOf.Warden)
{
// This will re-enable the work-type of warden. In the game, this just means the pawn can be assigned to the "Warden" task again. However, the "Social" skill is still DISABLED.
pawn.story.DisabledWorkTypes.Remove(WorkTypeDefOf.Warden);
}

// THIS PART IS UNTESTED; It is a stub of some code that I've used and tested, though.
// Declare a new SkillRecord
SkillRecord cleanSocial = new SkillRecord(pawn, SkillDefOf.Social);
// Assign the clean SkillRecord to the pawn
pawn.skills.skills.Add(cleanSocial);

// The pawn now has an enabled SkillRecord for the "Social" skill type, though the level is set to 0, as is the total xp

12
Help / Re: Enable Human Pregnancy
« on: January 02, 2019, 09:50:43 PM »
Thank you for yet another reply!

I tried what you recommended, and it worked, but not perfect/ideal for what I'm trying to accomplish. I ended up using a custom HediffGiver, and it's working rather well. The HediffGiver checks a few things before attempting to add the pregnant hediff to the pawn, and it's a lot easier to mess with than toils and such; At least, it is for me :P

Nevertheless, I still appreciate your help :D

13
Help / [SOLVED] Enable/Disable Work Type (Capable vs Incapable)
« on: January 02, 2019, 09:48:29 PM »
It is fairly easy to disable a pawn's work settings, by using pawn.workSettings.DisableAll();

However, this does not make a pawn incapable of all work types, it just unticks the work from being assigned to that pawn.

My question is: Is it possible to reasonably make a pawn capable or incapable of a given work type without assigning a new backstory? If so, where do I start?

14
Help / [SOLVED] Enable Human Pregnancy
« on: January 01, 2019, 11:44:14 AM »
As it stands, human pawns can't get pregnant through lovin'. How do I enable human pawn pregnancy through lovin'?

15
Help / Re: Change Pawn Name
« on: January 01, 2019, 11:38:00 AM »
Thank you for the information! :D

Pages: [1] 2 3 ... 51