Ludeon Forums

Ludeon Forums

  • December 10, 2019, 12:21:14 AM
  • 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.

Topics - O Negative

Pages: [1] 2 3 ... 5
1
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.

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

3
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...

4
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?

5
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'?

6
Help / [SOLVED] Change Pawn Name
« on: December 31, 2018, 09:52:39 PM »
How do I go about changing a human pawn's last name in C#?

I have successfully changed a pawn's name to the same name another pawn has, but I can't seem to use strings to do what I want to accomplish. Any ideas?

Code: [Select]
String s = "O Negative";
pawn.Name = pawn2.Name; // This works!
pawn.Name = s; // This does NOT work!

I am essentially looking to give child pawns the ability to inherit last names from their parents, for anyone who is curious. I have a few methods written to parse the pawn.Name.ToString() string, and create a new string with the child pawn's first name and the parent pawn's last name; it's just a matter of applying that string to the name.

7
Ideas / Dynamic Passions
« on: September 13, 2018, 02:53:40 AM »
People are dynamic, and that's part of what makes them so interesting.
In RimWorld, there are only a few things about an individual which change over the course of a playthrough:
  • Health/Age
  • Relationships
  • Skill Levels
The goal of dynamic passions would be to add another layer of character development.

In vanilla, a character is spawned with a random assignment of passions for the skills they are capable of. You might get a character with a lot of passion in a variety of skills, a character with a lack of passion for anything, or someone in-between. What's more, is that sometimes you'll get a character with a backstory which suggests a passion; yet, the passion isn't there. A dynamic passion system - one that allows passions to be gained and lost - can offer an implicit explanation for things like this.

I've gone ahead and created a simple mod which implements a dynamic passion system for people to try out, if they desire.
Download: [B19] Dynamic Passions

Any thoughts and/or criticism on this idea is welcome.

8
Ideas / Plant Harvesting and Orchards
« on: May 25, 2018, 05:56:28 PM »
I know 1.0 is probably near release. However, I wanted to make a small suggestion regarding plants and farming.

As it stands now, plants can be cut or harvested from. If a plant is cut, it is destroyed and any defined products are dropped (ie. Wood). If a plant is harvested, it is usually destroyed and products are still dropped; however, some plants such as wild berry bushes drop products (berries) and aren't destroyed. Instead, they are reverted to a lower growth percentage.

If you try to mod a fruit-bearing tree into the game, you end up with a tree that produces fruit AND wood every time it is harvested. PLUS, it is reverted to a smaller, less-grown version of itself.

I'd like to suggest an option for plants to be fruit-bearing and also maintain whatever growth they have when harvested. Similar to how some animals have milk which can be harvested, but don't get younger when milked...

This would allow for orchards as a long-term option for farming. Orchards would add to gameplay in that they don't require re-planting for each harvest, handle temperature events better, and can be cut for wood if needed, but yeild less food per acre per season.

Just an idea. Any other thoughts on the subject are welcome.

9
Support / Italian Translation
« on: January 31, 2018, 03:40:56 AM »
Currently studying Italian as a second language, and I'm noticing some things that are wrong in Rimworld's translation of the language...

I'm interested in contributing some changes to better the translation. Is this where I would do that?

10
Hi,

This is a request to Tynan and the other developers of the game. The request I'd like to make is as follows: Make it possible for melee weapons to have custom sounds without the implementation of a new material. I'm making this request because I, and a few others, have run into a few issues with the method of using a custom material as a middle-man for a custom sound for our custom melee weapons.

Ideally, this would be an xml property listed under the "tools" of a weapon. For example:
Code: [Select]
<tools>
  <li>
<label>point</label>
        <soundCastHit>"soundDefName"</soundDefHit> ///This sound would play for the tool used, if the tool/pawn hits its target
        <soundCastMiss>"soundDefName"</soundDefMiss> ///This sound would play for the tool used, if the tool/pawn misses its target
<capacities>
  <li>Stab</li>
</capacities>
<power>10</power>
<cooldownTime>2.45</cooldownTime>
<commonality>0.1</commonality>
  </li>
</tools>
This would allow for the same melee weapon to sound different depending on the tool used, and give modders more creative freedom when it comes to adding more melee weapons to the game. I also think this has a lot of potential for core/vanilla game immersion.

In the past, I would use a C# method which was basically a copy/paste of the melee verb with some minor modifications. That is no longer possible, due to the new "tools" system for weapons. Sure, if I knew a bit more C#, I might be able to get around the tools system, but I don't think it should have to be that complicated.

I don't, by any means, think that everything should be moddable via xml. But, I do think this should be one of those things that is possible through xml modding, in the same way custom ranged weapon sounds are.

11
Ideas / Change Scenario Editor Starting Population Cap
« on: December 10, 2017, 10:48:33 PM »
Right now, the scenario editor limits you to a pool of 10 people (or, and from). It would be nice if the scenario editor wasn't so restrictive.

It's not a huge deal, because you can edit the scenario xml to be whatever you want. But, if you want to share a scenario on the Steam Workshop which has a pool larger than 10, it just gets put back down to 10. For example:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<savedscenario>
<meta>
<gameVersion>0.18.1722 rev1198</gameVersion>
<modIds>
<li>Core</li>
</modIds>
<modNames>
<li>Core</li>
</modNames>
</meta>
<scenario>
<name>The 25</name>
<summary>25 Survivors - Start With Nothing</summary>
<description>The civilian ship you were all on has suffered a fatal malfunction. You and most of the others managed to make it to the escape pods. Unfortunately, your pods have gone astray, and you have been separated from the other survivors and materials.

What will you do?</description>
<publishedFileId>1228241610</publishedFileId>
<playerFaction>
<def>PlayerFaction</def>
<factionDef>PlayerColony</factionDef>
</playerFaction>
<parts>
<li Class="ScenPart_ConfigPage_ConfigureStartingPawns">
<def>ConfigPage_ConfigureStartingPawns</def>
<pawnCount>25</pawnCount>
<pawnChoiceCount>100</pawnChoiceCount>
</li>
<li Class="ScenPart_PlayerPawnsArriveMethod">
<def>PlayerPawnsArriveMethod</def>
<method>DropPods</method>
</li>
<li Class="ScenPart_DisableIncident">
<def>DisableIncident</def>
<incident>WandererJoin</incident>
</li>
<li Class="ScenPart_DisableIncident">
<def>DisableIncident</def>
<incident>SelfTame</incident>
</li>
<li Class="ScenPart_DisableIncident">
<def>DisableIncident</def>
<incident>FarmAnimalsWanderIn</incident>
</li>
</parts>
</scenario>
</savedscenario>

This is the XML of a scenario that I've made which allows you to start with 25 people, and absolutely no resources. It's chaotic, but fun in my opinion :)

I understand there's the issue with the UI involved, though. There's only enough room on the left-hand side for 10 portraits/cards.

12
Help / [B18] Custom Melee Sound | Implementation?
« on: November 19, 2017, 04:36:39 AM »
Goal: Have a melee weapon the plays unique/custom sounds on hit/miss.

In the past, I was able to achieve my goal by creating my own custom melee verb in an assembly.
A17
Code: [Select]
namespace HaloWeapons
{
public class Verb_EnergySwordAttack : Verb_MeleeAttack
{
private const int TargetCooldown = 50;

private const float DefaultHitChance = 0.6f;

protected override bool TryCastShot()
{
Pawn casterPawn = base.get_CasterPawn();
bool fullBodyBusy = casterPawn.stances.get_FullBodyBusy();
bool result;
if (fullBodyBusy)
{
result = false;
}
else
{
Thing thing = this.currentTarget.get_Thing();
bool flag = !base.CanHitTarget(thing);
if (flag)
{
Log.Warning(string.Concat(new object[]
{
casterPawn,
" meleed ",
thing,
" from out of melee position."
}));
}
casterPawn.get_Drawer().rotator.Face(thing.get_DrawPos());
bool flag2 = !this.IsTargetImmobile(this.currentTarget) && casterPawn.skills != null;
if (flag2)
{
casterPawn.skills.Learn(SkillDefOf.Melee, 250f, false);
}
bool flag3 = Rand.get_Value() < this.GetHitChance(thing);
bool flag4;
SoundDef soundDef;
if (flag3)
{
flag4 = true;
this.ApplyMeleeDamageToTarget(this.currentTarget);
bool flag5 = thing.def.category == 4;
if (flag5)
{
soundDef = this.SoundHitBuilding();
}
else
{
soundDef = this.SoundHitPawn();
}
}
else
{
flag4 = false;
soundDef = this.SoundMiss();
}
SoundStarter.PlayOneShot(soundDef, new TargetInfo(thing.get_Position(), casterPawn.get_Map(), false));
casterPawn.get_Drawer().Notify_MeleeAttackOn(thing);
Pawn pawn = thing as Pawn;
bool flag6 = pawn != null && !pawn.get_Dead();
if (flag6)
{
pawn.stances.StaggerFor(95);
bool flag7 = casterPawn.get_MentalStateDef() != MentalStateDefOf.SocialFighting || pawn.get_MentalStateDef() != MentalStateDefOf.SocialFighting;
if (flag7)
{
pawn.mindState.meleeThreat = casterPawn;
pawn.mindState.lastMeleeThreatHarmTick = Find.get_TickManager().get_TicksGame();
}
}
casterPawn.get_Drawer().rotator.FaceCell(thing.get_Position());
bool flag8 = casterPawn.caller != null;
if (flag8)
{
casterPawn.caller.Notify_DidMeleeAttack();
}
result = flag4;
}
return result;
}

[DebuggerHidden]
private IEnumerable<DamageInfo> DamageInfosToApply(LocalTargetInfo target)
{
Verb_EnergySwordAttack.<DamageInfosToApply>d__3 expr_07 = new Verb_EnergySwordAttack.<DamageInfosToApply>d__3(-2);
expr_07.<>4__this = this;
expr_07.<>3__target = target;
return expr_07;
}

private float GetHitChance(LocalTargetInfo target)
{
bool surpriseAttack = this.surpriseAttack;
float result;
if (surpriseAttack)
{
result = 1f;
}
else
{
bool flag = this.IsTargetImmobile(target);
if (flag)
{
result = 1f;
}
else
{
bool flag2 = base.get_CasterPawn().skills != null;
if (flag2)
{
result = StatExtension.GetStatValue(base.get_CasterPawn(), StatDefOf.MeleeHitChance, true);
}
else
{
result = 0.6f;
}
}
}
return result;
}

private bool IsTargetImmobile(LocalTargetInfo target)
{
Thing thing = target.get_Thing();
Pawn pawn = thing as Pawn;
return thing.def.category != 1 || pawn.get_Downed() || PawnUtility.GetPosture(pawn) > 0;
}

private void ApplyMeleeDamageToTarget(LocalTargetInfo target)
{
foreach (DamageInfo current in this.DamageInfosToApply(target))
{
bool thingDestroyed = target.get_ThingDestroyed();
if (thingDestroyed)
{
break;
}
target.get_Thing().TakeDamage(current);
}
}

private SoundDef SoundHitPawn()
{
bool flag = this.ownerEquipment != null && this.ownerEquipment.get_Stuff() != null;
SoundDef result;
if (flag)
{
bool flag2 = this.verbProps.meleeDamageDef.armorCategory == DamageArmorCategoryDefOf.Sharp;
if (flag2)
{
bool flag3 = !SoundDefHelper.NullOrUndefined(this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitSharp);
if (flag3)
{
result = this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitSharp;
return result;
}
}
else
{
bool flag4 = !SoundDefHelper.NullOrUndefined(this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitBlunt);
if (flag4)
{
result = this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitBlunt;
return result;
}
}
}
bool flag5 = base.get_CasterPawn() != null && !SoundDefHelper.NullOrUndefined(base.get_CasterPawn().def.race.soundMeleeHitPawn);
if (flag5)
{
result = SoundDef.Named("SwordHitPawn");
}
else
{
result = SoundDef.Named("SwordHitPawn");
}
return result;
}

private SoundDef SoundHitBuilding()
{
bool flag = this.ownerEquipment != null && this.ownerEquipment.get_Stuff() != null;
SoundDef result;
if (flag)
{
bool flag2 = this.verbProps.meleeDamageDef.armorCategory == DamageArmorCategoryDefOf.Sharp;
if (flag2)
{
bool flag3 = !SoundDefHelper.NullOrUndefined(this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitSharp);
if (flag3)
{
result = this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitSharp;
return result;
}
}
else
{
bool flag4 = !SoundDefHelper.NullOrUndefined(this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitBlunt);
if (flag4)
{
result = this.ownerEquipment.get_Stuff().stuffProps.soundMeleeHitBlunt;
return result;
}
}
}
bool flag5 = base.get_CasterPawn() != null && !SoundDefHelper.NullOrUndefined(base.get_CasterPawn().def.race.soundMeleeHitBuilding);
if (flag5)
{
result = SoundDef.Named("SwordHitBuilding");
}
else
{
result = SoundDef.Named("SwordHitBuilding");
}
return result;
}

private SoundDef SoundMiss()
{
bool flag = base.get_CasterPawn() != null && !SoundDefHelper.NullOrUndefined(base.get_CasterPawn().def.race.soundMeleeMiss);
SoundDef result;
if (flag)
{
result = SoundDef.Named("SwordMiss");
}
else
{
result = SoundDef.Named("SwordMiss");
}
return result;
}
}
}
The above is the A17 melee verb verbatim, with a few minor changes towards the end. I reference the sound files: SoundDef.Named("SwordHitPawn"), SoundDef.Named("SwordHitBuilding"), and SoundDef.Named("SwordMiss")

B18
The way melee verbs/actions are handled has changed significantly. Weapons are no longer assigned a melee verb - they now have a list of tools to be selected from - which means I can't really use my old method of changing the sounds.

I understand this isn't such a big deal for most weapon modders. If I'm not mistaken, most weapon mods out there don't focus much on melee weapons to begin with, and when they do the sounds aren't usually an issue because of the material of the weapon. However, when it comes to futuristic energy-based weapons (lightsabers and energy swords) the core game sounds just don't work quite right.

13
Help / [B18] Weapon_Bulk | Function?
« on: November 18, 2017, 03:42:20 PM »
While looking around the weapon XMLs, I notice there is a new stat called "Weapon_Bulk"

Maybe common sense is failing me, but I just don't know what this does. Can someone enlighten me?

Many thanks ahead of time!

14
General Discussion / Stronger/Synergetic Enemies > More Enemies
« on: August 07, 2017, 08:27:51 PM »
Abstract
I can't speak for everyone on this, because I'm sure there are those that get a kick out of slaughtering thousands of tribals; but, I'm a player that would prefer to see higher-tier enemy designs in the late game. More specifically, I'm intersted in enemy team synergy and how to use knowledge of that synergy to cripple raiders by strategically eliminating enemies and enemy types. Currently, mechanoids are the highest tier of enemy we are put against, and they are almost completely bare-bones. I would even argue that they don't have as many raid strategy options as human raiders. So, I've come up with some - hopefully original - ideas.

Mechanoids
* Centipedes with mortars
* Centipedes/Scythers that act as sappers
* Mechanoids land with a building/structure/item that disables all electronics on the map (like a solar flare)
* New mechanoid types (contribute opportunities for expanding lore)
     + Engineer - Repairs/doctors mechanoids while raiding; possibly responsible for building mechanoid structures during raids.
     + Nanobot - Fragile, small mechanoids that specialize in the destruction/decomposition of raw resources; prioritize player resources as targets over pawns.

Pirates / Outlanders / Tribals
* Raiders bring their tamed/domesticated animals as living weapons. Simulates a better sense of self-preservation by human factions.
     + Pirates bring boomrats & wargs
     + Outlanders bring dogs (ie. labs)
     + Tribals bring wolves and wild boars (possibly thrumbo)
* Specialized pawn brings a harmful ancient artifact (ie. insanity lance) with them & uses it on one (or more) of your colonists.

15
Ideas / Sappers and Saboteurs
« on: June 16, 2017, 01:56:24 AM »
I love the AI behind sappers infiltrating my base in a "smart" way, and would personally like to see one or two more "specialist" raiders. It would be especially interesting to see them work together in the same raid event. However, I understand that the sapper AI was a pretty significant feature that took a decent amount of time and effort to get right. I'd be more than understanding if this idea didn't get implemented :)

Saboteurs
A pawn with the sole purpose of sabotaging a colony's defensive capabilities would be an incredibly interesting mechanic, in my opinion.
Plus, it can be accomplished in any number of ways. Here's a few options:
1) Pawn prioritizes destroying power conduits (preferably connected to power)
2) Pawn causes a Zzzt! event at a power conduit they target (preferably connected to power)
3) Pawn causes appropriate buildings to break down (similar to lighting fire to a building, but smarter)
4) Pawn prioritizes lobbing grenades at buildings that produce power (probably the simplest one of them all)

*A great way to combat the use of turret-based kill-boxes is to give the raiders the ability to disable the turrets, even temporarily.
*This doesn't take away from players who rely on kill-boxes and are able to quickly react to a potential problem. This is a strategy game, no?
*Watching raiders damage important structures is much more immersive and interesting than watching raiders punch my granite perimeter wall until they pass out from exhaustion

Pages: [1] 2 3 ... 5