Jump to content
bbh_blocked_dnftl

Near Death Trauma - Mod or item


Recommended Posts

Have you looked at buffNearDeathTrauma? :)

I guess any item with something like

<effect_group tiered="false">
 <triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTrauma"/>
</effect_group>

should do the trick.

Link to comment
Share on other sites

<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTraumaTrigger"/>

This should be the code you would need to remove the NDT. You CAN build an item from scratch OR you can just build an item based on the bandage or medkit. You'll just want to make sure the above code is within the code below:

<effect_group tiered="false">
</effect_group>

Link to comment
Share on other sites

buffNearDeathTrauma

buffNearDeathTraumaCalculate

You might want to either include the above two lines in additional lines on the item OR you'll run into an infinite debuff of lower stats. You'll need the debuff removed... I haven't tested this but this is the code you'll need. Not sure if the "RemoveBuff" will work. I'll try it when I get a chance.

Link to comment
Share on other sites

If you want to create a new item, it will be in items.xml.

Something along those lines if you're creating a modlet:

<append xpath="/items">
   <item name="NearDeathTraumaKit">
     <property name="Extends" value="medicalBandage" param1="DescriptionKey"/>
     <property name="Group" value="Science"/>
     <property name="EconomicValue" value="200"/>
     <property name="CraftingSkillGroup" value="craftSkillScience"/>
     <property name="Stacknumber" value="5"/>
     <property class="Action0">
       <requirement name="StatCompare" stat="health" operation="lte" value="50"/>
       <property name="Sound_start" value="player_firstAidKit"/>
     </property>
     <property class="Action1">
       <property name="Sound_start" value="player_firstAidKit"/>
     </property>
     <effect_group tiered="false">
       <triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTrauma"/>
     </effect_group>
   </item>
 </append> 

(Without the append otherwise.)

 

I just tried it and it worked.

You'll need a

<property name="CustomIcon" value="something"/>

though. :)

Link to comment
Share on other sites

<item name="medicalBandage">
<property name="DisplayType" value="medical"/>
<property name="HoldType" value="16"/>
<property name="Meshfile" value="Items/Health/gauze"/>
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
<property name="Material" value="Mcloth"/>
<property name="Stacknumber" value="10"/> <!-- STK medical -->
<property name="FuelValue" value="1"/>
<property name="Weight" value="5"/>
<property name="EconomicValue" value="5"/>
<property class="Action0">
	<property name="Class" value="Eat"/>
	<property name="Delay" value="1.0"/>
	<property name="Use_time" value="..."/>
	<property name="Sound_start" value="player_bandage"/>
</property>
<property class="Action1">
	<property name="Class" value="UseOther"/>
	<property name="Delay" value="1.0"/>
	<property name="Use_time" value="..."/>
	<property name="Sound_start" value="player_bandage"/>
</property>
<property name="Group" value="Science,Basics"/>
<property name="DescriptionKey" value="medicalBandageDesc"/>
<property name="ActionSkillGroup" value="Medicine"/>
<property name="CraftingSkillGroup" value="craftSkillMiscellaneous"/>
<property name="PickupJournalEntry" value="firstAidTip"/>

[color="#FF0000"]<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" target="self" cvar="maxHealthAmount" operation="add" value="15"/> <!-- X -->
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" target="self" cvar="maxHealthIncrease" operation="set" value="@medicPerkIncrease"/>

	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffInjuryBleeding"/>

	<triggered_effect trigger="onSelfSecondaryActionEnd" action="ModifyCVar" target="other" cvar="maxHealthAmount" operation="add" value="15"/> <!-- X -->
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="ModifyCVar" target="other" cvar="maxHealthIncrease" operation="set" value="1.25">
		<requirement name="CVarCompare" target="self" cvar="maxHealthIncrease" operation="Equals" value="1.25"/> </triggered_effect>
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="ModifyCVar" target="other" cvar="maxHealthIncrease" operation="set" value="1.5">
		<requirement name="CVarCompare" target="self" cvar="maxHealthIncrease" operation="Equals" value="1.5"/> </triggered_effect>
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="ModifyCVar" target="other" cvar="maxHealthIncrease" operation="set" value="2">
		<requirement name="CVarCompare" target="self" cvar="maxHealthIncrease" operation="Equals" value="2"/> </triggered_effect>

	<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" target="other" buff="buffProcessConsumables"/>
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="RemoveBuff" target="other" buff="buffInjuryBleeding"/>
</effect_group>[/color]
</item>

 

Here is the bandage as an example. It says "tiered=false" because its not a function of the current game iteration. It might have meaning in the future but for now it's just how it works.

Link to comment
Share on other sites

If you want to create a new item, it will be in items.xml.

Something along those lines if you're creating a modlet:

<append xpath="/items">
   <item name="NearDeathTraumaKit">
     <property name="Extends" value="medicalBandage" param1="DescriptionKey"/>
     <property name="Group" value="Science"/>
     <property name="EconomicValue" value="200"/>
     <property name="CraftingSkillGroup" value="craftSkillScience"/>
     <property name="Stacknumber" value="5"/>
     <property class="Action0">
       <requirement name="StatCompare" stat="health" operation="lte" value="50"/>
       <property name="Sound_start" value="player_firstAidKit"/>
     </property>
     <property class="Action1">
       <property name="Sound_start" value="player_firstAidKit"/>
     </property>
     <effect_group tiered="false">
       <triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTrauma"/>
     </effect_group>
   </item>
 </append> 

(Without the append otherwise.)

 

I just tried it and it worked.

You'll need a

<property name="CustomIcon" value="something"/>

though. :)

 

I know XML but rusty. what does the /append xpath do? normally I would just add a new item.

 

ALSO I assume this is added to the items.xml file.

 

not sure how to add a custom/new icon to the game.

 

I did try your code without the /append and I see the item in creative menu with no icon but I get the following error when I try and use it:

 

NullReferenceException: Object Reference Not set to an Instance of an Object

Link to comment
Share on other sites

If you're just adding it to the vanilla xmls, you don't need the append stuff. That's just if you're making a separate modlet out of it.

 

And for the icon you an always use one that's already in the game. Can add a tint to it so it's recognizable.

 

<property name="CustomIcon" value="ammoRocketHE"/><property name="CustomIconTint" value="107,12,12"/>

 

That's the RocketFrag icon, just using the RocketHE with a tint, for example. You could use any icon, just find the name of the one you want. :)

Link to comment
Share on other sites

Made a quick test item. This worked for me. All it does is remove the NDT buff, nothing else. You could always add some effects from the medical bandage if you wanted it to also do some healing or whatever.

 

<item name="TEST">
<property name="DisplayType" value="medical"/>
<property name="HoldType" value="16"/>
<property name="Meshfile" value="Items/Health/gauze"/>
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
<property name="Material" value="Mcloth"/>
<property name="Stacknumber" value="10"/> <!-- STK medical -->
<property name="FuelValue" value="1"/>
<property name="Weight" value="5"/>
<property name="EconomicValue" value="5"/>
<property class="Action0">
	<property name="Class" value="Eat"/>
	<property name="Delay" value="1.0"/>
	<property name="Use_time" value="..."/>
	<property name="Sound_start" value="player_bandage"/>
</property>
<property class="Action1">
	<property name="Class" value="UseOther"/>
	<property name="Delay" value="1.0"/>
	<property name="Use_time" value="..."/>
	<property name="Sound_start" value="player_bandage"/>
</property>
<property name="Group" value="Science,Basics"/>
<property name="DescriptionKey" value="medicalBandageDesc"/>
<property name="ActionSkillGroup" value="Medicine"/>
<property name="CraftingSkillGroup" value="craftSkillMiscellaneous"/>
<property name="PickupJournalEntry" value="firstAidTip"/>

<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTrauma"/>
</effect_group>
</item>

Link to comment
Share on other sites

ok I will try this.

 

I am NEW to Mod/modlets in A13-A16 I would just mode the existing /data/config/*.xml files.

 

so you are saying I can use the /append tag to put the new item in a file called (for example) /mods/mymodlet.xml and as long as I have the "<append xpath="/items">" and </append> wrapper it will know that this is an extension of items.xml? could I put an append for block and recipe and items all in the same mymodlet.xml ?

Link to comment
Share on other sites

I am getting errors when I run my modlet.

 

the error when I USE the item is: NullReferenceException: Object Reference Not set to an Instance of an Object

is it because I do not have NDT on me?

 

I put the modlet in the /mods/LonestarCanuck_Mods folder and it contains a ModInfo and a folder called config with the items.xml. here is the code:

 

ModInfo.xml

 

<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<ModInfo>
	<Name value="LonestarCanuck_mods" />
	<Description value="LonestarCanuck_mods" />
	<Author value="LonestarCanuck" />
	<Version value="1.0" />
	<Website value="http://www.lonestarcanuck.com/" />
</ModInfo>
</xml>

 

and the items.xml

 

<configs>

<append xpath="/items" >


   <item name="NearDeathTraumaKit">
     <property name="Extends" value="medicalBandage" param1="DescriptionKey"/>
  <property name="CustomIcon" value="ammoRocketHE"/><property name="CustomIconTint" value="107,12,12"/>
     <property name="Group" value="Science"/>
     <property name="EconomicValue" value="200"/>
     <property name="CraftingSkillGroup" value="craftSkillScience"/>
     <property name="Stacknumber" value="5"/>
     <property class="Action0">
       <requirement name="StatCompare" stat="health" operation="lte" value="50"/>
       <property name="Sound_start" value="player_firstAidKit"/>
     </property>
     <property class="Action1">
       <property name="Sound_start" value="player_firstAidKit"/>
     </property>
     <effect_group tiered="false">
       <triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTrauma"/>
     </effect_group>
   </item>

</append>

</configs>

Link to comment
Share on other sites

Not sure honestly. I do know that line under Action0 with StatCompare in it is commented out in vanilla. Try removing that single line. If that doesn't work, try using my code just to see.

 

I wouldn't think not having NDT would cause an NRE.

Link to comment
Share on other sites

Try to add a requirement like so

 

<effect_group tiered="false">
 <requirement name="HasBuff" buff="buffNearDeathTrauma"/>
 <triggered_effect trigger="onSelfPrimaryActionEnd" action="RemoveBuff" target="self" buff="buffNearDeathTrauma"/>
</effect_group>

Link to comment
Share on other sites

ok that was the FIX removing that line and fixing the Effect.

 

QUESTION - I am working on the recipe so far looking like this (See Below) - how do I gate the recipe behind Intellect Physician perk level 2?

 


<configs>

<append xpath="/recipes" >

<recipe name="NearDeathTraumaKit" count="1" craft_area="chemistryStation" tags="learnable" >
	<ingredient name="medicalBloodBag" count="2"/>
	<ingredient name="drinkJarGrainAlcohol" count="2"/>
	<ingredient name="medicalFirstAidKit" count="1"/>
	<ingredient name="medicalSplint" count="1"/>
	<ingredient name="drugSteroids" count="1"/>
	<ingredient name="drugFortBites" count="1"/>
	<ingredient name="resourceDuctTape" count="4"/>
</recipe>

</append>

</configs>

Link to comment
Share on other sites

Haven't tested it, but this should work. I think. Lol.

 

<append xpath="/progression/perks/perk[@name=perkPhysician]/effect_group/passive_effect[@level=2,5]/@tags">YOURITEMNAME</append>

 

This will go in a progression.xml. Make sure you have the <configs> </configs> at the beginning and end, same as the other xmls.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...