UE4SS-RE / RE-UE4SS

Injectable LUA scripting system, SDK generator, live property editor and other dumping utilities for UE4/5 games
http://docs.ue4ss.com/
MIT License
1.26k stars 165 forks source link

[Feature] BP modding logs should include mod name at start of each line #353

Open Buckminsterfullerene02 opened 7 months ago

Buckminsterfullerene02 commented 7 months ago

When looking at user submitted logs, where a user is running multiple lua mods, it's impossible to tell which log is coming from which mod.

For example, take the extract from a log file from another issue:

[Lua] [Better Riding Ground Mounts] Max angle of obstacle climible by ground mount set to 70
[Lua] [Better Sell Rates] Sell Item Rate set to 0.2
[Lua] [Better Sell Rates] Sell Pal Rate set to 0.1
[Lua] [Better Shields] Delay before shield recovery set to 15.0
[Lua] [Better Shields] Speed of shield recovery set to 30
[Lua] [Max Level Increased] Character Max Level set to 60
[Lua] [Max Level Increased] Guild Character Max Level set to 60
[Lua] Loading mod: DekResetStats_P
[Lua] Loading mod: PalAnalyzer
[Lua] Loading mod: progressiveBases_P
[Lua] Loading mod: StorageIntergration
[Lua] Loading mod: OreCrusher_P
[Lua] PostBeginPlay not valid
[Lua] PostBeginPlay not valid
[Lua] PostBeginPlay not valid
[Lua] PostBeginPlay not valid
[Lua] PostBeginPlay not valid
[Lua] Actor: ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482200
[Lua] PreBeginPlay not valid
[Lua] Executing 'PostBeginPlay' for mod 'ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482199'
[Lua] Executing 'PostBeginPlay' for mod 'ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482199'
[Lua] Executing 'PostBeginPlay' for mod 'ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482199'
[Lua] Executing 'PostBeginPlay' for mod 'ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482199'
[Lua] Executing 'PostBeginPlay' for mod 'ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482199'
[Lua] Actor: ModActor_C /Game/Pal/Maps/Login/PL_Login.PL_Login:PersistentLevel.ModActor_C_2147482199
[Lua] PreBeginPlay not valid

Since all BP mods require the same ModActor name for loading, that name is always referenced which makes it impossible to tell which is which. I think the future plan is to add support for BP mods to not require the name ModActor, but that's still a meh solution.

And currently we don't know exactly which mod is producing certain output, like in this part:

[Lua] [Better Riding Ground Mounts] Max angle of obstacle climible by ground mount set to 70

Is that a Lua mod making that output, or is it a BP mod? Since BP mods use BPModLoader Lua mod, it is still pre-appended by [Lua] so it's kind of impossible to tell.

I propose that the logging should prefix [BP mod name] before each related log. For example (I don't actually know which mod is making that first line, I am guessing):

[Lua] [progressiveBases_P][Better Riding Ground Mounts] Max angle of obstacle climible by ground mount set to 70
[Lua] [DekResetStats_P] PostBeginPlay not valid
[Lua] [PalAnalyzer] PostBeginPlay not valid
[Lua] [progressiveBases_P] PostBeginPlay not valid
[Lua] [StorageIntergration] PostBeginPlay not valid
[Lua] [OreCrusher_P] PostBeginPlay not valid
UE4SS commented 7 months ago

This is a good point. I will look into it.

UE4SS commented 7 months ago

This is somewhat taken care of by #360 It's obviously still not ideal but it's better for the most common errors.