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

mod help

hay guys im trying to adding some items with some new buffs. the first item I tried to do. I wont it to heal your max Stamina and not drain stamina for a min. , and give a speed boost. I don't thank the buffs work for A17 haven't tried yet. any help would be greatly appreciated. thanks in advance.

item

Code:
<item name="Adrenaline_Syringe">
<!--<property name="CustomIcon" value="adrenalin" />-->
<property name="Meshfile" value="Items/Health/painkillersPrefab" />
<property name="Material" value="organic" />
<property name="HoldType" value="16" />
<property name="Stacknumber" value="10" />
<property name="Group" value="Medicine" />
<property class="Action0">
	<property name="Class" value="Eat" />
	<property name="Delay" value="1" />
	<property name="Use_time" value="..." />
	<property name="Sound_start" value="player_painkillers"/>
	<property name="Create_item" value="drinkJarEmpty"/>

<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="waterAmount" operation="add" value="5"/>

	<!-- <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="waterPerkDisplay" operation="add" value="@waterHydrationPSec"/> -->
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="5"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="adrenalin">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="speedBoost">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffHealStaminaMaxStatus">
		<requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="5"/>
	</triggered_effect>
	<display_value name="FoodPoisoningRisk" value=".05" />

</effect_group>
</item>	

<item name="Health_Syringe">
<!--<property name="CustomIcon" value="adrenalin" />-->
<property name="Meshfile" value="Items/Health/painkillersPrefab"/>
<property name="Material" value="organic" />
<property name="HoldType" value="16" />
<property name="Stacknumber" value="10" />
<property name="Group" value="Medicine" />
<property class="Action1">
	<property name="Class" value="Eat" />
	<property name="Delay" value="1" />
	<property name="Use_time" value="..." />
	<property name="Gain_health" value="0" />
	<property name="Gain_stamina" value="0" />
	<property name="Gain_food" value="-5" />
	<property name="Gain_water" value="-5" />
	<property name="Gain_sickness" value="0" />
	<property name="Gain_wellness" value="0" />
	<property name="Sound_start" value="UseActions/player_bandage" />
	<property name="Create_item" value="Empty_Syringe" />
	<property name="Buff" value="increasedHealth, increasedHealth1" />
</property>
</item>

<item name="ZombrexTablets">
   <property name="Meshfile" value="Items/Health/painkillersPrefab" />
   <property name="Material" value="organic" />
   <property name="HoldType" value="16" />
   <property class="Action1">
       <!-- UseAction -->
       <property name="Class" value="Eat" />
       <property name="Delay" value="1.0" />
       <property name="Use_time" value="..." />
       <property name="Gain_health" value="0" />
       <property name="Gain_food" value="0" />
       <property name="Gain_water" value="-5" />
       <property name="Sound_start" value="UseActions/player_painkillers" />
       <property name="Buff" value="increasedHealth3, increasedHealth4" />
   </property>
   <property name="Group" value="Medicine" />
   <property class="Preview">
       <property name="Zoom" value="28" />
       <property name="Pos" value="-0.02,-0.1" />
       <property name="Rot" value="90,45,0" />
   </property>
</item></item>
buffs

Code:
<configs>
<append xpath="/buffs">
<buff id="adrenalin" duration="600" name_key="Adrenalin" type="healthup" description_key="You are felling power up." icon="ui_game_symbol_medical">
<modify id="0" stat="stamina" amount="5" rate="1" />
<modify id="1" stat="speedmodifier" setValue="2.5" />
</buff>
<buff id="speedBoost" duration="1200"  name_key="speedBoostBeer" stack="reset" actions="increment(@wellness, 1, 150, 0, 0)" icon="ui_game_symbol_run">
   <modify id="0" stat="speedmodifier" modifyMaxValue="2.01"/>
   <modify id="1" stat="speedmodifier" modifyValue="1.5"/>
</buff> 

<buff id="increasedHealth" stack="reset" duration="1200" name_key="increasedHealth" type="healthup" description_key="firstAidLargeDesc" tooltip_key="firstAidLargeTooltip" icon="ui_game_symbol_inceasedHealth">
   <modify id="0" stat="health" modifyMaxValue="200.01"/> 
</buff>

<buff id="increasedHealth1" stack="reset" duration="2" name_key="increasedHealth1" type="healthup" description_key="firstAidLargeDesc" tooltip_key="firstAidLargeTooltip" icon="ui_game_symbol_medical">
   <modify id="1" stat="health" amount="200" rate="1" /> 
</buff> 

<buff id="increasedHealth3" stack="stack" duration="1200" name_key="increasedHealth3"  stacklimit="100" type="healthup" description_key="firstAidLargeDesc" tooltip_key="firstAidLargeTooltip" icon="ui_game_symbol_medical">
   <modify id="0" stat="health" modifyMaxValue="20.01"/> 
</buff>

<buff id="increasedHealth4" stack="stack" duration="2" name_key="increasedHealth4"  stacklimit="100" type="healthup" description_key="firstAidLargeDesc" tooltip_key="firstAidLargeTooltip" icon="ui_game_symbol_medical">
   <modify id="1" stat="health" amount="20" rate="1" /> 
</buff>

<buff id="HUp" duration="1800" name_key="HUp" stack="stack" stacklimit="100" type="healthup" description_key="increasedHealth" tooltip_key="increasedHealth" icon="ui_game_symbol_medical">
   <modify id="0" stat="health" modifyMaxValue="2.01"/>
   <modify id="1" stat="health" amount="5" rate="1" />
</buff>
</append>
</configs>
sry guys just got used to A16. it will take some time but I will slowly lean this one to.

 
Last edited by a moderator:
hay all I could use some help, I'm trying to make a speed buff, I've been looking in the buff xml and I cant fined a steedmodifier. my old code is in the fist post.

any help would be appreciated. and thank you.

 
Last edited by a moderator:
so I tried making a item and a buff didn't work could use some help with it.

I'm trying to make a Adrenaline_shot that will speed you up, Heal Max Stamina and keeps it full and Maybe some health.

And I want the buff to stack.

item

Code:
<item name="drugAdrenaline_shot">
<property name="DisplayType" value="medicalPainkillers"/>
<property name="HoldType" value="16"/>
<property name="Meshfile" value="Items/Health/painkillersPrefab"/>
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
<property name="Material" value="Morganic"/>
<property name="EconomicValue" value="80"/>
<property name="Stacknumber" value="5000"/> <!-- STK loot -->
<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_painkillers"/>
	<property name="Create_item" value="drinkJarEmpty"/>
</property>
<property name="ActionSkillGroup" value="Medicine"/>
<property name="CraftingSkillGroup" value="craftSkillScience"/>
<property name="Group" value="Science"/>

<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffDrugAdrenalin"/>
       <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffHealStaminaMaxStatus">
	<display_value name="dInstantHealth" value="40" />
	<display_value name="dHealthLoss" value=".1" />
	<display_value name="waterAmount" value="-40" />
</effect_group>
</item>
buff

Code:
 <buff name="buffDrugAdrenalin" name_key="buffDrugAdrenalinName" description_key="buffDrugAdrenalinDesc" tags="drug" icon="ui_game_symbol_pills">
	<stack_type value="effect"/>
	<duration value="120"/>
	<effect_group>
		<passive_effect name="WalkSpeed" operation="perc_add" value="3.35"/>
		<passive_effect name="RunSpeed" operation="perc_add" value="9.35"/>
		<passive_effect name="AttributeLevel" operation="base_add" value="3" tags="attStrength"/>
			<triggered_effect trigger="onSelfBuffStart" action="AddBuff" target="self" buff="buffDrugAdrenalin"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStat" stat="Health" operation="add" value="40"/>
		<passive_effect name="WaterChangeOT" operation="base_subtract" value=".083"/>
		<passive_effect name="CarryCapacity" operation="base_set" value="50" />


	</effect_group>
</buff>
this is the localization .txt

buffDrugAdrenalinDesc,buffs,Buff,EnChanged,You took Adrenalin. Your Stamina doesn't drain from running.,,,,,

buffDrugAdrenalinName,buffs,Buff,New,Adrenalin,,,,,

buffDrugAdrenalinTooltip,buffs,Buff,New,You took Adrenalin.,Vous avez pris des antidouleurs.,Du hast Schmerzmittel genommen.,,Tomaste analgésicos.,

 
Last edited by a moderator:
If it is needed here is the error code

Code:
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
 at System.Collections.Generic.List`1[GameMode].get_Item (Int32 index) [0x00000] in <filename unknown>:0 
 at XUiC_ComboBoxList`1[GameMode].set_SelectedIndex (Int32 value) [0x00000] in <filename unknown>:0 
 at XUiC_NewContinueGame.OnOpen () [0x00000] in <filename unknown>:0 
 at XUiController.OnOpen () [0x00000] in <filename unknown>:0 
 at XUiWindowGroup.OnOpen () [0x00000] in <filename unknown>:0 
 at GUIWindowManager.Open (.GUIWindow _w, Boolean _bModal, Boolean _bIsNotEscClosable, Boolean _bCloseAllOpenWindows) [0x00000] in <filename unknown>:0 
 at GUIWindowManager.Open (System.String _windowName, Boolean _bModal, Boolean _bIsNotEscClosable, Boolean _bCloseAllOpenWindows) [0x00000] in <filename unknown>:0 
 at XUiC_MainMenu.CheckProfile (System.String _windowToOpen) [0x00000] in <filename unknown>:0 
 at XUiC_MainMenu.btnNewGame_OnPressed (.XUiController _sender, .OnPressEventArgs _e) [0x00000] in <filename unknown>:0 
 at XUiC_SimpleButton.Btn_OnPress (.XUiController _sender, .OnPressEventArgs _e) [0x00000] in <filename unknown>:0 
 at XUiController.OnPressed (.OnPressEventArgs _e) [0x00000] in <filename unknown>:0 
 at XUiController.Pressed (Int32 mouseButton) [0x00000] in <filename unknown>:0 
 at XUiView.OnClick (UnityEngine.GameObject _go) [0x00000] in <filename unknown>:0 
 at UIEventListener.OnClick () [0x00000] in <filename unknown>:0
 
Last edited by a moderator:
does anyone know what this error means?

does items load alphabetically?

Code:
2018-12-01T10:59:14 48.506 ERR Failed loading and parsing XML (items.xml):
2018-12-01T10:59:14 48.506 EXC 'triggered_effect' is expected  Line 12239, position 5.
XmlException: 'triggered_effect' is expected  Line 12239, position 5.
 at Mono.Xml2.XmlTextReader.Expect (System.String expected) [0x00000] in <filename unknown>:0 
 at Mono.Xml2.XmlTextReader.ReadEndTag () [0x00000] in <filename unknown>:0 
 at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
 at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
 at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0 
 at System.Xml.XmlDocument.LoadXml (System.String xml) [0x00000] in <filename unknown>:0 
 at XmlFile.toXml (System.String _data, System.String _filename) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
XmlFile:toXml(String, String)
XmlFile:toXml(Byte[], String)
XmlFile:.ctor(String, String, Boolean)
XmlPatcher:LoadAndPatchConfig(String)
<loadSingleXml>c__Iterator1:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
Last edited by a moderator:
Usually 'X' is expected Line #, position # means you forgot to close a tag somewhere and it tells you where. Looks like you're missing a / here.

Code:
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffHealStaminaMaxStatus"[color="#FF0000"]/[/color]>
 
Usually 'X' is expected Line #, position # means you forgot to close a tag somewhere and it tells you where. Looks like you're missing a / here.

Code:
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffHealStaminaMaxStatus"[color="#FF0000"]/[/color]>
that was it thank you. it is so easy to over look little things like that.

 
ya, one of these times I will get a hang of it, well at least I know that now thank you.

Do u now how to get a buff to multiply. I tried the stack_type value="effect" it didn't do it.

-up date-

the <stack_type value="duration"/> worked, the buff time goes up every time you use the item.

 
Last edited by a moderator:
I'm having trouble with custom icons, mod set up config thin itemicon and modinfo but my icons will not work they have the same name, I have a itemicon and a ui_game_symbol icon. does any one now why they wont show in game.

-up date-

I used <property name="CustomIcon" value="AdrenalineShot" /> for my item but it didn't work.

can someone help please? thank you.

 
Last edited by a moderator:
Back
Top