Access Transformers problems

I am trying to allow access to FWwiseSoundBankManagerImpl from a mod, and I thought that I added the access transformer correctly, but I keep getting that "Unused friend access transformer" message--what could I be doing wrong? My access transformer config is like this:
[AccessTransformers]
Friend=(Class="WwiseSoundBankManagerImpl", FriendClass="MyModName")
[AccessTransformers]
Friend=(Class="WwiseSoundBankManagerImpl", FriendClass="MyModName")
Where MyModName's class is FMyModName, prefix removed per the instructions in documentation--although I have also tried with the four combinations including FWwiseSoundBankManagerImpl and FMyModName (It is still possible to edit headers to make it work, however)
40 Replies
Mircea
Mircea2mo ago
For Friend you do need the raw c++ class names, including the prefix Were you still getting the unused error when using the full names? Ah FWwiseSoundBankManagerImpl is not an UStruct, so Access Transformers can't reach it What are you trying to achieve?
Sibiren
SibirenOP2mo ago
Well in the end, I am trying to load an external soundbank file (included with the mod), basing work off of an existing mod that does that but in Update 8, I figure it may have changed in the full release
Mircea
Mircea2mo ago
Nothing should have changed, but that mod didn't use access transformers for this same reason Also, soon ™️ (when I'm done with uni assignments) SML will have proper wwise support, so that hook won't be necessary
Sibiren
SibirenOP2mo ago
Oooh okay, nice! At the moment with the header edits, I have the mod built and loading, but actually trying to play a sound is crashing--so that is less great, but I'm not giving up yet. I don't suppose you have any idea why? The soundbank is included in the .pak in Content/WwiseAudio if I unpack it and the event can play sound if I run it in the editor, it just seems not to ever be loaded based on logging (from logging each soundbank name that is loaded in the hook), and crashes on a null reference when playing it
Mircea
Mircea2mo ago
CSS has some patches made to Wwise, so PostEvent and functions like that don't exist at runtime. This is also part of the :soon:
Sibiren
SibirenOP2mo ago
Fair enough, I'll keep trying to see if I can get it to work for this at least. The hooked function is definitely called, but I only see it loading banks like these that are clearly base game
No description
Rex
Rex2mo ago
Have you seen this yet? https://github.com/Th3Fanbus/Th3Tunes https://github.com/Th3Fanbus/Th3Tunes/blob/master/Source/Th3Tunes/Private/Th3Tunes.cpp
/*
* In order for this to compile, a header edit is necessary.
*
* File: Wwise/WwiseSoundBankManagerImpl.h
* Class: FWwiseSoundBankManagerImpl
* Friend: FTh3WwisePatcher
*/
/*
* In order for this to compile, a header edit is necessary.
*
* File: Wwise/WwiseSoundBankManagerImpl.h
* Class: FWwiseSoundBankManagerImpl
* Friend: FTh3WwisePatcher
*/
Sibiren
SibirenOP2mo ago
Yes, I had, thank you for checking though--and that is what I'm currently doing, it was just surprising that Access Transformers would not work
Sibiren
SibirenOP2mo ago
I wonder if this might be the source of this trouble
No description
Sibiren
SibirenOP2mo ago
in which case one could imagine the solution of replicating all the base soundbanks in a library along with the project used to create it, that modders could then use to generate soundbanks--or something like that
Rex
Rex2mo ago
I'm not sure what trouble you're referring to
Sibiren
SibirenOP2mo ago
That everything seems to be set up correctly, but the hooked function never runs for the Play_ event for this sound, and then on trying to play it an exception is thrown on a nullptr
Rex
Rex2mo ago
:thistbh:
Sibiren
SibirenOP2mo ago
Well it is called for the base game sounds, so is it wrong to be a little skeptical of that? I'm hooking other functions along the line to see where it does get and with what data
Rex
Rex2mo ago
How do you play the sound? Which exception do you get? (with callstack) Do you have a full log?
Sibiren
SibirenOP2mo ago
Through the boombox, so right now I'm at the point of the tape change function--hang on, I'll grab a fresh one I can send my version of your code too, if that helps, I haven't added much though--mostly just logging and updating SML, besides the assets for the tape I'm adding
Rex
Rex2mo ago
Okay. For now I'd like a log, then I'll see if I need the code
Sibiren
SibirenOP2mo ago
For sure, I appreciate your help
Rex
Rex2mo ago
Okay, it's crashing in the boombox code :thistbh:
Sibiren
SibirenOP2mo ago
sure, I can get that too
Rex
Rex2mo ago
What is your sound(bank) called?
Sibiren
SibirenOP2mo ago
not the actual name (because it is for something I'm keeping secret until it's time) but all references in that log are changed to ANONYMIZED
Rex
Rex2mo ago
Something seems to be invalid in there
[2024.10.20-11.52.29:753][ 42]LogTh3TunesCpp: Warning: Th3Tunes BeginChangeTapeSequence hook for tape at 汀鄆翻.
[2024.10.20-11.52.29:756][ 42]LogTh3TunesCpp: Warning: Th3Tunes 汀鄆翻 is ANONYMIZED.
[2024.10.20-11.52.29:756][ 42]LogBlueprintUserMessages: [BPW_BoomBox_TapeButton_C_2147444656] ANONYMIZED
[2024.10.20-11.52.30:959][ 98]LogBlueprintUserMessages: [BPW_BoomBox_TapeButton_C_2147444656] ANONYMIZED
[2024.10.20-11.52.29:753][ 42]LogTh3TunesCpp: Warning: Th3Tunes BeginChangeTapeSequence hook for tape at 汀鄆翻.
[2024.10.20-11.52.29:756][ 42]LogTh3TunesCpp: Warning: Th3Tunes 汀鄆翻 is ANONYMIZED.
[2024.10.20-11.52.29:756][ 42]LogBlueprintUserMessages: [BPW_BoomBox_TapeButton_C_2147444656] ANONYMIZED
[2024.10.20-11.52.30:959][ 98]LogBlueprintUserMessages: [BPW_BoomBox_TapeButton_C_2147444656] ANONYMIZED
Sibiren
SibirenOP2mo ago
I'm logging a pointer directly there, it is fine
Rex
Rex2mo ago
Why? If it's a UObject, use GetName
Sibiren
SibirenOP2mo ago
I was figuring out how to work with the CDO, it was just part of discovering it
Rex
Rex2mo ago
What I mean is that I don't see your soundbank getting remapped anywhere
Sibiren
SibirenOP2mo ago
since it didn't work how I originally intuited, I wanted to make sure that it had some kind of value
Rex
Rex2mo ago
So if you added any custom sounds through Wwise, they're not there for some reason
Sibiren
SibirenOP2mo ago
yeah, that is the problem, but my tape asset does reference an event that can play it in the editor and my mod packages the soundbank, so that is what I'm trying to find out now--why it doesn't load and how to get it to
Rex
Rex2mo ago
What is your soundbank named? Does it get processed by the hook in my code? I couldn't even find an error about failing to find a soundbank https://github.com/Th3Fanbus/Th3Tunes/blob/master/Source/Th3Tunes/Private/Th3Tunes.cpp#L27 Mods MUST name their sound banks `Mod_MODREFERENCE.bnk` for them to be remapped properly
Sibiren
SibirenOP2mo ago
it is named Mod_Th3Tunes_ANONYMIZED.bnk, the mod reference is Th3Tunes_ANONYMIZED from that logging I can tell that CreateOp is never called, it isn't missing the prefix-suffix condition
Rex
Rex2mo ago
Okay, then it's not packaged for some reason. Could you please confirm by looking into the mod's pak files using FModel?
Sibiren
SibirenOP2mo ago
I unpacked with UnrealPak and it is included there at least, in Content/WwiseAudio
Rex
Rex2mo ago
Interesting, so it's not getting loaded it seems
Sibiren
SibirenOP2mo ago
this is why I got suspicious about that note about the initialization bank, but then again that may have been one of those things that CSS patched so it may not be relevant. Either way, it seemed to me like the next step was to hook the rest of that call chain and see what happens in those
Rex
Rex2mo ago
The things being patched happen much later If you try using "Post Event" in the game, it'll crash because the function doesn't exist
Sibiren
SibirenOP2mo ago
That seems convenient and intuitive 😁 I had heard that, but yeah I don't think it's relevant to this What I see so far is that UFGTapeData::GetSongs() for that tape does return elements, but the first one at least is null, and it's the same story looking at the tape CDO at mPlaylist, it has the song name but a nullptr at Song None of my intellisense is working yet, I didn't originally think I would be digging in this much to it so it didn't seem important but... it's slowing things down at this point, I'm gonna fix that lol It was not worth it to attempt that--the problem here was that my tape pointed to the original event file and not to the one included in my mod--I'm glad I was just being dumb and that this is still possible original meaning like the one the Wwise extension created, don't be like me if you're reading this sometime from the future lol good news for you @Rex [they/them] is that your mod still works just fine, it only needs the SML update
Rex
Rex2mo ago
I thought as much but I know there's a better way to go about this (fix the paths when packaging the mod)
Want results from more Discord servers?
Add your server