• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

sphereii's DMT Mods

Bloom's Family Animal Husbandry

The Bloom's Animal Husbandry Mod provides sample xml for a cow, along with support XML items, such as hand item, buff sequences to control its thirst and hunger, as well as reproduction.

Using a combination of A custom AI task ( EAIMaslowLevel1 ) and Buffs, animals can be guided through their entire life cycle.

Finding

Animals can be found in the wild or earned through potential quest lines from NPCs, using the RewardGiveNPCSDX quest reward system. Animals can spawn in small herds, usually with a male and a few female animals. Male animals have an

AoE buff that affects only the female version of the animal, re-inforced by the faction system. This allows the opportunity for the animals to breed.

Incentives

Unlike full NPCs, you are not expected to hire or gain the loyalty of a farm animal. Basic animal handling is control using the incentive feature of the EAIApproachAndFollowTargetSDX.

An incentive is something that each individual entity finds appealing. This can be a combination of buffs, cvars, block or item names. For animals, it makes that they would be attracted to certain blocks (hay bales) and

food. If a baby is spawned from an entity, then it has a Mother cvar, which has the entity ID of the mother entity. This gets removed as the entity gets older through the buff system, but when it's young,

it'll follow its mother around.

A spawned in herd will usually contain a male version of the animal, or however the EntityAliveEventSpawnderSDX is configured for them. The "Leader" is spawned in first, and its EntityID is stored with the Followers, allowing them to

follow their leader.

Code:
<property name="AITask-7" value="ApproachAndFollowTargetSDX, Mods" param1="Mother,Leader,hayBaleBlock,foodCornOnTheCob"/>
Breeding

Breeding is handled throuhgh a buffs. For breeding to be successful, there needs to be a Male and Female version of the same animal, and they need to share the same faction.

When the adults recieve the buffAnimalAdult buff, they'll be affected by one of two effect groups, depending on their gender:

If they are female, they'll have a random chance to get pregnant. One of the conditions, besides random chance, to getting pregnant is having the buffAnimalFertility buff.

If they are male, they'll have the buffAnimalFertility AoE. The buffAnimalFertility only affects Females that are close by ( Default is 4 blocks ).

Code:
<buff name="buffAnimalAdult" hidden="true">
   <stack_type value="ignore"/>
   <duration value="1000"/>

   <!-- Effects that only need to happen on the females -->
   <effect_group name="Female Effects">
	<requirement name="IsMale" invert="true"/>

	<!-- Conditions for triggering pregnancy-->
	<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" target="self" buff="buffAnimalPregnant">
		<requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="1"/>
		<requirement name="NotHasBuff" buff="buffAnimalPregnant"/>
		<requirement name="NotHasBuff" buff="buffAnimalNewMother"/>
		<requirement name="NotHasBuff" buff="buffBloodMoonEffect" />
		<requirement name="HasBuff" buff="buffAnimalFertility"/>
	</triggered_effect>
   </effect_group>

   <!-- if the entity is a male, then give it the fertility buff -->
   <effect_group name="Male Effects">
	<requirement name="IsMale" />
	<triggered_effect trigger="onSelfBuffUpdate" action="AddBuff" target="selfAOE" range="4" buff="buffAnimalFertility" target_tags="farmanimal"/>
   </effect_group>

   <!-- Effects and triggers for both genders -->
   <effect_group name="Universal effects">
	<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$sizeScale" operation="set" value="1"/>
	<triggered_effect trigger="onSelfBuffStart" action="PumpQuestSDX, Mods" target="self"  />
   </effect_group>

   <effect_group name="Exit Buffs">
	<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" target="self" buff="buffAnimalSenior" />
	<triggered_effect trigger="onSelfBuffFinish" action="RemoveBuff" target="self" buff="buffAnimalHarvestable" />
	<triggered_effect trigger="onSelfBuffFinish" action="RemoveBuff" target="self" buff="buffAnimalFertility" />
   </effect_group>
</buff>
Herds

Initial spawning is handled through a special entity called EntityAliveEventSpawnerSDX class. Through this special entity, you may spawn in a particular entity as a leader, then spawn in followers. These followers will set

their cvar Leader to their leader, and follow it everywhere. If the leader gets attacked, then the followers will protect it.

The invisibleCowHerdSpawner would be configured through an entity group or through biome spawning like a typical zombie or animal.

Code:
   <entity_class name="invisibleCowHerdSpawner">
     <property name="Mesh" value="Gore/gore_block1_bonesPrefab"/>
     <property name="ModelType" value="Custom"/>
     <property name="Prefab" value="Backpack"/>
     <property name="Class" value="EntityAliveEventSpawnerSDX, Mods"/>
     <property name="Parent" value="Animals"/>
     <property name="TimeStayAfterDeath" value="1"/>
     <property name="IsEnemyEntity" value="false"/>
     <property name="LootListOnDeath" value="4"/>
     <property name="Faction" value="animals"/>
     <property class="SpawnSettings" >
       <property name="Leader" value="animalFarmCowMale" />
       <property name="Followers" value="animalFarmCow,animalFarmCow,animalFarmCow" />
     </property>
   </entity_class>
 
aXUi_Dialog

The aXUi_Dialog provides a sample XUI from Sirillion to allow the NPCs to have a different dialog display format, including a sample NPC dialog with a quest chain.

npc.xml

This XML defines the dialog options for an NPC.

Code:
<configs>
 <append xpath="/npc">
   <npc_info
   id="spheretest"
   name="NPC"
   name_key="npc_traitorJoel"
   faction="whiteriver"
   portrait="npc_joel"
   greeting_type="nearby"
   stance="Like" voice_set="trader"
   trader_id="1" dialog_id="GenericNPCWithQuest"
   quest_list="npcqest" />
 </append>
</configs>
The id="spheretest" would be used as the NPCID on the entity class, and links the entity class to its NPC hooks.

Code:
<property name="NPCID" value="spheretest"/>
the dialog-id, "GenericNPC" makes a reference to the dialog.xml file, and brings up the chat and interaction window.

Code:
  <!-- Generic Dialog with Quest options (if quests are available -->
   <dialog id="GenericNPCWithQuest" startstatementid="start">
     <statement id="start" text="dialog_trader_statement_start">
       <response_entry id="FollowMe" />   
       <response_entry id="jobshave" />
       <response_entry id="ShowMe" />
       <response_entry id="StayHere" />
       <response_entry id="GuardHere" />
       <response_entry id="Wander" />
       <response_entry id="SetPatrol" />
       <response_entry id="Patrol" />
       <!-- response_entry id="Loot" / -->
       <response_entry id="Hire" />
       <response_entry id="done" />
     </statement>
If the NPC can give a quest or multiple quests, a quest_list needs to be added to the quests.xml, along with whatever quests you want to provide it. For example, you may want to create a quest line that a single NPC

gives you. Once you complete all the requirements, the NPC may join you as a follower.

Code:
   <quest_list id="npcqest">
     <quest id="test_fetch" />
   </quest_list>
 
Finally released! Woot!!! Well done Sphereii and thanks to all those who helped us test all this.

 
Anti-Nerd Pole

The Anti-Nerd Pole mod disables placing blocks when you are not on the ground. No more jump and placing here.

You can still place blocks if you are on a ladder, flying, or in god mode.

 
Clear UI

A Clean UI mod, which removes all indicators and distractions on your main HUD. No health bar, no item pick up, no damage indicator, and no other context clues that you may be looking at.

 
The Anti-Nerd Pole mod disables placing blocks when you are not on the ground. No more jump and placing here.
You can still place blocks if you are on a ladder, flying, or in god mode.
inventively...

it's a good thing for hardcore players!

 
HI

I have a question about Bloom's Animal Husbandry....

I Installed the mod cause it was needed for the NPC Mod.

Now i have the animals in the F6 spawn Menu... i was interessted what that may be or do...

Spawned the cows, but the only thing i can to ist talk with them, killing them does not give resources eather...

I also spawned the zombie cow... she now attacks me all the time and i cant even hit her... so i cant kill her. And she runs totaly slowmotion towwards me..

The animal farm (Deer) is totaly buggy just runs around dissapiering here shows up there...

Do i need to do something else or install another mod to make it work?

 
Last edited by a moderator:
HI I have a question about Bloom's Animal Husbandry....

I Installed the mod cause it was needed for the NPC Mod.

Now i have the animals in the F6 spawn Menu... i was interessted what that may be or do...

Spawned the cows, but the only thing i can to ist talk with them, killing them does not give resources eather...

I also spawned the zombie cow... she now attacks me all the time and i cant even hit her... so i cant kill her. And she runs totaly slowmotion towwards me..

The animal farm (Deer) is totaly buggy just runs around dissapiering here shows up there...

Do i need to do something else or install another mod to make it work?
The deer was a test entity and I didn't even think it was in the bundle. It's not part of Bloom's anyway.

You can hold items in your hand that they prefer.

Code:
     <property name="AITask-3" value="ApproachAndFollowTargetSDX, Mods" param1="Mother,Leader,hayBaleBlock,foodCornOnTheCob"/>
They will follow you if you are holding a haybale or corn on the cob. You can lead them back to your farm. You should be able to harvest them for materials.

The farm animals are not meant to have a lot of interaction directly with you. The female cows, once they get pregnant from a male cow, will spawn a baby that will grow over time. When the mother spawns a baby, then she'll have a milk value that will climb over time. You should be able to get milk from her then.

 
Thanks :)

Somehow in may case it does not work. I can kill the normal Cows but then not harvest them. The corpse does not get hit with any weapon or tool. Like the Zombie Cow i wich i cant even kill cause i cant even hit her.

 
@sphereii would be cool if you could make xml files as the basis for a cow that you stop catching and produce milk:02.47-tranquillity:

 
@sphereii would be cool if you could make xml files as the basis for a cow that you stop catching and produce milk:02.47-tranquillity:
When a cow is a female, and has had a baby, it'll start producing milk :)

 
how i can catch a cow ? i have hale and corb in the hand . nothing happens except I just trigger E the i have 3 selection options that do not really bring what. The cow still stands star in front of me

 
how i can catch a cow ? i have hale and corb in the hand . nothing happens except I just trigger E the i have 3 selection options that do not really bring what. The cow still stands star in front of me
You don't really tame or catch cows. You can hold a haybale and it should be interested in you to start following you. As long as you hold it, it should follow you. Lead it back to a pasture or fenced in area, and it'll technically be yours :)

 
how i can catch a cow ? i have hale and corb in the hand . nothing happens except I just trigger E the i have 3 selection options that do not really bring what. The cow still stands star in front of me
I retested last night, and you are correct. They are not following as they are supposed too. I've got a patch that I'll release today for it. Sorry for the troubles!

 
Top thank you! I've already wondered why that does not work

and a separate mod for 255 Quality Stats Randomizer would be great:fat:

 
Top thank you! I've already wondered why that does not workand a separate mod for 255 Quality Stats Randomizer would be great:fat:
The NPCs are complicated code, which I hope to make simpler, to avoid stuff like this.

 
Back
Top