Download

Replacing Weapon Audio

I watched a few tutorials on how to add end edit weapons but I could not replicate that process for a slightly different idea I have.

I simply want to replace the default noise of an arrow to a more accurate sound.

How would I do this?

I have a mod folder for my mod but I cannot make sense of what assets/blueprints I need to force a weapon to make a new noise.

Can I get any guidance?

If you go to the 3d model of the item you are wanting to change it will have all of the attached sound files. You can just click “find in content browser” to find exactly where it is located also.

If the attachment works, you can see my mod folder and what things I have in there right now. I believe they all reference each other. The cue file is referenced to template.
The template is referenced to the weaponbow blueprint etc etc.

Not sure what I’m missing here because when I test the mod (Press play in the editor), the default cue is still being played as if the new bow is not being utilized.

Any ideas?

This is because the sound is actually played via the animations. You have to look into the bow shoot animation and change the sound cue there.

Ah good tip thanks. I will try to adjust accordingly. Will post results.

Make sure you are also spawning in your bow, the one you start with is the default “vanilla” bow.

Interesting. After looking at the fire animation sequence, (there are two, one is called “Fire” and another is labeled “Iron_Fire”), I can’t seem to locate how the animation uses the default fire cue.

Tips?

Oh how do I spawn in the new bow?

I had thought by adding the cue itself into my mod folder I could have effectively replaced the audio.

I replaced the weapbow template child’s cue with the new one in my mod folder as below:

EDIT Apologies for the double comment.
I think it may be worth noting I am wanting to replace the audio of the vanilla bow, not add a new one. Hope this clarifies some issues.

I tried to change the fire projectile sound and even the fire sound in the WeapBow blueprint, but it doesn’t do anything. I assume these properties aren’t used at all.

What you’ll have to do to change/replace the sound is to subclass both the “fire” and the “Iron_Fire” animation sequences, and the fire montage and Iron_Fire montage as well. Then make your new fire montages point to your new animation sequences and make your weapon use your modified montages instead of the vanilla ones.

Then edit the animation sequences:
2cdb0bc59ce1b274489e44f8257143c678d7c415.jpeg

Do that with both the fire and the iron_fire animation.
Repeat the whole thing for all the third-person animations.

Sorry that you had to spell it out for me but this was very helpful.

Is this ‘audio-attached-to-animation’ feature universal for all weapon sounds? If so, this thread should help other users a lot in the long run.

I will credit everyone who helped in this thread on the workshop mod when uploaded.
Thanks everyone for all of your help.

Will post more questions if another issue arises :stuck_out_tongue:

Alright where I’m at now.

I have subclassed all appropriate FPV and TPV animations that use the new CUE and made sure they are all using it.

I have thought ahead and replaced the Bow references in the LootItemSets in which the bow appeared. Naturally subclassing those also. In doing so I had hoped the vanilla bow should be replaced with the upgraded bow in both T1 supply drops and the “survivor” ineventory.

Unfortunately when I test the mod it is playing all 4 default firing sounds still which leads me to believe the bow placed in the inventory upon testing WITHIN THE KIT is still vanilla.

My question here is where else should I look to replace the vanilla bow with the new one?

(Is there a way to replace all current vanilla bows within the inventory of players whom already have the old bow?)
Or is the bow simply ready to go and the dev kit is somehow using the vanilla bow from the “Generic” mod folder instead of my folder…

At this current point in time, all instantiations of objects in a save file are isolated and self contained, they don’t require to be in the Master Item List to be creatable or exist in the game, because other parts of code already define them and contain their values, this is the same for tamed dinosaurs and structures that already exist in the save, you will need to destroy them all and create new ones, and manually disable the old bow engrams as well, as they will create the old bows too.

If you are using this mod for your own server, just let people know to swap their bow with you, otherwise put a note on your mod on the workshop to replace all existing bows, in regards to the item caches I have not yet looked into editing or manipulating those.

EDIT

I have added a new bow instead to the Master Item list.

Associated all files and can now create and equip this bow in a test without removing or changing the original bow.

Now the problem persists, the fact that I simply can not get the new sound cue to take place in the test let alone cooking and uploading it.
If I do however upload the mod, starting a local game after selecting my mod, the bow is no longer there?

What am I missing?

Have you cooked a mod before?
Do you have the Level file the Orange one that said GenericMod?

To cook the mod, you need to specify your Mod “Level” File, that has the WorldSettings to your Mod “PrimalGameData” file, and set the Map Override to TheIsland (if you want a core mod not a map mod)
Then When you cook and upload, and run the mod, you should see “PrimalGameData_BP” -> “Your Mod Name” -> “The Island” in the loading section.

Yes, I’ve cooked a mod sucessfully.

After updating the dev kit and making some changes the issue now is the fact that when I spawn in the new bow, it comes with 1x arrow which has the new sound cue applied.

However, once I attach new arrows to it, the normal cue plays.

Should be obvious right?

Ugh I clicked the wrong thing and wiped my post haha…

Are you aware that the PrimalItemAmmo_AmmoType actually deletes and respawns a weapon everytime you change ammo types?

PrimalItemAmmo_ArrowTranq
Support Drag Onto Item Class -> PrimalItem_WeaponBow

Ammo Support Drag Onto Weapon Item Weapon Template -> WeapBow_Tranq

What this does, is tell the tranqs they can be dragged onto a weapon template for a primal item, the same that the engram creates… And then delete that weapon and replace it with the other weapon that fires Tranq Arrows, this happens because the ammo has no information of what it does or how it does it, the weapon (the 3d model blueprint class) is where all that information is stored, just like the animations and such.

Thanks for the teampseak session Akukiyo.

In the end I created both a new bow and a new arrow type. Added them to the engram list and cooked the mod correctly :slight_smile:

Mod successful!