I don't want to delete my companions, please save them!

andgalf… Thanks for the script, I’m going to have to try and work out how to get it in the right place so I can console it from a save and then load the next module to test it.

Shallina… Trust me I don’t make big mods and use campaigns but blame my naughty companions if it happens, I’m only trying to save them from destruction. I think the OC had something different with all that swapping companions about stuff, mine are three permanent companions… Up until now when they need to leave.

andgalf…Nice try with the script but it didn’t work, the same thing happened they disappeared, new module, they came back. I think for some reason I’m stuck with them and that I was before with another companion in a previous campaign I made. I’ll leave it for now and mess about with other module jumps later to see if that makes a difference. Thank you.

Ok. I hope you manage to solve it eventually.

It might be an issue with the bIgnoreSelectable flag of the ga_roster_pary_remove_all standard script.

Non selectable roster members might not be removed if the flag remains to 0, which I suspect is the default value.

I always use ga_roster_party_remove_all(1,1)

// ga_roster_party_remove_all( int bDespawnNPC, int bIgnoreSelectable )
/*
	Remove all selectable roster members from oPC's party
	
	Parameters:
		int bDespawnNPC 		= If 1, despawn after removing from party
		int bIgnoreSelectable 	= If 1, also remove non-Selectable roster members
2 Likes

Claudius33… Thanks but I tried that and it didn’t work either. I’m leaving them as they are at the moment and if I can’t merge the two modules then I’ll have to go for destroy.

It’s weird that I had to destroy a previous companion years ago in a campaign I made so it might just be something at my end making them come back when you start the next mod.

@Tsongo - Can’t you open each module and do a Save Directory? Then you’ll have 2-3 (or how many modules there are) folders with all the files, then you move all the files to one of the folders outside the toolset, choose Open Directory in the Toolset, and then save as a new module with a new name? If you do it like that, the old mod files will still be there if something goes wrong. And after, you can still work on this as a module and not in Directory Mode if that’s what you prefer.

andgalf… Thanks, that was sort of what I was planning but I might just go for export and import and take the whole lot out. It’s just conversations and areas, that’s pretty much it, but because some areas are outside it could get big and that will be the deciding factor for my companions who are now sitting on death row charged with being too loyal !

Will they get a last minute pardon ? Watch this space and the fate of the trusty and very well behaved trio will be revealed.

Ah, export as an .erf, you mean? Yeah, that works too, I guess.

I hope it works if I decide to do it !

It’s really silly that I have a one minute solution to all this but really don’t want to use destroy because I’ve become attached to my trio of lunatics over the last year and it just feels wrong, like some sort of betrayal. A “that’s it you’ve done your job I don’t need you now” sort of thing.

Yeah but won’t that one minute solution cause a lot of trouble down the road? I mean, if they have leveled up and have a lot of gear from the previous module, and you are to use them again at a later stage in the next module, won’t that mess with things? Or maybe I’ve misunderstood this whole situation?

It’s the ending module, they come back but all changed and ready to party !

Ah, ok.

You can treat/save “modules” as “module folders” and is actually how I provide my campaign. ie: I have a campaign folder (that contains most of the files) and a smaller module folder, and I am currently working on the module 2 folder.

I always work with folders as it is safer to do so anyway. i.e. Break a mod and you may have to work from a backup. A folder cannot be broken (in the same way).

My personal approach is to keep all campaign files where possible (which can then be patched “live”) and only place module material where necessary - which means areas mostly. That way, all scripts are available for all modules you are working on from the campaign folder - and work on module areas are kept separate.

Re Companions … Why not just remove them from party on first area entry of the new module?

Unless I have misunderstood your issue?

2 Likes

Lance_Botelle… I like the idea of using the campaign folder like that but I’m a bit late now to start swapping about. I’m a module mode person and never changed over to directory. I save as a directory if I want something to become campaign like a conversation or script then I swap it in manually because I lost the toolset window for that years ago and it never came back.

Regarding the companions it’s all a bit tricky. People say goodbye then can’t really show up at all in the next module. If it went wrong and one gets stuck then you could have two of them at once which would look really silly. That’s why I wanted to solo the PC from the start of the next module.

I agree with Lance here. If you put a script on the first area, or something similar, where you remove them right away (might have a 0.2 delay (and I don’t think the player will see that as it goes so fast) on that so that the game sees them entering the area or something) the problem should be solved. I don’t see how they would get stuck…I do think you would want to do a custom script for this though. I know of no stock script that could do something like this if you want to make sure it’s done right.

1 Like

Here’s the kind of script I would use for this. Place this on the OnEnter of the area where the PC starts the new module:

#include "ginc_companion"


void main()
{

object oPC = GetEnteringObject();

if(!GetIsPC(oPC)) return;

if(GetLocalInt(OBJECT_SELF,"Done")) return;

SetLocalInt(OBJECT_SELF,"Done",1);

RemoveRosterMembersFromParty(oPC);


}
3 Likes

andgalf… You have saved my companions from death row ! The script worked so even if I merge my mods I’ll just leave it in and let it do the work.

Thank you.

1 Like

Glad that it worked for you and that I could help!

I’m right now screwing about with another script of mine…I think you should put this script on the OnClientEnter and not the OnEnter of the area @Tsongo. That’s how I usually do it, and that always works, but I had some odd issues right now with my other script, so that’s why I told you to put it on the OnEnter, but I believe it is safer to put it on the OnClientEnter. So maybe try that too, and if that works for you, I suggest you use that instead. From my understanding reading some other old threads on this (when my problem came up), the OnClientEnter is more reliable (even if in my extremely peculiar case it was an issue).

And I see now that I made a mistake with your script, so I will change and test it again. Gaah, sometimes you don’t see things until you read 5 times. I’ll be back soon after some testing…

1 Like

Alright, I see now the mistakes I made with the script. I’m glad it still worked for you. However, I edited it so it is more correct now (so that it doesn’t cause bugs, and without redundant parts) to this:

#include "ginc_companion"

void main()
{

object oPC = GetEnteringObject();

if(!GetIsPC(oPC)) return;

if(GetLocalInt(OBJECT_SELF,"Done")) return;

SetLocalInt(OBJECT_SELF,"Done",1);

RemoveRosterMembersFromParty(oPC);


}

What I tried to do with the script above was to put a bit of delay so that the game is sure to find the companions from the party, but since it finds the PC, maybe it’s ok. I have another version of this script where I put a delay on the whole thing, but there you may see, for a microsecond, the companions disappearing:

#include "ginc_companion"

void RemoveTheCompanions()
{

object oPC = GetFirstPC();

RemoveRosterMembersFromParty(oPC);

}

void main()
{

object oPC = GetEnteringObject();

if(!GetIsPC(oPC)) return;

if(GetLocalInt(OBJECT_SELF,"Done")) return;

SetLocalInt(OBJECT_SELF,"Done",1);

DelayCommand(0.2,RemoveTheCompanions());


}

Sorry about all the mess, @Tsongo. I’m not thinking straight today. A bit too tired, and when trying several things at once in the toolset, my head gets confused and makes mistakes.

Please @Tsongo use the edited script in the “solution” post instead, or try out the new one here (the second one).

1 Like