Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: May 2017
enthusiast
OP Offline
enthusiast
Joined: May 2017
While the query "GetTextEventParamUUID " only runs if a parameter exists, it seems to try and parse the TextEvent name as the parameter.

The other GetTextEventParam queries work fine.

Test code:
Code
IF
TextEventSet("LLNWIZ_AddWand")
AND
GetTextEventParamUUID(1, _Target)
AND
GetUUID(_Target, _Str)
THEN
LLNWIZ_DebugLog("LLNWIZ_AddWand [UUID]: ", _Str);


Command used:
Code
oe LLNWIZ_AddWand S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406


Result:
(Error)
StoryUtils::RetrieveGuid : TemplateNameGuid 'LLNWIZ_AddWand' too short!

Category: Code
Count: 1
Timestamp: 04-03-2018 22:56:48:598
Function: esv::StoryUtils::RetrieveGuid
Location: EoCServer\Server\StoryUtilities.cpp (71)


To further illustrate this error, I tested the following rule and command:

Code
IF
TextEventSet(_Event)
AND
GetTextEventParamUUID(1, _Target)
AND
GetUUID(_Target, _Str)
THEN
LLNWIZ_DebugLog("Test command [UUID]: ", _Str);


Command:
Code
oe CHARACTERGUID_S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406 Hi


Using the GUIDSTRING as both the text event name and param works:

Quote
Osiris triggered an assert: [LLNWIZ:Debug]Test command [UUID]: da072fe7-fdd5-42ae-9139-8bd4b9fca406

Joined: May 2017
enthusiast
OP Offline
enthusiast
Joined: May 2017
Oh, and to be sure that "1" is the correct value for the parameter index, I tried the following:

Story script rules:
Code
IF
TextEventSet("LLNWIZ_AddWand")
AND
GetTextEventParamInteger(1, _Int)
AND
IntegertoString(_Int, _IntStr)
THEN
LLNWIZ_DebugLog("LLNWIZ_AddWand [Int]: ", _IntStr);

IF
TextEventSet("LLNWIZ_AddWand")
AND
GetTextEventParamReal(1, _Real)
AND
Integer(_Real, _Int)
AND
IntegertoString(_Int, _IntStr)
THEN
LLNWIZ_DebugLog("LLNWIZ_AddWand [Real]: ", _IntStr);

IF
TextEventSet("LLNWIZ_AddWand")
AND
GetTextEventParamString(1, _Str)
THEN
LLNWIZ_DebugLog("LLNWIZ_AddWand [Str]: ", _Str);


Command:
Code
oe LLNWIZ_AddWand 10


Results:
Quote
Osiris triggered an assert: [LLNWIZ:Debug]LLNWIZ_AddWand [Int]: 10
Osiris triggered an assert: [LLNWIZ:Debug]LLNWIZ_AddWand [Real]: 10
Osiris triggered an assert: [LLNWIZ:Debug]LLNWIZ_AddWand [Str]: 10

Joined: May 2017
enthusiast
OP Offline
enthusiast
Joined: May 2017
For those curious, a workaround is to reverse your command and character parameters, and look for the command name as a string parameter.

Here's my command to add my wand item to the GUIDSTRING target of the command:
Code
IF
TextEventSet(_Event)
AND
GetTextEventParamString(1, "LLNWIZ_AddWand") // What was formerly the text event name
AND
GetTextEventParamUUID(1, _Target)
THEN
ItemTemplateAddTo("WPN_LLNWIZ_Wand_Renamer_0a65dc24-7785-48af-8266-9b5b55f6c683", _Target, 1);

Example Usage:
Code
oe CHARACTERGUID_S_GLO_CharacterCreationDummy_001_da072fe7-fdd5-42ae-9139-8bd4b9fca406 LLNWIZ_AddWand


Moderated by  Larian_KVN 

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