Jump to content

Help Request


METALmurderer

Recommended Posts

I was trying to switch the default drink to right click and allow left click to preform the fast unarmed punch (left click with empty hand)

 

Switching the use to right click works fine:

 

<set xpath="/items/item[starts-with(@name, 'drink') and not(contains(@name, 'Empty'))]/property[@class='Action0']/@class">Action1</set>
<set xpath="/items/item[starts-with(@name, 'drink') and not(contains(@name, 'Empty'))]/effect_group[@tiered='false']/triggered_effect[@trigger='onSelfPrimaryActionEnd']/@trigger">onSelfSecondaryActionEnd</set>

 

 

However, when I add the same code I used to make some brass knuckles (but change it to the append stuff)

 

<append xpath="/items/item[starts-with(@name, 'drink') and not(contains(@name, 'Empty'))]">
<property name="Tags" value="blunt,melee,light,fists,perkLivingOffTheLandCrops"/>
<property class="Action0">
	<property name="Class" value="DynamicMelee"/>
	<property name="Damage_type" value="Bashing"/>
	<property name="Delay" value="0.8"/>
	<property name="Range" value="1.65"/>
	<property name="Block_range" value="2.5"/>
	<property name="DamageEntity" value="10"/>
	<property name="DamageBlock" value="16"/>
	<property name="Sound_start" value="swoosh"/>
</property>
<effect_group name="Base Effects">
	<passive_effect name="EntityDamage" operation="base_set" value="7"/>
	<passive_effect name="BlockDamage" operation="base_set" value="2.5"/>
	<passive_effect name="DamageModifier" operation="perc_add" value="0" tags="wood"/>
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="earth"/>
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="stone"/>
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="metal"/>
	<passive_effect name="AttacksPerMinute" operation="base_set" value="80"/>
	<passive_effect name="StaminaLoss" operation="base_set" value="9.3" tags="primary"/>

	<passive_effect name="MaxRange" operation="base_set" value="2.0"/>
	<passive_effect name="BlockRange" operation="base_set" value="2.6"/>

	<passive_effect name="HarvestCount" operation="base_set" value="0" tags="allToolsHarvest"/>
</effect_group>
<effect_group name="Power Attack">
	<passive_effect name="EntityDamage" operation="perc_add" value="1" tags="secondary"/>
	<passive_effect name="BlockDamage" operation="perc_add" value="1" tags="secondary"/>
	<passive_effect name="AttacksPerMinute" operation="perc_add" value="-.3" tags="secondary"/>
	<passive_effect name="StaminaLoss" operation="base_add" value="14" tags="secondary"/>
</effect_group>
<property name="ActionSkillGroup" value="attAgility"/>
</append>

 

 

the Item no longer stacks, has a numberless infinite durability bar, and left click does nothing. Using it with Right Click consumes the item and applies the appropriate buff when applicable. Does anyone know what it is I'm doing wrong, or is it just not possible to do this with the current framework (I want to be able to hold a beer in one hand and punch with the other)

 

- - - Updated - - -

 

I derped because tired, can a Mod please retitle this "Help Request - Punching with a Drink in Hand"?

Link to comment
Share on other sites

Looking at it I would assume its because you have no Action1 class anymore or having set the properties of right click to do all the consumable actions and properties however it may not be possible.

 

First I would remove both Action0 & Action1 then take the default Action0 class and amend it to be Action1 and see if that works and keep your Action0 append code that you have above.

Link to comment
Share on other sites

Sorry, this is an example of what comes out when I exportcurrentconfigs:

 

<item name="drinkJarBeer">
<property name="HoldType" value="3" />
<property name="Meshfile" value="Items/Food/bottled_waterPrefab" />
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab" />
<property name="Material" value="Mglass" />
<property name="Weight" value="10" />
<property name="Stacknumber" value="15" /> <!-- STK drink -->
<property name="EconomicValue" value="100" />
<property class="Action1"><!--Attribute "class" replaced by: "murderPACK"-->
	<property name="Class" value="Eat" />
	<property name="Delay" value="2" />
	<property name="Use_time" value="..." />
	<property name="Sound_start" value="player_drinking" />
	<property name="Create_item" value="drinkJarEmpty" />
</property>
<effect_group tiered="false">
	<requirement name="NotHasBuff" buff="buffIsOnFire" />
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" target="self" buff="buffBeer"><!--Attribute "trigger" replaced by: "murderPACK"--></triggered_effect>
</effect_group>

<effect_group tiered="false">
	<requirement name="HasBuff" buff="buffIsOnFire" />
		<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" target="self" buff="buffExtinguishFire"><!--Attribute "trigger" replaced by: "murderPACK"--></triggered_effect>
</effect_group>

<property name="Tags" value="blunt,melee,light,fists,perkLivingOffTheLandCrops"><!--Element appended by: "murderPACK"--></property>
<property class="Action0"><!--Element appended by: "murderPACK"-->
	<property name="Class" value="DynamicMelee" />
	<property name="Damage_type" value="Bashing" />
	<property name="Delay" value="0.8" />
	<property name="Range" value="1.65" />
	<property name="Block_range" value="2.5" />
	<property name="DamageEntity" value="10" />
	<property name="DamageBlock" value="16" />
	<property name="Sound_start" value="swoosh" />
</property>
<effect_group name="Base Effects"><!--Element appended by: "murderPACK"-->
	<passive_effect name="EntityDamage" operation="base_set" value="7" />
	<passive_effect name="BlockDamage" operation="base_set" value="2.5" />
	<passive_effect name="DamageModifier" operation="perc_add" value="0" tags="wood" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="earth" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="stone" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="metal" />
	<passive_effect name="AttacksPerMinute" operation="base_set" value="80" />
	<passive_effect name="StaminaLoss" operation="base_set" value="9.3" tags="primary" />

	<passive_effect name="MaxRange" operation="base_set" value="2.0" />
	<passive_effect name="BlockRange" operation="base_set" value="2.6" />

	<passive_effect name="HarvestCount" operation="base_set" value="0" tags="allToolsHarvest" />
</effect_group>
<effect_group name="Power Attack"><!--Element appended by: "murderPACK"-->
	<passive_effect name="EntityDamage" operation="perc_add" value="1" tags="secondary" />
	<passive_effect name="BlockDamage" operation="perc_add" value="1" tags="secondary" />
	<passive_effect name="AttacksPerMinute" operation="perc_add" value="-.3" tags="secondary" />
	<passive_effect name="StaminaLoss" operation="base_add" value="14" tags="secondary" />
</effect_group>
<property name="ActionSkillGroup" value="attAgility"><!--Element appended by: "murderPACK"--></property>
</item>

 

 

Could it be because the Action0 is below the Action1? (realistically shouldn't but you never know)

Link to comment
Share on other sites

I have never seen Action1 before Action0 but try putting it first and test it.

 

<insertBefore xpath="/items/item[@name=drinkJarBeer]/property[@class=Action1]">

<property class="Action0">

Whatever you want goes here

</insertBefore>

 

Using the insertBefore instead of just appending it gave the changed items durability and quality levels (I can mod beer?) and restores the drunk blur from beer, but still does not allow me to punch. At this point I'm going to assume that what I want to do is outside the scope of basic XML modding unless I were to add a custom weapon that used beer as a magazine item and only consumed ammo on the Action1, which isn't quite what I was hoping for. Thanks for all the help guys, calling this one a bust

Link to comment
Share on other sites

Using the insertBefore instead of just appending it gave the changed items durability and quality levels (I can mod beer?) and restores the drunk blur from beer, but still does not allow me to punch. At this point I'm going to assume that what I want to do is outside the scope of basic XML modding unless I were to add a custom weapon that used beer as a magazine item and only consumed ammo on the Action1, which isn't quite what I was hoping for. Thanks for all the help guys, calling this one a bust

 

So you don't plan to make a beer cannon which you can choose to shoot from or drink from?

A wasted opportunity, that.

Link to comment
Share on other sites

You're getting quality levels because the new effect_groups you're adding don't contain "tiered="false"". Also you don't need the Power Attack effect_group. Try adding <property name="Extends" value="meleeHandMaster"/> at the beginning (ie before <property name="HoldType" value="3" />). And did you try punching an object like grass to confirm that it isn't doing damage either, as opposed to the animation just not working?

Link to comment
Share on other sites

So you don't plan to make a beer cannon which you can choose to shoot from or drink from?

A wasted opportunity, that.

I never said I WASNT making a beer cannon. (Not to self, make beer cannon)

 

You're getting quality levels because the new effect_groups you're adding don't contain "tiered="false"". Also you don't need the Power Attack effect_group. Try adding <property name="Extends" value="meleeHandMaster"/> at the beginning (ie before <property name="HoldType" value="3" />). And did you try punching an object like grass to confirm that it isn't doing damage either, as opposed to the animation just not working?

 

It doesn't punch at all until I right click to drink not just the animation but there is no damage being done either (tested on grass and blocks), consuming the item and making me unarmed. I did take out the power attack and will do some more tweaking and testing, I'll let you know you it turns out

Link to comment
Share on other sites

Current code from exportcurrentconfigs:

 

<item name="drinkJarBeer">
<property name="Extends" value="meleeHandMaster"><!--Element inserted by: "murderPACK"--></property><property name="HoldType" value="3" />
<property name="Meshfile" value="Items/Food/bottled_waterPrefab" />
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab" />
<property name="Material" value="Mglass" />
<property name="Weight" value="10" />
<property name="Stacknumber" value="15" /> <!-- STK drink -->
<property name="EconomicValue" value="100" />

<property name="Tags" value="blunt,melee,light,fists,perkLivingOffTheLandCrops"><!--Element inserted by: "murderPACK"--></property>
<property class="Action0"><!--Element inserted by: "murderPACK"-->
	<property name="Class" value="DynamicMelee" />
	<property name="Damage_type" value="Bashing" />
	<property name="Delay" value="0.8" />
	<property name="Range" value="1.65" />
	<property name="Block_range" value="2.5" />
	<property name="DamageEntity" value="10" />
	<property name="DamageBlock" value="16" />
	<property name="Sound_start" value="swoosh" />
</property>
<effect_group name="Base Effects" tiered="false"><!--Element inserted by: "murderPACK"-->
	<passive_effect name="EntityDamage" operation="base_set" value="7" />
	<passive_effect name="BlockDamage" operation="base_set" value="2.5" />
	<passive_effect name="DamageModifier" operation="perc_add" value="0" tags="wood" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="earth" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="stone" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="metal" />
	<passive_effect name="AttacksPerMinute" operation="base_set" value="80" />
	<passive_effect name="StaminaLoss" operation="base_set" value="9.3" tags="primary" />

	<passive_effect name="MaxRange" operation="base_set" value="2.0" />
	<passive_effect name="BlockRange" operation="base_set" value="2.6" />

	<passive_effect name="HarvestCount" operation="base_set" value="0" tags="allToolsHarvest" />
</effect_group>
<property name="ActionSkillGroup" value="attAgility"><!--Element inserted by: "murderPACK"--></property>
<property class="Action1"><!--Attribute "class" replaced by: "murderPACK"-->
	<property name="Class" value="Eat" />
	<property name="Delay" value="2" />
	<property name="Use_time" value="..." />
	<property name="Sound_start" value="player_drinking" />
	<property name="Create_item" value="drinkJarEmpty" />
</property>
<effect_group tiered="false">
	<requirement name="NotHasBuff" buff="buffIsOnFire" />
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" target="self" buff="buffBeer"><!--Attribute "trigger" replaced by: "murderPACK"--></triggered_effect>
</effect_group>

<effect_group tiered="false">
	<requirement name="HasBuff" buff="buffIsOnFire" />
		<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" target="self" buff="buffExtinguishFire"><!--Attribute "trigger" replaced by: "murderPACK"--></triggered_effect>
</effect_group>
</item>

 

The durability bar is gone, but there is still no punch. I plan to try copy pasting the meleeHandPlayer and try tweaking values in it that way...

Link to comment
Share on other sites

Well, copy pasting the meleeHandPlayer and renaming it to drinkJarBeer gives the same effects as my prior code (no punches, consumes beer properly though).

 

<!--Element removed by: "murderPACK"-->


<item name="drinkJarBeer"><!--Element inserted by: "murderPACK"-->
<property name="Extends" value="meleeHandMaster" />
<property name="Tags" value="blunt,melee,light,fists,perkLivingOffTheLandCrops" />
<property name="HoldType" value="3" />
<property name="Meshfile" value="Items/Food/bottled_waterPrefab" />
<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab" />
<property name="Material" value="Mglass" />
<property name="Weight" value="10" />
<property name="Stacknumber" value="15" />
<property name="EconomicValue" value="100" />
<property class="Action0">
	<property name="Class" value="DynamicMelee" />
	<property name="Damage_type" value="Bashing" />
</property>
<property class="Action1">
	<property name="Class" value="Eat" />
	<property name="Delay" value="2" />
	<property name="Use_time" value="..." />
	<property name="Sound_start" value="player_drinking" />
	<property name="Create_item" value="drinkJarEmpty" />
</property>
<effect_group name="Base Effects" tiered="false">
	<passive_effect name="EntityDamage" operation="base_set" value="7" />
	<passive_effect name="BlockDamage" operation="base_set" value="2.5" />
	<passive_effect name="DamageModifier" operation="perc_add" value="0" tags="wood" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="earth" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="stone" />
	<passive_effect name="DamageModifier" operation="perc_add" value="-.5" tags="metal" />
	<passive_effect name="AttacksPerMinute" operation="base_set" value="80" /> <!-- A16 .75 -->
	<passive_effect name="StaminaLoss" operation="base_set" value="9.3" tags="primary" />
	<passive_effect name="MaxRange" operation="base_set" value="2.0" />
	<passive_effect name="BlockRange" operation="base_set" value="2.6" />
	<passive_effect name="HarvestCount" operation="base_set" value="0" tags="allToolsHarvest" /> <!-- all tools but not player hands -->
</effect_group>
<property name="ActionSkillGroup" value="attAgility" />
<effect_group tiered="false">
	<requirement name="NotHasBuff" buff="buffIsOnFire" />
	<triggered_effect trigger="onSelfSecondaryActionEnd" action="AddBuff" target="self" buff="buffBeer" />
</effect_group>

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

 

For now I'm going to put this project on the back burner, ty all for the feedback, and if anyone has suggestions on how to add a punch to the beer, feel free to post some code / suggestions and I'll happily play around with it, but I'm working on a bunch of other stuff and this is taking my efforts away from other stuff. Thanks for all the suggestions everyone!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...