Aller au contenu

Killing companions !


  • Veuillez vous connecter pour répondre
27 réponses à ce sujet

#1
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
I've just made an area and the idea is to keep two of your companions alive in it however they keep coming back to life when the fighting's finished ! And the whole point of the area is to do this for a bit of suspense.

They have the companion b scripts on them and none of the resurectable,no permanent death or immortal boxes are checked. The module has a respawn feature and I don't want to lose it but I don't see how that effects them as they don't respawn during combat instead they go into the minuses and it says they're dead but all of a sudden they aren't !

Also I never really played much of SoZ but how does that death system work as I know there's something about healing going on and would it be possible if the little b*****s stayed down to blast them with a healing kit ?

Can you change the respawn stuff and put in permanent death for one area ?

Would I be better off with henchmen but does that take away the ability to control them eg. wait here or be able to make them run off etc.
Why wont they die Posted Image

Thank you..

Also completely off topic is it safe to assume there wont be a patch for the OC so I can fulfill my dream and add in a kill Nasher in crossroad keep mod without resorting to the override ? As I fancy a run through of the OC but I can't stand that ****hole !

#2
Morbane

Morbane
  • Members
  • 1 883 messages
you have to find the behaviour script that handles death - forget which one - I know thats not much help - but I can say that once you find it you can script a condition so it overrides the resurrect default only when you ant it to - I think either M Reider or TheFred know which script it is because they told me - but in my case I wanted to turn it on. it is possible that it is an xml script.

good luck finding it.

#3
Morbane

Morbane
  • Members
  • 1 883 messages
i think it is k_mod_player_respawn a campaign script from the OC
or k_mod_player_death

Modifié par Morbane, 15 décembre 2011 - 11:52 .


#4
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Thank you, I will investigate but I've never done anything like that before as I've only ever used the default stuff.. We shall see.. But they must die !

#5
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
There is also a companion on death script. I think it is called nw_comp_ondeath or something like that. You will want to give your companions custom on death scripts, I believe. In TWA2, I have it set up so that there is no auto respawn. Unfortunately, I can't remember exactly what I did to set it up, but I do know that I have custom companion on death scripts and I believe that is it. You also will probably need a custom on player death script as well, as morbane pointed out.

#6
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I never really figured out companions, but in LotD I had to remove them from the party at death to keep them from popping back up when combat was over. That was using the plain NWN2 defaults, MotB and SoZ must have better systems hidden away somewhere.

#7
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
M.Reider.. I'd much rather stick it on the companions as they're expendable ones but the rest wont be neither will the PC. I'm going to have to investigate perhaps just a plain do nothing but fall over script might work. I had hoped for something like ticking a box but it looks like a script is needed !

Lugaid of the red Stripes.. Yes.. You killed my dog ! but was the dearly departed Selkie a henchman instead ?

#8
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
I just ran a test, I stuck ga_death on one companions on death and ga_roster_party_remove on the other and they both died very well indeed. However I was stuck with two dead bodies in my gang and even when I changed areas they followed ( well sort of appeared at my feet ). Whilst I find this highly amusing it could cause problems not to mention a bad smell ! I'll have a look at the on death scripts and see if it's possible to swap in a henchman one instead as I think they die permanently.

#9
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
You could try ga_roster_remove to see if that gets them out of the party. It will despawn them as well.

If you just want to have the companion affected, then you will probably want a differnt ondeath script for the companion. You could probably just use the normal ai script and put it in the companions on death event. I'm pretty sure that is how you get rid of the auto respawn. I'll double check in TWA2 when I get back to my modding computer.

#10
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages
Instructions for implementing the SoZ Death system are on my blog.

#11
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
M. Reider.. I'm going to do some experimenting with different scripts in the on death and will see what happens but I like the idea of the normal ai one it sounds nice and sneaky without too much hassle.

Kaldor Silverwand.. You truly are a mine of information that's a damn good explanation the only thing is I only want two companions to die ( well actually your supposed to look after them ) and don't want to set it for the whole lot. I like the idea of settings for hardcore though and would make for a real challenge ( not for me though I'm rubbish at playing this game ).

Many thanks to you both now back to the trial and error...

#12
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Well I tried all sorts of different despawning derostering and default scripts and none worked they still bounced back. I put the henchman one in too, changed the campaign info so party members could die and made a feeble attempt at adding a bit to the companion death script then got frightened and left it !

In this case henchmen are the way forward, they die and stay down without following you around ! I'm going to try another couple of things like making them selectable but I think I'll be leaving them as henchmen it's only one area they have to go through anyway. Poor little things have died a lot of times in the last hour !

Many thanks to all..

#13
Dann-J

Dann-J
  • Members
  • 3 161 messages
I've got an OnDeath script for killable companions on my computer at home. I make the companions resurrectable and non-decaying, then when they die the script removes them from the party and leaves them lying on the ground.

Casting a Raise Dead or Resurrection spell on them brings them back to life, then you have to talk to them to have them join you again.

I only check these forums when I'm at work, and today is Friday here, so I could post the script on Monday (Sunday on the other side of the date line) if required.

#14
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Like DannJ says, I'm certain it is in the OnDeath script - not the modue on PC death event, but the OnDeath event for the NPC. You could just try deleting the on death script and see if that keeps them down, then if you need anything fancy, you could go from there.

#15
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
I think it's a roster thing ! I can get them down but not out of the party but a henchman does the trick and they are commandable which is good enough. I put all the henchman scripts on one of them but the conversation used the 3 roster adding scripts and they seemed to trump the others leaving the PC stuck with a dead body.

So thank you both for the kind offers and help but they're henchies now it's just about the same and in a way better for what I want as you have to be more careful of them ( no sticking healing potions in the quick slots and running them out of trouble ).

Strange thing is I always ticked the no permanent death, decay and resurrectable boxes and thought it was me keeping them alive !

#16
Dann-J

Dann-J
  • Members
  • 3 161 messages
Keep in mind that there is a bug that causes the game to crash when exiting via the main menu if you have a henchman in your party. It's not a critical bug, since you've probably saved the game before exiting, but it can be annoying.

It turns out I just used a slightly modified version of my standard ga_remove_from_party script in order to have companions leave when dead. They have to have the resurrectable flag set in their properties if you want to be able to use Raise Dead or Resurrect on them:

//ga_remove_from_party
//
// If no sTag specified, use conversation owner
// Will work as an OnDeath script if required

void main(string sTag)
{
object oCompanion = OBJECT_SELF;
if (sTag != "")
oCompanion = GetNearestObjectByTag(sTag, GetFirstPC());

if (!GetIsObjectValid(oCompanion))
return;

string sName = GetRosterNameFromObject(oCompanion);
RemoveRosterMemberFromParty(sName, GetFirstPC(), FALSE);

if (GetIsDead(oCompanion))
SetIsDestroyable(FALSE, TRUE, TRUE);
}

#17
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Look on the vault. Lance Botelle has a fix for that henchman crash bug. I use it in The Wizard's Apprentice 2 and it works great.

#18
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
DannJ.. Thanks for the warning and the script, so far things are working fine but I'll definitely keep this in mind for the future. Copying and pasting now !

M.Reider.. Off to the vault.. Thanks for the advice, this simple little thing has got more complicated as I've gone on ! Would have been nice if the no permanent death box had done something in the first place.

#19
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
M.Rieder,, I downloaded Mr Botelle's file and it's got information about maximum numbers of henchmen saying you need to put SetMaxHenchman(10); to the module on load.

Have you done this as mine keep disappearing from saves ( I even put an autosave on the area but it's pointless as it wipes one out straight away ) and I can't work out how the hell I'm supposed to add that to anything.

I'm definitely heading back to self resurrecting companions after I get these sorted.

#20
Dann-J

Dann-J
  • Members
  • 3 161 messages
I long ago gave up on henchmen in NWN2. Like many of the NWN1 leftover functions, you either have to accept the bugs or jump through hoops to circumvent them.

You can 'fake' a henchman by making a companion non-selectable using SetIsCompanionPossessionBlocked (so you can't possess them, or open their inventory directly). However I've found that you can still transfer items to them by dragging them onto their portraits - which you can never get back. If you give them something too heavy, then you're pretty much stuck with them being encumbered from then on (or you endlessly cast Bull's Strength on them).

I tried giving my fake henchmen a custom OnDisturbed script, but it seems that it only fires if you open the inventory directly or if they've been pickpocketed. Dragging and dropping items onto a portrait apparently circumvents an OnDisturbed event. A heartbeat script that cycled through the inventory and dropped anything it found tended to crash if it encountered a container item.

My solution was to cram the fake henchman's inventory full of 128 cursed keys (the lightest non-stacking items I could create). That way any attempt to drag-and-drop items to their portraits results in the item dropping directly to the ground. That's how I configured Lucky the magic cat and the darksteel golem in Isle of Shrines. The downside is that the fake henchman won't be able to swap weapons, and if they are disarmed then it is permanently. That wasn't an issue for my cat or golem, who only used creature weapons.

Modifié par DannJ, 21 décembre 2011 - 11:59 .


#21
M. Rieder

M. Rieder
  • Members
  • 2 530 messages

Iveforgotmypassword wrote...

M.Rieder,, I downloaded Mr Botelle's file and it's got information about maximum numbers of henchmen saying you need to put SetMaxHenchman(10); to the module on load.

Have you done this as mine keep disappearing from saves ( I even put an autosave on the area but it's pointless as it wipes one out straight away ) and I can't work out how the hell I'm supposed to add that to anything.

I'm definitely heading back to self resurrecting companions after I get these sorted.



You only need to alter the max number of henchmen if you are going to go over the default.  I think the default is 2 or something. I modified it and have had no problems. 


I added this line of code to my module on load script:

SetMaxHenchmen(10);

#22
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
DannJ.. That's some serious hoops you jumped through ! I like the cursed keys idea and I will definitely be giving up on them after this. I'm actually surprised that this is an issue and the defaults aren't higher as you could have loads in the crossroadkeep battle in the OC. Really weird thing is that the missing henchman is still in the party just not in body !

The reason I know this is because when you travel around with the "invisible hench" conversations still treat it as if he/she's there and fire the lines for when they're in the party.. Only problem is that it stops when they're supposed to speak !

M.Reider.. I've only got two and that's too many ! Where do I put that line of code there is already a default script in the on load section of the module properties ? I've never touched default scripts before last night and when I did and stuck the SetMaxHenchman bit in at the beginning after the "void" stuff it wouldn't let me save it saying it was wrong. Is there something else that goes with it and where abouts should it go ?

Thank you..

#23
Morbane

Morbane
  • Members
  • 1 883 messages
You have to remember that altering the default scripts that it saves to a copy that ends up in your script list - you have to manually change it to your modified script.

Modifié par Morbane, 22 décembre 2011 - 11:00 .


#24
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Morbane.. Thanks for the advice and I will remember to do that I'll rename it to make sure it's the right one too. Problem is I don't know how to modify it. I found the script using the open script/conversation function and typing in the original on load script tag (x2_mod_def_load), then stuck in the line SetMaxHenchman(10); near the beginning but it wont compile/save as it says x2_mod_def_load.nss(45) which is the line I put it on ERROR UNDEFINED IDENTIFIER. Whether it needs more added or I've put it in the wrong place I don't know.

#25
Guest_Iveforgotmypassword_*

Guest_Iveforgotmypassword_*
  • Guests
Ooops forgot the brackets !

For anybody else reading this go to just under the first { then type in..

{
SetMaxHenchmen(10);
}

Ad off you go with up to ten of the awkward pain in the **** creatures ! Next person my PC will meet is going to be a companion !