Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#623683 29/09/17 06:17 PM
Joined: Sep 2017
R
Reltzu Offline OP
apprentice
OP Offline
apprentice
R
Joined: Sep 2017
Several commands listed here seem to be missing?
For example I get "Failed to parse action" for "GetPlayerCount" and "GetPlayerByIndex".

Am I missing some #include statement or a dependency?

Thanks!

More importantly, "ListGet" seems to be missing (but ListSet, etc... is there...weird)

Last edited by Reltzu; 29/09/17 08:37 PM.
Joined: Jan 2010
Location: USA
F
enthusiast
Offline
enthusiast
F
Joined: Jan 2010
Location: USA
ContainerIdentifyAll() is another function the editor does not recognize.

There are a few more functions listed in story_header.div that are not recognized.

I asked for a comprehensive function reference a few days back.

Dev reply:
"As with the rest of the wiki, that documentation is still in the works. We've started on similar documentation for Osiris, and plan on providing something similar for character/item scripting in the future."

Joined: Sep 2016
journeyman
Offline
journeyman
Joined: Sep 2016
Forgive the ignorance, but I think I'm struggling with the same issue.

Was looking for a simple way to get magic armor as a percentage and found this in the story_header.div:

query CharacterGetMagicArmorPercentage([in](CHARACTERGUID)_Character, [out](INTEGER)_Percentage) (2,0,133,1)

When I open the script editor and try to use CharacterGetMagicArmorPercentage in a charscript, the text stays black, instead of turning red. Does that mean the editor doesn't recognize it, and it won't do anything for me?

Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
There is a chance I misplaced some of the calls in that list. A query won't work after a THEN, for example. But the list I got that from didn't define queries/calls (actions), so it's kind of trial and error.

I use CharacterGetStat(_MagicArmor,_Character,MagicArmor) for armor checks, which returns a percentage. If the command doesn't change color and offer you information at the top, I don't think it's recognized.

And also, Osiris calls are different from character scripting stuff. They're basically two different (but similar) scripting languages.

Finally, some of those commands are probably outdated, since those are from the alpha. They are mostly correct, but perhaps some were deleted or slightly changed. You should be able to type something like "Count" and it should show you any command/query that has "Count" in it, though again, it will only offer functions that are appropriate for the location of the script (like if under an IF, it will only suggest queries).

Last edited by Baardvark; 30/09/17 12:24 AM.
Joined: Sep 2017
R
Reltzu Offline OP
apprentice
OP Offline
apprentice
R
Joined: Sep 2017
Thanks for the info Baardvark. Thing is, commands like ListGet do not appear in the autocomplete but do turn red in the editor (but still yield the failed to parse error). Currently I’m only trying that command under THEN. But I’m wondering why I should be able to clear and populate lists there but not get items out of the list? Maybe a dev can shed some more light on that....

Joined: Sep 2017
R
Reltzu Offline OP
apprentice
OP Offline
apprentice
R
Joined: Sep 2017
Originally Posted by Baardvark
There is a chance I misplaced some of the calls in that list. A query won't work after a THEN, for example. But the list I got that from didn't define queries/calls (actions), so it's kind of trial and error.


This lead me to the solution.
Indeed, "ListGet" is only available in the IF / CHECK. So now I ended up with a bit of akward code. I'm using the OnInit event to populate my list in the THEN action.
Within the IF of my OnUseItem event, I use the ListGet query to get one of the elements.
Not pretty but it works.

Joined: Aug 2014
old hand
Offline
old hand
Joined: Aug 2014
Any "Get" or "Is" command is a query that goes under IF or CHECK.


Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5