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 - benjiboy12

#1
Help / Re: Creating a new race
July 22, 2014, 01:11:08 AM
I figured it out, it was a simple mistake but I'll explain how to make a race just in case any poor soul is searching through the forums wanting to know how to do such a thing races.

The problem was in the pawn kinds, I put the <race> as Ork_Base  in the pawn definition when it should have been Ork_Boy. 

When making a new race you will need to have three xml files

ThingsDef- which will hold the BaseRace from which you apply health and think tree and what not.
PawnKindsDef- this is where you make the different professions of the race, for humans you have mercenaries pirates and what not.
FactionsDef- this is where you you put your pawnkinds in to make a faction, so if you wanted to add space ork pirates to the pirate faction you would simply just have to
1.Create a ork race inside ThingsDef.
2.Create a space pirate ork pawn(this is where you tell what type of equipment and armor the pawn type should use)
3.Add that pawn to the pirate faction's pawn list so it will have a chance(depending on a weight value) of being initiated when a pirate assault or raid occurs.   

Creating a race, if you want to create a race that has multiple sub species it is a good idea to make a parent class that all sub species will share, such as <backstory>,<isFlesh>, and <diet>.  Make sure that when you create the parent class that you write <Abstract>True, this shows that this is not actually a race, but something that can hold its value and give it to its children. 

Although I fixed the bug I have already encountered a dozen more when I try to instantiate a ork  :'(, but I think that has to do more with me using a robot image and trying to apply it to a humanoid pawn. 
#2
Help / Re: Creating a new race
July 20, 2014, 09:57:55 AM
QuoteBut you could take arachnid threat mod or horror world as a template, this mods create pawns purly in xml and they work fine
That's what I did  :P, I dissected the arachnid threat mod, which is a pretty cool mod kuddos to the developer, I didn't copy and paste his mod, but I've cross reference his /thingsdef race and my race and I cannot seem to see how his works and mine has an error. The error has something to do with the racebase, is there another file this should be attached to or what?

To Berengar, I could use help on armor and body texture, I do a pretty good job with weapon sprites if you need any, but my skill at proportioning and scaling is quite rubbish so I have a hard time making armor and bodies. PM if you are interested. 
#3
Help / Creating a new race
July 16, 2014, 03:45:55 PM
Hello all, I've been working on a mod that will include several new races, I've got a pretty good understanding how things work when adding new content, but I've seem to hit a major road block.  The game crashes when I load in the mod i'm working on and the error message says no cross reference for BaseOrk.  Here is the race that I created, don't mind some of obvious things such as still using the mechanoid as the art.

  <ThingDef Name="BasePawn" Abstract="True">
    <eType>Pawn </eType>
    <thingClass>Pawn</thingClass>
    <category>Pawn</category>
    <selectable>true</selectable>
    <tickerType>Normal</tickerType>
    <altitudeLayer>Pawn</altitudeLayer>
    <useStandardHealth>false</useStandardHealth>
    <flammability>1.0</flammability>
    <hasTooltip>true</hasTooltip>
    <soundBulletHit>BulletImpactFlesh</soundBulletHit>
    <inspectorTabs>
      <li>ITab_Pawn_Thoughts</li>
      <li>ITab_Pawn_Needs</li>
      <li>ITab_Pawn_Prisoner</li>
      <li>ITab_Pawn_Gear</li>
      <li>ITab_Pawn_Character</li>
    </inspectorTabs>
    <drawGUIOverlay>true</drawGUIOverlay>
  </ThingDef>



  <!-- ============================ Ork ========================== -->
 
 
  <ThingDef ParentName="BasePawn" Name="BaseOrk" Abstract="True">
 
    <soundBulletHit>BulletImpactFlesh</soundBulletHit>
    <flammability>1.0</flammability>
    <race>
      <hasStory>false</hasStory>
      <needsRest>false</needsRest>
      <hasGenders>false</hasGenders>
      <isFlesh>true</isFlesh>
      <diet>NeverEats</diet>
    </race>
  </ThingDef>
 
  <!-- Ork Boy -->
 
  <ThingDef ParentName="BaseOrk">
    <defName>Ork_Boy</defName>
    <label>Ork Boy</label>
    <description>Tough, mean, and green, this ork's only concern is to shoot and smash.  It's shear muscle mass makes a protective armor coating that can abosorb a great deal of damage.</description>
    <maxHealth>200</maxHealth>
    <sunShadowInfo>
      <baseWidth>0.4</baseWidth>
      <baseHeight>0.4</baseHeight>
      <tallness>0.8</tallness>
    </sunShadowInfo>
    <targetHitChanceFactor>1.5</targetHitChanceFactor>
<race>
      <thinkTree>Humanoid</thinkTree>
      <humanoid>true</humanoid>
      <walkSpeed>1.0</walkSpeed>
      <meleeDamage>25</meleeDamage>
      <bodySize>1.25</bodySize>
      <soundWounded>Pawn_Human_Wounded</soundWounded>
      <soundDeath>Pawn_Human_Death</soundDeath>
      <soundMeleeHitPawn>Pawn_Melee_Punch_HitPawn</soundMeleeHitPawn>
      <soundMeleeHitBuilding>Pawn_Melee_Punch_HitBuilding</soundMeleeHitBuilding>
      <soundMeleeMiss>Pawn_Melee_Punch_Miss</soundMeleeMiss>
    </race>
  </ThingDef>


Here is the pawn kind
<PawnKindDef>
<defName>Ork_Choppa</defName>
    <label>Ork Choppa</label>
    <race>Ork_Boy</race>
    <pointsCost>100</pointsCost>
<defaultFactionType>Ork_Clan</defaultFactionType>
<aiAvoidCover>false</aiAvoidCover>
    <isFighter>true</isFighter>
    <standardBodyGraphicPath>Things/Pawn/Mechanoid/Centipede</standardBodyGraphicPath>
    <moneyForWeapons>
      <min>1200</min>
      <max>1200</max>
    </moneyForWeapons>
    <weaponTags>
      <li>MechanoidGunHeavy</li>
    </weaponTags>
  </PawnKindDef>


Finally the faction

<FactionDef>
    <defName>Ork_Clan</defName>
    <label>Ork Clan</label>
    <description>A large group of greenskins who travel around the galaxy looking for a fight.</description>
    <pawnsPlural>Orks</pawnsPlural>
    <requiredCountAtGameStart>1</requiredCountAtGameStart>
    <fixedName>a ork clan</fixedName>
    <raidCommonality>45</raidCommonality>
    <humanoidFaction>false</humanoidFaction>
    <hidden>false</hidden>
    <canFlee>true</canFlee>
    <techLevel>Ultra</techLevel>
    <startingGoodwill>
      <min>-100</min>
      <max>-100</max>
    </startingGoodwill>
    <naturalColonyGoodwill>
      <min>-100</min>
      <max>-100</max>
    </naturalColonyGoodwill>
    <spawnGroups>
      <li>
        <selectionWeight>100</selectionWeight>
        <kinds>
          <li>Ork_Boy</li>
        </kinds>
      </li>
    </spawnGroups>
  </FactionDef>


I've spent a entire day trying to figure out what I've done wrong.  Also if your wondering what the mod is, its a 40k mod. Any 2d artist who want to help out are more than welcome, already finished most of the imperial weapons, just need to make the armors and alien bodies  ;D.
#4
Help / Re: Having Issues with Texture
July 09, 2014, 09:12:45 AM
Found the issue, and as I though, it was a noobish one, forgot to make the Thing folder.  Not trying to sound rude, but the mod wiki needs some serious updating  :P.
#5
Help / Having Issues with Texture
July 08, 2014, 01:12:59 PM
Hello, so I've decide to try modding out rimworld, my first mod I was planning on just being a weapons mod with a new arsenal of weapons.  I'm no stranger to coding and although the modding wiki is a bit outdated and could use a little loving. I was able to figure out how to create a weapon, the main problem now, is the texture.  When I load the mod, on the debug screen, it says "Could not load UnityEngine.Texture2D at Thing/mode texture location in any active mod or default location".  I also have another error saying "Matform with null Sourcetext" I have no idea if these two errors are related or not. 

I made the 2d texture using paint.net I converted the file into a DDS and used DTX1, I then put the texture in my mod folder, in the folder labeled as Textures.  The texture is a 64x64 with the same resolution.  I'm sure I made a noob mistake, any advice or answers to my problem would be highly appreciated  :D.
#6
I've had the same problem.  I notice the trade ships stop showing up after my colony reached a population of 10.  Once I lost a few colonist trade ships started to show up again. My guess is that the AI story teller doesn't want colonies to pass the population to go to high.