User Tools

Site Tools


features:sinfar_supporter_housing:npc_appearance
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]
authpdo: Statement did not return 'mail' attribute [auth.php:522]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
features:sinfar_supporter_housing:npc_appearance [2019/07/20 14:14]
spankitty
features:sinfar_supporter_housing:npc_appearance [2019/07/22 07:07] (current)
spankitty
Line 1: Line 1:
 ====== NPC Appearance ====== ====== NPC Appearance ======
  
-To spawn an NPC in your house you'll need : +If you know how to put an npc in your house , it may be time to dress them up ! 
-\\ + 
-1: A NPC. +==== Resources to use or that need to be created (similar) in your webclient resource page : ==== 
-\\+ 
 +{{:​features:​sinfar_supporter_housing:​npc_playerhouse_resources.jpg}} 
 + 
 + 
 +=== To spawn an NPC in your house you'll need : === 
 + 
 + 
 +1: A NPC. (female in this case) 
 + 
 + 
 +{{:​features:​sinfar_supporter_housing:​npc_playerhouse_npc.jpg}} 
 + 
 2: An armor/cloth in the chest slot of that NPC. 2: An armor/cloth in the chest slot of that NPC.
-\\ + 
-3: The On_Spawn script : p_cf2_npc_spawn in the NPC On_Spawn slot or make your own and use the following code. + 
-\\ +{{:​features:​sinfar_supporter_housing:​npc_playerhouse_cloths1.jpg}} 
-4: The Variables.+ 
 + 
 +3: The On_Spawn script : p_cf2_npc_spawn in the NPC On_Spawn slot or make your own and use the following code in your own script
 + 
 +{{:​features:​sinfar_supporter_housing:​npc_playerhouse_npc_script.jpg}} 
 + 
 +<​code>​ 
 +#include "​inc_appr"​ 
 + 
 +void main() 
 +
 +    string sBodyAppearance = GetLocalString(OBJECT_SELF,​ "​P_BODY_APPEARANCE"​);​ 
 +    string sArmorAppearance = GetLocalString(OBJECT_SELF,​ "​P_ARMOR_APPEARANCE"​);​ 
 +    string sHeadAppearance = GetLocalString(OBJECT_SELF,"​P_HEAD_APPEARANCE"​);​ 
 +    object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST,​ OBJECT_SELF);​ 
 +    int iOrginalAC = GetItemAC(oArmor);​ 
 +     
 +    if (sBodyAppearance != ""​) 
 +        { 
 +        SetEntireCreatureAppearance(OBJECT_SELF,​ sBodyAppearance);​ 
 +        } 
 +    if(sArmorAppearance != ""​ && GetIsObjectValid(oArmor)) 
 +        { 
 +        RestoreItemAppearance(oArmor,​ sArmorAppearance); ​    
 +        object oNewArmor = UpdateItemAppr(oArmor);​ 
 +        if(GetItemAC(oNewArmor) != iOrginalAC) 
 +            { 
 +            SetItemAC(oNewArmor,​ iOrginalAC);​ 
 +            } 
 +        }  
 +    if(sHeadAppearance != ""​) 
 +        { 
 +        SetHeadItemOverrideString(OBJECT_SELF,​sHeadAppearance);​ 
 +        }    
 +}</​code>​ 
 + 
 + 
 +4: The Variables ​on the NPC. 
 + 
 + 
 +{{:​features:​sinfar_supporter_housing:​npc_playerhouse_spawn_variables.jpg}} 
 + 
 + 
 +Var Values come from :  
 + 
 +ARMOR = Tailor dummy change armor appearance menu.\\ 
 +BODY = Body dummy front menu.\\ 
 +HEAD = Body dummy change Body Parts Head menu.\\ 
 + 
 +Notes :  
 + 
 +The Body appearance is somewhat optional as that would only show if the NPC gets undressed.\\ 
 +The Head appearance is optional in case you use a V2 head (a head you cannot set with the toolset).\\ 
 +The Generic_Master on the picture makes the NPC wander about and has nothing to do with the appearance.
  
authpdo: Statement did not return 'mail' attribute [auth.php:522]
features/sinfar_supporter_housing/npc_appearance.1563632044.txt.gz · Last modified: 2019/07/20 14:14 by spankitty

phpBB Appliance - Powered by TurnKey Linux