I tried to incorporate swimming into the mod I’m working on at the moment. I tried this:
https://neverwintervault.org/project/nwn2/hakpak/rws-swimming-beta
To my surprise it works really well (I really didn’t think I would be able to script this but I did)! However, there is a small concern that I don’t know what to do about. It says in the description of the hak:
“Create a trigger so than when a player enters it changes the appearance to the equal swimming line ie. elf_swim or Gnome_swim lines”
The script I’m writing at the moment looks like this (and though it is convoluted it works really well):
void main()
{
object oPC = GetEnteringObject();
if(!GetIsPC(oPC)) return;
if(GetAppearanceType(oPC) == 4006)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_HUMAN);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_HUMAN)
{
SetCreatureAppearanceType(oPC,4006);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_DWARF)
{
SetCreatureAppearanceType(oPC,4000);
}
else if(GetAppearanceType(oPC) == 4000)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_DWARF);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_ELF)
{
SetCreatureAppearanceType(oPC,4001);
}
else if(GetAppearanceType(oPC) == 4001)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_ELF);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_HALF_ELF)
{
SetCreatureAppearanceType(oPC,4004);
}
else if(GetAppearanceType(oPC) == 4004)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_HALF_ELF);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_GNOME)
{
SetCreatureAppearanceType(oPC,4002);
}
else if(GetAppearanceType(oPC) == 4002)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_GNOME);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_HALFLING)
{
SetCreatureAppearanceType(oPC,4003);
}
else if(GetAppearanceType(oPC) == 4003)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_HALFLING);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_HALF_ORC)
{
SetCreatureAppearanceType(oPC,4005);
}
else if(GetAppearanceType(oPC) == 4005)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_HALF_ORC);
}
else if(GetAppearanceType(oPC) == APPEARANCE_TYPE_HALF_ORC)
{
SetCreatureAppearanceType(oPC,4005);
}
else if(GetAppearanceType(oPC) == 4005)
{
SetCreatureAppearanceType(oPC,APPEARANCE_TYPE_HALF_ORC);
}
}
Now, if one looks at the appearance.2da for this hak, you have these lines:
4000 Dwarf_swim **** 1 0 0.75 0.75 0.75 .6 P_DD? P_DD? P_DD?_Head P_DD?_Hair P_SWM_DD?_Skel P_SWM_DD?_Skel 1 DD? 0 2 Character_model D default 1 P 1 1 1 1.15 0.95 SLOW 0.35 0.70 0.3 0.3 1.5 0.3 1.4 H 1 6 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4001 Elf_swim **** 1 0 0.9 0.9 0.9 .6 P_EE? P_EE? P_EE?_Head P_EE?_Hair P_SWME_HH?_Skel P_SWME_HH?_Skel 1 EE? 0 2 Character_model E default 1 P 1 1 1 0.85 0.8 SLOW 0.47 0.95 0.3 0.3 1.75 0.3 1.5 H 1 7 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4002 Gnome_swim **** 1 0 0.65 0.65 0.65 .6 P_GG? P_GG? P_GG?_Head P_GG?_Hair P_SWM_GG?_Skel P_SWM_GG?_Skel 1 GG? 0 2 Character_model G default 1 P 1 1 1 0.9 0.82 SLOW 0.33 0.64 0.25 0.25 1.5 0.3 1.3 H 1 8 1 1 **** 2 9 0 0 1 60 30 head_g 6 1 1 **** ****
4003 Halfling_Swim **** 1 0 0.6 0.6 0.6 .6 P_HH? P_AA? P_AA?_Head P_AA?_Hair P_SWMH_HH?_Skel P_SWMH_HH?_Skel 1 HH? 0 2 Character_model A default 1 P 1 1 1 0.7 0.65 SLOW 0.34 0.69 0.2 0.2 1.5 0.25 1.1 H 1 10 1 1 **** 2 9 0 0 1 60 30 head_g 6 1 1 **** ****
4004 Half_Elf_Swim **** 1 0 0.95 0.95 0.95 .6 P_HH? P_HH? P_EH?_Head P_HH?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1 0.9 SLOW 0.53 1.06 0.3 0.3 2 0.3 1.7 H 1 7 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4005 Half_Orc_Swim **** 1 0 1.05 1.05 1.05 .6 P_OO? P_OO? P_OO?_Head P_OO?_Hair P_SWM_OO?_Skel P_SWM_OO?_Skel 1 OO? 0 2 Character_model O default 1 P 1 1 1 1.2 1.2 SLOW 0.53 1.06 0.45 0.45 2.25 0.3 1.9 H 1 13 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4006 Human_Swim **** 1 0 1 1 1 .6 P_HH? P_HH? P_HH?_Head P_HH?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 SLOW 0.53 1.06 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4007 Assimar_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HA?_Head P_HH?_hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4008 Tiefling_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HT?_Head P_HT?_hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4009 “Elf,Sun_Swim” **** 1 0 0.9 0.9 0.9 1 P_EE? P_EE? P_ES?_Head P_EE?_Hair P_SWME_HH?_Skel P_SWME_HH?_Skel 1 EE? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 1.75 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4010 “Elf,Wood_Swim” **** 1 0 0.9 0.9 0.9 1 P_EE? P_EE? P_EW?_Head P_EE?_Hair P_SWME_HH?_Skel P_SWME_HH?_Skel 1 EE? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 1.75 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4011 “Elf,Drow_Swim” **** 1 0 0.83 0.83 0.83 1 P_EE? P_EE? P_ED?_Head P_EE?_Hair P_SWME_HH?_Skel P_SWME_HH?_Skel 1 EE? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 1.75 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4012 “Gnome,Svirfneblin_Swim” **** 1 0 0.65 0.65 0.65 1 P_GG? P_GG? P_GS?_Head P_GG?_hair P_SWM_GG?_Skel P_SWM_GG?_Skel 1 GG? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.25 0.25 1.5 0.3 1.4 H 1 11 1 1 **** 2 9 0 0 1 60 30 head_g 6 1 1 **** ****
4013 “Dwarf,Gold” **** 1 0 0.75 0.75 0.75 1 P_DD? P_DD? P_DG?_Head P_DD?_Hair P_SWM_DD?_Skel P_SWM_DD?_Skel 1 DD? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 1.5 0.3 1.4 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4014 “Dwarf,Duergar_Swim” **** 1 0 0.75 0.75 0.75 1 P_DD? P_DD? P_DU?_Head P_DD?_Hair P_SWM_DD?_Skel P_SWM_DD?_Skel 1 DD? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 1.5 0.3 1.4 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4015 “Halfling,Strongheart_Swim” **** 1 0 0.6 0.6 0.6 1 P_HH? P_AA? P_AS?_Head P_AA?_hair P_SWMH_HH?_Skel P_SWMH_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.2 0.2 1.5 0.3 1.1 H 1 11 1 1 **** 2 9 0 0 1 60 30 head_g 6 1 1 **** ****
4016 Elf_Wild_NX1_Swim **** 1 0 0.93 0.93 0.93 1 P_HH? P_HH? P_EL?_Head P_EL?_Hair P_SWME_HH?_Skel P_SWME_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4017 Earth_Genasi_NX1_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HE?_Head P_HE?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** fx_earthgenasi.sef
4018 Fire_Genasi_NX1_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HF?_Head P_HF?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** fx_firegenasi_hair.sef
4019 Air_Genasi_NX1_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HI?_Head P_HI?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** fx_airgenasi_hair.sef
4020 Water_Genasi_NX1_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HW?_Head P_HW?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** fx_watergenasi_hair.sef
4021 Half_Drow_NX1_Swim **** 1 0 0.95 0.95 0.95 1 P_HH? P_HH? P_ER?_Head P_HH?_Hair P_SWME_HH?_Skel P_SWME_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
4022 YuantiPureblood_Swim **** 1 0 1 1 1 0 P_HH? P_HH? P_HP?_Head P_HH?_Hair P_SWM_HH?_Skel P_SWM_HH?_Skel 1 HH? 0 2 Character_model H default 1 P 1 1 1 1.05 0.85 NORM 1.6 3.2 0.3 0.3 2 0.3 1.5 H 1 11 1 1 **** 3 9 0 0 1 60 30 head_g 6 1 1 **** ****
Now, the problem is, if the player wants to play an Assimaar, Sun Elf or a Tiefling, I can’t find any APPEARANCE_TYPE for them under Globals in the Script Assist. So how does one get around that? Do I just tell the player he/she can’t play those races or is there a way around this?
Thanks!