Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Is it possible to teleport the player to a new location using dialogue? For example, if the player asks an NPC for a ride on his cart and then teleports to the destination?

Joined: Nov 2014
stranger
Offline
stranger
Joined: Nov 2014
I dont know about a Action for Dialogs that teleport the character,
but i think it will be possible by adding an item to the player by dialog (e.g. a ticket)and then teleport by using the item.

Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
That's what I was worried about at first, but then I remembered that Walter Mc Wishing Well from the main Campaign teleports you to the snow location during dialogue. So I opened the main campaign and checked the sidebar. Walter is set to Global and OnUseActions: [1] Send a use event to Osiris.

I tried opening the DialogueEditor to see what actions and conditions they used but I received an error saying that I need developer rights to open the GenericKeyWords.lsx. Was this an intended error or is it possible to unpack the main campaign dialogue using lstools?

The StoryEditor - CYS_WishingWell I found below:
INIT___________________________________________________________
ItemSetOnstage(ITEM_CYS_WilliamWell,0);
DB_ItemDialogs(ITEM_CYS_WalterWell,"CYS_Walter");
DB_ItemDialogs(ITEM_CYS_WilliamWell,"HIB_WilliamWell");

DB_CYS_WishingWellTreasure(CHARACTER_CYS_WishingWell,1);
DB_CYS_WishingWellTreasure(CHARACTER_CYS_WishingWellBad,2); DB_CYS_WishingWellTreasure(CHARACTER_CYS_WishingWellMeh,3);
DB_CYS_WishingWellTreasure(CHARACTER_CYS_WishingWellGood,4);


KB______________________________________________________________
//REGION Retrieve quest
IF
DialogEnded("CYS_Walter",_)
AND
ItemGetVarInteger(ITEM_CYS_WalterWell,"sendParty",1)
THEN
ItemSetVarInteger(ITEM_CYS_WalterWell,"sendParty",0);
CharacterTeleportPartyToTrigger(TRIGGER_HIB_WellArrival,"");
//END_REGION

//REGION CYSEAL WISH
IF
DialogEnded("CYS_Walter",_ID)
AND
DB_DialogPlayers(_ID,_Player,1)
AND
CharacterGetVarInteger(_Player,"CYS_GaveWalterGold",_Reward)
AND
DB_CYS_WishingWellTreasure(_Character,_Reward)
THEN
CharacterSetVarInteger(_Player,"CYS_GaveWalterGold",0);
CharacterMoveAllItemsToCharacter(_Character,CHARACTER_CYS_WishingWellDepot);
GenerateItems(_Player,_Character);
CharacterMoveAllItemsToCharacter(_Character,_Player);
//END_REGION

Joined: Nov 2014
stranger
Offline
stranger
Joined: Nov 2014
Originally Posted by JecklynHyde
I tried opening the DialogueEditor to see what actions and conditions they used but I received an error saying that I need developer rights to open the GenericKeyWords.lsx. Was this an intended error or is it possible to unpack the main campaign dialogue using lstools?


Yes it is possible by unpack the main.PAK and copy the "Keywords" Folder to mods/main/story. Now you can open "CYS_Walter.lsx", but read only. I think the Developer Rights Error is because the Engine wants to open the Keywords in the .PAK Files.

I think Larian do the teleport by seting an FLAG to the Party.

[Linked Image]

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by JecklynHyde
Is it possible to teleport the player to a new location using dialogue? For example, if the player asks an NPC for a ride on his cart and then teleports to the destination?


Yes, it's possible and pretty simple:

In the Dialogue selection you want to have initiate the teleport (in the keyword editor), go to the ACTIONS box and type in:

ACTION SetFlag("FlagName",1)

Then

In the story editor, make a new script and in the KB section

IF
GlobalEventSet("FlagName")
THEN
CharacterTeleportPartyToTrigger(CHARACTER_Player1, TRIGGER_DesinationName,""_)

That should get you going.

Last edited by Burgee; 27/11/14 01:57 AM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Does the speaker need to be global for this script to work?
What's the difference between a global and non-global character anyway?

Last edited by JecklynHyde; 03/12/14 12:18 AM.
Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Originally Posted by JecklynHyde
Does the speaker need to be global for this script to work?
What's the difference between a global and non-global character anyway?


Basically anything far as I know needs to be global for scripts from the story editor to function. There are a few exceptions like item templates.

One of the scripting tutorial videos from Larian explains the difference. The tl;dw version is Global objects can communicate with the Osiris scripting language. Local (non global) stuff cannot.

I'm sure someone with more experience could explain better. But basically if you are going to do anything with that item/character in the story editor you need to make it global and generate definitions before you can use it.

Which is most definitely true for teleporting as described in this thread.

Last edited by SniperHF; 03/12/14 12:50 AM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Hm, I ask because there's one stubborn character in my game who refuses to speak when set to Global. Do you know if the legionnaire NPCs can't be set to Global for some reason? My other global characters work fine and I checked and rechecked all his Sidebar fields. They appear to be the same as all my other global characters. I even deleted and remade him. I renamed him and adjusted all the scripts to reflect that. I followed Burgee's tutorial like 8 times. rrrghhgraah...


Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by JecklynHyde
Hm, I ask because there's one stubborn character in my game who refuses to speak when set to Global. Do you know if the legionnaire NPCs can't be set to Global for some reason? My other global characters work fine and I checked and rechecked all his Sidebar fields. They appear to be the same as all my other global characters. I even deleted and remade him. I renamed him and adjusted all the scripts to reflect that. I followed Burgee's tutorial like 8 times. rrrghhgraah...



Make sure on his sidebar he has "Default" in his dialogue box. Leaving the dialogue box blank will make it so even scripted global characters don't speak.

Some characters by default have blank dialogue boxes.

Last edited by Burgee; 03/12/14 01:12 AM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
His character name is Navigator, his DisplayName is Navigator, his dialogue is called Navigator.lsb, and his DefaultDialog is set to Default. See below image for Sidebar and KB script.

[Linked Image]

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Do you have the _Start code in place in that particular module?

INITSECTION
CHARACTER_Player1.isPlayer();
CHARACTER_Player2.isPlayer();

KBSECTION
IF
GameEventSet("GAMEEVENT_GameStarted")
THEN
InitStory();
GoalCompleted;


Do other NPC's dialogue work?

Last edited by Burgee; 03/12/14 01:31 AM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Yup, the _Start code is in and my other Global characters can fire their dialogue. I've tried to remake this NPC too, but that didn't work either.

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Other things to check:

Make sure your Dialogue has a greeting, make sure there is at least one "available at start" option.

Make sure it's named correctly, and case sensitive. Same with the Character's tag.

If you've remade the character and it still doesn't work then the problem is likely with the dialogue or a character name somewhere. The script looks right.

There's always a reason something doesn't work, it's never "just broken" =) Double check yourself everywhere - I've been hung up on a typo or odd mistake all the time.

Try setting his dialogue to be someone else's dialogue, see if it fires then to eliminate the dialogue from suspicion.

Last edited by Burgee; 03/12/14 01:43 AM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
Checked: The navigator dialogue has a greeting. The dialogue and character are named correctly and case sensitive. There is a leave dialogue, there are other dialogue options.

Test #1: The Navigator dialog works when the character is not set to Global.

Test #2: I gave the Navigator dialogue to a global NPC Rogue who already had a functional global dialogue. Rogue's dialogue no longer fired when set to the Navigator one. I returned the Rogue's dialogue back to normal and it no longer fired either. I reset the toolset and then the Rogue's dialogue worked again.

Test #3: I tried switching the Navigator's dialogue to the rogue's and the Rogue's to the navigator's. I saved, regenerated story and definitions, saved again. The rogue still spoke the rogue dialogue. I closed and reopened the Divinity Engine. The Rogue still fires the rogue dialogue, even though the script says he should be firing the Navigator's. I'm so confused...

Test #4: Left everything the way it was in Test #3. Saved everything, reloaded all definitions, closed Divinity Editor, opened it again, saved and reloaded story and definitions. Neither the Rogue or Navigator would speak any dialogue.

Test #5743: Copied all steps exactly from the video tutorial (https://www.youtube.com/watch?v=nnxL-QDWF7U) and the character still refused to talk.

I recall seeing a thread where you can download fixes for the editor. Would that maybe help? I really feel like many of the errors I get are totally random as I'm very careful about getting the names and scripts correct. I'll copy every single thing in a video tutorial exactly. I'll watch and replicate the video twice. I have no idea what's going on and I never had such trouble with Aurora. I want to finish this module but I've probably put over 10 hours to figuring out this one issue and still can't find a resolution.

Now I noticed that my MessagePanel is spamming me with error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" every second.

Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
What's the full file path for the Navigator character and the Navigator.lsb?

Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
On the Navigator's SideBar, the File Name reads:
C:/Program Files (x86)/Steam/SteamApps/common/Divinity - Original Sin/Data/Mods/MyGame/Globals/Island/Characters/characters-COMPUTER1.lsb

Where do I look for the other information?
I also reformatted my computer recently; I'm not sure if that would have caused an issue.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Are you using in the INIT section a DB_Dialogs(CHARACTER_Navigator ,"Navigator")

My dialog stops working without this.

Last edited by SniperHF; 03/12/14 10:35 PM.
Joined: Oct 2014
Location: Hogwarts
member
OP Offline
member
Joined: Oct 2014
Location: Hogwarts
I tried adding the DB_Dialogs script to the INIT field but the dialog still failed to fire.

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
Yeah I think that's because I'm using multiple Dialogs for the same characters. Not relevant to your situation.

Joined: Oct 2014
B
enthusiast
Offline
enthusiast
B
Joined: Oct 2014
Do you have a conditional on the greeting that isn't being met? That could cause an issue.

For lack of other ideas, I'd delete the dialogue and the character and just re-do it at this point.

Page 1 of 2 1 2

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