//----------------
!!!Newest findings !!!
Located in module properties variables...
ON_PLAYER_DEATH1 string h2_fuguedeathopd **sends pc to plane
ON_PLAYER_DEATH2 string h2_pccorpseopd **creates corpse
ON_PLAYER_DEATH3 string h2_lootsystemopd **creates loot Bag
these are the key files for death and there includes within them...this is ware you will alter what you want done...to create corpse on player or in F*** plane
Any way you can run a small test mod in tech_support section perhaps password set then email me pass and we can send script to eachother until it works. Due to my single player delima I cant really see what effect raise/res has on pc i loos no xp when i die heck I dont even get a option for the respawn button LOL
this is key create corpse function:
void h2_CreatePlayerCorpse(object oPC)
{
string uniquePCID = h2_GetPlayerPersistentString(oPC, H2_UNIQUE_PC_ID);
location loc = GetLocalLocation(oPC, H2_LOCATION_LAST_DIED);
object oDeadPlayer = CopyObject(oPC, loc, OBJECT_INVALID, H2_CORPSE + uniquePCID);
SetName(oDeadPlayer, H2_TEXT_CORPSE_OF + GetName(oPC));
ChangeToStandardFaction(oDeadPlayer, STANDARD_FACTION_COMMONER);
// remove gold, inventory & equipped items from dead player corpse copy
h2_DestroyNonDroppableItemsInInventory(oDeadPlayer);
h2_MovePossessorInventory(oDeadPlayer, TRUE);
h2_MoveEquippedItems(oDeadPlayer);
AssignCommand(oDeadPlayer, SetIsDestroyable(FALSE, FALSE));
AssignCommand(oDeadPlayer, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(), oDeadPlayer));
object oDeathCorpse = CreateObject(OBJECT_TYPE_PLACEABLE, H2_DEATH_CORPSE, GetLocation(oDeadPlayer));
object oCorpseToken = CreateItemOnObject(H2_PC_CORPSE_ITEM, oDeathCorpse);
SetName(oCorpseToken, H2_TEXT_CORPSE_OF + GetName(oPC));
SetName(oDeathCorpse, GetName(oCorpseToken));
SetLocalLocation(oCorpseToken, H2_LAST_DROP_LOCATION, GetLocation(oDeathCorpse));
SetLocalString(oCorpseToken, H2_DEAD_PLAYER_ID, uniquePCID);
}
you find this in “h2_pccorpse_iâ€
This is the key create loot bag function
object h2_CreateLootBag(object oPC)
{
object oLootBag = GetLocalObject(oPC, H2_LOOT_BAG);
location lLootBag = GetLocation(oLootBag);
location lPlayer = GetLocation(oPC);
if (!GetIsObjectValid(oLootBag) || GetDistanceBetweenLocations(lPlayer, lLootBag) > 3.0 ||
GetAreaFromLocation(lLootBag) != GetArea(oPC))
{
oLootBag = CreateObject(OBJECT_TYPE_PLACEABLE, H2_LOOT_BAG, GetLocation(oPC));
//TODO: set the name of the lootbag using 1.67 patch SetName fuction?
SetLocalObject(oPC, H2_LOOT_BAG, oLootBag);
}
return oLootBag;
}
found in “h2_lootsystem_iâ€
Altering these two core functions will allow you to create corpse/lootbag ware you want.
You could also in the death ware you put the take away crystal free respawn have these functions fire if there are zero crystals you would alter that in....
“h2_pccorpseopd†for corpse options...
#include "h2_pccorpse_i"
void main()
{
object oPC = GetLastPlayerDied();
object oArea = GetArea(oPC);
if(check crystal count == 0 )
{
//if some other death subsystem set the player state back to alive before this one, no need to continue
if (h2_GetPlayerPersistentInt(oPC, H2_PLAYER_STATE) != H2_PLAYER_STATE_DEAD)
return;
if (GetLocalInt(oArea, H2_DO_NOT_CREATE_CORPSE_IN_AREA))
return;
if (!GetLocalInt(oPC, H2_LOGIN_DEATH)
h2_CreatePlayerCorpse(oPC);
}
//other wise the script is not fired hence no corpse/lootbag
'>
}
So there is a lternitive we just take what you used for crystals and dont make these parts fire, but once out your out you will need PC intervention or a function that tracks and sets all pc deaths to a db and upon server reset creates corpses in some area temple etc...thats the next simplest thing I can think of...
PM me if you want to give hcr2 a shot I think its possible.
Modifié par Greyfort, 07 février 2011 - 05:23 .