Jump to content

How to stash party members somewhere?


Recommended Posts

Posted (edited)

I need all the party members to leave the party, and leave the area they are in so that Charname cannot accidentally run into them.

	ActionOverride(Player2,LeaveParty())
	ActionOverride(Player3,LeaveParty())
	ActionOverride(Player4,LeaveParty())
	ActionOverride(Player5,LeaveParty())
	ActionOverride(Player6,LeaveParty())
	Wait(1)
	ActionOverride(Player2,EscapeAreaObject("TranBD0030"))
	ActionOverride(Player3,EscapeAreaObject("TranBD0030"))
	ActionOverride(Player4,EscapeAreaObject("TranBD0030"))
	ActionOverride(Player5,EscapeAreaObject("TranBD0030"))
	ActionOverride(Player6,EscapeAreaObject("TranBD0030"))

However, I also need them to be available to reappear later; the SoD script before the ambush scene uses:

	MoveGlobal("bd6200","JAHEIRA",[1470.1205])  // Jaheira
	MoveGlobal("bd6200","KHALID",[1545.1230])  // Khalid

When I look at Jaheira in a savegame in NI, it says:

Current Area: none

So evidently the EscapeAreaObject() action removed Jaheira & Khalid, and made them inaccessible for a later MoveGlobal() action?

So how can I make the party members disappear, but keep them accessible? I don't want to use LeaveAreaLUA() because the camera will follow them (I think).

Should I change that MoveGlobal() action into a CreateCreature() action?

EDIT - I guess CreateCreature() would create them without any equipment. But then again maybe that’s okay? This is for the ambush scene after all, and Minsc & Jaheira should not have any equipment at the start of BG2

Edited by subtledoctor
Link to comment
5 hours ago, subtledoctor said:

and made them inaccessible for a later MoveGlobal() action?

You need to make them global before you stow them away. Then you can call them from anywhere by MoveGlobal[Object](), even if they "DestroySelf()"ed. EDIT: That is with using the death variable, at least. I never tried for "Playerx".🤔

5 hours ago, subtledoctor said:

I guess CreateCreature() would create them without any equipment. But then again maybe that’s okay?

CreateCreature will spawn the "untouched" cre. If you want players to come visit with pitchforks, go ahead. ^^

EDIT: depending on what you have in mind, you could also hide or make unselectable. Problem with a generic leaving script calling "Player2-6" is that you wouldn't know which NPCs were in party?

EDIT 2: Ah, they never leave the party. Then I guess they can still be addressed by "PlayerX". I do believe that the game plays with deactivation of sorts. Or have a look at Weimer's Solaufein, the fight against the handmaiden (I think), where he has to fight alone.

Link to comment

Sorry if it wasn’t clear. The NPCs need to leave the party, and then not be in the same area as Player1. We don’t know which NPCs will be in the party, so this happens to Player2 through Player6.

Then, later, Jaheira/Khalid/Minsc/Dynaheir need to be moved to Player1’s area. Specified by their script name. 

The issue is, if Player2 is Minsc in the first part, then Minsc becomes unavailable in the second part. It sounds like MakeGlobal() is the solution here. 

(Also, I have a workaround in how I handled the first part: I leave all NPCs behind in a cut scene area transition before the LeaveParty() action. That cut scene is slightly less ideal, but it obviates the need for any EscapeArea() actions.)

Link to comment

SoD does this itself, I think it's bdcut61 or something. Maybe you don't have to invent the weel anew. EDIT: the cutscene lets the NPCs leave per scriptnames, so mod NPCs that do not consider this will stay in group.

The reason why I used the original cutscene from SoD for EndlessBG1 is that some NPCs need some cleanup if they leave, mod NPCs may have a "joinedparty" variable they need to adjust, some should take specific items with them (for plot reasons) etc.

What I'm trying to say: just kicking Player2-6 will not be very mod friendly /compatible.

Also: make sure you are not kicking Multiplayers.

Link to comment
13 hours ago, jastey said:

CreateCreature will spawn the "untouched" cre. If you want players to come visit with pitchforks, go ahead. ^^

It's Jaheira, Minsc, Khalid & Dynaheir. The former two must have no equipment when next you see them in Chateau Irenicus, and the latter two are gone for good immedately after the ambush cut scene. Equipment that gets transferred from Bg1/SoD into BG2 is pretty tightly controlled, so for purposes of the ambush scene it really doesn't matter what equipment they have.

7 hours ago, jastey said:

SoD does this itself, I think it's bdcut61 or something

Thanks I'll take a look at that. TBH it's been hard to find out exactly what does what at the end of SoD, because it's a long collection of dialogues, scripted area transitions, and cut scenes. I mean, this last part of this mod is a bunch of dialogues, area scripts, and cut scenes that have been quite annoying to put together. But SoD is like 10 times as much.

7 hours ago, jastey said:

The reason why I used the original cutscene from SoD for EndlessBG1

See, I don't even know what "original cutscene" you are talking about. There are like 20-30 cutscenes at the end of SoD, and they are not named in a way that makes them easy to identify.

7 hours ago, jastey said:

What I'm trying to say: just kicking Player2-6 will not be very mod friendly /compatible.

Also: make sure you are not kicking Multiplayers.

Yeah, well, you gotta crawl before you walk before you run. I'm not even worrying about multiplayer stuff yet. I don't even know how that would work. If you have three players together, how does the game get J/K/M/D to Chateau Irenicus? For the moment this is a back-burner concern.

Link to comment

All the original joinable NPCs are already baked in the GAM. IOW they are global. Your Jaheira doesn't have an area set, since you just told her to scram, not to where.

I'm surprised your first snippet works at all, since I'd expect Player2 et al to get invalidated after all those LeavePartys.

Link to comment
15 minutes ago, subtledoctor said:

t's Jaheira, Minsc, Khalid & Dynaheir. The former two must have no equipment when next you see them in Chateau Irenicus, and the latter two are gone for good immedately after the ambush cut scene.

There is also stats etc. And: BGII considers imported items of which they could carry some. There is a way to make this so they are continuous NPCs - one of the advantages of EET - there is no need to take this away from players.

17 minutes ago, subtledoctor said:

See, I don't even know what "original cutscene" you are talking about. There are like 20-30 cutscenes at the end of SoD, and they are not named in a way that makes them easy to identify.

Maybe it clears a little if you look into my SoD NPC Tutorial, and how they are handled at the end of SoD. And i was talking about bdcut61 I mentioned before. That is the cutscene that makes NPCs leave the party after the slayer dream scene, and it's also where mod NPCs patch their leaving to.

Link to comment
9 hours ago, lynx said:

All the original joinable NPCs are already baked in the GAM.

Is this true for SoD NPCs, too? I didn't see them in the BG:SoD GAM. But you are right for Jaheira, Minsc, K&D, of course.

9 hours ago, lynx said:

your first snippet works at all, since I'd expect Player2 et al to get invalidated after all those LeavePartys.

What do you mean by invalidated and why? EDIT: ah, you mean because after the LeaveParty, they would no longer be "PlayerX". Now I get it.

Link to comment

A bunch of players just left. There aren't six people in the party anymore, so the Player6 identifier doesn't point to anything. It really looks like a bad idea to target LeaveParty at any of the PlayerN identifiers

Every instance of ActionOverride(****,LeaveParty()) in the vanilla BG series has **** be a character's script name. And that seems like a good pattern to follow; either your script runs from the perspective of whoever's leaving, or you override based on specific characters.

I see two basic approaches here:

- Remove recruited characters from the party. Here, you follow the example of SoD after the starting dungeon; you grab a list of script names for recruitables from a 2DA, and banish all of them by name. Note that any additional player-created characters will stay with you.

- Disable extra characters and stash them somewhere out of the way; this would be like the dream sequence in Spellhold.

 

Link to comment

I was under the impression scripting Objects remained valid for the entire block once it's already running, in particular when they still are present in the game. Not sure why I think so, as I've never actually tested it, but I think I came to this conclusion when looking into how Objects were selected during the targeting process triggers perform when evaluated, I think I was trying to find out why SCS scripts use Continue() as much as they do (I remember seeing DavidW mention, that it was to hasten how a spellcasting block would be triggered, as the objects remained identical. However, I thought it some complex inner working of the engine instead of understanding that it just entails an immediate sequence of triggers being checked under the same game state).

Link to comment
Posted (edited)
17 hours ago, lynx said:

I'm surprised your first snippet works at all, since I'd expect Player2 et al to get invalidated after all those LeavePartys.

Yeah, me too. I suspect it would not survive a save/reload. That snippet is actually pasted together from two different scripts in two different components (for now), which were tested separately. So I didn't even notice that it shouldn't work until pasting them together here. In any event, I have since modified them and the current local version of the mod no longer has script actions targeting PlayerX after LeaveParty() commands!

17 hours ago, jastey said:

i was talking about bdcut61 I mentioned before

Yes - my point was, before you pointed to me to that particular script it had not risen to my awareness. It's a real needle/haystack situation. So, thanks for that.

I am still a bit mystified by this stuff... I installed EndlessBG1 to see how it handles the skip-SoD option, and it seems to jump the whole party right to BD6100? And then use EET's K#TELBGT, which seems to be a stand-in replacement for SoD's usual J/K/M/D handling. Regardless, removing all party members and leaving Charname alone is a plot point here, so that is probably not something to emulate.

16 hours ago, jmerry said:

Every instance of ActionOverride(****,LeaveParty()) in the vanilla BG series has **** be a character's script name. And that seems like a good pattern to follow; either your script runs from the perspective of whoever's leaving, or you override based on specific characters.

But that would not address any mod NPCs. And as I say, it is a plot point that Charname gets separated from the rest of the party members. (I just played the end of BG1 in an EET with Breagar in my party, and it is quite jarring - in the transition to SoD all party members leave as expected except Breagar who basically sleeps in Charname's bed with you and wakes up for the poisoning scene.

At any rate, SoD includes this in the aforementioned BDCUT61.bcs:

IF
	InPartyAllowDead("JAHEIRA")  // Jaheira
THEN
	RESPONSE #100
		CutSceneId(Player1)
		SetGlobal("bd_jaheira_party_epilogue","global",1)
		ActionOverride("JAHEIRA",LeaveParty())
		ActionOverride("JAHEIRA",DestroyAllFragileEquipment(ADAMANTINE))
END

IF
	InPartyAllowDead("KHALID")  // Khalid
THEN
	RESPONSE #100
		CutSceneId(Player1)
		SetGlobal("bd_khalid_party_epilogue","global",1)
		ActionOverride("KHALID",LeaveParty())
		ActionOverride("KHALID",DestroyAllFragileEquipment(ADAMANTINE))
END

[etc. with all other vanilla named NPCs]

IF
	InPartyAllowDead(Player2)
	!Name("None",Player2)
THEN
	RESPONSE #100
		CutSceneId(Player1)
		ActionOverride(Player2,DestroyAllFragileEquipment(ADAMANTINE))
		ActionOverride(Player2,LeaveParty())
END

IF
	InPartyAllowDead(Player3)
	!Name("None",Player3)
THEN
	RESPONSE #100
		CutSceneId(Player1)
		ActionOverride(Player3,DestroyAllFragileEquipment(ADAMANTINE))
		ActionOverride(Player3,LeaveParty())
END

IF
	InPartyAllowDead(Player4)
	!Name("None",Player4)
THEN
	RESPONSE #100
		CutSceneId(Player1)
		ActionOverride(Player4,DestroyAllFragileEquipment(ADAMANTINE))
		ActionOverride(Player4,LeaveParty())
END

IF
	InPartyAllowDead(Player5)
	!Name("None",Player5)
THEN
	RESPONSE #100
		CutSceneId(Player1)
		ActionOverride(Player5,DestroyAllFragileEquipment(ADAMANTINE))
		ActionOverride(Player5,LeaveParty())
END

IF
	InPartyAllowDead(Player6)
	!Name("None",Player6)
THEN
	RESPONSE #100
		CutSceneId(Player1)
		ActionOverride(Player6,DestroyAllFragileEquipment(ADAMANTINE))
		ActionOverride(Player6,LeaveParty())
END

So I think I just need to expand my leaving script to follow this pattern. As far as keeping them somewhere accessible for that later MoveToGlobal() action, I will just have to contrive to leave them in some area (at the moment, that's the BG1 Ducal Palace) so the separation can occur without need for any EscapeArea() antics.

Edited by subtledoctor
Link to comment
1 hour ago, subtledoctor said:

except Breagar who basically sleeps in Charname's bed with you

For normal SoD, he leaves the party and is on the same floor in the palace to rejoin.

Link to comment
1 hour ago, subtledoctor said:

At any rate, SoD includes this in the aforementioned BDCUT61.bcs:

Are you sure you are looking at an unmodded bdcut61.bcs? Because the script blocks for "None" Player2-6 are not in mine. EDIT: This is only in the EET version.

 

Link to comment
1 hour ago, subtledoctor said:

And then use EET's K#TELBGT, which seems to be a stand-in replacement for SoD's usual J/K/M/D handling.

Sorry for triple posting.

K#TELBGT.bcs is for transition to BG2. That is something different than the transition to SoD. EndlessBG1 uses it if the players skips SoD because - well, then the game is supposed to advance to BG2. The reason that is done from BD6100.are is because that is where the script does it in original EET (it's the last kidnapping area) so all EET-shenanigans for the transition will just happen normally. Plus, any mod NPCs also patched this script so they'll be taken care of, too.

Link to comment
4 hours ago, subtledoctor said:

But that would not address any mod NPCs.

That's why you grab their script names from a 2DA and build your script up during installation; PDIALOG.2DA and it's other-campaign equivalents that assign dialogue files are the obvious choices for picking up a list of recruited NPCs. (BDDIALOG for SoD, PDIALOG for BG1 without EET, something I don't recall for BG1 with EET).

Also, regarding bdcut61, unmodded SoD does not include the PlayerN blocks in that scene. I wonder how robust that tweaked version is to a party with multiple NPCs not in the base game. Sure, those blocks should all run simultaneously when this cutscene is run with StartCutSceneEx, but that still leaves a chance to break things if the synchronization is a bit off and the PlayerN objects get redefined as people leave.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...