Page 283 of 465

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 7:55 am
by zurls
Invertex wrote:
Fri Aug 18, 2023 1:06 pm
zurls wrote:
Thu Aug 17, 2023 6:42 pm
Invertex wrote:
Thu Aug 17, 2023 6:18 am
Anyone know of a code that would change the character's genitals? I fucked up and didn't realize until I'd already sunk a lot of time into the playthrough.

Using the option to run character creator again doesn't seem like a solution, since it ends up creating a whole 5th character that's somehow part of your party lmao
There are any number of mods that change genitals in any number of ways on N e xus
Huh? There are no such mods on there... And I'm not talking about just changing it visually. I'm talking about going from one genital TYPE to another, which means changing multiple flags on the character, as it alters the animations that would be used for sex scenes.

The closest thing is "Appearance Edit LITE", which does not have options for genitals yet.
Not sure where you've been looking, but I'm using a mod called Better Penises and my character is VERY, VERY proud.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 8:37 am
by karamethien
Anyone know the passive id for Warlocks' level 12 ability Lifedrinker? the one that adds necro damage to melee? I can't seem to find a feat list online.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 9:07 am
by xylcro
PeDaGaNG wrote:
Sat Aug 26, 2023 9:03 pm
xylcro wrote:
Sat Aug 26, 2023 7:41 pm
How do I use Game Flags? I want to change Shadowheart's hair since I have that bug where it doesn't change if you don't talk to Nightsong before you enter Act III. I found this in the game flags but don't know where to enter it.

Code: Select all

"8be2b10c-aedd-4290-bd84-0d5803deb86e", --ORI_Shadowheart_Event_NightsongFate_ChangeAppearance 
Not sure that the right UUID to change the hair. Restarting my game with patch 1.1 but here SetFlag Code:

Code: Select all

{$lua}
if syntaxcheck then return end
flag = "8be2b10c-aedd-4290-bd84-0d5803deb86e", --ORI_Shadowheart_Event_NightsongFate_ChangeAppearance
[ENABLE]
SetFlagOnPlayer(flag)
[DISABLE]
Was indeed not the right UUID. I did found the right one though if anyone has the same bug and want the white hair.
Set this UUID as a flag when you are in camp, long rest and then talk to Shadowheart.

Code: Select all

"396b3e23-b789-4380-b002-a0d754efc026", --Shadowheart_InParty_State_PreparingHairChange 

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 9:10 am
by TescoBag
unREAL wrote:
Sat Aug 26, 2023 4:33 pm
Nick8472 wrote:
Sat Aug 26, 2023 4:24 pm

I scrolled and found what you posted but when I copy and paste it says:

Not all code is injectable

Are you sure you want to edit it to this?

Then nothing!

Oh I made a typo .. Im sorry :mellow:

okay to make it easier for everyone, here is the complete code:

Code: Select all

[ENABLE]
{$lua}
if syntaxcheck then return end
local commands = readPointer("cmdList")
if commands == 0 then
  print("plaese load a saved game first")
  return
end
local size = readInteger(commands + 0x2C)
if size <= 0 then
  print("please load a saved game first")
  return
elseif size > 3000 then
  size = 3000 -- just in case
end
commands = readPointer(commands + 0x20)
COMMAND_SELF = {}
for i = 1, size do
  local addr = readPointer(commands)
  if addr > 0 then
    local name = readPointer(addr + 0x08)
    name = readString(name, 256, false)
    local self = readPointer(addr + 0x40)
    addr = readPointer(addr + 0x48)
    COMMAND_SELF[name] = self
    if addr > 0x1000 then
      unregisterSymbol(name)
      registerSymbol(name, addr, true)
    end
  end
  commands = commands + 0x08
end

function PrepareCall(name)
  local cmdAddr = getAddress("cmdAddr")
  local cmdSelf = getAddress("cmdSelf")
  local cmd = getAddress(name)
  writePointer(cmdAddr, cmd)
  writePointer(cmdSelf, COMMAND_SELF[name])
end

function ExecuteCall(FuncName)
  local cmdAddr = getAddress("cmdAddr")
  local cmdSelf = getAddress("cmdSelf")
  local cmdCall = getAddress("cmdCall")
  local cmd = getAddress(FuncName)
  writePointer(cmdAddr, cmd)
  writePointer(cmdSelf, COMMAND_SELF[FuncName])
  return executeCodeEx(0, nil, cmdCall)
end

function GetArgAt(i)
  return getAddress("cmdArgs") + 0x10 * i + 0x08
end

function GetStringAt(i)
  return getAddress("cmdStr"..i)
end

function ClearArg(i)
  SetArgToLong(i, 0)
end

function GetArgAsInteger(i)
  local arg = GetArgAt(i)
  return readInteger(arg)
end

function SetArgToInteger(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writeQword(arg, value)
end

function GetArgAsLong(i)
  local arg = GetArgAt(i)
  return readQword(arg)
end

function SetArgToLong(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writeQword(arg, value)
end

function GetArgAsFloat(i)
  local arg = GetArgAt(i)
  return readFloat(arg)
end

function SetArgToFloat(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writeFloat(arg, value)
end

function SetArgToPointer(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writePointer(arg, value)
end

function GetArgAsString(i)
  local arg = GetArgAt(i)
  local value = readPointer(arg)
  if value and value > 0 then
    return readString(value, 256, false)
  end
  return nil
end

function SetArgToString(i, value)
  local str = GetStringAt(i)
  writeString(str, value)
  writeBytes(str + #value, 0)
  SetArgToPointer(i, str)
end

function GetHostCharacter()
  ClearArg(0)
  ExecuteCall("GetHostCharacter")
  return GetArgAsString(0)
end

function AddPassive(Entity, PassiveID)
  SetArgToString(0, Entity)
  if type(PassiveID) == "table" then
    for i = 1, #PassiveID do
      SetArgToString(1, PassiveID[i])
      ExecuteCall("AddPassive")
    end
  else
    SetArgToString(1, PassiveID)
    return ExecuteCall("AddPassive")
  end
end

function AddPassiveToPlayer(PassiveID)
  local player = GetHostCharacter()
  return AddPassive(player, PassiveID)
end

function AddPassiveToWeapon(PassiveID)
  local item = GetEquippedWeapon()
  return AddPassive(item, PassiveID)
end

function RemovePassive(Entity, PassiveID)
  SetArgToString(0, Entity)
  if type(PassiveID) == "table" then
    for i = 1, #PassiveID do
      local value = PassiveID[i]
      SetArgToString(1, value)
      ExecuteCall("RemovePassive")
    end
  else
    SetArgToString(1, PassiveID)
    return ExecuteCall("RemovePassive")
  end
end

function RemovePassiveFromPlayer(PassiveID)
  local player = GetHostCharacter()
  return RemovePassive(player, PassiveID)
end

function RemovePassiveFromWeapon(PassiveID)
  local item = GetEquippedWeapon()
  return RemovePassive(item, PassiveID)
end

function AddBoosts(Object, Boosts, SourceID, Cause)
  SetArgToString(0, Object)
  SetArgToLong(2, SourceID)
  SetArgToLong(3, Cause)
  if type(Boosts) == "table" then
    for i = 1, #Boosts do
      SetArgToString(1, Boosts[i])
      ExecuteCall("AddBoosts")
    end
  else
    SetArgToString(1, Boosts)
    return ExecuteCall("AddBoosts")
  end
end

function AddBoostsToPlayer(Boosts)
  local player = GetHostCharacter()
  return AddBoosts(player, Boosts, 0, 0)
end

function RemoveBoosts(Object, Boosts, RemoveOnlyFirstDescMatch, SourceID, Cause)
  SetArgToString(0, Object)
  SetArgToLong(2, RemoveOnlyFirstDescMatch)
  SetArgToLong(3, SourceID)
  SetArgToLong(4, Cause)
  if type(Boosts) == "table" then
    for i = 1, #Boosts do
      SetArgToString(1, Boosts[i])
      ExecuteCall("RemoveBoosts")
    end
  else
    SetArgToString(1, Boosts)
    return ExecuteCall("RemoveBoosts")
  end
end

function RemoveBoostsFromPlayer(Boosts)
  local player = GetHostCharacter()
  return RemoveBoosts(player, Boosts, 0, 0, 0)
end

function ApplyStatus(Object, Status, Duration, Force, Source)
  if Duration == nil then
    Duration = -1
  end
  SetArgToString(0, Object)
  SetArgToFloat(2, Duration)
  SetArgToLong(3, Force)
  SetArgToLong(4, Source)
  if type(Status) == "table" then
    for i = 1, #Status do
      SetArgToString(1, Status[i])
      ExecuteCall("ApplyStatus")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("ApplyStatus")
  end
end

function ApplyStatusToPlayer(Status, Duration)
  local player = GetHostCharacter()
  return ApplyStatus(player, Status, Duration, 1, 0)
end

function ApplyStatusToWeapon(Status)
  local item = GetEquippedWeapon()
  return ApplyStatus(item, Status, Duration, 1, 0)
end

function RemoveStatus(Target, Status, Cause)
  SetArgToString(0, Target)
  SetArgToLong(2, Cause)
  if type(Status) == "table" then
    for i = 1, #Status do
      SetArgToString(1, Status[i])
      ExecuteCall("RemoveStatus")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("RemoveStatus")
  end
end

function RemoveStatusFromPlayer(Status)
  local player = GetHostCharacter()
  return RemoveStatus(player, Status, 0)
end

function RemoveStatusFromWeapon(Status)
  local item = GetEquippedWeapon()
  return RemoveStatus(item, Status, 0)
end

function AddSpell(Character, Spell, ShowNotification, AddContainerSpells)
  SetArgToString(0, Character)
  SetArgToLong(2, ShowNotification)
  SetArgToLong(3, AddContainerSpells)
  if type(Spell) == "table" then
    for i = 1, #Spell do
      SetArgToString(1, Spell[i])
      ExecuteCall("AddSpell")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("AddSpell")
  end
end

function AddSpellToPlayer(Spell)
  local player = GetHostCharacter()
  return AddSpell(player, Spell, 0, 1)
end

function RemoveSpell(Character, Spell, RemoveContainerSpells)
  SetArgToString(0, Character)
  SetArgToLong(2, RemoveContainerSpells)
  if type(Spell) == "table" then
    for i = 1, #Spell do
      SetArgToString(1, Spell[i])
      ExecuteCall("RemoveSpell")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("RemoveSpell")
  end
end

function RemoveSpellFromPlayer(Spell)
  local player = GetHostCharacter()
  return RemoveSpell(player, Spell, 0)
end

function SetTag(Target, Tag)
  SetArgToString(0, Target)
  if type(Tag) == "table" then
    for i = 1, #Tag do
      SetArgToString(1, Tag[i])
      ExecuteCall("SetTag")
    end
  else
    SetArgToString(1, Tag)
    return ExecuteCall("SetTag")
  end
end

function SetTagOnPlayer(Tag)
  local player = GetHostCharacter()
  return SetTag(player, Tag)
end

function ClearTag(Target, Tag)
  SetArgToString(0, Target)
  if type(Tag) == "table" then
    for i = 1, #Tag do
      SetArgToString(1, Tag[i])
      ExecuteCall("ClearTag")
    end
  else
    SetArgToString(1, Tag)
    return ExecuteCall("ClearTag")
  end
end

function ClearTagOnPlayer(Tag)
  local player = GetHostCharacter()
  return ClearTag(player, Tag)
end

function IsTagged(Target, Tag)
  SetArgToString(0, Target)
  SetArgToString(1, Tag)
  SetArgToLong(2, 0)
  local result = ExecuteCall("IsTagged")
  if result == 1 then
    return GetArgAsInteger(2)
  else
    return nil
  end
end

function IsTaggedOnPlayer(Tag)
  local player = GetHostCharacter()
  return IsTagged(player, Tag)
end

function SetFlag(Flag, Object, DialogInstance, SendFlagSetEventIfChanged)
  SetArgToString(1, Object)
  SetArgToLong(2, DialogInstance)
  SetArgToLong(3, SendFlagSetEventIfChanged)
  if type(Flag) == "table" then
    for i = 1, #Flag do
      SetArgToString(0, Flag[i])
      ExecuteCall("SetFlag")
    end
  else
    SetArgToString(0, Flag)
    return ExecuteCall("SetFlag")
  end
end

function SetFlagOnPlayer(Flag)
  local player = GetHostCharacter()
  return SetFlag(Flag, player, 0, 1)
end

function GetFlag(Flag, Object)--: FlagState
  SetArgToString(0, Flag)
  SetArgToString(1, Object)
  SetArgToLong(2, 0)
  local result = ExecuteCall("GetFlag")
  if result == 1 then
    return GetArgAsInteger(2)
  else
    return nil
  end
end

function GetFlagOnPlayer(Flag)
  local player = GetHostCharacter()
  return GetFlag(Flag, player)
end

function ClearFlag(Flag, Object, DialogInstance, SendFlagClearEventIfChanged)
  SetArgToString(1, Object)
  SetArgToLong(2, DialogInstance)
  SetArgToLong(3, SendFlagClearEventIfChanged)
  if type(Flag) == "table" then
    for i = 1, #Flag do
      SetArgToString(0, Flag[i])
      ExecuteCall("ClearFlag")
    end
  else
    SetArgToString(0, Flag)
    return ExecuteCall("ClearFlag")
  end
end

function ClearFlagOnPlayer(Flag)
  local player = GetHostCharacter()
  return ClearFlag(Flag, player, 0, 1)
end

function TemplateAddTo(ItemTemplate, InventoryHolder, Count, ShowNotification)
  if Count == nil then Count = 1 end
  if ShowNotification == nil then ShowNotification = 0 end
  SetArgToString(1, InventoryHolder)
  SetArgToLong(2, Count)
  SetArgToLong(3, ShowNotification)
  ExecuteCall("TemplateAddTo")
  if type(ItemTemplate) == "table" then
    for i = 1, #ItemTemplate do
      SetArgToString(0, ItemTemplate[i])
      ExecuteCall("TemplateAddTo")
    end
  else
    SetArgToString(0, ItemTemplate)
    return ExecuteCall("TemplateAddTo")
  end
end

function TemplateAddToPlayer(ItemTemplate, Count)
  local player = GetHostCharacter()
  return TemplateAddTo(ItemTemplate, player, Count, 1)
end

function GetPosition(Target)--: X: Y: Z
  SetArgToString(0, Target)
  ClearArg(1)
  ClearArg(2)
  ClearArg(3)
  ExecuteCall("GetPosition")
  local x = GetArgAsFloat(1)
  local z = GetArgAsFloat(2)
  local y = GetArgAsFloat(3)
  return x, y, z
end

function GetPositionOfPlayer()
  local player = GetHostCharacter()
  return GetPosition(player)
end

function CreateAt(TemplateId, X, Y, Z, Temporary, PlaySpawn, SpawnFinishEvent)--: CreatedObject
  SetArgToString(0, TemplateId)
  SetArgToFloat(1, X)
  SetArgToFloat(2, Z)
  SetArgToFloat(3, Y)
  SetArgToLong(4, Temporary)
  SetArgToLong(5, PlaySpawn)
  SetArgToLong(6, SpawnFinishEvent)
  ClearArg(7)
  ExecuteCall("CreateAt")
  return GetArgAsString(7)
end

function CreateAtPosition(TemplateId, X, Y, Z)
  if X == nil or Y == nil or Z == nil then
    X, Y, Z = GetPositionOfPlayer()
  end
  return CreateAt(TemplateId, X, Y, Z, 0, 0, 0)
end

function CreateAtObject(TemplateId, Anchor, Temporary, PlaySpawn, SpawnFinishEvent, MatchOrientation)--: CreatedObject
  SetArgToString(0, TemplateId)
  SetArgToString(1, Anchor)
  SetArgToLong(2, Temporary)
  SetArgToLong(3, PlaySpawn)
  SetArgToLong(4, SpawnFinishEvent)
  SetArgToLong(5, MatchOrientation)
  ClearArg(6)
  ExecuteCall("CreateAtObject")
  return GetArgAsString(6)
end

function CreateAtPlayer(TemplateId)
  local player = GetHostCharacter()
  return CreateAtObject(TemplateId, player, 0, 0, 0, 0)
end

function GenerateTreasure(InventoryHolder, TreasureID, Level, Finder)
  SetArgToString(0, InventoryHolder)
  SetArgToString(1, TreasureID)
  SetArgToLong(2, Level)
  SetArgToString(3, Finder)
  ClearArg(4)
  return ExecuteCall("GenerateTreasure")
end

function GenerateTreasureBag(TreasureID)
  local player = GetHostCharacter()
  local bag = "3e6aac21-333b-4812-a554-376c2d157ba9"
  bag = CreateAtObject(bag, player, 0, 0, 0, 0)
  GenerateTreasure(bag, TreasureID, 12, player)
  return bag
end

function GetEquippedWeapon(Character)
  if Character == nil then
    Character = GetHostCharacter()
  end
  SetArgToString(0, Character)
  ClearArg(1)
  ExecuteCall("GetEquippedWeapon")
  return GetArgAsString(1)
end

Slotnames = {
  "Helmet",
  "Breast",
  "Cloak",
  "Melee Main Weapon",
  "Melee Offhand Weapon",
  "Ranged Main Weapon",
  "Ranged Offhand Weapon",
  "Underwear",
  "Boots",
  "Gloves",
  "Amulet",
  "Ring",
  "Ring2",
  "Wings",
  "Horns",
  "Overhead",
  "MusicalInstrument",
  "VanityBody",
  "VanityBoots"
}
for i = 1, #Slotnames do
  Slotnames[ Slotnames[i] ] = true
end
function GetEquippedItem(Character, Slotname)--: Item
  if Slotname == nil then
    Slotname = Character
    Character = GetHostCharacter()
  end
  if Slotname == nil then
    return nil
  end
  if Slotnames[Slotname] ~= true then
    print("Slotname must be one of the following: " .. table.concat(Slotnames, ", "))
    return nil
  end
  SetArgToString(0, Character)
  SetArgToString(1, Slotname)
  ClearArg(2)
  ExecuteCall("GetEquippedItem")
  return GetArgAsString(2)
end

{$asm}
[DISABLE]
just paste into Register Commands :)
I'm running 4.1.1.3669438 (steam version) and I have copied the above code into register commands. I load a save but command count doesn't populate at all so I get the 'please load a save' error when trying to use register commands. I have 2 mods installed, improved UI and invocations expanded.

Am I doing something wrong?

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 9:35 am
by kidicarus
.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 10:16 am
by Hazukashi
So since Patch 1 disabled Halsin and Minthara from being alive at the same time, it seems that in my saves that I loaded where Halsin and Minthara are in my party, Halsin dies immediately but once only. I have to revive him through Withers (bone-man) and he does not die immediately after loading a new save thereafter. Does the "immediate-death-for-Halsin" "feature" (from Larian) affect new playthroughs? The previous method I found on Reddit to have both Minthara and Halsin in your party are listed as below in steps:
  • 1. Spawn Minthara as companion in the early game, preferably before going to the Goblin Camp
    2. Prevent Arabella from dying to Kagha's snake
    3. Uncover and expose dark druids and Kagha's plan
    4. Convince Rolan and siblings to stay with the Tieflings
    5. Free Halsin from his cage, but NOT bring him out of the Warg Pens
    6. Have Minthara suicide by selecting her and jump into a chasm
    7. Kill Gut and Dror Ragzlin. This way all 3 leaders are dead and objective to free Halsin is met.
    8. Revive Minthara through Withers. You can then talk to Zevlor and to proceed to the camp celebration with the Tieflings.
    9. Proceed to the Shadow-cursed Lands as normal (Underdark/Mountain Pass) and do the quest to wake up Art Cullagh.
    10. Help Halsin in finding the Spirit of the Land, Thaniel and find the latter's other half. You can then enlist Halsin as a companion thereafter.
So after Patch 1, will Halsin just spawn dead in any of the above steps, or the above method still works fine? Has anyone figured it out?

Table used to spawn Minthara was from this post viewtopic.php?p=311867#p311867

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 10:36 am
by xiraiya
zurls wrote:
Sun Aug 27, 2023 7:55 am
Invertex wrote:
Fri Aug 18, 2023 1:06 pm
zurls wrote:
Thu Aug 17, 2023 6:42 pm


There are any number of mods that change genitals in any number of ways on N e xus
Huh? There are no such mods on there... And I'm not talking about just changing it visually. I'm talking about going from one genital TYPE to another, which means changing multiple flags on the character, as it alters the animations that would be used for sex scenes.

The closest thing is "Appearance Edit LITE", which does not have options for genitals yet.
Not sure where you've been looking, but I'm using a mod called Better Penises and my character is VERY, VERY proud.
They just want to re-edit their character, which no mod has been able to successfully do without it being a mess, yet. So mods are meaningless in that regard.

I too am hoping for the inclusion character appearance data in a table, I would give anything to be able to fix my co-op character by pasting my appearance from another save file, if nothing else.

I've been very spoiled by Crusader Kings 3's appearance table.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 10:41 am
by caroline00
Hey guys i'm having this weird bug about Flaming Aura, even tho i disable it and did a long rest, the Flaming condition still persist and it making NPC around start attacking me, thank you.
Edit: NEVERMIND I'M STUPID, there is a toggle in passive, ughh.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 11:27 am
by emerlyn
ptyler wrote:
Sun Aug 27, 2023 12:01 am
has anyone figured out a proper way to remove flags and tags to allow an Oathbroken-Multiclassed Paladin to respec properly?
I can't seem to remove the Oathbroken tag at all to by pass the Oathbreaker Knight to allow myself to respec, using the newer tables with the command to allow respec doesn't work for this one character but works for the rest properly.
I searched a bit through the thread and have tried all UUIDs relating to the Oathbroken tag and changing the add tags scripts to remove them instead with no such luck.
there's 1 mod on the Nexus that no longer works/didn't properly fix it in the first place, and it appears this bug has been in the game since before release patch.
I am desperately looking for a fix on this as well.
My shadowheart is a lvl 1 cleric/lvl 7 paladin and gameplay is less than optimal.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 11:43 am
by Alarion9
unREAL wrote:
Sat Aug 26, 2023 4:33 pm
Nick8472 wrote:
Sat Aug 26, 2023 4:24 pm

I scrolled and found what you posted but when I copy and paste it says:

Not all code is injectable

Are you sure you want to edit it to this?

Then nothing!

Oh I made a typo .. Im sorry :mellow:

okay to make it easier for everyone, here is the complete code:

Code: Select all

[ENABLE]
{$lua}
if syntaxcheck then return end
local commands = readPointer("cmdList")
if commands == 0 then
  print("plaese load a saved game first")
  return
end
local size = readInteger(commands + 0x2C)
if size <= 0 then
  print("please load a saved game first")
  return
elseif size > 3000 then
  size = 3000 -- just in case
end
commands = readPointer(commands + 0x20)
COMMAND_SELF = {}
for i = 1, size do
  local addr = readPointer(commands)
  if addr > 0 then
    local name = readPointer(addr + 0x08)
    name = readString(name, 256, false)
    local self = readPointer(addr + 0x40)
    addr = readPointer(addr + 0x48)
    COMMAND_SELF[name] = self
    if addr > 0x1000 then
      unregisterSymbol(name)
      registerSymbol(name, addr, true)
    end
  end
  commands = commands + 0x08
end

function PrepareCall(name)
  local cmdAddr = getAddress("cmdAddr")
  local cmdSelf = getAddress("cmdSelf")
  local cmd = getAddress(name)
  writePointer(cmdAddr, cmd)
  writePointer(cmdSelf, COMMAND_SELF[name])
end

function ExecuteCall(FuncName)
  local cmdAddr = getAddress("cmdAddr")
  local cmdSelf = getAddress("cmdSelf")
  local cmdCall = getAddress("cmdCall")
  local cmd = getAddress(FuncName)
  writePointer(cmdAddr, cmd)
  writePointer(cmdSelf, COMMAND_SELF[FuncName])
  return executeCodeEx(0, nil, cmdCall)
end

function GetArgAt(i)
  return getAddress("cmdArgs") + 0x10 * i + 0x08
end

function GetStringAt(i)
  return getAddress("cmdStr"..i)
end

function ClearArg(i)
  SetArgToLong(i, 0)
end

function GetArgAsInteger(i)
  local arg = GetArgAt(i)
  return readInteger(arg)
end

function SetArgToInteger(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writeQword(arg, value)
end

function GetArgAsLong(i)
  local arg = GetArgAt(i)
  return readQword(arg)
end

function SetArgToLong(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writeQword(arg, value)
end

function GetArgAsFloat(i)
  local arg = GetArgAt(i)
  return readFloat(arg)
end

function SetArgToFloat(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writeFloat(arg, value)
end

function SetArgToPointer(i, value)
  local arg = GetArgAt(i)
  if value == nil then value = 0 end
  writePointer(arg, value)
end

function GetArgAsString(i)
  local arg = GetArgAt(i)
  local value = readPointer(arg)
  if value and value > 0 then
    return readString(value, 256, false)
  end
  return nil
end

function SetArgToString(i, value)
  local str = GetStringAt(i)
  writeString(str, value)
  writeBytes(str + #value, 0)
  SetArgToPointer(i, str)
end

function GetHostCharacter()
  ClearArg(0)
  ExecuteCall("GetHostCharacter")
  return GetArgAsString(0)
end

function AddPassive(Entity, PassiveID)
  SetArgToString(0, Entity)
  if type(PassiveID) == "table" then
    for i = 1, #PassiveID do
      SetArgToString(1, PassiveID[i])
      ExecuteCall("AddPassive")
    end
  else
    SetArgToString(1, PassiveID)
    return ExecuteCall("AddPassive")
  end
end

function AddPassiveToPlayer(PassiveID)
  local player = GetHostCharacter()
  return AddPassive(player, PassiveID)
end

function AddPassiveToWeapon(PassiveID)
  local item = GetEquippedWeapon()
  return AddPassive(item, PassiveID)
end

function RemovePassive(Entity, PassiveID)
  SetArgToString(0, Entity)
  if type(PassiveID) == "table" then
    for i = 1, #PassiveID do
      local value = PassiveID[i]
      SetArgToString(1, value)
      ExecuteCall("RemovePassive")
    end
  else
    SetArgToString(1, PassiveID)
    return ExecuteCall("RemovePassive")
  end
end

function RemovePassiveFromPlayer(PassiveID)
  local player = GetHostCharacter()
  return RemovePassive(player, PassiveID)
end

function RemovePassiveFromWeapon(PassiveID)
  local item = GetEquippedWeapon()
  return RemovePassive(item, PassiveID)
end

function AddBoosts(Object, Boosts, SourceID, Cause)
  SetArgToString(0, Object)
  SetArgToLong(2, SourceID)
  SetArgToLong(3, Cause)
  if type(Boosts) == "table" then
    for i = 1, #Boosts do
      SetArgToString(1, Boosts[i])
      ExecuteCall("AddBoosts")
    end
  else
    SetArgToString(1, Boosts)
    return ExecuteCall("AddBoosts")
  end
end

function AddBoostsToPlayer(Boosts)
  local player = GetHostCharacter()
  return AddBoosts(player, Boosts, 0, 0)
end

function RemoveBoosts(Object, Boosts, RemoveOnlyFirstDescMatch, SourceID, Cause)
  SetArgToString(0, Object)
  SetArgToLong(2, RemoveOnlyFirstDescMatch)
  SetArgToLong(3, SourceID)
  SetArgToLong(4, Cause)
  if type(Boosts) == "table" then
    for i = 1, #Boosts do
      SetArgToString(1, Boosts[i])
      ExecuteCall("RemoveBoosts")
    end
  else
    SetArgToString(1, Boosts)
    return ExecuteCall("RemoveBoosts")
  end
end

function RemoveBoostsFromPlayer(Boosts)
  local player = GetHostCharacter()
  return RemoveBoosts(player, Boosts, 0, 0, 0)
end

function ApplyStatus(Object, Status, Duration, Force, Source)
  if Duration == nil then
    Duration = -1
  end
  SetArgToString(0, Object)
  SetArgToFloat(2, Duration)
  SetArgToLong(3, Force)
  SetArgToLong(4, Source)
  if type(Status) == "table" then
    for i = 1, #Status do
      SetArgToString(1, Status[i])
      ExecuteCall("ApplyStatus")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("ApplyStatus")
  end
end

function ApplyStatusToPlayer(Status, Duration)
  local player = GetHostCharacter()
  return ApplyStatus(player, Status, Duration, 1, 0)
end

function ApplyStatusToWeapon(Status)
  local item = GetEquippedWeapon()
  return ApplyStatus(item, Status, Duration, 1, 0)
end

function RemoveStatus(Target, Status, Cause)
  SetArgToString(0, Target)
  SetArgToLong(2, Cause)
  if type(Status) == "table" then
    for i = 1, #Status do
      SetArgToString(1, Status[i])
      ExecuteCall("RemoveStatus")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("RemoveStatus")
  end
end

function RemoveStatusFromPlayer(Status)
  local player = GetHostCharacter()
  return RemoveStatus(player, Status, 0)
end

function RemoveStatusFromWeapon(Status)
  local item = GetEquippedWeapon()
  return RemoveStatus(item, Status, 0)
end

function AddSpell(Character, Spell, ShowNotification, AddContainerSpells)
  SetArgToString(0, Character)
  SetArgToLong(2, ShowNotification)
  SetArgToLong(3, AddContainerSpells)
  if type(Spell) == "table" then
    for i = 1, #Spell do
      SetArgToString(1, Spell[i])
      ExecuteCall("AddSpell")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("AddSpell")
  end
end

function AddSpellToPlayer(Spell)
  local player = GetHostCharacter()
  return AddSpell(player, Spell, 0, 1)
end

function RemoveSpell(Character, Spell, RemoveContainerSpells)
  SetArgToString(0, Character)
  SetArgToLong(2, RemoveContainerSpells)
  if type(Spell) == "table" then
    for i = 1, #Spell do
      SetArgToString(1, Spell[i])
      ExecuteCall("RemoveSpell")
    end
  else
    SetArgToString(1, Status)
    return ExecuteCall("RemoveSpell")
  end
end

function RemoveSpellFromPlayer(Spell)
  local player = GetHostCharacter()
  return RemoveSpell(player, Spell, 0)
end

function SetTag(Target, Tag)
  SetArgToString(0, Target)
  if type(Tag) == "table" then
    for i = 1, #Tag do
      SetArgToString(1, Tag[i])
      ExecuteCall("SetTag")
    end
  else
    SetArgToString(1, Tag)
    return ExecuteCall("SetTag")
  end
end

function SetTagOnPlayer(Tag)
  local player = GetHostCharacter()
  return SetTag(player, Tag)
end

function ClearTag(Target, Tag)
  SetArgToString(0, Target)
  if type(Tag) == "table" then
    for i = 1, #Tag do
      SetArgToString(1, Tag[i])
      ExecuteCall("ClearTag")
    end
  else
    SetArgToString(1, Tag)
    return ExecuteCall("ClearTag")
  end
end

function ClearTagOnPlayer(Tag)
  local player = GetHostCharacter()
  return ClearTag(player, Tag)
end

function IsTagged(Target, Tag)
  SetArgToString(0, Target)
  SetArgToString(1, Tag)
  SetArgToLong(2, 0)
  local result = ExecuteCall("IsTagged")
  if result == 1 then
    return GetArgAsInteger(2)
  else
    return nil
  end
end

function IsTaggedOnPlayer(Tag)
  local player = GetHostCharacter()
  return IsTagged(player, Tag)
end

function SetFlag(Flag, Object, DialogInstance, SendFlagSetEventIfChanged)
  SetArgToString(1, Object)
  SetArgToLong(2, DialogInstance)
  SetArgToLong(3, SendFlagSetEventIfChanged)
  if type(Flag) == "table" then
    for i = 1, #Flag do
      SetArgToString(0, Flag[i])
      ExecuteCall("SetFlag")
    end
  else
    SetArgToString(0, Flag)
    return ExecuteCall("SetFlag")
  end
end

function SetFlagOnPlayer(Flag)
  local player = GetHostCharacter()
  return SetFlag(Flag, player, 0, 1)
end

function GetFlag(Flag, Object)--: FlagState
  SetArgToString(0, Flag)
  SetArgToString(1, Object)
  SetArgToLong(2, 0)
  local result = ExecuteCall("GetFlag")
  if result == 1 then
    return GetArgAsInteger(2)
  else
    return nil
  end
end

function GetFlagOnPlayer(Flag)
  local player = GetHostCharacter()
  return GetFlag(Flag, player)
end

function ClearFlag(Flag, Object, DialogInstance, SendFlagClearEventIfChanged)
  SetArgToString(1, Object)
  SetArgToLong(2, DialogInstance)
  SetArgToLong(3, SendFlagClearEventIfChanged)
  if type(Flag) == "table" then
    for i = 1, #Flag do
      SetArgToString(0, Flag[i])
      ExecuteCall("ClearFlag")
    end
  else
    SetArgToString(0, Flag)
    return ExecuteCall("ClearFlag")
  end
end

function ClearFlagOnPlayer(Flag)
  local player = GetHostCharacter()
  return ClearFlag(Flag, player, 0, 1)
end

function TemplateAddTo(ItemTemplate, InventoryHolder, Count, ShowNotification)
  if Count == nil then Count = 1 end
  if ShowNotification == nil then ShowNotification = 0 end
  SetArgToString(1, InventoryHolder)
  SetArgToLong(2, Count)
  SetArgToLong(3, ShowNotification)
  ExecuteCall("TemplateAddTo")
  if type(ItemTemplate) == "table" then
    for i = 1, #ItemTemplate do
      SetArgToString(0, ItemTemplate[i])
      ExecuteCall("TemplateAddTo")
    end
  else
    SetArgToString(0, ItemTemplate)
    return ExecuteCall("TemplateAddTo")
  end
end

function TemplateAddToPlayer(ItemTemplate, Count)
  local player = GetHostCharacter()
  return TemplateAddTo(ItemTemplate, player, Count, 1)
end

function GetPosition(Target)--: X: Y: Z
  SetArgToString(0, Target)
  ClearArg(1)
  ClearArg(2)
  ClearArg(3)
  ExecuteCall("GetPosition")
  local x = GetArgAsFloat(1)
  local z = GetArgAsFloat(2)
  local y = GetArgAsFloat(3)
  return x, y, z
end

function GetPositionOfPlayer()
  local player = GetHostCharacter()
  return GetPosition(player)
end

function CreateAt(TemplateId, X, Y, Z, Temporary, PlaySpawn, SpawnFinishEvent)--: CreatedObject
  SetArgToString(0, TemplateId)
  SetArgToFloat(1, X)
  SetArgToFloat(2, Z)
  SetArgToFloat(3, Y)
  SetArgToLong(4, Temporary)
  SetArgToLong(5, PlaySpawn)
  SetArgToLong(6, SpawnFinishEvent)
  ClearArg(7)
  ExecuteCall("CreateAt")
  return GetArgAsString(7)
end

function CreateAtPosition(TemplateId, X, Y, Z)
  if X == nil or Y == nil or Z == nil then
    X, Y, Z = GetPositionOfPlayer()
  end
  return CreateAt(TemplateId, X, Y, Z, 0, 0, 0)
end

function CreateAtObject(TemplateId, Anchor, Temporary, PlaySpawn, SpawnFinishEvent, MatchOrientation)--: CreatedObject
  SetArgToString(0, TemplateId)
  SetArgToString(1, Anchor)
  SetArgToLong(2, Temporary)
  SetArgToLong(3, PlaySpawn)
  SetArgToLong(4, SpawnFinishEvent)
  SetArgToLong(5, MatchOrientation)
  ClearArg(6)
  ExecuteCall("CreateAtObject")
  return GetArgAsString(6)
end

function CreateAtPlayer(TemplateId)
  local player = GetHostCharacter()
  return CreateAtObject(TemplateId, player, 0, 0, 0, 0)
end

function GenerateTreasure(InventoryHolder, TreasureID, Level, Finder)
  SetArgToString(0, InventoryHolder)
  SetArgToString(1, TreasureID)
  SetArgToLong(2, Level)
  SetArgToString(3, Finder)
  ClearArg(4)
  return ExecuteCall("GenerateTreasure")
end

function GenerateTreasureBag(TreasureID)
  local player = GetHostCharacter()
  local bag = "3e6aac21-333b-4812-a554-376c2d157ba9"
  bag = CreateAtObject(bag, player, 0, 0, 0, 0)
  GenerateTreasure(bag, TreasureID, 12, player)
  return bag
end

function GetEquippedWeapon(Character)
  if Character == nil then
    Character = GetHostCharacter()
  end
  SetArgToString(0, Character)
  ClearArg(1)
  ExecuteCall("GetEquippedWeapon")
  return GetArgAsString(1)
end

Slotnames = {
  "Helmet",
  "Breast",
  "Cloak",
  "Melee Main Weapon",
  "Melee Offhand Weapon",
  "Ranged Main Weapon",
  "Ranged Offhand Weapon",
  "Underwear",
  "Boots",
  "Gloves",
  "Amulet",
  "Ring",
  "Ring2",
  "Wings",
  "Horns",
  "Overhead",
  "MusicalInstrument",
  "VanityBody",
  "VanityBoots"
}
for i = 1, #Slotnames do
  Slotnames[ Slotnames[i] ] = true
end
function GetEquippedItem(Character, Slotname)--: Item
  if Slotname == nil then
    Slotname = Character
    Character = GetHostCharacter()
  end
  if Slotname == nil then
    return nil
  end
  if Slotnames[Slotname] ~= true then
    print("Slotname must be one of the following: " .. table.concat(Slotnames, ", "))
    return nil
  end
  SetArgToString(0, Character)
  SetArgToString(1, Slotname)
  ClearArg(2)
  ExecuteCall("GetEquippedItem")
  return GetArgAsString(2)
end

{$asm}
[DISABLE]
just paste into Register Commands :)
Hello. For me, these corrections in the table from Lua do not work not on dx11, not on Vulkane. Help please. You can throw off the table that works for you. It seems to have replaced the register console command, but nothing starts.

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 12:02 pm
by omrictu
themaoci wrote:
Sat Aug 26, 2023 1:41 pm
And hello again i have updated my table but i dropped it in github(its easier to keep track of changes like that) i hope it wont trigger any rules in here there is no executables etc. there are images, CT file and readme

[Link]

Table is updated and should properly work with latest game version (tested on my steam game version) also on old saved game and it works properly

Item spawning could crash your game make sure to save a game after each successfull spawn

Companions Update:
Image


How in the world do i download this from github?!

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 12:15 pm
by omrictu
Can anyone please tell me where to get a posted full UUID list from? Thank you!

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 12:28 pm
by 1948135598
emteka wrote:
Thu Aug 24, 2023 10:14 am
1948135598 wrote:
Thu Aug 24, 2023 6:05 am
Jaxtes wrote:
Thu Aug 24, 2023 3:43 am
Anyone find way to add tadpoles to Hirelings yet? Would really appreciate if it was possible.
you can use Item Spawner(can find in ct table) add Mind Flayer Parasite Specimen to your player.
the id of Mind Flayer Parasite Specimen is c8f4a71f-d190-4cf1-889d-0dfe3c03cbc3.
Do you know how to get rid of invested tadpoles?
sorry, I dont konw :D

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 12:33 pm
by 321123
hi there,
I am trying to make a meme character that has essentially all passives / spells and feats,
can someone help me with a script for it? (the list is too long to go for one by one!)
thx

Re: z Baldur's Gate 3

Posted: Sun Aug 27, 2023 1:06 pm
by Selune
Hi there!

I just now discovered that you can recruit Us in Act 2 if you saved him on the Nautiloid. He died for me.
What is the flag I can set to have him survived and be recruitable in Act 2?