So Here is a script for making waypoints from triggers that are for waypoints.... the remove function does not seem to work for me yet butg this will name it what ever you make it and you can even use the debug triggers like this one.
(in triggers mapkey is the uuid of the trigger)
"
Mods\GustavDev\Globals\SCL_Main_A\Triggers\_merged.lsj"
Code: Select all
{
"Flag": {
"type": 4,
"value": 1
},
"IsGlobal": {
"type": 19,
"value": true
},
"LevelName": {
"type": 22,
"value": "SCL_Main_A"
},
"MapKey": {
"type": 22,
"value": "02e38877-fa79-45a1-96d7-040fb518ed09"
},
"Name": {
"type": 23,
"value": "S_Debug_MOO_Roof"
},
"TemplateName": {
"type": 22,
"value": "15111ce4-12fc-4757-bb81-7c2c212e141a"
},
"Type": {
"type": 22,
"value": "trigger"
},
"_OriginalFileVersion_": {
"type": 32,
"value": 144115205255725558
},
"FadeChildren": [
{}
],
"LayerList": [
{
"Layers": [
{
"Object": [
{
"MapKey": {
"type": 22,
"value": "SCL_Main_A"
},
"Layer": [
{
"Object": {
"type": 31,
"value": "12e040c1-6fbe-f0a9-81bf-5f283aff575b"
}
},
{
"Object": {
"type": 31,
"value": "4b0e131d-2ca2-0594-a451-05c78f51393f"
}
}
]
}
]
}
]
}
],
"Transform": [
{
"Position": {
"type": 12,
"value": "-157.0633 69.28051 -213.4454"
},
"RotationQuat": {
"type": 13,
"value": "0 -0.690284 0 0.7235386"
},
"Scale": {
"type": 6,
"value": 1.0
}
}
]
},
So the name is a string of your choice (value) and the truggert is a UUID... In BG3 you need a UUID to instance a ref of a object / class. so say the function needs a Trigger... vs a TriggerID. Trigger ius a uuid. ID is a name in the tables. and finally TriiggerName would be a string that is new that makes it like its id once its created.
thats what i have learned so far.
heres the script..
it has to go under console commands subsection so its registered etc.
Code: Select all
[ENABLE]
{$lua}
if syntaxcheck then return end
local value = "S_Debug_MOO_Roof" -- you can name it anything
local trigger = "02e38877-fa79-45a1-96d7-040fb518ed09"
local cmdCall = getAddress("cmdCall")
local cmdArgs = getAddress("cmdArgs")
local cmdStr1 = getAddress("cmdStr1")
local cmdStr2 = getAddress("cmdStr2")
local cmdStr3 = getAddress("cmdStr3")
PrepareCall("GetHostCharacter")
executeCodeEx(0, nil, cmdCall)
local player = readPointer(cmdArgs + 0x08)
player = readString(player, 256, false)
writeString(cmdStr1, player)
writeBytes(cmdStr1 + #player, 0)
writeString(cmdStr2, value)
writeBytes(cmdStr2 + #value, 0)
writeString(cmdStr3, trigger)
writeBytes(cmdStr3 + #trigger, 0)
PrepareCall("UnlockWaypoint")
writePointer(cmdArgs + 0x08, cmdStr2)
writePointer(cmdArgs + 0x18, cmdStr3)
writePointer(cmdArgs + 0x28, cmdStr1)
local result = executeCodeEx(0, nil, cmdCall)
if result ~= 1 then
print("command failed")
end
{$asm}
assert(true)
[DISABLE]