I slightly modified the Register Commands script to dump all possible console commands to a file (in your table's folder), since i didn't find any comprehensive list of available commands online. And specifically something that included the possible / neccessary parameters and arguments for the game's console commands.
This relies on having the "Console Commands" script active, and like "Register Commands" it only works when you've loaded a save.
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>9999</ID>
<Description>"Dump Commands List"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
local commands = readPointer("cmdList")
if not commands or commands == 0 then
print("please load a saved game first")
assert(false,"can't activate yet")
return
end
local size = readInteger(commands + 0x2C)
if size <= 0 then
print("please load a saved game first")
assert(false,"can't activate yet")
return
elseif size > 3000 then
size = 3000 -- just in case
end
commands = readPointer(commands + 0x20)
if not commands or commands == 0 then
print("please load a saved game first")
assert(false,"can't activate yet")
return
end
local paramtypes = {
"int",
nil,
"float",
"strVar",
"strObj",
"strChar",
"strItem"
}
local COMMAND_LIST = "Index;Command Name\n"
--local COMMAND_LIST2 = "Index;Table Address;Cmd Address;Name;# of Arguments\n"
for i = 1, size do
local addr = readPointer(commands)
if addr and addr ~= 0 then
local name = readPointer(addr + 0x08)
if name and name ~= 0 then
name = readString(name, 256, false)
if type(name) == "string" then
local self = readPointer(addr + 0x40)
local faddr = readPointer(addr + 0x48)
local numParam = readInteger(addr + 0x18)
local argtable = readPointer(addr + 0x10)
local cmdargs = ""
for j = 1, numParam do
local argcur = (j - 1) * 0x10 + argtable
local argname = readPointer(argcur)
local argtype = readInteger(argcur + 0x08)
local isResult = readInteger(argcur + 0x0C)
argtype = paramtypes[argtype] or "type"..tostring(argtype)
if isResult ~= 1 then cmdargs = cmdargs.."-> " end
cmdargs = cmdargs..argtype.." "..readString(argname, 256, false)
if j ~= numParam then cmdargs = cmdargs..", " end
end
COMMAND_LIST = COMMAND_LIST..string.format("%d;%s ( %s )\n", i, name, cmdargs)
-- COMMAND_LIST2 = COMMAND_LIST2..string.format("%d;%X;%X;%s;%d\n", i, commands, addr, name, numParam)
end
end
end
commands = commands + 0x08
end
--print(COMMAND_LIST)
local file = io.output('bg3_commandslist.csv')
io.write(COMMAND_LIST)
io.close(file)
{$asm}
[DISABLE]
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatTable>
Will end up as "bg3_commandslist.csv" at your table's location.
edit: i noted a few common parameter types, most of them are strings of some kind noted with "str" in the prefix, most of them are denoted by "typeXX" though, check the parameter name to find out what type it is.
Also, result parameters are denoted by a -> arrow. Like this: IntegerSum ( int A, int B, -> int Sum )
This has 3 arguments, the first and second are what you wanna add up, and the result ends up in argument 3
For the LUA Console Command list I was using the "story_header.div" file that came with the scripts during data extraction. That was a text file listing all the commands with more details for the parameters. For some unknown reason (to me) I cannot find it back when extracting the data file ... I still have a local copy of it but I have found another source for all these functions here:
[Link] ... have a look there!
for example this function that I use in my scripts for cleanly spawning items "nearby":
---@param sourceX number
---@param sourceY number
---@param sourceZ number
---@param radius number
---@param object GUIDSTRING
---@param avoidDangerousSurfaces integer
---@return number validPositionX
---@return number validPositionY
---@return number validPositionZ
function Osi.FindValidPosition(sourceX, sourceY, sourceZ, radius, object, avoidDangerousSurfaces) end
Hi
I'm front of nightsong, but shadowheart is not with me ( she died act 1, not in my party ). And i would like to kill nightsong, but i cant without shadowheart. i've try to spawn her with CE script, but without succes.
Can someone help me ? please
Does adding any of these tags to your character allow the dialog to trigger?
Hi,
I have found the quest and the corresponding "MapKey"'s. You have tried the "TemplateName" which are, as the name says, the template on which the object is based. The MapKey is the UUID you have to use to spawn the object.
Unfortunately, I could not spawn any of these items. I suspect that this is because I don't have that quest yet in my save.
May be you will have more luck with these?
Here are the Object's internal Names and Mapkeys:
I did find that last UUID for the book 'Funerary Jar Form and Function' aka CarrionJarDiagrams, but it failed to spawn for me as well. I tried all of those UUIDs and none of them worked, unfortunately. :/ (I mean, I *could* just kill Thrumbo but that seems rude.)
I think it must be because the item spawn script might actually be a template spawn script and then, because most 'templates' are just the items themselves, it spawns correctly? But because these specific ones are something on top of a template, they only spawn the template item?
For example, Elixir of Heroism has a UUID from it's TemplateID that is "bb27cc17-5af9-4d53-818b-3e620f3f59f2", which successfully spawns an Elixir of Heroism, but doesn't have any other UUID associated with it. (And the the script is called TemplateAddToPlayer so. Who knows.)
You could try setting/removing some of the related flags, to see if you can get the item to spawn afterwards, or in other ways progress the quest.
As for the TemplateName attribute in the file Patch1\Mods\GustavDev\Levels\CTY_Main_A\Items\_merged.lsf.lsx (the file containing the item in question), that simply references the template of "Stained Book". So I would assume this is just the same as ParentTemplateId in the actual RootTemplates files. It's just "inheriting" the referenced template, and then adding the differences on top of that.
Hi,
maybe some of you can help me. I tried to spawn Items. I used the Register Command: "Various Gear Sets" and picked one Set for example "Mobilty Set" then i right clicked and pressed "Change Script". Then i changed at GenerateTreasureBag the Item. I found the Item ID in the Internet but somehow the bag spawns but there is no Item inside of it. What am i doing wrong?
Hi,
maybe some of you can help me. I tried to spawn Items. I used the Register Command: "Various Gear Sets" and picked one Set for example "Mobilty Set" then i right clicked and pressed "Change Script". Then i changed at GenerateTreasureBag the Item. I found the Item ID in the Internet but somehow the bag spawns but there is no Item inside of it. What am i doing wrong?
If you are just trying to spawn items, why dont you change the crossbow+2 script? e.g.:
Gale is bugged with dialogue from mid-Act 2 persisting even into Act 3 (he has the option to ask him about whether the Nightsong could save him, but we've already rescued Nightsong, and the dialogue option won't go away). Is there any way to use CE to get rid of whatever flag is causing this dialogue to appear for him?
After using the force level up on save game I leveled up my characters 1 level. After saving the game, disabling the scrip and restarting game, the level up option went away as it should. The problem is, if i reclass a character, the extra levels go away. Is this normal and I just have to re-do the cheat every time I reclass?
Last edited by hustler3976 on Wed Sep 20, 2023 9:52 pm, edited 4 times in total.
Hi
I'm front of nightsong, but shadowheart is not with me ( she died act 1, not in my party ). And i would like to kill nightsong, but i cant without shadowheart. i've try to spawn her with CE script, but without succes.
Can someone help me ? please
Does adding any of these tags to your character allow the dialog to trigger?
Hi
I'm front of nightsong, but shadowheart is not with me ( she died act 1, not in my party ). And i would like to kill nightsong, but i cant without shadowheart. i've try to spawn her with CE script, but without succes.
Can someone help me ? please
Does adding any of these tags to your character allow the dialog to trigger?
Hello people, after a few test with older BG3commander, i finally got it to work, i had an issue i wanted to fix, i'm playing in coop as astarion and didn't get the bite, i managed to add it but can't help but wonder if there is other issue with vampire related flag.
Is there any way for me to check what flag are activated on a save (i intend to compare vampire related flag between an astarion companion and avatar astarion), what are the 'really' origin flag ?
I'm trying to add the telekinesis effect (Cast telekinesis once per short rest) and I've attempted to add the spell via the add Fireball spell section substituting the fireballs for Throw_MAG_Throw_Githborn_Telekinesis but I'm unable to select the checkbox to execute. Is there supposed to be a different function for this? I've tried testing it as a passive, but that just results in an outright game crash.
"MAG_Githborn_MageHandSupport_Gloves";"Hr'a'cknir Bracers";"The planar silver cladding of these forearm bracers allows the wielder to channel the latent astral energies floating in the Weave.";"4be77d67-2310-44fc-bdaf-81cffb411467";"Armor";"_Hand_Magic_Metal";"_Hand_Magic_Metal";"Gloves";"VeryRare";;;;;"RollBonus(SavingThrow, 1, Strength);UnlockSpell(Throw_MAG_Throw_Githborn_Telekinesis)";;;"MAG_Githborn_MageHandSupport_Gloves_Passive";;;;
Has anyone figured out how to cancel combat or make a character disengage from combat due to bugs/mods? There was once a mod that did that but I am not sure it can work again. It had a script file in it like this:
INIT
CHARACTER:%PeaceSource = null
EXTERN SPELL:%Spell=Shout_Make_Peace
EVENTS
EVENT OnEnterCombat
ON
OnEnteredCombat(_Char,_)
ACTIONS
IterateParty("AddMakePeace")
EVENT AllCharactersAddPeace
VARS
CHARACTER:_Char
ON
OnIterateCharacter(_Char,"AddMakePeace")
ACTIONS
CharacterAddSpell(_Char,%Spell, 1)
EVENT SourceMakePeace
VARS
CHARACTER:_Character
LIST<STATUS>:_RemoveList
STATUS:_Result
ITEM:_Item
ON
FetchCharacterApplyStatusData(_Character, MAKE_PEACE)
ACTIONS
Set(%PeaceSource,_Character)
IterateCharactersInCombat(_Character,"MakePeace")
Set(_Result,MAKE_PEACE)
RETURN(_RemoveList,_Result,null)
EVENT AllEnemiesMakePeace
VARS
CHARACTER:_Char
ON
OnIterateCharacter(_Char,"MakePeace")
ACTIONS
MakePeace(%PeaceSource,_Char,1)
LeaveCombat(_Char)
and I am wondering if something like this could just be added to CE