Thoughts on how to do this

This is confusing me and I don’t know what goes in what order or how to do certain things. Here’s the plan…

You have three companions, they will leave the party and go to different locations during a single conversation, two will be stripped of items, one has to be given clothes as otherwise she’s totally naked, the one that isn’t stripped will turn up later and rejoin you, you will then go and rejoin another one and finally go and get the last one. All from conversations.

Here’s what I thought. Take away the companion that doesn’t get stripped ( she leaves first ) and send her to a hangout/ waypoint near where you meet up again, she turns up, do the “ga_roster party add” thing and she’s back on the team. But can I move someone that’s in a hangout or do I just leave her behind a door to say “surprise” ? Does jumping her straight back with the “party add” work from a hangout or do they have to actually join officially.

Next companion, she walks off camera, gets stripped of items, given some clothes which she puts on ( don’t know how to do that without giving some to everybody ) and jumped to a hangout/ waypoint. You find her and join up again.

Fade to black in conversation with last party member, whilst this is happening he is stripped, leaves the party and is jumped to a location, the PC gets stripped and jumped too. Later on you will find this last companion and he joins up again but can I strip him later when he’s not in the area or party ? Can I strip the other one and give her clothes when she’s not in the area or party ?

I’ve never used a hangout before do I need to “ga roster party remove” before doing so and how much control do I have over anybody in a hangout ? Is this hangout thing like in the OC where you select who’s going on what mission ? Does sending a companion to a hangout automatically take them out of the party ?

All suggestions welcome, but I’m sorry to say the item strip is vital… But everybody get it all back later, I promise !

Wow, that’s a lot of questions.

Here’s a few thoughts. I used the hangout system together with Colorfade’s companion system that was based on the OC in my second module. Sadly, for me it worked so-so…I tried asking Colorsfade back then, about 3 years ago or so, and he said he’d get back to me and help me, which he never did, and he’s not active on the vault anymore sadly.
After that I’ve never used the hangout system even though, if you do it correctly and know what you’re doing, I’m fairly certain it can be a solid system.

You can party add her through dialogue as long as she’s in the same module. She doesn’t need to be in the same area.

I’ve just done a script where the companions jump to different locations and leave the party in my 5th module. I’m basing my script of a script that kevL_s did for my first module. I think the stripping of items should be no problem to script either…but it may take some time. I’m sure if travus is around, he’ll do a super effective compact script for this like he always does. Otherwise I could try and help you, but it seems like there was quite a lot to be done with this script, so I’ll have to try and wrap my head around it all.

2 Likes

angalf… Thanks for the ideas, I wasn’t too happy about this hangout thing because I’d never used it before so I could just go with strip them all off camera, party remove and jump one by one. I think my naked lady’s going to cause issues !

This has to be done one by one so one script wont work. They all leave at different times during the cutscene.

I think you’ve solved one companion I’ll just party add her because it’s the same module, she’s fully equipped and should be easy enough to trap in a locked room after leaving the party.

Ah, ok. Can’t you just use the ga_roster_remove script then? Is it the stripping thing you need a separate script for, or do you need to remove and strip them at the same time (I’m sorry, I’m a bit distracted at the moment, as I’m trying to solve my own issues with my own module at the same time as I’m talking to you right now).

EDIT: Maybe do a ga_roster_remove at one node, then do a ga_jump at the next node, and then we do a stripping script…just a moment and I think I’ll have something like that…

EDIT2: Here’s a modified script that I’m using in the module I’m working on now. It works quite well, I believe. It’s travus’ script that I’ve modified:

/*
	Script by andgalf with excerpts from a script by travus.
*/


void UnequipAll(object oFM)
{
	object o;
	int n;
	
	for (n = INVENTORY_SLOT_HEAD; n < INVENTORY_SLOT_CWEAPON_L; n++)
	{
		o = GetItemInSlot(n, oFM);
		if (!GetItemCursedFlag(o)) AssignCommand(oFM, ActionUnequipItem(o));
	}
}



void MoveItemsToChest(object oFM)
{
	object oContainer = GetObjectByTag("containertag");
	object oItem = GetFirstItemInInventory(oFM);

	while (GetIsObjectValid(oItem))
	{
     if (!GetItemCursedFlag(oItem)) 
		{
		AssignCommand(oFM, ActionGiveItem(oItem, oContainer));
		}
			
		oItem = GetNextItemInInventory(oFM);
	}
	

}

				
void main(string sCompaniontag)
{
	object oPC = GetFirstPC();

	object oCompanion = GetObjectByTag(sCompaniontag);
	

	
	UnequipAll(oCompanion);
	
	
	DelayCommand(0.2f, MoveItemsToChest(oCompanion));
	
	CreateItemOnObject("itemtemplate",oCompanion,1,"itemtag",FALSE);
	
	object oItem = GetObjectByTag("itemtag");
	
DelayCommand(0.2, AssignCommand(oCompanion, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)));

				
	
}

As you can see, all items are stripped from the body and all items in the inventory are also taken. Everything is moved to a crate.

EDIT: I added an item to the companion that I also equipped at the end of the script.

EDIT2: Missed the thing with the itemtemplate. Updated that.

1 Like

andgalf. Thanks for the script and I must say these scripts are getting more advanced ! I like that you can put in the tags on the conversation node, quite a few of the scripts I’ve got from here do that and I never thought it was possible !

So here’s a plan… But more questions !

Party remove the first companion and then jump them to a secret location in the module.

Move 2nd companion out of the way ( she’s the naked one ).

Fade to black.

Strip 3rd companion, party remove and jump.

Strip 2nd companion and PC, give both clothes, equip 2nd companion, party remove, jump 2nd and third companion all over the place with the PC too.

Can I party remove before jumping or will they disappear ? Can I equip them while they’re not in the party ?

andgalf… I just read your edit, that solves a big issue so ignore my bit up above about it.

Is that item tag thing a resref and then a tag later ?

Ok? So is it solved then? I mean, we could do it like this too:

/*
	Script by andgalf.
	
		int nSlot - the equipment slot to unequip.
				INVENTORY_SLOT_HEAD			= 0;
				INVENTORY_SLOT_CHEST		= 1;
				INVENTORY_SLOT_BOOTS		= 2;
				INVENTORY_SLOT_ARMS			= 3;
				INVENTORY_SLOT_RIGHTHAND	= 4;
				INVENTORY_SLOT_LEFTHAND		= 5;
				INVENTORY_SLOT_CLOAK		= 6;
				INVENTORY_SLOT_LEFTRING		= 7;
				INVENTORY_SLOT_RIGHTRING	= 8;
				INVENTORY_SLOT_NECK      	= 9;
				INVENTORY_SLOT_BELT      	= 10;
				INVENTORY_SLOT_ARROWS    	= 11;
				INVENTORY_SLOT_BULLETS   	= 12;
				INVENTORY_SLOT_BOLTS     	= 13;
				INVENTORY_SLOT_CWEAPON_L 	= 14;
				INVENTORY_SLOT_CWEAPON_R 	= 15;
				INVENTORY_SLOT_CWEAPON_B 	= 16;
				INVENTORY_SLOT_CARMOUR   	= 17;
				

*/
		
void main(string sCompaniontag, string sItemtemplate, string sItemtag, int nSlot)
{

	object oCompanion = GetObjectByTag(sCompaniontag);
	
	CreateItemOnObject(sItemtemplate,oCompanion,1,sItemtag,FALSE);
	
	object oItem = GetObjectByTag(sItemtag);
	
	DelayCommand(0.2, AssignCommand(oCompanion, ActionEquipItem(oItem, nSlot)));
	
}	

This is just a “create item and then equip the item” script.

EDIT: Updated the script a bit.

First it’s the tag of the item, and then it’s the new tag of the item, if you want to change it, if you’re referring to CreateItemOnObject that is.

Yes, if you party remove. I think the companon stays where it is, it’s just not part of the party anymore (maybe test it ingame to be sure). Yes, you can equip them while they’re not in the party.

EDIT: Sorry, I made a mistake. First it’s the template of the item and then it’s the new tag of the item. Arrgh, I need to redo the script a bit then…

1 Like

andgalf… Awesome, I thought you couldn’t create an item with a tag… But I wish you could because I’ve put in tags too many times !

Thanks for clarifying what I can do with my ex companions that’s a big help too.

I think it’s solved and will tick the scripts box in a minute, it’ll just be a matter of timing it right. It’s a long way into the module and the rejoining is even further so I’ll have to test it when I get there. but this issue has been driving me nuts for a while while I was trying to work it out in my head.

1 Like

Great to hear. I updated the script since I made that mistake with the template.

EDIT: And I updated the other script with that in mind too.

andgalf… I can’t tick two solved boxes, but I would if I could, many thanks for saving my brain !

1 Like

Glad I could help. This was easy compared to trying to help the other guy with NWN:EE. That really gave me a real headache and was too advanced for me. I still only know basic scripting, so I’m glad when I can help out with things like this.

If I somehow made a mistake with either of these scripts (they are not fully tested in their current form), feel free to get back and ask about it.

1 Like

andgalf… If your scripting’s basic then mine’s in the stone age ! Thanks again, you will now be held responsible for stripping a lot of women !

But you did give them some more clothes so you’re still a gentleman.

:sweat_smile: Ok, got a bit worried there…

And I can’t take too much credit for the first script. It’s mostly @travus genius at play there. I just modified it to fit my, and now your, needs.

This is all possible to do and not that difficult. But i am afraid it’s super “specific” and you need to write your batch of scripts yourself to do it.

Either you find someone that can do it for you, or you decide to really invest yourself into scripting in order to becomme proficient with it.

You need functions to unequip/destroy item, functions to jump objects around, and functions to add/remove object from your roster/party

There are functions that do it in the OC/XP1/XP2, or in somme community modules, you can use them as a basic, but you’ll have to put them together and fully understand them in order for you to do the sequences you wish.

Shallina… Thanks I’m going to give it a go with what I have as I think I can get away with it, if not I’ll change the story a bit to make it fit. The way I see it is that if I can make the companions leave the party and be jumped somewhere in the state that you’re supposed to find them in then that’ll do it. There is actually a bit more to this involving destroying two objects and giving one back much later but I think the ga_destroy and ga_create item can handle that.

Problem is testing this because it happens in the middle of a quite large module so I’ll have to keep my fingers crossed !

I know I should invest myself in scripting but I normally try to write around what’s on offer and is generic and it’s only this module that I’ve got a bit carried away with, so I’ve found things more difficult and complicated.

Since you often don’t have that difficult things you need to be done, I find it a nice exercise in trying to learn scripting myself by helping you. If you had really complicated stuff you needed in your module then perhaps I would too advice trying to learn on your own but…as it is now, I think we can help you out here in the community. :slightly_smiling_face:

1 Like

you can check the BGR first script runned in the first module (BGR_A). We strip of its equipement the main PC, and jump it to the start point of our campaign inside that script. I think there is also something similar at the beginning of MOTB.

1 Like

andgalf… Thanks, I really do try not to get complicated and I appreciate all the help I get when I write myself into something out of the ordinary.

I’m very pleased I could be of assistance with your scripting… It’s not often I get to say that !

Shallina… I’m going to investigate what you suggested as it might be more efficient in one script rather than the ga give inventory and ga jump players that are in the conversation scripts, thank you.