Jump to content

Bladestorm Games

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Bladestorm Games's Achievements

Refugee

Refugee (1/15)

1

Reputation

  1. 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.
  2. 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>
  3. 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
  4. 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.
  5. 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?
  6. 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.
  7. I've adjusted the code, but this didnt fix the issue. Still having Regular Attacks inherit the StaminaLoss & BlockDamage. Thanks though!
  8. 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:
  9. 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!
  10. 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!
  11. 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!
  12. 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.
  13. 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!
×
×
  • Create New...