Jump to content

Items Creation Help!


ZzzSmileYzzZ

Recommended Posts

I'm working on a mod for the community I'm in 'Pro Hookers' and require some help for creating certain Items.

 

I'm working on making a new drink 'drinkJarMineralWater' , as for making the drink it self I got no problem, the issue I got is the effect of the drink.

 

This is the coding for the Drink:

 

	<item name="drinkJarMineralWater">
		<property name="HoldType" value="3"/>
		<property name="DisplayType" value="mineralWater"/>
		<property name="Meshfile" value="#Other/Items?Food/bottled_waterPrefab.prefab"/>
		<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
		<property name="Material" value="Mglass"/>
		<property name="Stacknumber" value="150"/>
		<property name="Weight" value="10"/>
		<property name="EconomicValue" value="100"/>
		<property name="SellableToTrader" value="true"/>
		<property class="Action0">
			<property name="Class" value="Eat"/>
			<property name="Delay" value="1"/>
			<property name="Use_time" value="..."/>
			<property name="Sound_start" value="player_drinking"/>
			<property name="Create_item" value="drinkJarEmpty"/>
		</property>
		<property name="Group" value="Food/Cooking,CFDrink/Cooking"/>

		<effect_group tiered="false">
			<requirement name="NotHasBuff" buff="buffIsOnFire"/>

			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="45"/>
			<display_value name="dStaminaRegen" value=".15"/>
			<display_value name="dEfficientDigestion" value=".15"/>
			<display_value name="dDuration" value="600"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables,buffMineralWater"/>
		</effect_group>

		<effect_group tiered="false">
			<requirement name="HasBuff" buff="buffIsOnFire"/>
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffExtinguishFire"/>
		</effect_group>
	</item>

 

And this is the buff for it:

 

	<buff name="buffMineralWater" name_key="buffMineralWater" description_key="buffMineralWaterDesc" icon="ui_game_symbol_stomach" icon_color="0,255,255,150" icon_blink="true">
		<stack_type value="ignore"/>
		<duration value="600"/>

		<effect_group>
			<passive_effect name="HealthChangeOT" operation="base_add" value="1.25" duration="5"/>
			<passive_effect name="WaterLossPerStaminaPointGained" operation="perc_subtract" value="0.2"/>
			<passive_effect name="StaminaLossMaxMult" operation="perc_subtract" value="0.15"/>
		</effect_group>
	</buff>

 

Also I made change in the UI_Display:

 

<insertAfter xpath="/ui_display_info/item_display/item_display_info[@display_type='toolBellows']" >
	<item_display_info display_type="mineralWater" display_group="groupConsumables">
		<display_entry name="$waterAmountAdd" title_key="statWaterAmount"/>
		<display_entry name="dStaminaRegen" title_key="statStaminaRegen" display_type="Percent"/>
		<display_entry name="dEfficientDigestion" title_key="statEfficientDigestion" display_type="Percent" display_leading_plus="true"/>
		<display_entry name="dDuration" title_key="statDuration" display_type="Time"/>
	</item_display_info>
</insertAfter>

 

What I want the drink to do:

 

-- Give 5 HP

-- Food cost of regenerating stamina -15%

-- Water cost of regenerating stamina -20%

-- Stamina usage -15% for all action that require Stamina Usage

 

*For the give HP it keep giving HP even after 5 sec and keep going for the duration of the buff that is 10mins

*Stamina usage don't work at all

 

Can anyone review this and tell me what to do to make it happen.

 

Cheers,

Link to comment
Share on other sites

This isn't exactly how you wanted it but I got it to work. The numbers you want reduced barely have an effect since the water and stamina regen so quickly, at least in my testing. I jumped the numbers up to make it actually noticeable while testing it out. Set them back to what you wanted afterward. I also added properties to the item for a custom icon and custom tint in case you want to use them. If not, just leave them the way they are or delete the entries. I didn't mess with the UI code because I am not familiar with it at all. Anyway, hope this helps you out a lil.

 

ITEM:

 

<configs>
<append xpath="/items">

	<item name="drinkJarMineralWater">
		<property name="CustomIcon" value="none"/>
		<property name="CustomIconTint" value="none"/>
		<property name="HoldType" value="3"/>
		<property name="DisplayType" value="mineralWater"/>
		<property name="Meshfile" value="#Other/Items?Food/bottled_waterPrefab.prefab"/>
		<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
		<property name="Material" value="Mglass"/>
		<property name="Stacknumber" value="150"/>
		<property name="Weight" value="10"/>
		<property name="EconomicValue" value="100"/>
		<property name="SellableToTrader" value="true"/>
		<property class="Action0">
			<property name="Class" value="Eat"/>
			<property name="Delay" value="1"/>
			<property name="Use_time" value="..."/>
			<property name="Sound_start" value="player_drinking"/>
			<property name="Create_item" value="drinkJarEmpty"/>
		</property>
		<property name="Group" value="Food/Cooking,CFDrink/Cooking"/>

		<effect_group tiered="false">
			<requirement name="NotHasBuff" buff="buffIsOnFire"/>

			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="45"/>
			<display_value name="dStaminaRegen" value=".15"/>
			<display_value name="dEfficientDigestion" value=".15"/>
			<display_value name="dDuration" value="600"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables,buffMineralWater"/>
		</effect_group>

		<effect_group tiered="false">
			<requirement name="HasBuff" buff="buffIsOnFire"/>
				<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffExtinguishFire,buffMineralWater"/>
		</effect_group>
	</item>

</append>
</configs>

 

BUFF:

 

<configs>
<append xpath="/buffs">

	<buff name="buffMineralWater" name_key="buffMineralWater" description_key="buffMineralWaterDesc" icon="ui_game_symbol_stomach" icon_color="0,255,255,150" icon_blink="true">
		<stack_type value="ignore"/>
		<duration value="600"/>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="add" value="5" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Water" operation="add" value="-20" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Stamina" operation="add" value="-15" />
		</effect_group>
	</buff>

</append>
</configs>

 

Just noticed I didn't do what you wished it would do. I did get the health to go up 5 and the water and stamina to drop though. If I get more time, I'll look at trying to get it the way you mentioned at the end.

Link to comment
Share on other sites

The reason why the number were low or not really noticeable, was because it stack with other buffs, raising the number will create the stacking to high. And got same issue here for the last one. The only thing I'm thinking about it, is to raise the stamina regen higher to compensate. Or state all action in the buff and lower there stamina usage of tools or weapons and that will be a long list. lol

 

Cheers,

Link to comment
Share on other sites

OK, I think I got it figured out. This should help with the weapons and tools stamina too. It lowers the actual stats by a set amount so the stamina would be reduced by 15 which means that the weapons and tools all have 15% less for that duration, hopefully. I changed the duration while working on it but should work for the whole 600 secs you want it set to.

 

BUFF:

<configs>
<append xpath="/buffs">

	<buff name="buffMineralWater" name_key="buffMineralWater" description_key="buffMineralWaterDesc" icon="ui_game_symbol_stomach" icon_color="0,255,255,150" icon_blink="true">
		<stack_type value="ignore"/>
		<duration value="600"/>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="add" value="5" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmount" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="-15"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmount" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="-20"/> 
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Food" value_type="modifiedmax" operation="add" value="-15"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Water" value_type="modifiedmax" operation="add" value="-20"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Stamina" value_type="modifiedmax" operation="add" value="-15"/> 
		</effect_group>
	</buff>

</append>
</configs>

 

ITEM:

I commented the following line out because the water would quickly regen with it active.

<!-- <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="45"/> -->

 

Lemme know if this is like you wanted or not.

Link to comment
Share on other sites

OK, I think I got it figured out. This should help with the weapons and tools stamina too. It lowers the actual stats by a set amount so the stamina would be reduced by 15 which means that the weapons and tools all have 15% less for that duration, hopefully. I changed the duration while working on it but should work for the whole 600 secs you want it set to.

 

BUFF:

<configs>
<append xpath="/buffs">

	<buff name="buffMineralWater" name_key="buffMineralWater" description_key="buffMineralWaterDesc" icon="ui_game_symbol_stomach" icon_color="0,255,255,150" icon_blink="true">
		<stack_type value="ignore"/>
		<duration value="600"/>

		<effect_group>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="add" value="5" />
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmount" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$foodAmountAdd" operation="set" value="-15"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmount" operation="set" value="0"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$waterAmountAdd" operation="set" value="-20"/> 
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Food" value_type="modifiedmax" operation="add" value="-15"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Water" value_type="modifiedmax" operation="add" value="-20"/>
			<triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Stamina" value_type="modifiedmax" operation="add" value="-15"/> 
		</effect_group>
	</buff>

</append>
</configs>

 

ITEM:

I commented the following line out because the water would quickly regen with it active.

<!-- <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="45"/> -->

 

Lemme know if this is like you wanted or not.

 

That drop my food from 100 to 85, same for stamina and water drop to 100 to 80. Water don't regen over time during buff duration, it's stays at 80. On the code I post, everything works except for the stamina lost on tools and melee weapons. I fix the HP by replacing my coding with yours it work ok now. Also I want the drink to give 45 water.

 

Ain't the stamina loss on tools this coding:

 

					<passive_effect name="StaminaLoss" operation="perc_add" value="-.15"/>

 

Cheers,

Link to comment
Share on other sites

Also if I got another buff that give 15 less stamina usage and want them to stack, should be the stack_type set to Effect like this:

 

		<buff name="buffMineralWater" name_key="buffMineralWaterName" description_key="buffMineralWaterDesc" tooltip_key="buffMineralWaterTooltip" icon="ui_game_symbol_water" icon_color="0,150,255" icon_blink="true">
		<stack_type value="effect"/>
		<duration value="600"/>

 

Cheers,

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...