RE-UE4SS icon indicating copy to clipboard operation
RE-UE4SS copied to clipboard

[BUG - Release] Cannot set MapProperty of a UScriptStruct

Open ChloeForSure opened this issue 9 months ago • 1 comments

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

  1. Launch game
  2. Load or start a game on the Oxbow map
  3. Talk to an NPC (this will populate the required objects, and run the code trying to modify it.)
  4. 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.)

ChloeForSure avatar May 03 '24 16:05 ChloeForSure

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.

UE4SS avatar May 03 '24 19:05 UE4SS