Aller au contenu

Photo

Disable deathscreen correctly (Baldur's Gate Reloaded)


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

#1
Axe_Edge

Axe_Edge
  • Members
  • 284 messages
Hi,

Getting ready to play a multiplayer run-through of Baldur's Gate Reloaded.  Problem is, while playing multiplayer, if any PC dies the deathscreen appears and the server kicks off all players.  I've been able to disable the deathscreen by commenting out

Endgame("deathhand")

which seems to work great and players are not kicked.  Problem is, when a party transitions to another area while at least one PC is dead, the entire party is dead after transitioning.

I'm just not seeing where to modify the scripts correctly to keep alive party members (PCs and/or NPCs) alive, and dead party members (PCs and/or NPCs) dead after transitioning.

I've been looking into:

player_death_script_bg

player_dying_script_bg

check_death


Thanks for any help.
Image IPB

#2
Axe_Edge

Axe_Edge
  • Members
  • 284 messages
Well, I am able to disable the deathscreen, so no PCs are kicked from the server.

Problem is, with a dead PC in the party, all PCs die after the party goes through a transition. NPCs are fine.

After having a NPC resurrect all dead PCs, the PCs still die after going through a transition.

Any ideas?

Thanks

hmm.  Maybe the exploit work around that causes damage after going through a transition kills them, again.

Modifié par Axe_Edge, 16 août 2013 - 03:53 .


#3
Axe_Edge

Axe_Edge
  • Members
  • 284 messages
I'm not quite sure what is tagging all of the PCs as "dead". After a player is killed, then resurrected, all PCs in the party die after traveling through a transition. After traveling through the transition, they seem fine for a second, then, I can year them all yell in pain ;) (and die).  I'd like for the party to be able to take a dead PC back to town to be resurrected properly.

Or, is there a way to go back to the default OnDeath, which I think a PC can die and the rest will not?

Maybe posting the player death script will help?
It may not even be this script, I guess.
(I'll take it down if the BGR team is offended)

Thanks



//player_death_script_SOA


// k_mod_player_death
/*
Module OnDeath handler to queue KnockOut script for owned PCs
*/
// BMA-OEI 12/19/05
// BMA-OEI 2/28/06 -- DeathScript support
// BMA-OEI 8/10/10 -- Exit if not owned by player (e.g. possessed companions)
// MDiekmann 7/10/07 - Modified to cause game ending condition if caused by spirit eater death
// TDE 6/20/08 - Adapted script for NX2

#include "ginc_death_bg"
#include "ginc_debug"

void main()
{
     object oDead = GetLastPlayerDied();
     PrintString( "k_mod_player_death: " + GetName(oDead) + " executing OnPlayerDeath event" );
//   SendMessageToPC(GetFirstPC(TRUE),"dead");
     //   Abort if dying character is not an owned PC

          object oFM = GetFirstFactionMember(GetFirstPC(TRUE), FALSE);
            while( GetIsObjectValid(oFM) )

            {
//         SetLocalInt(GetFirstPC(TRUE),GetTag(oFM)+"_isDead",TRUE);
              if(GetIsDead(oFM,TRUE)){
                 SendMessageToPC(GetFirstPC(TRUE),GetTag(oFM)+"_isDead"); 

                          if (GetIsOwnedByPlayer(oFM)){
                              EndGame("deathand");
                          }
                         //set this value so when you load a new area if the NPC is still dead, he remain dead
                 SetLocalInt(GetFirstPC(TRUE),GetTag(oFM)+"_isDead",TRUE);
             //         SendMessageToPC(GetFirstPC(TRUE),GetTag(oFM)+"_isDead");
                }

               oFM = GetNextFactionMember(oDead, FALSE);
            }




        // Making sure, here.
       ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDead);


        // Check for additional death script
       string sDeathScript = GetLocalString( oDead, "DeathScript" );
       if ( sDeathScript != "" ) ExecuteScript( sDeathScript, oDead );

       // Check if there are any members left for PC to possess
       if ( GetIsOwnedByPlayer(oDead) == TRUE || GetIsRosterMember(oDead) == TRUE )
       {
            if (GetIsDeathPopUpDisplayed(oDead) == FALSE )
            {
                 if ( GetIsPartyPossessible(oDead) == FALSE )
                 {
                     PrettyDebug( "*** NO ONE LEFT! ***", 30.0 );
//                   ShowProperDeathScreen( oDead );
                 }
            }
       }

ExecuteScript("k_death_remove_GUI", oDead);
}

Modifié par Axe_Edge, 18 août 2013 - 05:21 .


#4
diophant

diophant
  • Members
  • 116 messages
I have no experience with multiplayer scripting, but the problem might be this line:
SetLocalInt(GetFirstPC(TRUE),GetTag(oFM)+"_isDead",TRUE);
A PC has no tag (at least in singleplayer mods), or, other said, GetTag remains an empty string for all players. So, the local int _isDead is set to true. When entering the next area, I guess each player checks if _isDead is TRUE, and then decides to commit suicide.
You could try to replace GetTag(oFM) by GetName(oFM) throughout the script, but you must also apply this change to the onEnter script of each area.

#5
Axe_Edge

Axe_Edge
  • Members
  • 284 messages
I'll give it a go. :)