Jump to content

METALmurderer

Members
  • Posts

    82
  • Joined

Personal Information

  • Location
    Permanently trapped on the Fifth of November

METALmurderer's Achievements

Survivor

Survivor (3/15)

0

Reputation

  1. Thanks, I've got it ALMOST working for the drink part using this: <set xpath="/items/item[@name='drinkJarBeer']/property[@class]/@class">Action1</set> <set xpath="/items/item[@name='drinkJarBeer']/effect_group[@tiered='false']/triggered_effect[@trigger='onSelfPrimaryActionEnd']/@trigger">onSelfSecondaryActionEnd</set> Right Click now drinks, but for some reason, the screen does not give the drunken blur even though I get the Buzzed buff. I can't find anything in the item or buff code tying it specifically to the Primary Action. Thanks again sphereii, and Merry Christmas to you and yours EDIT: Apparently Grandpa's Moonshine blurs, but beer buzzed does not. Possibly something that was tweaked in B240?
  2. Trying to change Action0 to Action1 and append new Action0 (drinkJar Trying to make the default drink be Right Click, and append the basic punch (unarmed left click) to drinks (currently proof of concept, tweaks to come later) I've tried 2 ways so far (about to head to dinner so I figured I'd bounce it off a few of you) <set xpath="/items/item[starts-with(@name, 'drinkJar') and not(contains(@name, 'Empty'))]/property[@Class='Action0']">Action1</set> <set xpath="/items/item[starts-with(@name, 'drinkJar') and not(contains(@name, 'Empty'))]/property[@Class='Action0']/@value">Action1</set> I get a WRN in console but the rest of the mod loads fine. Can I rename the Action0 to Action1 this way and something is wrong in my Syntax or do I have to remove Action0 and then append it with the Action0 from the player hand and Action1 as the normal drink code?
  3. Thanks, I suppose I was just staring at the code too long to miss something that simple...
  4. Not sure how to do it with XPath but are you trying to fix the looping idle sound or just make them silent? If just trying to fix the idle bug you can comment out the idle sounds on each (tested on local files and on a server's XML but not local in b199 and it was a temp fix for the looping when not equipped but), still plays the sound when using them.
  5. Pastebin complained my file was too big, so I'll separate it STABLE LAUNCH (but limiting stack size on Flaming Arrow & Exploding Xbow not working): items.xml from my mod test folder: https://pastebin.com/Ybrhajdr items.xml from exportcurrentconfigs (starting from last vanilla item): https://pastebin.com/6jj1qcSM changed item from items.xml from exportcurrentconfigs: https://pastebin.com/gq8nTy4Y If I change the items.xml in the mod test folder to: <configs> <!-- LAZY COPY/PASTE TEMPLATES --> <!-- <property name="" value=""/> --> <append xpath="/items"> <!-- snip --> </append> <append xpath="/items/item[@name='ammoArrowFlaming']><property name="Stacknumber" value="250"/></append> <append xpath="/items/item[@name='ammoCrossbowBoltExploding']><property name="Stacknumber" value="250"/></append> <set xpath="/items/item[@name='resourceCement' or @name='resourceConcreteMix']/property[@name='Stacknumber']/@value">6000</set> <set xpath="/items/item[@name='resourceFeather']/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'ammoArrow') and not(contains(@name, 'Flaming'))]/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'ammoCross') and not(contains(@name, 'Exploding'))]/property[@name='Stacknumber']/@value">500</set> </configs> I get the error in console: ERR Failed loading and parsing XML (items.xml) XmlException: attribute values cannot contain '<' Line 95, position 55. ERR XML Loader. Patching 'items.xml' from mod 'test' failed. NullReferenceException: Object reference not set to an instance of an Object. Sorry for slow response, I keep trying and learning new ways to not do what I want.
  6. Thx sphereii I'll see about appending a stack number in the append section (the sets are beneath the appends for that specific reason) --- Ok so the whole thing currently looks like this <configs> <append xpath="/items"> <!-- snip --> </append> <append xpath="/items/item[@name='ammoArrowFlaming' or @name='ammoCrossbowBoltExploding']/property[@name='Stacknumber']/@value">250</append> <set xpath="/items/item[@name='resourceCement' or @name='resourceConcreteMix']/property[@name='Stacknumber']/@value">6000</set> <set xpath="/items/item[@name='resourceFeather']/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'ammoArrow') and not(contains(@name, 'Flaming'))]/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'ammoCross') and not(contains(@name, 'Exploding'))]/property[@name='Stacknumber']/@value">500</set> </configs> I have also tried separating into 2 separate <append>(s) but I get the same result, but there are no parsing errors and the other parts of the mod work just fine <append xpath="/items/item[@name='ammoArrowFlaming']/property[@name='Stacknumber']/@value">250</append> <append xpath="/items/item[@name='ammoCrossbowBoltExploding']/property[@name='Stacknumber']/@value">250</append>
  7. SandyBeaches did comment right after your question, unless it was just 2 ppl posting at once. And ty, cuz this is half of what I came here for --- So I'm trying to increase the stack sizes on feathers and Arrows/Bolts NOT including flaming/exploding I copy pasted the drinkJar from one of the earlier posts as ref, and confirmed it works for the drinkJar items but not the ammo. I even copy/pasted the drinkJar and changed it to the ammoArrow/ammoCrossbow and Flaming/Exploding. Is it because ammoArrowFlaming/ammoCrossbowBoltExploding extend another item instead of being a parent item themselves? And if so, how would I fix it, with an <append> to those specific ones adding their own stack size variable? <set xpath="/items/item[@name='resourceFeather']/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'ammoArrow') and not(contains(@name, 'Flaming'))]/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'ammoCross') and not(contains(@name, 'Exploding'))]/property[@name='Stacknumber']/@value">500</set> <set xpath="/items/item[starts-with(@name, 'drinkJar') and not(contains(@name, 'Empty'))]/property[@name='Stacknumber']/@value">64</set>
  8. So I tried adding in an item using the xpath and it throws an error and doesn't parse the items.xml file at line 16, expects item but doesn't find it. Am I just derping the code or can I not extend an item referenced in the original items.xml using xpath? The line referenced in the error is the first </property> after <property class="Action0">. <configs> <!-- LAZY COPY/PASTE TEMPLATES --> <!-- <property name="" value=""/> --> <append xpath="/items"> <!-- Van Helsing Crossbow --> <item name="gunCrossbowVanHelsing"> <property name="Extends" value="gunCrossbow"/> <property name="CustomIcon" value="gunCrossbow"/><property name="CustomIconTint" value="ffff66"/> <property name="EconomicValue" value="1000"/> <property name="RepairTools" value="resourceRepairKit"/> <property class="Action0"/> <property name="Class" value="Ranged"/> <property name="Delay" value="0.4"/> <property name="Magazine_items" value="ammoCrossbowBoltStone,ammoCrossbowBoltIron, ammoCrossbowBoltSteelAP"/> </property> <effect_group name="Base Effects"> <passive_effect name="MagazineSize" operation="base_set" value="20"/> <passive_effect name="EntityDamage" operation="perc_add" value=".59"/> <passive_effect name="SpreadDegreesVertical" operation="base_set" value="1.62"/> <passive_effect name="SpreadDegreesHorizontal" operation="base_set" value="1.62"/> <passive_effect name="SpreadMultiplierAiming" operation="base_set" value=".10"/> <passive_effect name="SpreadMultiplierCrouching" operation="base_set" value=".8"/> <passive_effect name="SpreadMultiplierWalking" operation="base_set" value="1.5"/> <passive_effect name="SpreadMultiplierRunning" operation="base_set" value="2.2"/> </effect_group> </item> </append> </configs> Edit: this is just me trying to get proof of concept, plan on adding more stuff but wanna see it in game before I go full on coding in the perk requirements etc
×
×
  • Create New...