trying to make an alien race mod, not sure what i'm doing wrong

Started by KBraid, January 08, 2019, 06:57:41 PM

Previous topic - Next topic

KBraid

I've tried to make my own race mod, i started by stripping down the Callistan race mod for a base and following the Alien Framework's provided tutorial, but whenever i try to play a new game with my mod enabled the planet won't load.

Could someone help me figure out what i'm missing or what i've done wrong?

[attachment deleted due to age]

LWM

You'll get better answers if you're more specific than "won't load."  E.g., logs?

KBraid

apologies. i have no excuse as to not include it, i should have remembered that posting logs is standard procedure.
https://pastebin.com/HZnsDeZU

LWM

Your first major error ("exception") in your log file is here:

    Exception reading Bodies_Peglaci.xml as XML: System.Xml.XmlException: 'li' is expected  Line 600, position 18.

That probably keeps the entire race from being loaded, so pawns are failing to be generated.  I even tells you line number, position, etc - v helpful!

--LWM

KBraid


LWM

What you do next is make sure your XML is very nicely arranged in a text file with lots of whitespace:

<parts>
    <li>
        <def>Ribcage</def>
<coverage>0.036</coverage>
<depth>Inside</depth>
<groups>
    <li>Torso</li>
</groups>
    </li>
    <li>
        ...etc


And then you hope that the error messages you get are a little more specific and you can find out what's wrong more easily.  Whitespace and patience.  Lots of patience.

Also, your XML is incorrect in (at least) one spot - if you search for "</li><parts>" in your XML, you should find it.  I'm pretty sure those tags don't belong next to each other.

Good luck, and I recommend a nice strong cup of tea and a pleasant place to sit for a while.

--LWM

KBraid

i managed to find all the xml code mistakes, now i need to figure out what this means. https://pastebin.com/KF7PQRWU

KBraid

i've been able to thin it down this far on my own, though i can't figure out how to solve the rest. https://pastebin.com/uJE5Q28T
i've included the updated files if that help

[attachment deleted due to age]

LWM

Your first error there, the could not resolve cross reference?  I ran into that when I had the wrong <defName> that I was trying to reference.  Or maybe it needed <thingDef .... Name="<needed name>">?  But I think it was a mistaken defName.  Make sure whatever is supposed to be the def for "Peglaci" - not the race? is correct.

--LWM

KBraid

so what you are saying is that these def names are wrong and should be something else? Or am i misinterpreting?
-----------------------------------------------------------------------
<Defs>
   <AlienRace.ThingDef_AlienRace ParentName="BasePawn">
        <defName>Alien_Peglaci</defName>
        <label>Peglaci</label>
        <description>A baseline Peglaci, mostly unmodified by gene engineering and mostly unchanged by evolutionary pressures on non-Peglaci planets. A resilient, cold-dwelling omnivorous race that see themselves as the peasekeepers of the galaxy.</description>
-------------------------------------------------------------------------
  <PawnKindDef Abstract="True" Name="BasePlayerPawnKind">
    <race>Peglaci</race>
    <combatPower>40</combatPower>
    <isFighter>true</isFighter>
    <apparelIgnoreSeasons>true</apparelIgnoreSeasons>
    <forceNormalGearQuality>true</forceNormalGearQuality>
  </PawnKindDef>

  <PawnKindDef ParentName="BasePlayerPawnKind">
    <defName>Alien_Peglaci</defName>
    <label>Peglaci</label>
    <defaultFactionType>PlayerColony</defaultFactionType>
------------------------------------------------------------------------
<Defs>
  <BodyDef>
    <defName>Alien_Peglaci</defName>
    <label>Peglaci</label>
    <corePart>
      <def>Torso</def>
      <height>Middle</height>
      <depth>Outside</depth>
      <groups>
        <li>Torso</li>
      </groups>

Mehni

QuoteCould not resolve cross-reference: No Verse.ThingDef named Peglaci found to give to Verse.PawnKindDef Peglaci

The <race> tag in the PawnKindDef should point to a ThingDef. The error means RimWorld can't find a ThingDef with the Peglaci defName, which is right: You've named it Alien_Peglaci.

Your inclusion of the "BasePlayerPawnKind" will also cause a lot of compatibility errors: you're effectively changing all the BasePlayerPawnKind for all mods loaded after your mod. Rename it to something original.

KBraid

i've managed to reduce the amount of errors down to these five, if i could figure out what they mean i think i can finally get my mod into a working state.
https://pastebin.com/RsdWdCfC

edit, if it helps here's the updated files below

[attachment deleted due to age]