Jump to content

Luduaver

Members
  • Posts

    17
  • Joined

  • Last visited

Luduaver's Achievements

Refugee

Refugee (1/15)

1

Reputation

  1. The "name" of the second xpath is missing an @! And there is no perk with the name "LockPickBreakChance". Maybe that's why you missed it! Unless you're trying to modify a skill created by another mod! If I'm right, maybe that's what you want to do: <configs> <!-- Changes lockpicking to be actually useful and make sense to spend points on. --> <set xpath="//perk[@name='perkLockPicking']//passive_effect[@name='LockPickTime']/@value">.25,.75</set> <set xpath="//perk[@name='perkLockPicking']//passive_effect[@name='LockPickBreakChance']/@value">.33,100</set> </configs> I've reduced the size of the xpath and made it more readable! Using "//", you can search for all passive effects following the hierarchy, without having to mention effect_group or other nodes! In this case, I've already mentioned which perk I want to select and then skipped all the nodes directly to any passive_effect! Elements don't need @ but attributes do! Element is what is inside the beginning of <> Example, <effect_group>, so "effect_group" is an element! What comes after "effect_group" is an attribute Example, <effect_group name="attributeValue1"> In this case, the attribute is "name" and its value is "attributeValue1". So you can select a specific "effect_group/@name" by searching for the value, or you can search for all "effect_group/@name" and edit them all at the same time! Searching for a specific one (use [] after the element to select an attribute from it as a requirement): //perk/effect_group[@name='attributeValue1'] Searching for all effect_groups that have @name! //perk/effect_group[@name] And if you want to select the attribute instead of the element, you have to put the @attribute after the element in the xpath So this: //perk/effect_group[@name='attributeValue1'] Will become this: //perk/effect_group[@name='attributeValue1']/@name <perks> <perk> <effect_group name="attributeValue1"></effect_group> <effect_group name="attributeValue2"></effect_group> </perk> </perks> Use the XML above to test the XPATHS I mentioned, you can use "https://codebeautify.org/Xpath-Tester" to test! And you can also look at this documentation on the WIKI, it will help you a lot! https://7daystodie.fandom.com/wiki/XPath_Explained There are several ways to select a single node! Test enough to select as simply as possible!
  2. I want to start studying to create mods that change the game directly instead of XML! I know that some mods use C# and compile into a .dll! But I searched and didn't find any doc showing how it works to make this kind of modification! Is there anything that can help me get started?
  3. Did you make sure to put the stack_type inside the buff? I'm not home right now, so if I can't solve it, tomorrow I can do a test and tell you how it went here!
  4. Don't forget to add 1 reset to the variable every time you reset the skill points! I don't know how it's reset in The Wasteland! But in the drinkJarGrandpasForgettingElixir item you can use <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="buffAttributeStrengthVar" operation="set" value="0"> But that's only if there's some way of removing the points given by the book! Because the book adds 1 buff and the vanilla Grandpas Forgetting Elixir doesn't remove buffs!
  5. Now I think I understand! You want books to be able to raise the level of the attribute up to 10? From what I've seen, the buff adds 1 passive that adds 1 level! If that's the case, then you need to change all the buffs so that they can stack! I've never used stack effect, but I think it's something like this: <stack_type value="effect"/> But maybe it increases the level infinitely when using several books! You can also use <stack_type value="replace"/> instead stack effect! Set a variable that triggers 1 to the value of the variable, something like: <effect_group> <triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="buffAttributeStrengthVar" operation="add" value="1"> <requirement name="ProgressionLevel" progression_name="attStrength" operation="LT" value="10"/> </triggered_effect> <triggered_effect trigger="onSelfBuffStack" action="PlaySound" sound="read_skillbook_final"/> <passive_effect name="AttributeLevel" operation="base_add" value="@buffAttributeStrengthVar" tags="attStrength"/> </effect_group> This way, the buff will stack and when it reaches level 10 in the attribute, it stops changing the variable and then doesn't add any more levels to the attribute! Is that what you want?
  6. Now I get it! So it's not enough just to edit the book! You have to revise the SPIFSAL points system! Because the book adds 1 buff that adds 1 level to the attribute with the specified tag! Nothing more! As I don't know how these SPIFSAL points work, it's hard to understand! For example, does it use the skill points from the vanilla game or is it a points system created for the mod? If it's the vanilla points system, does it restrict the use of points in any way? Things like that!
  7. Do you want the book to give skill points instead of increasing the attribute level directly?
  8. from the looks of it, when using the item it triggers the buffAttributeStrength. then you need to look for this buff in the file buffs.xml, if you can't solve through this buff, send me the XML of the buff so I understand how it's done.
  9. Can you show me <item> the one so I can help you?
  10. Is there any way to define CVAR as the current health and also the max health? For example, max health 200 and current health 157 <triggered_effect trigger="onOtherAttackedSelf" action="ModifyCVar" cvar="cvarCurrentHealth" operation="set" value="157 (CURRENT HEALTH HERE)"/> <triggered_effect trigger="onOtherAttackedSelf" action="ModifyCVar" cvar="cvarCurrentHealth" operation="set" value="200 (MAX HEALTH HERE)"/>
  11. I've redefined my answer! So maybe this is unfeasible? For example, suppose I set the minimum life limit to 1, then my current life is 20! But right now I've taken 1 hit that deals 50 damage, so I'll die instantly! Then maybe it won't work, because before the buff updates, I'll already be dead! I tried using `GeneralDamageResist`: <passive_effect name="GeneralDamageResist" operation="base_add" value="1"> <requirement name="StatCompareCurrent" stat="Health" operation="LTE" value="50"/> </passive_effect> So it works, as long as I set it lower than the `Health ModMax` with all injuries active. But if I set the minimum health to 1, it doesn't prevent me from dying if I don't have 1 health yet. If there was a way to define "if I suffer damage to my current life, then instead of suffering damage, my life is defined as X". For example, I have 30 life, the damage calculation results in 50 damage, so the damage is canceled and my life is set to 1. But I haven't found anything that allows me to do this, in fact I'm just starting out in the world of mods for 7D2D so I'm still lost in some aspects of xml!
  12. I checked, and yes, it can be used AND! Thank you, you helped me a lot! I have another question in another post! If you could answer me, I'd be happy to! Minimum Current Stat - Discussion and Requests - 7 Days to Die
  13. Would it be possible to create a buff that, when it is active, sets the minimum limit of a stat to X? For example, I have a weapon that consumes a lot of stamina, so as long as the buff is active, the stamina doesn't drop beyond 100. But even if I don't use just one action of the weapon, I can still use other actions. I don't want the stat to be infinite, I want it not to drop beyond the limit, so if I set the minimum life to be 100, then the life doesn't drop below 100.
  14. That's what I needed! You are a God! Can I also put multiple requirements? For example, a requirement inside another requirement and then the trigger inside the 2? <requirement name="RandomRoll" seed_type="Random" min_max="1,50" operation="LTE" value="100"> <requirement name="CompareItemMetaFloat" operation="Equals" value="4" key="charge"> <triggered_effect trigger="onSelfPrimaryActionRayHit" action="SetItemMetaFloat" change="2" relative="false" key="charge"> <requirement name="IsAlive" target="other"/> </triggered_effect> <triggered_effect trigger="onSelfSecondaryActionRayHit" action="SetItemMetaFloat" change="2" relative="false" key="charge"> <requirement name="IsAlive" target="other"/> </triggered_effect> </requirement> </requirement> Here I first wanted to check the RandomRoll, then check the charge value and only then execute the 2 triggers.
×
×
  • Create New...