So I have been trying to get some of the monster skins to work on PCs. Only problem is that Leto changes them, but when I load my character in a mod I downloaded it changes my skin back to default. Script issue or something else?
I could post the OnClientEnter but is has alot of #includes commands and I dont know how to decode them to pinpoint the problem.
Mod: Anphillia Genesis ( On the NWN vault )
PC skins
Débuté par
Starbridge
, janv. 29 2011 05:27
#1
Posté 29 janvier 2011 - 05:27
#2
Posté 29 janvier 2011 - 11:01
Whats your nwnplayer.ini Single Player Enforce Legal Characters setting? If you have it on (1) turn it off (0).
#3
Posté 29 janvier 2011 - 03:34
It is set at 0, and still wont work.
#4
Posté 29 janvier 2011 - 03:45
(Well I misunderstand what you needed, I saw "skin" so I thought creature skin item, but obviously you meant appearance)
Ok, so first try if it does work in any other module. If do, post here the main OnClientEnter of the mod you want to play.
In case it won't work even in other module (try NWN OC), I would guess you are doing it wrong?
Ok, so first try if it does work in any other module. If do, post here the main OnClientEnter of the mod you want to play.
In case it won't work even in other module (try NWN OC), I would guess you are doing it wrong?
#5
Posté 29 janvier 2011 - 06:00
As ShaDoOoW mentions post your OnClientEnter(), as default though the Horse additions can nobble a non-default appearance.
#6
Posté 29 janvier 2011 - 08:17
Ok, here is the script.
Modifié par Starbridge, 29 janvier 2011 - 08:25 .
#7
Posté 29 janvier 2011 - 08:25
//Hardcore Client Entering
//Archaegeo 2002 Jun 24
//
// This script goes in OnClientEnter in Module Properties - Events
// It checks to see if they have a Death Amulet on them, and if so
// It sets thier player state to Dead and rekills them.
#include "NW_I0_GENERIC"
#include "hc_inc_on_enter"
#include "hc_text_enter"
#include "anph_inc"
#include "anph_persist_inc"
#include "anph_level_inc"
#include "zep_inc_phenos2"
#include "tk_hips_inc"
#include "moth_inc_effects"
#include "moth_inc_spells"
#include "moth_inc"
#include "cs_persmap__inc"
#include "x3_inc_horse"
void HCRBoot(object oPC, string sReason)
{
SendMessageToPC(oPC,sReason);
DelayCommand(3.0,BootPC(oPC));
}
void UpdateLikeDislike (object oPC)
{
CheckPlayerTeam (oPC);
}
void CreateItemOnPlayer (object oPC, string sResRef)
{
CreateItemOnObject(sResRef, oPC);
}
void main()
{
object oMod = GetModule();
object oPC = GetEnteringObject();
string sArea = GetTag(GetArea(oPC));
//--------1.69 Horses------------------
ExecuteScript("x3_mod_pre_enter",OBJECT_SELF); // Override for other skin systems
if ((GetIsPC(oPC)||GetIsDM(oPC))&&!GetHasFeat(FEAT_HORSE_MENU,oPC))
{ // add horse menu
HorseAddHorseMenu(oPC);
if (GetLocalInt(GetModule(),"X3_ENABLE_MOUNT_DB"))
{ // restore PC horse status from database
DelayCommand(2.0,HorseReloadFromDatabase(oPC,X3_HORSE_DATABASE));
} // restore PC horse status from database
} // add horse menu
if (GetIsPC(oPC))
{ // more details
// restore appearance in case you export your character in mounted form, etc.
if (!GetSkinInt(oPC,"bX3_IS_MOUNTED")) HorseIfNotDefaultAppearanceChange(oPC);
// pre-cache horse animations for player as attaching a tail to the model
HorsePreloadAnimations(oPC);
DelayCommand(3.0,HorseRestoreHenchmenLocations(oPC));
} // more details
// End 1.69 Horse
MothSetFactionInt(oPC);
MothRemovePolymorph(oPC);
MothDontStealDacksKey(oPC);
RemoveRelics(oPC);
TK_HiPS_OnClientEnter(oPC);
zep_Dismount(oPC);
MothSetIsPMCaster(oPC);
MothBonuses(oPC);
MothGiveJournal(oPC);
MothTimeLockCleaner(oPC);
MothBanWandCheck(oPC,oMod);
//MothPPCheck(oPC,oMod);
LoadPersistentMapPins(oPC);
MothSetShifterLevels(oPC);
MothSetRDDLevels(oPC);
MothRestorePlotWeapon(oPC);
SetPanelButtonFlash(oPC,PANEL_BUTTON_JOURNAL,FALSE);
MothDislikeSecondaryFaction(oPC);
MothSetDomain(oPC);
int nPKT = GetLocalInt(oMod,"PKTRACKER");
int nDM = GetIsDM(oPC);
string sCDK = GetPCPublicCDKey(oPC);
string sPlayerName = GetPCPlayerName(oPC);
string sName = GetName(oPC);
int iStripItems = FALSE;
int iLvl;
//--------------------------------------------------------------------------
// DMReserve
//--------------------------------------------------------------------------
if(GetLocalInt(oMod,"DMRESERVE"))
{
int nC;
object oPlayers=GetFirstPC();
if(!nDM)
{
while(GetIsObjectValid(oPlayers))
{
if(!GetIsDM(oPlayers)) nC++;
oPlayers=GetNextPC();
}
}
if(nC > GetLocalInt(oMod,"DMRESERVE") && nDM==FALSE)
{
HCRBoot(oPC,DMRES);
postEvent();
return;
}
}
if (GetIsPC (oPC) && !GetXP (oPC) && !GetIsDM (oPC))
iStripItems = TRUE;
//--------------------------------------------------------------------------
// Factions
//--------------------------------------------------------------------------
// Remember Factions.
if (GetAnphInt (AnphPCID (oPC) + "LamirFaction") == 1){
object oLamirFaction = GetObjectByTag ("LamirFaction");
AdjustReputation (oPC, oLamirFaction, 1);
}
if (GetAnphInt (AnphPCID (oPC) + "RanzingtonFaction") == 1){
object oRanzingtonFaction = GetObjectByTag ("RanzingtonFaction");
AdjustReputation (oPC, oRanzingtonFaction, 1);
}
// RememberedHP is set in the heartbeat.
int nKnown = GetLocalInt (oMod, sName + sPlayerName + "RHP");
if (nKnown == 1)
{
int nHitPoints = GetLocalInt (oMod, sName + sPlayerName + "CHP");
int nCurHitPoints = GetCurrentHitPoints (oPC);
int nDam = nCurHitPoints - nHitPoints;
if (nHitPoints < 0)
{
effect eDam = EffectDamage(nCurHitPoints + 50, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE);
ATS_InitializePlayer(oPC);
DelayCommand(5.0, ApplyEffectToObject (DURATION_TYPE_INSTANT, eDam, oPC));
}
else if (nDam > 0)
{
effect eDam = EffectDamage (nDam, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
DelayCommand (3.0, ApplyEffectToObject (DURATION_TYPE_INSTANT, eDam, oPC));
}
}
//--------------------------------------------------------------------------
// DM Wands
//--------------------------------------------------------------------------
if (nDM)
{
// Give DM's a HCR Helper in inventory
if(GetIsObjectValid(GetItemPossessedBy(oPC,"DMsHelper"))==FALSE)
CreateItemOnObject("DMsHelper", oPC);
if(GetIsObjectValid(GetItemPossessedBy(oPC,"WandOfFX"))==FALSE)
CreateItemOnObject("wandoffx", oPC);
if(!GetIsObjectValid(GetItemPossessedBy(oPC,"XPWand")))
CreateItemOnObject("xpwand", oPC);
if(!GetIsObjectValid(GetItemPossessedBy(oPC,"ATS_D_DMSW_N_NON")))
CreateItemOnObject("ats_d_dmsw_n_non", oPC);
}
//--------------------------------------------------------------------------
// New player?
//--------------------------------------------------------------------------
if (!GetXP (oPC)) SetXP (oPC, 1);
//--------------------------------------------------------------------------
// Log
//--------------------------------------------------------------------------
WriteTimestampedLogEntry (" Player Enter 1:"+ GetPCPlayerName(oPC) +
", Handle:" + GetName(oPC) +
", CD KEY:" + GetPCPublicCDKey(oPC)+
", IP:" + GetPCIPAddress(oPC) +
", XP:" + IntToString(GetXP(oPC))+
", Level:" + IntToString(GetCharacterLevel(oPC)) );
WriteTimestampedLogEntry (" Player Enter 2:"+ GetPCPlayerName(oPC) +
", Gender:" + IntToString(GetGender(oPC))+
", Race:" + IntToString(GetRacialType(oPC))+"/"+GetRace(GetRacialType(oPC))+
", Gold:" + IntToString(GetGold(oPC))+
", class:" + Getclass( oPC )+
", Faction:" + IntToString(AnphFastGetPlayerTeamInt(oPC))+"/"+AnphGetPlayerTeam(oPC)+"/"+AnphFastGetPlayerTeam(oPC) );
// Send a message to DMs and write CD-key to variable
SaveLevelsOnPC(oPC);
string sCDkey = GetPCPublicCDKey(oPC);
DelayCommand(2.5, SendMessageToAllDMs("** Player " + sPlayerName + ", Char " + GetName(oPC) + ", CD-Key " + sCDkey + " joined.\\nXP: " + IntToString(GetXP(oPC)) + " (" + CreateLevelUpMessage(oPC, TRUE) + "). Gold: " + IntToString(GetGold(oPC))+ "."));
DelayCommand(5.0, DeleteLevelsOnPC(oPC));
SetLocalString(GetModule(), GetName(oPC) + "CDKey", GetPCPublicCDKey(oPC));
SetLocalString(GetModule(), GetName(oPC) + "PlayerName", GetPCPlayerName(oPC));
//--------------------------------------------------------------------------
// Send a login message to all players if one exists
//--------------------------------------------------------------------------
if(GetLocalString(oMod,"LOGINMESSAGE") != "NONE")
SendMessageToPC(oPC,GetLocalString(oMod,"LOGINMESSAGE"));
//--------------------------------------------------------------------------
// Update player faction
//--------------------------------------------------------------------------
DelayCommand(10.0, UpdateLikeDislike (oPC));
DelayCommand(8.0,MothUpdateHideFeats(oPC));
if (GetIsObjectValid(GetItemPossessedBy(oPC, "Banished")))
{
object oFaction01Member = GetObjectByTag (GetLocalString(oMod, "FACTION_01_FACTIONOBJECT")); // Cleaven
object oFaction02Member = GetObjectByTag (GetLocalString(oMod, "FACTION_02_FACTIONOBJECT")); // Axfell
object oFaction03Member = GetObjectByTag (GetLocalString(oMod, "FACTION_03_FACTIONOBJECT")); // Ranzington
object oFaction04Member = GetObjectByTag (GetLocalString(oMod, "FACTION_04_FACTIONOBJECT")); // Drow
object oFaction05Member = GetObjectByTag (GetLocalString(oMod, "FACTION_05_FACTIONOBJECT")); // -inactive-
AdjustReputation (oPC, oFaction01Member, -100);
AdjustReputation (oPC, oFaction02Member, -100);
AdjustReputation (oPC, oFaction03Member, -100);
AdjustReputation (oPC, oFaction04Member, -100);
AdjustReputation (oPC, oFaction05Member, -100);
}
}
//Archaegeo 2002 Jun 24
//
// This script goes in OnClientEnter in Module Properties - Events
// It checks to see if they have a Death Amulet on them, and if so
// It sets thier player state to Dead and rekills them.
#include "NW_I0_GENERIC"
#include "hc_inc_on_enter"
#include "hc_text_enter"
#include "anph_inc"
#include "anph_persist_inc"
#include "anph_level_inc"
#include "zep_inc_phenos2"
#include "tk_hips_inc"
#include "moth_inc_effects"
#include "moth_inc_spells"
#include "moth_inc"
#include "cs_persmap__inc"
#include "x3_inc_horse"
void HCRBoot(object oPC, string sReason)
{
SendMessageToPC(oPC,sReason);
DelayCommand(3.0,BootPC(oPC));
}
void UpdateLikeDislike (object oPC)
{
CheckPlayerTeam (oPC);
}
void CreateItemOnPlayer (object oPC, string sResRef)
{
CreateItemOnObject(sResRef, oPC);
}
void main()
{
object oMod = GetModule();
object oPC = GetEnteringObject();
string sArea = GetTag(GetArea(oPC));
//--------1.69 Horses------------------
ExecuteScript("x3_mod_pre_enter",OBJECT_SELF); // Override for other skin systems
if ((GetIsPC(oPC)||GetIsDM(oPC))&&!GetHasFeat(FEAT_HORSE_MENU,oPC))
{ // add horse menu
HorseAddHorseMenu(oPC);
if (GetLocalInt(GetModule(),"X3_ENABLE_MOUNT_DB"))
{ // restore PC horse status from database
DelayCommand(2.0,HorseReloadFromDatabase(oPC,X3_HORSE_DATABASE));
} // restore PC horse status from database
} // add horse menu
if (GetIsPC(oPC))
{ // more details
// restore appearance in case you export your character in mounted form, etc.
if (!GetSkinInt(oPC,"bX3_IS_MOUNTED")) HorseIfNotDefaultAppearanceChange(oPC);
// pre-cache horse animations for player as attaching a tail to the model
HorsePreloadAnimations(oPC);
DelayCommand(3.0,HorseRestoreHenchmenLocations(oPC));
} // more details
// End 1.69 Horse
MothSetFactionInt(oPC);
MothRemovePolymorph(oPC);
MothDontStealDacksKey(oPC);
RemoveRelics(oPC);
TK_HiPS_OnClientEnter(oPC);
zep_Dismount(oPC);
MothSetIsPMCaster(oPC);
MothBonuses(oPC);
MothGiveJournal(oPC);
MothTimeLockCleaner(oPC);
MothBanWandCheck(oPC,oMod);
//MothPPCheck(oPC,oMod);
LoadPersistentMapPins(oPC);
MothSetShifterLevels(oPC);
MothSetRDDLevels(oPC);
MothRestorePlotWeapon(oPC);
SetPanelButtonFlash(oPC,PANEL_BUTTON_JOURNAL,FALSE);
MothDislikeSecondaryFaction(oPC);
MothSetDomain(oPC);
int nPKT = GetLocalInt(oMod,"PKTRACKER");
int nDM = GetIsDM(oPC);
string sCDK = GetPCPublicCDKey(oPC);
string sPlayerName = GetPCPlayerName(oPC);
string sName = GetName(oPC);
int iStripItems = FALSE;
int iLvl;
//--------------------------------------------------------------------------
// DMReserve
//--------------------------------------------------------------------------
if(GetLocalInt(oMod,"DMRESERVE"))
{
int nC;
object oPlayers=GetFirstPC();
if(!nDM)
{
while(GetIsObjectValid(oPlayers))
{
if(!GetIsDM(oPlayers)) nC++;
oPlayers=GetNextPC();
}
}
if(nC > GetLocalInt(oMod,"DMRESERVE") && nDM==FALSE)
{
HCRBoot(oPC,DMRES);
postEvent();
return;
}
}
if (GetIsPC (oPC) && !GetXP (oPC) && !GetIsDM (oPC))
iStripItems = TRUE;
//--------------------------------------------------------------------------
// Factions
//--------------------------------------------------------------------------
// Remember Factions.
if (GetAnphInt (AnphPCID (oPC) + "LamirFaction") == 1){
object oLamirFaction = GetObjectByTag ("LamirFaction");
AdjustReputation (oPC, oLamirFaction, 1);
}
if (GetAnphInt (AnphPCID (oPC) + "RanzingtonFaction") == 1){
object oRanzingtonFaction = GetObjectByTag ("RanzingtonFaction");
AdjustReputation (oPC, oRanzingtonFaction, 1);
}
// RememberedHP is set in the heartbeat.
int nKnown = GetLocalInt (oMod, sName + sPlayerName + "RHP");
if (nKnown == 1)
{
int nHitPoints = GetLocalInt (oMod, sName + sPlayerName + "CHP");
int nCurHitPoints = GetCurrentHitPoints (oPC);
int nDam = nCurHitPoints - nHitPoints;
if (nHitPoints < 0)
{
effect eDam = EffectDamage(nCurHitPoints + 50, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_FIVE);
ATS_InitializePlayer(oPC);
DelayCommand(5.0, ApplyEffectToObject (DURATION_TYPE_INSTANT, eDam, oPC));
}
else if (nDam > 0)
{
effect eDam = EffectDamage (nDam, DAMAGE_TYPE_MAGICAL, DAMAGE_POWER_PLUS_TWENTY);
DelayCommand (3.0, ApplyEffectToObject (DURATION_TYPE_INSTANT, eDam, oPC));
}
}
//--------------------------------------------------------------------------
// DM Wands
//--------------------------------------------------------------------------
if (nDM)
{
// Give DM's a HCR Helper in inventory
if(GetIsObjectValid(GetItemPossessedBy(oPC,"DMsHelper"))==FALSE)
CreateItemOnObject("DMsHelper", oPC);
if(GetIsObjectValid(GetItemPossessedBy(oPC,"WandOfFX"))==FALSE)
CreateItemOnObject("wandoffx", oPC);
if(!GetIsObjectValid(GetItemPossessedBy(oPC,"XPWand")))
CreateItemOnObject("xpwand", oPC);
if(!GetIsObjectValid(GetItemPossessedBy(oPC,"ATS_D_DMSW_N_NON")))
CreateItemOnObject("ats_d_dmsw_n_non", oPC);
}
//--------------------------------------------------------------------------
// New player?
//--------------------------------------------------------------------------
if (!GetXP (oPC)) SetXP (oPC, 1);
//--------------------------------------------------------------------------
// Log
//--------------------------------------------------------------------------
WriteTimestampedLogEntry (" Player Enter 1:"+ GetPCPlayerName(oPC) +
", Handle:" + GetName(oPC) +
", CD KEY:" + GetPCPublicCDKey(oPC)+
", IP:" + GetPCIPAddress(oPC) +
", XP:" + IntToString(GetXP(oPC))+
", Level:" + IntToString(GetCharacterLevel(oPC)) );
WriteTimestampedLogEntry (" Player Enter 2:"+ GetPCPlayerName(oPC) +
", Gender:" + IntToString(GetGender(oPC))+
", Race:" + IntToString(GetRacialType(oPC))+"/"+GetRace(GetRacialType(oPC))+
", Gold:" + IntToString(GetGold(oPC))+
", class:" + Getclass( oPC )+
", Faction:" + IntToString(AnphFastGetPlayerTeamInt(oPC))+"/"+AnphGetPlayerTeam(oPC)+"/"+AnphFastGetPlayerTeam(oPC) );
// Send a message to DMs and write CD-key to variable
SaveLevelsOnPC(oPC);
string sCDkey = GetPCPublicCDKey(oPC);
DelayCommand(2.5, SendMessageToAllDMs("** Player " + sPlayerName + ", Char " + GetName(oPC) + ", CD-Key " + sCDkey + " joined.\\nXP: " + IntToString(GetXP(oPC)) + " (" + CreateLevelUpMessage(oPC, TRUE) + "). Gold: " + IntToString(GetGold(oPC))+ "."));
DelayCommand(5.0, DeleteLevelsOnPC(oPC));
SetLocalString(GetModule(), GetName(oPC) + "CDKey", GetPCPublicCDKey(oPC));
SetLocalString(GetModule(), GetName(oPC) + "PlayerName", GetPCPlayerName(oPC));
//--------------------------------------------------------------------------
// Send a login message to all players if one exists
//--------------------------------------------------------------------------
if(GetLocalString(oMod,"LOGINMESSAGE") != "NONE")
SendMessageToPC(oPC,GetLocalString(oMod,"LOGINMESSAGE"));
//--------------------------------------------------------------------------
// Update player faction
//--------------------------------------------------------------------------
DelayCommand(10.0, UpdateLikeDislike (oPC));
DelayCommand(8.0,MothUpdateHideFeats(oPC));
if (GetIsObjectValid(GetItemPossessedBy(oPC, "Banished")))
{
object oFaction01Member = GetObjectByTag (GetLocalString(oMod, "FACTION_01_FACTIONOBJECT")); // Cleaven
object oFaction02Member = GetObjectByTag (GetLocalString(oMod, "FACTION_02_FACTIONOBJECT")); // Axfell
object oFaction03Member = GetObjectByTag (GetLocalString(oMod, "FACTION_03_FACTIONOBJECT")); // Ranzington
object oFaction04Member = GetObjectByTag (GetLocalString(oMod, "FACTION_04_FACTIONOBJECT")); // Drow
object oFaction05Member = GetObjectByTag (GetLocalString(oMod, "FACTION_05_FACTIONOBJECT")); // -inactive-
AdjustReputation (oPC, oFaction01Member, -100);
AdjustReputation (oPC, oFaction02Member, -100);
AdjustReputation (oPC, oFaction03Member, -100);
AdjustReputation (oPC, oFaction04Member, -100);
AdjustReputation (oPC, oFaction05Member, -100);
}
}
#8
Posté 30 janvier 2011 - 07:52
well i dont have the includes so its a little hard to tell what some of the functions do, and ware exactly you set up/save the skins(appearances) for your players.
But trying to get a better picture of what your saying you say you downloaded your chars....IE save char as? or downloaded from the server via a web extension.
either way unless your running exact scripts as the server you char bif is saved has a defult. if they are using the standard nwn...
SetCreatureAppearanceType(oPC, APPEARANCE_TYPE_GOLEM_ADAMANTIUM);
and then...
ExportSingleCharacter(oPC);
This is a sure way your character saves the appearance it is. the lexicon can better help with that.
Other then needing the includes, thats all I can think of quickly of the top of my head.
But trying to get a better picture of what your saying you say you downloaded your chars....IE save char as? or downloaded from the server via a web extension.
either way unless your running exact scripts as the server you char bif is saved has a defult. if they are using the standard nwn...
SetCreatureAppearanceType(oPC, APPEARANCE_TYPE_GOLEM_ADAMANTIUM);
and then...
ExportSingleCharacter(oPC);
This is a sure way your character saves the appearance it is. the lexicon can better help with that.
Other then needing the includes, thats all I can think of quickly of the top of my head.
#9
Posté 30 janvier 2011 - 08:22
This standard line as you have above can cause some havoc if you don't check if the player has a non-default racial appearance like a monster appearance:
// restore appearance in case you export your character in mounted form, etc.if (!GetSkinInt(oPC,"bX3_IS_MOUNTED")) HorseIfNotDefaultAppearanceChange(oPC);
As GreyFort mentioned you would have to check if it is a non-standard appearance (assuming you do store that detail somewhere) and decide if to call this function or even reapply the new appearance if warranted.
// restore appearance in case you export your character in mounted form, etc.if (!GetSkinInt(oPC,"bX3_IS_MOUNTED")) HorseIfNotDefaultAppearanceChange(oPC);
As GreyFort mentioned you would have to check if it is a non-standard appearance (assuming you do store that detail somewhere) and decide if to call this function or even reapply the new appearance if warranted.
Modifié par ent.devil, 30 janvier 2011 - 08:22 .
#10
Posté 30 janvier 2011 - 08:36
A fix by The Krit in the link below.
http://nwn.bioware.c...724459&forum=42
http://nwn.bioware.c...724459&forum=42
Modifié par Lightfoot8, 30 janvier 2011 - 08:36 .
#11
Posté 31 janvier 2011 - 03:33
Thank you Ent, and Light. Found problem and fixed. Thanks guys.





Retour en haut






