Lonestarcanuck Posted July 25, 2019 Share Posted July 25, 2019 Question - Near Death Trauma (NDT) is there a way to heal or remove it? basically I am thinking of making an item that can be crafted like a Trauma Kit that would remove NDT. I need to know if its a state that can be "healed" or a buff that can be removed Link to comment Share on other sites More sharing options...
Tete1805 Posted July 25, 2019 Share Posted July 25, 2019 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 More sharing options...
Belgeranrg Posted July 25, 2019 Share Posted July 25, 2019 <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 More sharing options...
Tete1805 Posted July 25, 2019 Share Posted July 25, 2019 Indeed. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 25, 2019 Author Share Posted July 25, 2019 can you explain <effect_group tiered="false"> </effect_group> I see effect_group in many buffs like broken leg but I can't find anything with "tiered" in the buff.xml file Link to comment Share on other sites More sharing options...
Belgeranrg Posted July 25, 2019 Share Posted July 25, 2019 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 More sharing options...
Tete1805 Posted July 25, 2019 Share Posted July 25, 2019 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 More sharing options...
Belgeranrg Posted July 25, 2019 Share Posted July 25, 2019 <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 More sharing options...
bdubyah Posted July 26, 2019 Share Posted July 26, 2019 The tiered bit is for quality. So, if it's false it just means that item doesn't have quality levels. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 26, 2019 Author Share Posted July 26, 2019 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 More sharing options...
bdubyah Posted July 26, 2019 Share Posted July 26, 2019 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 More sharing options...
bdubyah Posted July 26, 2019 Share Posted July 26, 2019 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 More sharing options...
Tete1805 Posted July 26, 2019 Share Posted July 26, 2019 And if you want to go deeper: https://7daystodie.com/forums/showthread.php?93816-XPath-Modding-Explanation-Thread Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 26, 2019 Author Share Posted July 26, 2019 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 More sharing options...
Belgeranrg Posted July 26, 2019 Share Posted July 26, 2019 No, you need to create a new XML called items.xml then put the append code in that and place that XML in your mods folder. And no, you need to do block changes in blocks.xml, recipes in recipes.xml, and items in items.xml Link to comment Share on other sites More sharing options...
bdubyah Posted July 26, 2019 Share Posted July 26, 2019 If you have any other modlets, check the file structure. It would go in Mods/yourmodsfolder/Config/items.xml. You'll also need a modinfo.xml in your mod folder so it loads it. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 26, 2019 Author Share Posted July 26, 2019 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 More sharing options...
bdubyah Posted July 26, 2019 Share Posted July 26, 2019 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 More sharing options...
Tete1805 Posted July 26, 2019 Share Posted July 26, 2019 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 More sharing options...
Tete1805 Posted July 26, 2019 Share Posted July 26, 2019 And indeed, remove this line <requirement name="StatCompare" stat="health" operation="lte" value="50"/> Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 26, 2019 Author Share Posted July 26, 2019 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 More sharing options...
bdubyah Posted July 27, 2019 Share Posted July 27, 2019 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 More sharing options...
Lonestarcanuck Posted July 29, 2019 Author Share Posted July 29, 2019 yeah that worked - thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.