ok, thanks for the help guys
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.
Pages1
#2
Help / Re: Custom Leather Sprite?
September 26, 2017, 12:42:34 AM
I'm wondering if I can make a specific animal's leather sprite a custom sprite with a custom definition, and leave the rest of the leathers the same for all other animals, what would I need to put in my code to do that if possible?
#3
Help / Custom Leather Sprite?
September 26, 2017, 12:16:55 AM
Is there any way to make a custom leather sprite for a certain animal's leather?
#4
Help / Animal Butcher items [SOLVED]
September 20, 2017, 01:35:40 AM
I'm having a bit of a problem with butchering mod animals I'm trying to make, whenever I try to butcher the creature with this item set as the butcherBodyPart:
<butcherBodyPart>
<bodyPartGroup>TuskAttackTool</bodyPartGroup>
<thing>UniqueMushroom</thing>
</butcherBodyPart>
Item code:
<ThingDef ParentName="ResourceVerbBase">
<defName>UniqueMushroom</defName>
<label>unique mushroom</label>
<description>A pinky sized mushroom valued for its unusual aroma.</description>
<graphicData>
<texPath>Things/Item/UniqueMushroom</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<statBases>
<MarketValue>150</MarketValue>
<Mass>.1</Mass>
</statBases>
<resourceReadoutPriority>Middle</resourceReadoutPriority>
<stackLimit>99</stackLimit>
<thingCategories>
<li>Items</li>
</thingCategories>
</ThingDef>
I get this error, and no meat is generated from the butcher, but the item and leather is just fine:
JobDriver threw exception in initAction. Pawn=Avery, Job=DoBill A=Thing_TableButcher60115 B=Thing_Mosswine_Corpse60105 C=(111, 0, 121), Exception: System.NullReferenceException: Object reference not set to an instance of an object
Now when I put any other custom item I've made into the butcherBodyPart <thing> bit, "BullfangoTusk" in this example, it works fine:
<ThingDef ParentName="ResourceVerbBase">
<defName>BullfangoTusk</defName>
<label>bullfango tusk</label>
<description>A bullfango's razor sharp tusk, valuable. Usable as a makeshift weapon.</description>
<graphicData>
<texPath>Things/Item/BullfangoTusk</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<equippedAngleOffset>-20</equippedAngleOffset>
<statBases>
<MarketValue>350</MarketValue>
<MaxHitPoints>110</MaxHitPoints>
<Mass>20</Mass>
<Flammability>1.0</Flammability>
<DeteriorationRate>0.5</DeteriorationRate>
<MeleeWeapon_DamageAmount>10</MeleeWeapon_DamageAmount>
<MeleeWeapon_Cooldown>4</MeleeWeapon_Cooldown>
</statBases>
<resourceReadoutPriority>Middle</resourceReadoutPriority>
<stackLimit>10</stackLimit>
<verbs>
<li>
<verbClass>Verb_MeleeAttack</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<meleeDamageDef>Scratch</meleeDamageDef>
</li>
</verbs>
<thingCategories>
<li>Items</li>
</thingCategories>
<tradeTags>
<li>Exotic</li>
</tradeTags>
</ThingDef>
Does anyone know what's going on with my code and what I'm doing wrong?
Edit: Upon further inspection, it happens with other animals with butcher items like the first one mentioned, the first time the item and everything else is butchered fine, but when two or more animals are butchered, I get the error and no meat is spawned, this HOWEVER does not happen with any butcher item like the tusk where it's a piece of equipment that a pawn can use, maybe that can help with figuring things out.
Edit Edit: Well that was fast, I figured out that the <ThingDef ParentName="ResourceVerbBase"> is supposed to be <ThingDef ParentName="ResourceBase"> for items that are not used as equipment (verbs), pretty easy to figure out in hindsight, so I guess this will be a reminder to anyone googling the issue for themselves.
<butcherBodyPart>
<bodyPartGroup>TuskAttackTool</bodyPartGroup>
<thing>UniqueMushroom</thing>
</butcherBodyPart>
Item code:
<ThingDef ParentName="ResourceVerbBase">
<defName>UniqueMushroom</defName>
<label>unique mushroom</label>
<description>A pinky sized mushroom valued for its unusual aroma.</description>
<graphicData>
<texPath>Things/Item/UniqueMushroom</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<statBases>
<MarketValue>150</MarketValue>
<Mass>.1</Mass>
</statBases>
<resourceReadoutPriority>Middle</resourceReadoutPriority>
<stackLimit>99</stackLimit>
<thingCategories>
<li>Items</li>
</thingCategories>
</ThingDef>
I get this error, and no meat is generated from the butcher, but the item and leather is just fine:
JobDriver threw exception in initAction. Pawn=Avery, Job=DoBill A=Thing_TableButcher60115 B=Thing_Mosswine_Corpse60105 C=(111, 0, 121), Exception: System.NullReferenceException: Object reference not set to an instance of an object
Now when I put any other custom item I've made into the butcherBodyPart <thing> bit, "BullfangoTusk" in this example, it works fine:
<ThingDef ParentName="ResourceVerbBase">
<defName>BullfangoTusk</defName>
<label>bullfango tusk</label>
<description>A bullfango's razor sharp tusk, valuable. Usable as a makeshift weapon.</description>
<graphicData>
<texPath>Things/Item/BullfangoTusk</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<equippedAngleOffset>-20</equippedAngleOffset>
<statBases>
<MarketValue>350</MarketValue>
<MaxHitPoints>110</MaxHitPoints>
<Mass>20</Mass>
<Flammability>1.0</Flammability>
<DeteriorationRate>0.5</DeteriorationRate>
<MeleeWeapon_DamageAmount>10</MeleeWeapon_DamageAmount>
<MeleeWeapon_Cooldown>4</MeleeWeapon_Cooldown>
</statBases>
<resourceReadoutPriority>Middle</resourceReadoutPriority>
<stackLimit>10</stackLimit>
<verbs>
<li>
<verbClass>Verb_MeleeAttack</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<meleeDamageDef>Scratch</meleeDamageDef>
</li>
</verbs>
<thingCategories>
<li>Items</li>
</thingCategories>
<tradeTags>
<li>Exotic</li>
</tradeTags>
</ThingDef>
Does anyone know what's going on with my code and what I'm doing wrong?
Edit: Upon further inspection, it happens with other animals with butcher items like the first one mentioned, the first time the item and everything else is butchered fine, but when two or more animals are butchered, I get the error and no meat is spawned, this HOWEVER does not happen with any butcher item like the tusk where it's a piece of equipment that a pawn can use, maybe that can help with figuring things out.
Edit Edit: Well that was fast, I figured out that the <ThingDef ParentName="ResourceVerbBase"> is supposed to be <ThingDef ParentName="ResourceBase"> for items that are not used as equipment (verbs), pretty easy to figure out in hindsight, so I guess this will be a reminder to anyone googling the issue for themselves.
#5
Help / Re: Separate animal pack leaders?
September 18, 2017, 08:03:13 PM
So you can't do it with natural spawns? Disappointing, but oh well, thanks.
#6
Help / Separate animal pack leaders?
September 16, 2017, 01:38:21 PM
I'm trying to create a pack animal, but only want one or two pack leaders that are an "alpha" version more or less of the pack animal with a different description, attack values, butcher items, etc. Is there any way to do that?
#7
Mods / Re: Modded animals appearing in the wild and other questions
September 12, 2017, 12:27:10 PM
@Mehni
Thanks
Thanks
#8
Mods / Re: Modded animals appearing in the wild and other questions
September 10, 2017, 12:29:01 PM
@noobonthisforum
thanks, appreciate it, been digging through other mods and google to see what makes things spawn and this hasn't popped up anywhere I've looked, turns out you just put it under <races>.
So I've figured out wild animal spawning and have my creations roaming around, but still don't know what wildSpawn_EcoSystemWeight, nuzzleMtbHours, or combatPower do.
I'm also considering adding projectiles to my animals, I've heard that it's a bit complicated but I've seen mods that have animals more or less throw organic grenades to do projectile damage. Is this a good way to do things if I want to make both area of effect attacks as well as direct attacks, or would there be a better way to get it done?
Also: is there any way to make something have a custom leather sprite?
thanks, appreciate it, been digging through other mods and google to see what makes things spawn and this hasn't popped up anywhere I've looked, turns out you just put it under <races>.
So I've figured out wild animal spawning and have my creations roaming around, but still don't know what wildSpawn_EcoSystemWeight, nuzzleMtbHours, or combatPower do.
I'm also considering adding projectiles to my animals, I've heard that it's a bit complicated but I've seen mods that have animals more or less throw organic grenades to do projectile damage. Is this a good way to do things if I want to make both area of effect attacks as well as direct attacks, or would there be a better way to get it done?
Also: is there any way to make something have a custom leather sprite?
#9
Mods / Re: Modded animals appearing in the wild and other questions
September 09, 2017, 10:14:12 PM
Thanks for the advice, I'm currently trying myself but don't have much experience with C# or programming in general, a lot of the things are just floats with the only search result being the definitions of themselves under race properties with no other dev comments. That would be great if you could try to find something else out about them, appreciate it.
#10
Mods / Modded animals appearing in the wild and other questions
September 09, 2017, 03:35:19 PM
I'm trying to make an animal mod but have a few questions on XML perimeters that I couldn't find elsewhere, what does the wildSpawn_EcoSystemWeight tag modify? What do I need to do to get a modded animal to spawn in the wild on their own, do they just appear when wildSpawn_spawnWild is set to 1 and the temperatures are good or are there other things I need to do? If I don't set the filename of Races_Animal_xxxx to one already in the core mod, would that prevent stuff from spawning naturally? What does nuzzleMtbHours do? For custom sounds, do I just put the sounds in the /Sounds folder of my mod with the right filename or do I need to direct soundWounded to a path? What does the combatPower tag indicate?
Thanks
Thanks
Pages1