Jump to content
sphereii

sphereii's DMT Mods

Recommended Posts

Take a look in the transmogrifier's Config folder for the entityclasses.xml

 

<!-- Turn on head shots, and random speeds for entities-->
 <append xpath="/entity_classes/entity_class[starts-with(@name, 'zombieTemplateMale')]" >
   <property name="HeadShots" value="true" />
   <property name="RandomSpeeds" value="true" />
   <property name="RandomSize" value="true" />

 

Set that HeadShots to false.

 

I came looking for this! Been wanting the headshots to work again!

Share this post


Link to post
Share on other sites

ERROR: System.InvalidOperationException: The sequence contains no matching elements

by System.Linq.Enumerable.First [TSource] (IEnumerable`1 source, Func`2 predicate)

by AnimationChange.Patch (ModuleDefinition module)

by SevenDaysToDiePlugin.BuildAndRunPatchModsTask.RunPatcherMods ()

ERROR: Task Compile against patcher scripts failed

 

Getting this error when trying to build with SDX. Alpha 17.2

Edited by fnfear (see edit history)

Share this post


Link to post
Share on other sites

ok I am getting ERROR: System.InvalidOperationException: Sequence contains no matching element

at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)

at AnimationChange.Patch(ModuleDefinition module)

at SevenDaysToDiePlugin.BuildAndRunPatchModsTask.RunPatcherMods()

ERROR: Task Compile mod patcher scripts failed

 

when trying to build just the animation sdx for 17.2 what am I doing wrong?

Share this post


Link to post
Share on other sites
ok I am getting ERROR: System.InvalidOperationException: Sequence contains no matching element

at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)

at AnimationChange.Patch(ModuleDefinition module)

at SevenDaysToDiePlugin.BuildAndRunPatchModsTask.RunPatcherMods()

ERROR: Task Compile mod patcher scripts failed

 

when trying to build just the animation sdx for 17.2 what am I doing wrong?

 

Use the experimental branch of the mods: https://github.com/7D2DMods/SDXMods/tree/17.2Experimental

Share this post


Link to post
Share on other sites

New updatein the main off. Using Guppycur's formatting for the modlets.

 

Also releasing the first of a few SDX Core modlets, which expands vanilla functionality for modders.

 

The first one is SDX_Buffs, which gives us a few more triggers and calls.

Share this post


Link to post
Share on other sites

SDX_Buffs

 

This SDX Mod adds additional Action events and Requirements that can be used in the buffs.xml.

 

MinEventActionAnimatorSpeedSDX

 

This class allows you to change the animation speed

 

Example Usage:

 

<triggered_effect trigger="onSelfBuffStart" action="AnimatorSpeedSDX, Mods" target="self" value="1" /> // normal speed
<triggered_effect trigger="onSelfBuffStart" action="AnimatorSpeedSDX, Mods" target="self" value="2" /> // twice the speed

 

MinEventActionCreateItemSDX

 

This class allows you to get an item from a buff.

 

Example Usage:

 

<triggered_effect trigger="onSelfBuffRemove" action="CreateItemSDX, Mods" item="drinkJarCoffee" count="2"/>

 

MinEventActionGiveQuestSDX

 

This class allows you to give a Quest to a non-player character.

 

Example Usage:

 

<triggered_effect trigger="onSelfBuffStart" action="GiveQuestSDX, Mods" target="self" quest="myNewQuest" />

 

MinEventActionModifySkillSDX

 

This class allows you to add (or subtract) points to a perk or skill

 

Example Usage:

 

<triggered_effect trigger="onSelfBuffStart" action="ModifySkillSDX, Mods" tag="skill_name" operation="add" value="1" /> // levels up skill_name by 1

 

MinEventActionPumpQuestSDX

 

Some new requirements and objectives added to the Quest system are not checked at regular intervals, such as if you have an Objective that progresses by a Buff. Adding a PumpQuest will cause each quest that the entity has to recheck all its objectives to see if it can progress.

 

Example Usage:

 

<triggered_effect trigger="onSelfBuffStart" action="PumpQuestSDX, Mods" target="self"  />

 

MinEventActionSkillPointSDX

 

This class allows you to add Skill Points to an entity via a buff

 

Example Usage:

 

<triggered_effect trigger="onSelfBuffStart" action="SkillPointSDX, Mods" target="self" value="2" /> // two Skill points

 

MinEventActionSpawnBabySDX:

 

This class allows you to spawn an entity, or an entity from a spawn group, and sets a Mother cvar, linking the new entity to the original entity. This allows mothers to have babies that are linked to each other.

 

Example usage:

 

<triggered_effect trigger="onSelfBuffFinish" action="SpawnBabySDX, Mods" target="self" SpawnGroup="farmAnimalsCow" />

 

RequirementEveryXDaySDX:

 

This class adds a new requirement that triggers every day.

 

Example usage:

 

<requirement name="RequirementEveryXDaySDX, Mods" value="0"/> <!-- triggers on horde days -->
<requirement name="RequirementEveryXDaySDX, Mods" value="2"/> <!-- triggers every two days -->

 

RequirementEveryXHourSDX:

 

This class adds a new requirement that triggers at the appointed time.

 

Example Usage:

 

<requirement name="RequirementEveryXHourSDX, Mods" value="22"/> <!-- triggers at 22:00 hours -->

 

RequirementOnSpecificBiomeSDX

 

This class adds a new requirement based on a biome name filter.

 

Example Usage:

 

<requirement name="RequirementOnSpecificBiomeSDX, Mods" biome="desert" />

<triggered_effect trigger="onSelfEnteredBiome" action="AddBuff" target="self" buff="bufffnamehere">
<requirement name="RequirementOnSpecificBiomeSDX, Mods" biome="desert" />
</triggered_effect>

 

RequirementSameFactionSDX

 

This class adds a new requirement based on the faction.

 

Example Usage:

 

<requirement name="RequirementSameFactionSDX, Mods" faction="animalsCows" />  <!-- Requirement will only pass if the entity belongs to this faction -->

 

MinEventActionAddBuffByFactionSDX

 

This class adds a new trigger event that filters based on faction. This allows us to filter certain AoE from affecting the same faction as we are.

 

Example Usage:

 

<triggered_effect trigger = "onSelfBuffUpdate" action="AddBuffByFactionSDX, Mods" target="selfAOE" range="4" buff="buffAnimalFertility"  /> <!-- Only affects the same faction -->
<triggered_effect trigger = "onSelfBuffUpdate" action="AddBuffByFactionSDX, Mods" target="selfAOE" range="4" mustmatch="true" buff="buffAnimalFertility"  /> <!-- Only affects other factions, not its own -->

Edited by sphereii (see edit history)

Share this post


Link to post
Share on other sites

SDX_Quests

 

The follow classes have been added to allow more fine tuning of the Quest system, by introducing new Objectives and action types.

 

Note: The new Objectives are not tied into the official quest "pump" that gets triggered to check if the objective is checked. For this reason, the MinEventActionPumpQuestSDX was created, to pump the quest chains to see if the

objectives have been met.

 

 

ObjectiveBuffSDX

---------------------

 

This new Objective type allows you to set a condition on a buff before continuing. In the below example, in order to transition from Phase 1 to Phase 2, the entity must have the buff called "buffAnimalAdult".

 

Properties:

 

phase: Like in Vanilla.

buff: This is the buff that the entity must have before this phase will progress.

 

Example Usage:

 

<objective type="BuffSDX, Mods">
<property name="phase" value="1" />
<property name="buff" value="buffAnimalAdult" />
</objective>

 

ObjectiveGotoPOI

---------------------

 

This new Objective type allows you to target a particular prefab by name.

 

Properties:

 

PrefabName: This is the prefabName you wish to target, which is the filename without the extension.

 

Example Usage:

 

<objective type="GotoPOISDX, Mods" value="500-800" phase="1">
<property name="completion_distance" value="50" />
   <property name="PrefabName" value="prefabName" />
</objective>

 

QuestActionGiveBuffSDX

---------------------

 

This new Action for the quest will give a buff to the recipient.

 

Properties:

 

type: This is the SDX Class of the GiveBuff

value: This is the buff you want to be applied

phase: Vanilla. Determines at which phase the buff is applied.

 

Example Usage:

 

<action type="GiveBuff, Mods" value="buffAnimalPregnant" phase="3" />

 

RewardGiveNPCSDX

---------------------

 

This reward gives you the quest NPC to the player as a follower.

 

Properties:

 

type: This is the SDX Class of the GiveNPCSDX

id: If provided, a new NPC will be spawned from this entity group, and assigned to you. If no id is specified, the current NPC is assigned.

 

Example Usage:

 

<reward type="GiveNPCSDX, Mods" id="entityGroup"  />  // Spawns in an entity from the group to be your NPC
<reward type="GiveNPCSDX, Mods"  />  // Hires the current NPC

 

 

RewardItemSDX

---------------------

 

This reward gives you target item.

 

Properties:

 

type: This is the SDX Class of the GiveNPCSDX

id: Provides the player with that item

value: Is the number of the item to provide.

 

Example Usage:

 

<reward type="ItemSDX, Mods" id="casinoCoin" value="10" />

 

 

QuestActionSpawnEntitySDX

---------------------

 

This QuestAction allows you to spawn an entity, spawning it beside the SharedOwnerID's entity. Unlike SpawnEnemy, it won't automatically set the player or spawn entity trigger as an enemy. Like SpawnEnemy,

it can accept comma delimited entities in the id="animalFarmCow,zombieArlene".

 

Example Usage:

 

<action type="SpawnEntitySDX, Mods" id="zombieBear" value="1" phase="3" />       <!-- This will spawn in an zombieBear entity during Phase 3 -->

 

 

RewardQuestSDX

---------------------

This RewardQuest allows you to give a Quest to the SharedOwnerID entity. This is a non-Player reward.

 

Properties:

 

type: This is the SDX Class of the RewardQuestSDX

id: The quest name you want to give.

 

Example Usage:

 

<reward type="QuestSDX, Mods" id="Progression_Quest" />

 

 

 

Quest Line Example

-------------------

 

Here's an example of a Quest line that works based on buff progression.

 

<quest id="Progression_Quest">
<property name="name_key" value="Progression_Quest" />
<property name="subtitle_key" value="Progression_Quest" />
<property name="description_key" value="Progression_Quest" />
<property name="icon" value="ui_game_symbol_zombie" />
<property name="repeatable" value="true" />
<property name="category_key" value="challenge" />
<property name="offer_key" value="Progression_Quest" />
<property name="difficulty" value="veryeasy" />

<!-- Before progressing, make sure the entity is at infection1 -->
<objective type="BuffSDX, Mods">
	<property name="phase" value="1" />
	<property name="buff" value="buffIllInfection1" />
</objective>

<!-- Before progressing, make sure the entity is at infection2 -->
<objective type="BuffSDX, Mods">
	<property name="phase" value="2" />
	<property name="buff" value="buffIllInfection2" />
</objective>

<!-- Before progressing, make sure the entity is at infection3 -->
<objective type="BuffSDX, Mods">
	<property name="phase" value="3" />
	<property name="buff" value="buffIllInfection3" />
</objective>

<!-- This will spawn in an zombieBear entity during Phase 3 -->
<action type="SpawnEntitySDX, Mods" id="zombieBear" value="1" phase="3" />

<!-- Once the entity is spawned, give back the same quest, and give it a casino coin for a good job. -->
<reward type="QuestSDX, Mods" id="buffProgression_Quest" />
<reward type="ItemSDX, Mods" id="casinoCoin" value="1" />

</quest>

 

As mentioned before, in order for the Objectives to properly fire, you need to use the MinEventActionPumpQuestSDX in the buffs. In the effect_group "Starting Effects", there's a PumpQuestSDX, Mods. This fires the refresh

call for each of the quests that belong to the entity to refresh and check their status.

 

<buff name="buffInfectedAnimal1">
   <stack_type value="ignore"/>
   <duration value="50"/>
   <effect_group name="Starting Effects">
	<triggered_effect trigger="onSelfBuffStart" action="PumpQuestSDX, Mods" target="self"  />
	<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" target="self" buff="buffAnimalHarvestable" />
	<triggered_effect trigger="onSelfBuffStart" action="RemoveBuff" target="self" buff="buffAnimalFertility" />
   </effect_group>

   <!-- Give the animal a chance to fight the infection -->
   <effect_group name="Updates">
	<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" target="self" buff="buffInfectedAnimal1" >
		<requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="1"/>
	</triggered_effect>
   </effect_group>

   <!-- handles the buffs that we are adding and removing together-->
   <effect_group name="General Matched buffs">
	<triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_onFire" local_offset="0,-.2,0" parent_transform="Hips"/>
	<triggered_effect trigger="onSelfBuffFinish" action="RemoveParticleEffectFromEntity" particle="p_onFire"/>
	<triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_onFire"/>
   </effect_group>

   <effect_group name="Exit Buffs">
	<triggered_effect trigger="onSelfBuffFinish" action="AddBuff" target="self" buff="buffInfectedAnimal2" />
	<triggered_effect trigger="onSelfBuffRemove" action="AddBuff" target="self" buff="buffAnimalHarvestable" />
   </effect_group>
</buff>

Share this post


Link to post
Share on other sites

SDX_Dialogs

 

The SDX Dialog adds in new actions and triggers used for the dialogs.xml, as well as include new UI controllers.

 

DialogActionExecuteCommandSDX

 

This class executes commands in the EntityAliveSDX.cs class. These commands must be added to the switch statement in EntityAliveSDX.cs to be effective.

 

Example Usage:

 

<response id="FollowMe" text="Follow me" >
  <requirement type="HiredSDX, Mods" requirementtype="Hide"/>
  <action type="ExecuteCommandSDX, Mods" id="FollowMe" />
</response>

 

DialogActionOpenDialogSDX

 

 

This class allows us to open up a new window

 

Example Usage:

 

<response id="Hire" text="I am interested in hiring you." >
<requirement type="HiredSDX, Mods" requirementtype="Hide" value="not"/>
   <action type="OpenDialogSDX, Mods" id="Hire" />
</response>

 

DialogRequirementHiredSDX

 

This class allows us to filter on if the statement should be visible, depending on if its hired or not.

 

Example Usage:

 

<response id="FollowMe" text="Follow me" >
<requirement type="HiredSDX, Mods" requirementtype="Hide"/>  <!-- This hides the entry if its not Hired. -->
<action type="ExecuteCommandSDX, Mods" id="FollowMe" />
</response>

<response id="Hire" text="I am interested in hiring you." >
<requirement type="HiredSDX, Mods" requirementtype="Hide" value="not"/> <!-- The value="not" flips the condition, so will only show if its not hired. -->
<action type="OpenDialogSDX, Mods" id="Hire" />
</response>

 

DialogRequirementPatrolSDX

 

This class shows or hides if the "Patrol" option is visible. If it does not have Patrol Coordinates (provided through the "Follow me for your patrol route" task"), then it won't show.'

 

Example Usage:

 

<response id="Patrol" text="Patrol your route" >
<requirement type="PatrolSDX, Mods" requirementtype="Hide" />        
   <action type="ExecuteCommandSDX, Mods" id="Patrol" />
</response>

Share this post


Link to post
Share on other sites

EntityAliveSDX

 

This is the new base class, which inherits from EntityNPC and all the sub classes. It has new features, such as allowing them to be hired and execute your orders.

 

NPCs can accept orders by interacting with them and selecting one of pre-made options. Using a combination of XML dialog settings and code, some dialog options will not appear unless they make sense. For example,

when you first meet an NPC, you will not be able to give them orders.

 

NPCs can be hired either by paying their Hire Cost, completing a quest line, or have some sort of incenntive for them to follow.

 

Using the new Maslow AI Task, along with the buff system, NPCs can consume food and water.

 

Hiring NPCs

 

Each unique NPC can have its own hiring cost and currency, available through the XML properties. By default, this is 1000 casino Coins. The HireCurrency is any available Item, and that item will be removed

from your inventory when you hire them.

 

Examples

 

Default:

<property name="HireCost" value="1000"/>
<property name="HireCurrency" value="casinoCoin"/>

 

Unique Item:

<property name="HireCost" value="1"/>
<property name="HireCurrency" value="BloomsFamilyHeirloom_1"/>

 

Currently, all NPCs are permanent hires. Once NPCs are hired, your entity ID is stored with the entity as a cvar "Leader". As soon as they are hired, they'll begin to follow you, and try to keep pace with your speed.

 

Initially, unhired NPCs will only show a few options in the dialog. However, when they are hired, they can do more for you.

 

Orders

 

ShowMe - This displays information about the entity in a tool tip window, and in the console. This will show you their health, name, and hunger levels.
ShowAffection - This just displays a tool tip. TODO: have it positively impact the entity
FollowMe  - The entity will follow you, keeping a distance of 3 to 5 spaces behind you. They'll try to match your walk and run speed.
Stayhere - The entity will stay in place
GuardHere - The entity will stand in your place, facing your initial direction. This will set the GuardPosition, allow the guard to return to that spot after a fight.
Wander - The entity will walk around the area
SetPatrol - The entity will begin following your foot steps, recording them as Patrol Coordinates
Patrol - The entity, if it has Patrol Coordinates, will begin tracing the coordinates back and forth. This option only shows if it has Patrol Coordinates
Hire - If unhired, the entity will allow you to hire them. Their cost depends on their XML settings.
OpenInventory - This will open their inventory
Loot - This tells the entity to Loot the POI you are in now.

Options can be filtered through using the SDX_Dialog class that adds new conditions to show statements based on if they are hired. Not all NPCs need to support all the tasks.

 

Here's a sample Dialog XML that show's the Hire option, if the NPC is not hired, and will show ShowMe and StayHere orders if it is hired.

 

Sample Dialog

 

<response id="Hire" text="I am interested in hiring you." >
<requirement type="HiredSDX, Mods" requirementtype="Hide" value="not"/>
<action type="OpenDialogSDX, Mods" id="Hire" />
</response>

<response id="FollowMe" text="Follow me" >
<requirement type="HiredSDX, Mods" requirementtype="Hide"/>
<action type="ExecuteCommandSDX, Mods" id="FollowMe" />
</response>

<response id="ShowMe" text="Show Me your inventory" >
<requirement type="HiredSDX, Mods" requirementtype="Hide" />
<action type="ExecuteCommandSDX, Mods" id="OpenInventory" />
</response>

<response id="StayHere" text="Stay here" >
<requirement type="HiredSDX, Mods" requirementtype="Hide" />
<action type="ExecuteCommandSDX, Mods" id="StayHere" />
</response>

 

 

Recommended AI Tasks

-------------------

The following AI tasks were used in testing well rounded NPCs. It is recommended taht you start off with this AI Tasks, and then customize as needed.

 

<property name="AITask-1" value="BreakBlock"/>
<property name="AITask-2" value="Territorial"/>
<property name="AITask-3" value="ApproachAndAttackSDX, Mods" param1="Entity,0" param2=""  /> 
<property name="AITask-4" value="ApproachAndFollowTargetSDX, Mods" param1="Leader,foodCornOnTheCob"/> 
<property name="AITask-5" value="PatrolSDX, Mods"/> 
<property name="AITask-6" value="MaslowLevel1SDX, Mods"/> 
<property name="AITask-7" value="Look"/> 
<property name="AITask-8" value="WanderSDX, Mods"/> 
<property name="AITask-9" value="" />
<property name="AITarget-1" value="SetAsTargetIfHurtSDX, Mods" param1="Entity"/> 
<property name="AITarget-2" value="SetAsTargetIfLeaderAttackedSDX, Mods" param1="Entity"/> 
<property name="AITarget-3" value="SetAsTargetNearestEnemySDX, Mods" param1="Entity,80"/>
<property name="AITarget-4" value="" />

 

Maslow

-------------------

Losely modelled around Maslow's Hierachy of Needs, the NPCs have requirements based on a combination of buffs and a new AI task. This buff is applied through the entityclass entry, and controls the NPCs' food and

drink requirements. Over time, the NPCs will get hungry and thirsty, and, using the EAIMaslowLevel1SDX class, will seek out food and water through its configuration.

 

Food and Water

 

NPCs will look for food and water through their configured bins. Triggered by the HungryBuffs and ThirstyBuffs, the AI task will seek out food and water as needed, and consume it. Once satisfied, it'll continue

to wander.

 

<!-- which containers to look for food in -->
<property name="FoodBins" value="cntSecureStorageChest,cntStorageChest" />

<!-- what it can drink out of -->
<property name="WaterBins" value="water,waterMoving,waterStaticBucket,waterMovingBucket,terrWaterPOI" />

<!-- Default thirsty and hungry buffs -->
<property name="ThirstyBuffs" value="buffStatusThirsty1,buffStatusThirsty2" />
<property name="HungryBuffs" value="buffStatusHungry1,buffStatusHungry2" />

 

Each entity can be configured to eat a certain food type. The NPCs will scan for the FoodBins, then search inside and consume one of the listed food items. The value of food they recieve is hard coded in the EAIMaslowLevel1

class initially, since some food items may not be have a food value, such as the hayBaleBlock. All foods satisfy the same amount of hunger.

 

Once an entity becomes too hungry or thirsty, it will start taking damage until it eventually dies.

 

<!-- Food items and bins that this entity will eat, if using the right AI Task -->
<property name="FoodItems" value="hayBaleBlock,resourceYuccaFibers,foodCropYuccaFruit,foodCornBread,foodCornOnTheCob,foodCornMeal,foodCropCorn,foodCropGraceCorn"/>

 

Sanitation

 

As an optional feature, NPCs can be affected by a sanitation system. Over time, a sanitation level rises through a buff. Once this value reaches a threshold, the entity will need to use the bathroom. If

a bathroom is not available, they will do their business on the ground.

 

If sanitation is turned on, the entity will search for a ToiletBlocks that is nearby. If found, it will go to the ToiletBlock and reset its sanitation level. This is useful for NPCs, but might not work out so well for animals.

 

If an entity does not have a toilet block, it will eventually drop a SanitationBlock. This will be useful in the future for different types of fertilizer.

 

By default, it is disabled.

 

<property name="ToiletBlocks" value="cntToilet01,cntToilet02,cntToilet03" />
<property name="SanitationBlock" value="terrDirt" /> <!-- Poop block. If ToiletBlocks is configured, it'll use those rather than generate this block. -->

 

Home Block

 

If configured, a Homeblock may be placed which will reset the entity's Home location. The blocks listed here will set the entity's Home Position, allow it to patrol around it using the vanilla Territorial AI task

 

<!-- This is the block it'll call home -->
<property name="HomeBlocks" value="cntCowHomeBlock,hayBaleBlock"/>

 

Starting Buffs

 

NPCs are controlled mainly through the buff system. The default buffs are listed on the entity class, and are used to start off its hunger / thirsty stats, it's sanitation stats, etc.

 

<!-- The starting buffs. Semi-colon delimited! Example for Animal Buffs -->
<property name="Buffs" value="buffAnimalStatusCheck;buffStatusCheck;buffAnimalBaby;buffSanitationStatusCheck;buffAnimalCow" />

 

Names

 

Each entity may have one or more names, configured through the XML files. When the ntity is first spawned in, a name is randomly picked by the XML. The entity will be known as "Name the EntityName" in log files, along

with its entity ID.

 

<property name="Names" value="Bully,Duke,Hydro,Homer,Earl,Disel,Horns,Armor,Bob,Sampson,Tank,Kristof,Angus,Midnight,Nitrous,Red Bull,Moogan Freeman,Meatloaf,T-Bone,Mooshu,Leonardo DiCowprio,Cheeseburger,LovaBull,Hugh Heifer,Moossolini,Grassyella,Moo Rock,Rick Raws The Sause Bause,SteakHouse" />

Share this post


Link to post
Share on other sites

EAITasks and EAITargets

 

The SDX_EAITasks class introduces new AI tasks for entities to perform. Some of the tasks were changed so they rely on entity factions, rather than specifying the enemies through their Entity classes.

 

EAIApproachAndFollowTargetSDX

 

This AI task is useful for getting followers, based on potential incentives.

 

Incentives can be a block name that you are holding, an item name that you are holding, a buff, or a CVar value. You do not need to specify which

type of incentive it is. The class will go through all the various combinations to try to identify which of your incentives is active.

 

For the cvar checks, it stored the EntityID of the target. For example, Leader is the one who has hired the entity, so it's the player.entityID. For Mother,

it's the entity ID of the mother that spawned it.

 

Parameters:

 

Param1: This parameter is the target's incentive

Param2: Not Used

 

Example Usage:

<property name="AITask-4" value="ApproachAndFollowTargetSDX, Mods" param1="Mother,Leader,hayBaleBlock,foodCornOnTheCob"/>

 

 

EAIPatrolSDX

 

This AI Task is useful for asking followers and NPCs to patrol a path for you, once they are hired.

 

To set a patrol task, the Order must be SetPatrol. By default, this is set through opening up a dialog chat by interacting with the NPC. Once SetPatrol is set, walk the path you want the entity to follow. The entity will record every step you make.

 

Once the path is set, interact with them again, and ask them to Patrol. They will turn around and retrace their steps to their starting position, and start looping back and forth until interrupted.

 

Parameters:

 

Param1: Not Used

Param2: Not Used

 

Example Usage:

 

<property name="AITask-3" value="PatrolSDX, Mods"/>

 

EAIWanderSDX

 

This AI Task is useful for assigning to NPCs and animals alike. By default, the base Wander Ai task will begin attacking a block that is in front of it. The WanderSDX task stops the entity from wandering in the direction that its stuck in, rather than trying to break through. Very useful for farm animals that you don't want to break out of your fences.

 

Parameters:

 

Param1: Not Used

Param2: Not Used

 

Example Usage:

<property name="AITask-9" value="WanderSDX, Mods"/>

 

EAIMaslowLevel1SDX

 

This AI Task enables rules based on losely on Maslow laws. It allows the entity to react to its own stats, including seeking food and water if hungry or thirsty, sanitation needs, and even farm-animal production, such as laying an egg or producing milk from a cow.

 

Parameters:

 

Param1: Not Used

Param2: Not Used

 

Example Usage:

<property name="AITask-7" value="MaslowLevel1SDX, Mods"/>

 

 

EAILootLocationSDX

 

This AI task is useful for assinging to NPCs who will help you loot a POI with you. They will scan for all the loot containers in the bounds of a prefab, and start searching them. You may intereact with the NPC and ask to see their Inventory to see what they have picked up.

 

This is experimental, and not recommended.

 

Parameters:

 

Param1: Not Used

Param2: Not Used

 

Example Usage:

<property name="AITarget-5" value="LootLocationSDX, Mods" />

 

 

EAISetAsTargetIfHurtSDX

 

This AI Target helps assign whether there is an revenge target if something attacks it. However, if its your leader, you forgive them...

 

Parameters:

 

Param1: Vanille: This sets a filter based on what type of Entity is allowed to be targetted.

Param2: Not Used

 

Example Usage:

<property name="AITarget-1" value="SetAsTargetIfHurtSDX, Mods" param1="Entity"/>  <!-- Anything that attakcs it, can be attacked back -->

 

EAISetAsTargetIfLeaderAttackedSDX

 

 

This AI Target helps assign whether the Leader, if assigned, is being attacked and if they should become the attack target of the entity.

 

Parameters:

 

Param1: Vanille: This sets a filter based on what type of Entity is allowed to be targetted.

Param2: Not Used

 

Example Usage:

 

<property name="AITarget-3" value="SetAsTargetIfLeaderAttackedSDX, Mods" param1="Entity"/>  <!-- Anything that attakcs the leader, can be attacked back -->

 

EAISetAsTargetNearestEnemySDX

 

This AI Target helps assign whether any entities that are close by belong to an enemy faction, and attacks accordingly.

 

 

Parameters:

 

Param1: Vanille: This sets a filter based on what type of Entity is allowed to be targetted.

Param2: Not Used

 

Example Usage:

 

<property name="AITarget-4" value="SetAsTargetNearestEnemySDX, Mods" param1="Entity"/> <!-- It will attack anything it hates, as defined by the NPC factions -->

Share this post


Link to post
Share on other sites

Spawn From Entity

 

This class attempts to provide an entity spawning mechanism based on an entity. Rather than using the block spawner, this entity will spawn in a specified group of entities, assign a leader to them. It's designed to be a Herd or Bandit / NPC group spawner

 

 

EntityAliveEventSpawnerSDX

 

This Entity class has a SpawnSettings class, that has properties for Leader and Follower entities. The Leader will spawn in first, then the Followers will spawn in, assigning their Leader ID to Leader entity. This will

cause the followers to follow their leader, and treat them as such. If the leader gets attacked, for example, the followers will defend it.

 

Properties:

 

Leader: This specifies which entity will be the leader.
value: This is either a single entity name, or multiple ones, separated by commas. Note: There can only be one leader.
Followers: This specifies the follow entities in its value attribute.  The value for follower may also be a single entitygroup reference, rather than entity class.
Param1: Param1 is used in the name="Follower-*" to determine how many entities to spawn

 

Example Usage:

 

<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="animalBull" /> 
       <property name="Followers" value="animalCow,animalCow,animalCow,animalCow"  />  
   </property>
</entity_class>

<entity_class name="invisibleCowHerdSpawner2"> 
   <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="animalBull" /> 
       <property name="Followers" value="animalCow"  param1="2,4"/>   <!-- entity with a range  -->
   </property>
</entity_class>

Share this post


Link to post
Share on other sites

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.

 

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

 

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

 

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

Share this post


Link to post
Share on other sites

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.

 

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

 

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

 

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

 

 

   <quest_list id="npcqest">
     <quest id="test_fetch" />
   </quest_list>

Share this post


Link to post
Share on other sites

Finally released! Woot!!! Well done Sphereii and thanks to all those who helped us test all this.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

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?

Edited by Xellulina (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...