Modded animals appearing in the wild and other questions

Started by dandog2142, September 09, 2017, 03:35:19 PM

Previous topic - Next topic

dandog2142

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

CannibarRechter

Pretty much best thing to do is decompile rimworld and check the code for these things. Seems it's a bit too quiet around here, so you're likely going to have to check yourself. Still if you are still stuck tomorrow I can take a peek at the code for you. ILspy is really easy to use.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

dandog2142

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.

noobonthisforum

<wildBiomes>
   <TemperateForest>0.00</TemperateForest>
   <TropicalRainforest>0.00</TropicalRainforest>
   <AridShrubland>0.00</AridShrubland>
   <Desert>0.00</Desert>
   <ExtremeDesert>0.00</ExtremeDesert>
   <Tundra>0.00</Tundra>
   <BorealForest>0.00</BorealForest>
      </wildBiomes>

Play around with the numbers and see what suits you, currently if you put these codes in they won't spawn in those biomes, also if you don't know where to put it go find a file in the core folders called "ThingsDefs_Races".

dandog2142

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

noobonthisforum

This guy explains it well on how to do it I don't remember much about the video but it should be a start https://www.youtube.com/watch?v=3HT9pYWvYa4&t=32s

Mehni

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

EcoSystemWeight is used as a parameter when determining what animal to spawn. The heavier your animal is on the ecosystem, the higher this number should be. Muffalo have a weight of 1, since they tend to eat a lot of grass. Predators have a comparatively lower weight, since they have a low-ish hunger rate and eat herbivores.

nuzzleMtbHours is how often an animal will nuzzle. Once every X hours, on average.

CombatPower determines how many points they cost to send in an event (Manhunter packs in this case). Higher numbers means they're costly to send, so the game will send fewer of these. You should try and estimate their strength to the best of your ability. Small animals are hard to hit, animals with an increased Healthscale are tankier. Faster animals can't be kited.