Event renaming issue

Hi there,

I’m having an issue with renaming of event while building (or unpacking?) banks. In our weapon system several audio instances (such as gunshots, reloading, handling) are named similarly for different types of guns with upper case, ie ‘event:/guns/pistol/imi_desert_eagle/ShotSubS’ (or …/BoltOpen, or …/TriggerPull, etc). Yes, I understand that the upper case is not the best idea and we plan to rename all the events properly (like “shot_sup_s” instead of ShotSubS), however everything worked fine until we missed one audio event (“the sound ‘guns/launch/gp_25/ShotSupS’ not found”). It appeared that the FMOD/API/engine (or something else?) somehow renamed it to guns/launch/gp_25/shotSupS with the lower case letter “s”, so the event with lower “s” could be played and the one with the upper “s” is missed. The FMOD version is 2.01.07, the API version is 2.01.05. May the difference in versions of API and Studio be the cause of missing /renaming event? Or there is another problem?

This could be due to a discrepancy between the project and the built banks. The FMOD Studio API is not case sensitive when it comes to event paths, so it is possible that the event has not been assigned and built into the banks.

Thanks for reply! Actually, the event was named as I wrote before, with the upper case letter. And I intentionally re-created the event with the same name, however, it caused the same issue.

I’ve tried to recreate the issue on my machine but no such luck. Naming and renaming events guns/launch/gp_25/ShotSupS, guns/launch/gp_25/shotSupS, and guns/launch/gp_25/shot_sup_s are all found by the system.

Can you confirm you are building the banks after the change, that no errors are being printed to the console (Window > Console > Logging) when building, and that those banks are correctly placed in the directory FMOD is loading banks from?

Yes, I’ve built the banks after every change and the banks are placed in the same directory as the project itself and the folder with all source audio files. The main problem is that I named the event guns/launch/gp_25/ShotSupS within FMOD project but after building the banks this event was somehow renamed toguns/launch/gp_25/shotSupS and can’t be found by the engine.

I’ve been trying to reproduce this issue but not having much luck. Are you able to share your project with me? You can export the project via File > Package Project. You don’t need to include the assets and you can share with me via DM for privacy reasons.

Sent you DM

Thanks for sending your project over.

The issue is a rare but difficult issue to fix. The issue is due to the internal data structure used to minimize memory usage. Without getting overly technical, there are instances where events starting with the same character but different casing (eg. ShotSupS and sight_assembly_click) can cause a discrepancy between the project and built banks.

Please change the event sight_assembly_click to Sight_assembly_click and you should see the event renaming issue go away.

1 Like

Thanks, Richard! That has solved the problem!

Hi,

I have the similar issue but with another event - the name within FMOD is event:/guns/pistol/nagant_revolver/RoundHandToGun,
but after building banks its name has been changed to event:/guns/pistol/nagant_revolver/roundHandToGun (the first letter in the word “round” became in lower case). Is there some universal solution of this problem?
Best regards

This is a minor known issue with how FMOD Studio stores strings internally to implement fast case-insensitive path lookup. There’s no universal solution, and implementing a fix would require switching to an entirely different internal data structure. However, this issue should be mostly cosmetic, as all “get” functions in FMOD are case-insensitive - looking up objects by string should work fine even if the case of a string has changed.

If you’re manipulating strings from FMOD Studio (i.e. event paths) in some way that is causing issues, for example generating hash-values from the strings, and therefore ending up with different has values, lowercasing the strings beforehand should solve your problem.

Hope that helps!

Thanks for reply, Louis. Yes, we plan to switch all the names of events to lower case in the closest future, however now our game engine operates with strict order of upper/lower cases in paths, hence if after (or during?) unpacking banks FMOD somehow changes the case of at least one letter in the path, the engine does not recognise it and “sound not found” error appears.

To give a little more info, the internal data structure that is used to store strings is a radix tree. The change of case is caused when the radix tree reaches a point in the tree where it compares the same character with two different cases, where instead of branching by case it defaults to one of the cases.

So, for example, if alongside your event

event:/guns/pistol/nagant_revolver/RoundHandToGun

you have another event called

event:/guns/pistol/nagant_revolver/roundEject

the case-insensitivity of the tree would cause it not to branch when reaching the first letter of “round”, thereby causing your problem.

As a simple workaround in lieu of changing how your engine operates - any change to the overall string that in turn causes the comparison between the same character with two different cases to no longer happen should solve this issue. Running with my previous example, this could potentially be done by:

  1. Adding a prefix to the name of an event that is causing the issue:
    • event:/guns/pistol/nagant_revolver/RoundHandToGun
    • event:/guns/pistol/nagant_revolver/_roundEject
  2. Putting an event that is causing the issue in a new folder:
    • event:/guns/pistol/nagant_revolver/RoundHandToGun
    • event:/guns/pistol/nagant_revolver/newfolder/roundEject

If you don’t have another event alongside event:/guns/pistol/nagant_revolver/RoundHandToGun that would be causing this issue, could you upload a screenshot the relevant events and folders in FMOD Studio’s event browser, if possible?

1 Like

Thanks for detailed explanation, Louis! You are right. Looks like the case issue was caused by another event in the same folder, which name was started from the same letter “R”, but in lower case (it’s highlighted in enclosed picture). Changing its name to “Reload_extraction” has solved the renaming problem, and …/RoundHandToGun event is now seen by engine as it should be. Very grateful for your help!

Screenshot 2022-12-19 at 17.05.04

1 Like