[A13] BackstoriesCore

Started by NoImageAvailable, April 10, 2016, 11:37:34 AM

Previous topic - Next topic

madpluck

#30
Quote from: Plurnt on April 17, 2016, 07:48:43 PM
Judging from the original thread, there were a few ppl on the last page with same problem as me who never got a response.

Having the same problem. Could not get the mod to load with PawnBioDefs added; was only able to get mod to load without any Names or PawnBios added. After deleting those folders, I can get the mod to function and for my custom backgrounds to be displayed in game, but not with custom Pawns or even Names, which is odd. The error message I got said there was no Backstories.NameDef (but the xml says defName?) matching a name that was NOT the name I had listed under defName for the Pawn in PawnBioDefs

RemingtonRyder

Hey there!

That error means that there isn't a defined NameDef for the pawn you want to put in the game.

If for example you had a bio like this one:
<PawnBioDefs>
  <PawnBioDef>
    <defName>MVK_Shadow</defName>
    <childhoodDef>MVK_Sleeper</childhoodDef>
    <adulthoodDef>MVK_Burglar</adulthoodDef>
    <gender>Either</gender>
    <name>
      <first>Sam</first>
      <last>Ellison</last>
      <nick>Shadow</nick>
    </name>
  </PawnBioDef>
</PawnBioDefs>


you would need an XML file in NameDefs which looks like this:

<NameDefs>


  <NameDef>
    <defName>SamEllisonShadow</defName>
    <first>Sam</first>
    <nick>Shadow</nick>
    <last>Ellison</last>
    <genderPossibility>Either</genderPossibility>
  </NameDef>
 
</NameDefs>


As you can see, the defName in this file is a string with no spaces consisting of the character's first name, last name, and nickname (if they have one).

The reason for this is that when you make a PawnBioDef you're actually reserving the name and backstory combination for one character alone (unless you use Prepare Carefully in which case you can choose whatever you like) so there must be a unique defName otherwise the backstories aren't locked.

ghostangel

Quote from: NoImageAvailable on April 15, 2016, 03:46:47 AM
Quote from: MarvinKosh on April 13, 2016, 07:59:47 PM
Hey there! If it's okay, I wrote up some pawn bios and I've attached them to this post.

Note that the backstories are tied to the specific pawn bios, so you'll only see them when that pawn is rolled, or if you use Prepare Carefully (I think it would work for that, don't quote me on that).


Good afternoon, I have a few questions! the first question and you will be able to update this mod (Mechanical Defence 2)? And the second question will be able to help me with how to update (Mechanical Defence 2) to alpha 13

Added a link to the OP. If anyone else decides to share some backstories they wrote feel free to post them and I'll link them.

Weekend

I noticed the new animal handling skill isn't included. Is there a way to add that in? It would be much appreciated.  ;D

JimmyProvince

#34
Since I can multiple backstories in one file, is this correct?
Quote<BackstoryDef>
    <defName>Waffen SS</defName>
    <title>Waffen SS</title>
    <titleShort>Waffen SS</titleShort>
    <baseDescription>NAME has been sent to both the Eastern Front against the Soviets and the Western Front against the Allies. Being infamous and notorious for firing on prisoners and civilians, NAME has become extremely battle-hardened, being capable of taking on thousands of hostile troops alone.</baseDescription>
    <bodytypeMale>Hulk</bodytypeMale>
    <bodyTypeFemale>Hulk</bodyTypeFemale>
    <slot>Adulthood</slot>
    <skillGains>
      <li>
        <defName>Melee</defName>
        <amount>6</amount>
      </li>
        <defName>Shooting</defName>
        <amount>8</amount>
      </li>
        <defName>Research</defName>
        <amount>5</amount>
      </li>
        <defName>Crafting</defName>
        <amount>3</amount>
      </li>
    </skillGains>
    <spawnCategories>
      <li>Civil</li>
      <li>Raider</li>
    </spawnCategories>
  </BackstoryDef>
  <BackstoryDef>
    <defName>SAS Commando</defName>
    <title>SAS Commando</title>
    <titleShort>SAS Commando</titleShort>
    <baseDescription>NAME has been part of the British SAS Commando Squad for years and has shown utter brutality against hostile forces such as the Wehrmacht.</baseDescription>
    <bodytypeMale>Hulk</bodytypeMale>
    <bodyTypeFemale>Hulk</bodyTypeFemale>
    <slot>Adulthood</slot>
    <skillGains>
      <li>
        <defName>Melee</defName>
        <amount>6</amount>
      </li>
        <defName>Shooting</defName>
        <amount>8</amount>
      </li>
        <defName>Research</defName>
        <amount>4</amount>
      </li>
        <defName>Crafting</defName>
        <amount>4</amount>
      </li>
    </skillGains>
    <spawnCategories>
      <li>Civil</li>
      <li>Raider</li>
    </spawnCategories>
  </BackstoryDef>
 
</BackstoryDefs>

Some questions :
1) Is the format correct?
2) Is the </BackstoryDefs> between the 2 backstories supposed to stick together or have one blank in between?
3) Is the spawn categories (Civil, Raiders) in the correct format?

JimmyProvince


Dragoon

Quote from: JimmyProvince on June 02, 2016, 08:52:05 PM
Is this forum dead?

no and yes you can have multiple backstories in one file.
Quote from: faltonico
I truly can't understand that sense of balancing a LOT of modders have, pouring more resources on something doesn't make it more difficult, but more annoying. It is not engaging, even if i'm swimming in silver at late game ¿why to bother?, why all the effort to get there?.

JimmyProvince

Quote from: Dragoon on June 04, 2016, 08:18:44 PM
Quote from: JimmyProvince on June 02, 2016, 08:52:05 PM
Is this forum dead?

no and yes you can have multiple backstories in one file.

Thank God you replied! Can you help me check this? It's the ENTIRE XML file. It doesn't work for me for some reason.

Quote<?xml version="1.0" encoding="utf-8" ?>
<BackstoryDef>
  <!--Body types:
  Undefined
  Thin
  Hulk
  Fat
  Male
  Female-->
 
  <!--Character references:
  NAME = character name
  HE = will place he/she depending on characters gender
  HIS = will place his/her depending on characters gender
  HECAP = will place capitalised he/she depending on characters gender
  HISCAP = will place capitalised his/her depending on characters gender
  -->
 
  <!--Spawn Categories:
  Civil
  Raider
  Slave-->
 
  <!--
WorkDisables:
      None
      Intellectual
      ManualDumb
      ManualSkilled
      Violent
      Caring
      Social
      Scary
      Artistic
      Crafting
      Cooking
      Firefighting
      Cleaning
      Hauling
      PlantWork
      Mining
  -->
 
  <!--
  Slot:
Adulthood
Childhood
  -->
 
  <!--
Skillgains:
The amount is the number to be added or subtracted from that skill. The range for this number is -20 to 20, do not go outside this range.
defNames:
Construction
Growing
Research
Mining
Shooting
Melee
Social
Cooking
Medicine
Artistic
Crafting
  -->

  <BackstoryDef>
    <defName>WaffenSS</defName>
    <title>Waffen ss</title>
    <titleShort>Waffen ss</titleShort>
    <baseDescription>NAME has been sent to both the Eastern Front against the Soviets and the Western Front against the Allies. Being infamous and notorious for firing on prisoners and civilians, NAME has become extremely battle-hardened, being capable of taking on thousands of hostile troops alone.</baseDescription>
    <bodytypeMale>Hulk</bodytypeMale>
    <bodyTypeFemale>Hulk</bodyTypeFemale>
    <slot>Adulthood</slot>
    <workDisables>
      <li>None</li>
   </workDisables>
    <skillGains>
      <li>
        <defName>Melee</defName>
        <amount>6</amount>
      </li>
      <li>
        <defName>Shooting</defName>
        <amount>8</amount>
      </li>
      <li>
        <defName>Research</defName>
        <amount>5</amount>
      </li>
      <li>
        <defName>Crafting</defName>
        <amount>3</amount>
      </li>
    </skillGains>
    <spawnCategories>
      <li>Civil</li>
      <li>Raider</li>
    </spawnCategories>
  </BackstoryDef>

  <BackstoryDef>
    <defName>SASCommando</defName>
    <title>Sas commando</title>
    <titleShort>Sas commando</titleShort>
    <baseDescription>NAME has been part of the British SAS Commando Squad for years and has shown utter brutality against hostile forces such as the Wehrmacht.</baseDescription>
    <bodytypeMale>Hulk</bodytypeMale>
    <bodyTypeFemale>Hulk</bodyTypeFemale>
    <slot>Adulthood</slot>
    <workDisables>
      <li>None</li>
   </workDisables>
    <skillGains>
      <li>
        <defName>Melee</defName>
        <amount>6</amount>
      </li>
      <li>
        <defName>Shooting</defName>
        <amount>8</amount>
      </li>
      <li>
        <defName>Research</defName>
        <amount>4</amount>
      </li>
      <li>
        <defName>Crafting</defName>
        <amount>4</amount>
      </li>
      <li>
    </skillGains>
    <spawnCategories>
      <li>Civil</li>
      <li>Raider</li>
    </spawnCategories>
  </BackstoryDef>

  <BackstoryDef>
    <defName>USSoldier</defName>
    <title>Us soldier</title>
    <titleShort>Us soldier</titleShort>
    <baseDescription>NAME has been sent to both the Pacific to fight against the Japanese and Europe against Germany and Italy. After seeing much combat, a massive invasion would be just a skirmish for HIM.</baseDescription>
    <bodytypeMale>Hulk</bodytypeMale>
    <bodyTypeFemale>Hulk</bodyTypeFemale>
    <slot>Adulthood</slot>
    <workDisables>
      <li>None</li>
   </workDisables>
    <skillGains>
      <li>
        <defName>Melee</defName>
        <amount>6</amount>
      </li>
      <li>
        <defName>Shooting</defName>
        <amount>6</amount>
      </li>
      <li>
        <defName>Crafting</defName>
        <amount>4</amount>
      </li>
    </skillGains>
    <spawnCategories>
      <li>Civil</li>
      <li>Raider</li>
    </spawnCategories>
  </BackstoryDef>

  <BackstoryDef>
    <defName>RedGuard</defName>
    <title>Red guard</title>
    <titleShort>Red guard</titleShort>
    <baseDescription>Being part of the Red Guard (Worker's Militia) of the Soviet Union in the Second World War, NAME has proven to be ruthless against foreign invaders such as the Wehrmacht during the Battle of Moscow.</baseDescription>
    <bodytypeMale>Hulk</bodytypeMale>
    <bodyTypeFemale>Hulk</bodyTypeFemale>
    <slot>Adulthood</slot>
    <workDisables>
      <li>None</li>
   </workDisables>
    <skillGains>
      <li>
        <defName>Melee</defName>
        <amount>8</amount>
      </li>
      <li>
        <defName>Shooting</defName>
        <amount>4</amount>
      </li>
      <li>
        <defName>Crafting</defName>
        <amount>5</amount>
      </li>
    </skillGains>
    <spawnCategories>
      <li>Civil</li>
      <li>Raider</li>
    </spawnCategories>
  </BackstoryDef>
 
</BackstoryDefs>

Yeah, this is the ENTIRE file. Any errors?

Dragoon

Quote from: JimmyProvince on June 05, 2016, 01:54:26 AM
<BackstoryDef>


Well one thing I noticed in you have backstorydef in the top instead of backstorydefs. I looked over some of your backstories but I don't know if I got everything tell me if it still doesn't work.
Quote from: faltonico
I truly can't understand that sense of balancing a LOT of modders have, pouring more resources on something doesn't make it more difficult, but more annoying. It is not engaging, even if i'm swimming in silver at late game ¿why to bother?, why all the effort to get there?.

JimmyProvince

Do you mean all the <BackstoryDef>s or just one? If you mean all, do I have to change all of them from <BackstoryDef> to <BackstoryDefs>?

JimmyProvince

Nawww this forum is definitely dead.

Peppsen

You'll have to change your first <BackstoryDef>  to <BackstoryDefs> is what he meant.

JimmyProvince


Peppsen


ASCarroll

I installed this mod according to the order directly under the OP but none of the backstories appear under Prepare Carefully. I've already tried reinstalling it (both the mod and the whole game itself), creating a new world with each fresh reinstallation, and entering and exiting the mod screen to refresh it. What am I doing wrong?

[attachment deleted by admin - too old]