RE-UE4SS
RE-UE4SS copied to clipboard
[BUG - Release] Cannot set MapProperty of a UScriptStruct
Branch or Release v3.0.1
Game and Engine Version Medieval Dynasty - UE 4.27
Describe the bug When trying to access a MapProperty of a UScriptStruct, UE4SS throws a lua error "Tried accessing unreal property without a registered handler (via StructProperty). Property type 'MapProperty' not supported". Getting the value can be circumvent by using the ForEachProperty(function callback) function, but cannot set values that way.
Mods directory Mods.zip
To Reproduce
- Launch game
- Load or start a game on the Oxbow map
- Talk to an NPC (this will populate the required objects, and run the code trying to modify it.)
- See error in console
Expected behavior On line 62, the MapProperty of PST.PM_Texts[1] should be overwriten to the previously acquired masctext MapProperty.
Desktop (please complete the following information):
- OS: Win11
Additional context The relevant code is in Testmod, line 40 to 63 in main.lua (Also code contains some mature words due to the game calling NPCs genders a different name.)
We don't currently support MapProperty (aka TMap) in Lua at the moment. TSet has recently been implemented in C++ which TMap requires so hopefully we'll get proper support for TMap eventually. Thank you for creating this issue, it helps a lot.