Jump to content

Bladestorm Games

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by Bladestorm Games

  1. Fixed the syntax error. Sorry, just double checking: you're saying that if "EntityTagCompare" and "IsAlive" returns true, the SECOND triggered_effect fires off? Wouldn't it be the first triggered_effect? Thanks for this info! Here is the edit: <effect_group> <triggered_effect trigger="onSelfKilledOther" action="ModifyCVar" cvar="roll_range" operation="set" value="randomint(5,15)"/> <triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Health" operation="add" value="@roll_range"/> </effect_group>
  2. Just a post checking if my usage of the "requirement" element is correct: Here is the example code: <!-- Method #1 - Requirements are before the trigger_effect --> <passive_group> <requirement name="EntityTagCompare" target="other" tags="zombie,animal"/> <requirement name="IsAlive" target="other"/> <requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="10"/> <triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Stamina" operation="add" value="10"/> </passive_group> <!-- Method #2 - Requirements are within the trigger_effect --> <passive_group> <triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Stamina" operation="add" value="10"> <requirement name="EntityTagCompare" target="other" tags="zombie,animal"/> <requirement name="IsAlive" target="other"/> <requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="10"/> </triggered_effect> </passive_group> I understand that in Method #2, the requirements must be met for that specific triggered_effect to occur. Question #1) In Method #1, those requirements must be met for the triggered_effect to occur, but that means anything AFTER the triggered_effect will also need to have met the requirements? So If I wanted to do something like: "On hitting an enemy, Recover 10 Stamina and a 25% chance to recover 5 life" <passive_group> <requirement name="EntityTagCompare" target="other" tags="zombie,animal"/> <requirement name="IsAlive" target="other"/> <!-- Needs to pass the EntityTagCompare, and IsAlive requirements --> <triggered_effect trigger="onSelfAttackedOther" action="ModifyStats" stat="Stamina" operation="add" value="10"/> <requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25"/> <!-- The first 2 requirements still apply to this triggered_effect, correct?? --> <triggered_effect trigger="onSelfAttackedOther" action="ModifyStats" stat="Health" operation="add" value="5"/> </passive_group> Question #2) Kind of a side question, is this the way to do a value range? Say I wanted to do something like this: "When you kill an enemy to recover 5 to 15 Stamina" <triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Health" operation="add" value="randomint(5,15)"/>
  3. No errors in the log, and the xpath is loaded, based on viewing the config dump.
  4. Thanks, this fixed the error issue, but now the issue is I'm not hearing the custom sounds (if i replace the sound to be placed with something like "breakleg" it plays that sound. Example: <!-- This plays the sound--> <triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="breakleg"/> <!-- This Does Not play the sound--> <triggered_effect trigger="onSelfBuffStart" action="PlaySound" sound="PoisonProc"/> <!-- sounds.xml snip for PoisonProc --> <config> <append xpath="/Sounds"> <SoundDataNode name="PoisonProc"> <AudioSource name="Sounds/AudioSource_Impact"/> <Noise ID="1" noise="7" time="3" muffled_when_crouched="0.5"/> <AudioClip ClipName="#@modfolder:Resources/sounds_poisons.unity3d?snd_poison_proc"/> <LocalCrouchVolumeScale value="0.3"/> <CrouchNoiseScale value="0.5"/> <NoiseScale value="1"/> <MaxVoices value="5"/> <MaxRepeatRate value="0.01"/> </SoundDataNode> </append> </config> Something is probably not right with how I have the SoundDataNode setup, but i am using a few references, so I'm not really sure why it doesnt play.
  5. Hello, I am trying to add custom sounds to my mod. I have followed a video guide and a text guide, and looked how other mods load sounds, but something is failing. (Link to Video Guide: https://youtu.be/ptBaRB7nFbY ) (Link to Text Guide: https://7d2dsdx.github.io/Tutorials/index.html?HowtoaddCustomSounds.html ) Here is the error I am receiving: The top part is while loading the world, bottom part is when triggering the sound. Here is my sound.xml code: <!-- ########## --> <!-- Custom SFX --> <!-- <AudioClip ClipName="#[NAME OF BUNDLE]?[NAME OF FILE IN BUNDLE]"/> --> <config> <append xpath="/Sounds"> <SoundDataNode name="PoisonApply"> <AudioSource name="Sounds/AudioSource_WeaponFire"/> <Noise ID="2" noise="11" time="3" muffled_when_crouched="0.5"/> <AudioClip ClipName="#@modfolder:Resources/sounds_poisons.unity3d?snd_poison_apply"/> <LocalCrouchVolumeScale value="0.3"/> <CrouchNoiseScale value="0.5"/> <NoiseScale value="1"/> <MaxVoices value="5"/> <MaxRepeatRate value="0.01"/> </SoundDataNode> <SoundDataNode name="PoisonProc"> <AudioSource name="Sounds/AudioSource_WeaponFire"/> <Noise ID="2" noise="11" time="3" muffled_when_crouched="0.5"/> <AudioClip ClipName="#@modfolder:Resources/sounds_poisons.unity3d?snd_poison_proc"/> <LocalCrouchVolumeScale value="0.3"/> <CrouchNoiseScale value="0.5"/> <NoiseScale value="1"/> <MaxVoices value="5"/> <MaxRepeatRate value="0.01"/> </SoundDataNode> </append> </config> The file "sounds_poisons.unity3d" directory is: D:\SteamLibrary\steamapps\common\7 Days To Die\mods\arpg_mode\Resources What am I doing wrong / missing? Thanks.
  6. Looks like this section is related to the issue: And here is the XML for the item mod: <configs> <append xpath="/item_modifiers"> <item_modifier name="modOintmentPoisonRegular" installable_tags="weapon" modifier_tags="poison" blocked_tags="noMods" type="attachment"> <property name="CustomIcon" value="ointmentPoisonRegular"/> <property name="Stacknumber" value="1"/> <property name="Group" value="Mods"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffPoisonDoT"/> <triggered_effect trigger="onSelfDamagedOther" action="ModifyCVar" target="other" cvar="poisonCounter" operation="add" value="5"/> </item_modifier> </append> </configs>
  7. Hey so I am working on a custom item modifier, Poison Ointment, pretty much everything is up (recipe craft, item icon, debuff). The issue I am running into is, when I apply the item modifier to a weapon, it results in a "NullReferenceException. Object reference not set to an instance of an object". Searching google, it seems people say "NullReferenceException" is Unity's general way of saying something went wrong. So I'm not sure what I'm missing that would cause this issue. Here is a video to see what is going on: https://youtu.be/7W8CJiIwrvg
  8. I've looked at both buffInjuryBleeding and perkDeepCuts, and understand how they function, but my question was more of whether I need to assign/initialize custom variables someplace first, before using them, since "poisonDuration" and "poisonCounter" are not actually in the game, I'm just curious if I need to initialize them someplace first before using them. I want to note here that I dont want to use the bleed variables(bleedAmount, bleedCounter, etc) in the poison debuff code, because Im sure if an enemy is poisoned and bleeding, there will be issues with sharing similar variables.
  9. Hello everyone, I am trying to attempt/theorize a Poison debuff that applies damage over time. I am using the Bleeding debuff as a guide on how to make a Poison version of the Bleed debuff. The question I have is, if I change this code: <triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffInjuryBleeding"> <requirement name="CVarCompare" cvar="$bleedDuration" operation="LTE" value="0"/> </triggered_effect> To this: <triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffPoisonDoT"> <requirement name="CVarCompare" cvar="$poisonDuration" operation="LTE" value="0"/> </triggered_effect> will the CVar of "poisonDuration" function? Or does it fail, because I havent declared a poisonDuration variable in some other file? I hope the question I'm asking makes sense, basically I'm replacing vars like "bleedDuration" and "bleedCounter" with "poisonDuration" and "poisonCounter" but I'm wondering if that would even work or would it fail because I need to declare those variables somewhere first?
  10. Sorry for the late responce, I went to bed and just woke up. I gotta use that more often! Very useful to see how things are finalized. Yeah this solved the issue, now only Power Attacks gain the increase for Block Damage and Stamina Loss. I guess with my code, like you said, it was adding it to all effect groups which the first effect group seems to be default values (which i'd be adding to) Thanks! Also side note, there are multiple effect_groups in perkBrawler in progression.xml. If I wanted to target and insert code into the 2nd effect_group, I'd probably have to do something like: <insertAfter xpath="/progression/perks/perk[@name='perkBrawler']/effect_group[2]/requirement[1]"> <triggered_effect trigger="onSelfSecondaryActionRayHit" action="PlaySound" sound="stonedestroy3"/> <passive_effect name="StaminaLoss" operation="perc_add" level="1,5" value=".2,1" tags="secondary"/> <passive_effect name="BlockDamage" operation="perc_add" level="1,5" value="20,100" tags="secondary"/> </insertAfter> (Checking the ConfigDump, it seems the code above does work, view spoiler for image of the effect of the code) (Noting that it does insert the code with undesired indentation) Again, thanks. Learning a lot with this session.
  11. I've adjusted the code, but this didnt fix the issue. Still having Regular Attacks inherit the StaminaLoss & BlockDamage. Thanks though!
  12. Hi, Im trying to make it so that knuckle items use 20% increased Stamina Use and deal 200% Block Damage on Power Attacks. I was able to pull this off in the items.xml, but I'd have to copy and paste the code for each Knuckle Item. I wanted to simplify that, so I've added this code into the progression.xml, which should effect all Knuckle weapons: <append xpath="/progression/perks/perk[@name='perkBrawler']/effect_group"> <requirement name="ItemHasTags" tags="perkBrawler"/> <passive_effect name="StaminaLoss" operation="perc_add" level="1,5" value=".2,1" tags="perkBrawler, secondary"/> <passive_effect name="BlockDamage" operation="perc_add" level="1,5" value="2,10" tags="perkBrawler, secondary"/> </append> Quick note, I needed the "requirement" line because without it, all weapons would be effected by the passive_effects. (With this line I could probably remove the "perkBrawler" from the tags.) The issue I'm running into with the code above, is with Regular Attacks, they seem to be inheriting the passive_effects. I was hoping I could add "secondary" to the tags attribute so that only Power Attacks get the passive_effects. What do i need to add/change to make the passive_effects only work with Power Attacking? Just for fun I'll provide my item.xml method incase anyone wanted to critique it / add suggestion to it:
  13. Hey guys, I'm trying to make a custom consumable item, but having trouble with finding out how to edit the Tooltip values (When you click on a consumable it shows the values of Health, Food, Stamina, Water, Regen, etc. on the item) Here is a visual image of what I'm trying to accomplish: https://i.imgur.com/lgkdWL5.png (Note: I already have the item applying the Health, Water, Cure, Stam Regen... just the tooltip isnt displaying the proper values) I think it has to do with DisplayType. For example if you changed "Food" to "Water" the item's tooltip values would change: <property name="DisplayType" value="water"/> VS <property name="DisplayType" value="food"/> If I'm correct and it has to do with "DisplayType" where would I setup a custom DisplayType for my specific item? Thanks!
  14. I guess I should clarify my design goal. So I was hoping that I could make a mod where Leather Knuckles (or any fist weapon) would create an explosion on Power Attack (explosion meaning like Explosive Arrow's explosion, the FX and the area damage, where damage effects enemies and blocks). It is probably possible to add a bit more to the current code to make AoE damage effect both enemies and blocks. I was also thinking of making the fist weapon have a hidden ammo slot with the ammo used being Explosive Arrow ammo, but trying to make it so with 0 arrows it still shoots an explosive arrow on Power Attack. But that seems even more complicated to get working than the current code. I wish there was a way to "create" explosions used by things like Rockets, Explosive Arrows, Pipebomb, etc, and assign values to the explosion (Range, Entity Damage, Block Damage, Explosion FX Size, etc). I think for now I'll leave the "Explosion on Melee Hit" goal, as I am working on some other ideas (I've made it where the 2-handed Sledges (stone, iron, steel) perform an AoE Power Attack that knocks enemies in an area down, while playing an earthquake-like sound (sound being "stonedestroy3"), which turned out really cool & fun.) Again thanks to all who have chimed in on this task, I learned a lot from you guys!
  15. Thanks guys! I've made the update from "onSelfAttackedOther" to "onSelfSecondaryActionRayHit", and it works properly (normal attack doesn't proc the AoE stuff now) Also, yeah I was looking at buffShocked earlier and did pretty much what you said, so now the custom buff looks like: <append xpath="/buffs"> <buff name="buffApplyAoEDamage" name_key="buffApplyAoEDamage"> <stack_type value="effect"/> <duration value="1"/> <effect_group> <!-- Apply Damage --> <triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="subtract" value="50"/> <!-- Apply FX --> <triggered_effect trigger="onSelfBuffStart" action="AttachParticleEffectToEntity" particle="p_electric_shock" parent_transform="Spine1" local_offset="0,-.2,0"/> <triggered_effect trigger="onSelfDied" action="RemoveParticleEffectFromEntity" particle="p_electric_shock"/> <triggered_effect trigger="onSelfBuffFinish" action="RemoveParticleEffectFromEntity" particle="p_electric_shock"/> <triggered_effect trigger="onSelfBuffRemove" action="RemoveParticleEffectFromEntity" particle="p_electric_shock"/> <triggered_effect trigger="onSelfBuffRemove" action="ModifyCVar" cvar="ETrapHit" operation="set" value="0"/> <triggered_effect trigger="onSelfLeaveGame" action="RemoveParticleEffectFromEntity" particle="p_electric_shock"/> </effect_group> </buff> </append> Oh also khzmusik, you said in general explosion damage (kills?) dont grant XP, but I've gotten XP from Rocket Frags and Explosive Arrow and Pipebombs, so explosion damage / kill should be granting exp? (Perhaps someway for the buff to check if the entity's "health <= 0", then grant enemy's exp to player(s), after the damage calculation) Final note is that, if I find a way to make the Explosion FX, I'll be moving it out from the buff section, as it would be strange if the AoE hits, say 3 targets, and explosions apply at each of the 3 target's location. Thanks for the tips & help!
  16. Thank you! I was able to get it to somewhat work, here is what I did: Item: Leather Knuckles <melee_explosion_test> <append xpath="/items/item[@name='meleeWpnKnucklesT0LeatherKnuckles']/effect_group[@name='Power Attack']"> <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" target="selfAOE" range="14" target_tags="zombie,animal" buff="buffApplyAoEDamage"/> <triggered_effect trigger="onSelfSecondaryActionRayHit" action="PlaySound" sound="explosion2"/> </append> </melee_explosion_test> New Buff: <melee_explosion_test> <append xpath="/buffs"> <buff name="buffApplyAoEDamage" name_key="buffApplyAoEDamage"> <stack_type value="effect"/> <duration value="1"/> <effect_group> <triggered_effect trigger="onSelfBuffStart" action="ModifyStats" stat="Health" operation="subtract" value="50"/> </effect_group> </buff> </append> </melee_explosion_test> I'm still trying to fix a few issues: 1) I have it set to Power Attack, but the effect seems to apply to regular (left mouse button) attack. 2) Getting kills with the AoE grants no XP. 3) Still looking at how/what particle to perform for the explosion FX.
  17. So I tried a few things and im at a wall. I even tried looking at "zombieDemolition" in the entityclasses.xml to see how it handles explosion, and my conclusion is that while I am seeing this line of code: <property name="Explosion.ParticleIndex" value="11"/> <property name="Explosion.RadiusBlocks" value="3"/> <property name="Explosion.RadiusEntities" value="4"/> <property name="Explosion.DamageBonus.stone" value=".3"/> <property name="Explosion.DamageBonus.metal" value=".1"/> <property name="Explosion.DamageBonus.earth" value="0"/> <property name="Explosion.DamageBonus.wood" value=".5"/> <property name="Explosion.DamageBonus.water" value="0"/> <property name="Explosion.BlockDamage" value="50"/> <property name="Explosion.EntityDamage" value="15"/> to things, those things need to have code for handling the creation of an explosion. So for example, im trying to edit Leather Knuckles (meleeWpnKnucklesT0LeatherKnuckles) to cause an explosion on hit, and the code above sets value/info for the explosion, however the game's code has no function(?) for creating an explosion with Leather Knuckles, so I'd need a way to actually create the explosion (which I cant seem to find a way). I wish I could use "triggered_effect" to do something like this: <triggered_effect trigger="CreateExplosion"> <property name="Explosion.ParticleIndex" value="11"/> <property name="Explosion.RadiusBlocks" value="3"/> <property name="Explosion.RadiusEntities" value="4"/> <property name="Explosion.DamageBonus.stone" value=".3"/> <property name="Explosion.DamageBonus.metal" value=".1"/> <property name="Explosion.DamageBonus.earth" value="0"/> <property name="Explosion.DamageBonus.wood" value=".5"/> <property name="Explosion.DamageBonus.water" value="0"/> <property name="Explosion.BlockDamage" value="50"/> <property name="Explosion.EntityDamage" value="15"/> </triggered_effect> Please let me know if I am somewhat correct, or completely wrong and there is a way to achieve my goal of explosions on melee hit, thanks!
  18. Hey guys, I'm trying to get into modding and I'm at a task that I cant figure out. So my goal with this task is to see if I can make a melee attack cause an explosion. I'm experimenting with the leather knuckles to see if I could pull this off. I'm able to get a sound effect to play on hit, but the explosion part isnt working (the FX isnt working either but that parts just a quick experiment i pasted in). I'm using ammoArrowExplosive, ammoRocketFrag, and thrownAmmoPipeBomb as a reference for explosions. I'm also taking a look at Bow items and Rocketlauncher items to see how the go about handling explosives ammo. I've tried a few different methods, none seem to work. Another idea I had was to give knuckles the ammoArrowExplosive tag, and make it wo power attacks shoot an explosive arrow. But before I go about trying that out, I figured I'd make a post about my task so see what Im doing wrong. <testing_sandbox> <!-- Attempting Explosion on Melee Hit --> <append xpath="/items/item[@name='meleeWpnKnucklesT0LeatherKnuckles']"> <effect_group name="Power Attack"> <!-- Sound on Hit testing (Working) --> <triggered_effect trigger="onSelfSecondaryActionRayHit" action="PlaySound" sound="stunbaton_hit5"/> <!-- Explosion on Hit (NOT working) --> <property name="Explosion.ParticleIndex" value="11"/> <property name="Explosion.RadiusBlocks" value="3"/> <property name="Explosion.RadiusEntities" value="4"/> <property name="Explosion.DamageBonus.stone" value=".3"/> <property name="Explosion.DamageBonus.metal" value=".1"/> <property name="Explosion.DamageBonus.earth" value="0"/> <property name="Explosion.DamageBonus.wood" value=".5"/> <property name="Explosion.DamageBonus.water" value="0"/> <property name="Explosion.BlockDamage" value="50"/> <property name="Explosion.EntityDamage" value="15"/> <!-- FX on Hit (NOT working) --> <property name="Particles_muzzle_fire" value="rocketLauncherFire"/> <property name="Particles_muzzle_smoke" value="nozzlesmoke_m136"/> </effect_group> </append> </testing_sandbox>
  19. Thank you! I tried that before, and it didnt seem to work. perhaps I forgot to actually save the TXT file, because I just now tried again and it works. I'm also watching Flexible Game's "7 Days to Die Tutorial: Making A Mod" video to learn how to access data without modifying the default files. I made a new mod folder (7 Days To Die\mods\test\Config) and using this to access and change the Archery Rank 1's long description: <test> <set xpath="/progression/perks/perk[@name='perkArchery']/effect_group/effect_description[@level='1']/@long_desc_key">Hello World</set> </test> Had to try a few times in getting the line right, but it works now : )
  20. Hey there, I am trying to edit the text that is displayed on perks. For example, I want to change Archery Rank 1's long description. In "progression.xml" I see the line: <effect_description level="1" desc_key="perkArcheryRank1Desc" long_desc_key="perkArcheryRank1LongDesc"/> If i change "long_desc_key="perkArcheryRank1LongDesc"/>" to something like "long_desc_key="Hello World"/>", that will display "Hello World" if you hover over that perk. But what I'm trying to find is where exactly "perkArcheryRank1LongDesc" is set at. Thanks!
×
×
  • Create New...