From fb4622efdb21ccee714af0e1e8e71146dcc1b8a9 Mon Sep 17 00:00:00 2001 From: D4rkl1ght3r <86805404+D4rkl1ght3r@users.noreply.github.com> Date: Thu, 14 Aug 2025 18:35:11 +0200 Subject: [PATCH] Add Lua Globals --- EXE/REM/Lua/DYNAMIC/config.lua | 27 ++++++++++++++++++++++++++- EXE/REM/Lua/luastart.lua | 12 ++++++++---- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/EXE/REM/Lua/DYNAMIC/config.lua b/EXE/REM/Lua/DYNAMIC/config.lua index 045bae3b..4c49c78f 100644 --- a/EXE/REM/Lua/DYNAMIC/config.lua +++ b/EXE/REM/Lua/DYNAMIC/config.lua @@ -13,7 +13,8 @@ setglobal('gcs_state', "off") setglobal('char_gen', "trent") setglobal('voice_gen', "Trent") -setglobal('anm_id', "MLBODY") +setglobal('dx_gen', "trent") +setglobal('body_gen', "MLBODY") setglobal('anm_gen', "stand") -- MISSIONS Settings @@ -65,6 +66,30 @@ setglobal('li01_city_farplane_gen', "7000") -- farplane = 7000 -- pos = { 59.65879, 56.31464, 97.57275 } +-- Function to create global variables for dx Voice lines +dxsnd = function(snd_id) + local sndvar = "dx_" .. tostring(snd_id) .. "_" .. tostring(dx_gen) + setglobal(snd_id, sndvar) +end + +-- Function to create global variables for dx Voice lines +vdxsnd = function(snd_id) + local sndvar = "dx_" .. tostring(snd_id) .. "_" .. tostring(voice_gen) + setglobal(snd_id, sndvar) +end + +-- Function to create global variables for VoiceProfile lines +vpsnd = function(snd_id) + local sndvar = "VoiceProfile_$BGCS_" .. tostring(voice_gen) .. "_" .. tostring(snd_id) + setglobal(snd_id, sndvar) +end + +-- Function to create global variables for Body lines +scanm = function(anm_id) + local anmvar = "Sc_" .. tostring(body_gen) .. "_" .. tostring(anm_id) + setglobal(anm_id, anmvar) +end + -- This Config File effecting Character Animation References, Planet & Station Enviorments and Mission Cutscenes. -- Files in DATA\SCRIPTS GCS, BASES and EXTRAS using these defined globals. -- Included with dofile('..\\EXE\\REM\\Lua\\DYNAMIC\\config.lua') in .thn scripts. \ No newline at end of file diff --git a/EXE/REM/Lua/luastart.lua b/EXE/REM/Lua/luastart.lua index c174d762..f07d48dc 100644 --- a/EXE/REM/Lua/luastart.lua +++ b/EXE/REM/Lua/luastart.lua @@ -54,13 +54,17 @@ function modifyLuaConfig(filePath) elseif line:find("setglobal%('char_gen',") then lines[i] = "setglobal('char_gen', \"trent\")" - -- Change gcs_voice to "trent" + -- Change voice_gen to "Trent" elseif line:find("setglobal%('voice_gen',") then lines[i] = "setglobal('voice_gen', \"Trent\")" - -- Change gcs_voice to "trent" - elseif line:find("setglobal%('anm_id',") then - lines[i] = "setglobal('anm_id', \"MLBODY\")" + -- Change dx_gen to "trent" + elseif line:find("setglobal%('dx_gen',") then + lines[i] = "setglobal('dx_gen', \"trent\")" + + -- Change body_gen to "MLBODY" + elseif line:find("setglobal%('body_gen',") then + lines[i] = "setglobal('body_gen', \"MLBODY\")" -- Change anm_gen to "stand" elseif line:find("setglobal%('anm_gen',") then