Add Lua Globals

This commit is contained in:
D4rkl1ght3r
2025-08-14 18:35:11 +02:00
parent 09896b3386
commit fb4622efdb
2 changed files with 34 additions and 5 deletions

View File

@@ -13,7 +13,8 @@ setglobal('gcs_state', "off")
setglobal('char_gen', "trent") setglobal('char_gen', "trent")
setglobal('voice_gen', "Trent") setglobal('voice_gen', "Trent")
setglobal('anm_id', "MLBODY") setglobal('dx_gen', "trent")
setglobal('body_gen', "MLBODY")
setglobal('anm_gen', "stand") setglobal('anm_gen', "stand")
-- MISSIONS Settings -- MISSIONS Settings
@@ -65,6 +66,30 @@ setglobal('li01_city_farplane_gen', "7000")
-- farplane = 7000 -- farplane = 7000
-- pos = { 59.65879, 56.31464, 97.57275 } -- 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. -- 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. -- Files in DATA\SCRIPTS GCS, BASES and EXTRAS using these defined globals.
-- Included with dofile('..\\EXE\\REM\\Lua\\DYNAMIC\\config.lua') in .thn scripts. -- Included with dofile('..\\EXE\\REM\\Lua\\DYNAMIC\\config.lua') in .thn scripts.

View File

@@ -54,13 +54,17 @@ function modifyLuaConfig(filePath)
elseif line:find("setglobal%('char_gen',") then elseif line:find("setglobal%('char_gen',") then
lines[i] = "setglobal('char_gen', \"trent\")" lines[i] = "setglobal('char_gen', \"trent\")"
-- Change gcs_voice to "trent" -- Change voice_gen to "Trent"
elseif line:find("setglobal%('voice_gen',") then elseif line:find("setglobal%('voice_gen',") then
lines[i] = "setglobal('voice_gen', \"Trent\")" lines[i] = "setglobal('voice_gen', \"Trent\")"
-- Change gcs_voice to "trent" -- Change dx_gen to "trent"
elseif line:find("setglobal%('anm_id',") then elseif line:find("setglobal%('dx_gen',") then
lines[i] = "setglobal('anm_id', \"MLBODY\")" 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" -- Change anm_gen to "stand"
elseif line:find("setglobal%('anm_gen',") then elseif line:find("setglobal%('anm_gen',") then