Question about swimming

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!

1 Like

the constants are just row #ids in Appearance.2da … try it like this Ag

// 'ag_swim'

const int APPEARANCE_TYPE_YUANTIPUREBLOOD      = 40;

const int APPEARANCE_TYPE_ASSIMAR              = 563;
const int APPEARANCE_TYPE_TIEFLING             = 564;
const int APPEARANCE_TYPE_ELF_SUN              = 565;
const int APPEARANCE_TYPE_ELF_WOOD             = 566;
const int APPEARANCE_TYPE_ELF_DROW             = 567;
const int APPEARANCE_TYPE_GNOME_SVIRFNEBLIN    = 568;
const int APPEARANCE_TYPE_DWARF_GOLD           = 569;
const int APPEARANCE_TYPE_DWARF_DUERGAR        = 570;
const int APPEARANCE_TYPE_HALFLING_STRONGHEART = 571;

const int APPEARANCE_TYPE_ELF_WILD             = 1036;
const int APPEARANCE_TYPE_GENASI_EARTH         = 1037;
const int APPEARANCE_TYPE_GENASI_FIRE          = 1038;
const int APPEARANCE_TYPE_GENASI_AIR           = 1039;
const int APPEARANCE_TYPE_GENASI_WATER         = 1040;
const int APPEARANCE_TYPE_HALFDROW             = 1041;


void main()
{
	object oPC = GetEnteringObject();

	if (!GetIsPC(oPC)) return;

	int iApp;

	switch (GetAppearanceType(oPC))
	{
		case APPEARANCE_TYPE_DWARF: iApp = 4000; break; // Dwarf_swim
		case 4000: iApp = APPEARANCE_TYPE_DWARF; break;

		case APPEARANCE_TYPE_ELF: iApp = 4001; break; // Elf_swim
		case 4001: iApp = APPEARANCE_TYPE_ELF; break;

		case APPEARANCE_TYPE_GNOME: iApp = 4002; break; // Gnome_swim
		case 4002: iApp = APPEARANCE_TYPE_GNOME; break;

		case APPEARANCE_TYPE_HALFLING: iApp = 4003; break; // Halfling_Swim
		case 4003: iApp = APPEARANCE_TYPE_HALFLING; break;

		case APPEARANCE_TYPE_HALF_ELF: iApp = 4004; break; // Half_Elf_Swim
		case 4004: iApp = APPEARANCE_TYPE_HALF_ELF; break;

		case APPEARANCE_TYPE_HALF_ORC: iApp = 4005; break; // Half_Orc_Swim
		case 4005: iApp = APPEARANCE_TYPE_HALF_ORC; break;

		case APPEARANCE_TYPE_HUMAN: iApp = 4006; break; // Human_Swim
		case 4006: iApp = APPEARANCE_TYPE_HUMAN; break;

		case APPEARANCE_TYPE_ASSIMAR: iApp = 4007; break; // Assimar_Swim
		case 4007: iApp = APPEARANCE_TYPE_ASSIMAR; break;

		case APPEARANCE_TYPE_TIEFLING: iApp = 4008; break; // Tiefling_Swim
		case 4008: iApp = APPEARANCE_TYPE_TIEFLING; break;

		case APPEARANCE_TYPE_ELF_SUN: iApp = 4009; break; // Elf,Sun_Swim
		case 4009: iApp = APPEARANCE_TYPE_ELF_SUN; break;

		case APPEARANCE_TYPE_ELF_WOOD: iApp = 4010; break; // Elf,Wood_Swim
		case 4010: iApp = APPEARANCE_TYPE_ELF_WOOD; break;

		case APPEARANCE_TYPE_ELF_DROW: iApp = 4011; break; // Elf,Drow_Swim
		case 4011: iApp = APPEARANCE_TYPE_ELF_DROW; break;

		case APPEARANCE_TYPE_GNOME_SVIRFNEBLIN: iApp = 4012; break; // Gnome,Svirfneblin_Swim
		case 4012: iApp = APPEARANCE_TYPE_GNOME_SVIRFNEBLIN; break;

		case APPEARANCE_TYPE_DWARF_GOLD: iApp = 4013; break; // Dwarf,Gold
		case 4013: iApp = APPEARANCE_TYPE_DWARF_GOLD; break;

		case APPEARANCE_TYPE_DWARF_DUERGAR: iApp = 4014; break; // Dwarf,Duergar_Swim
		case 4014: iApp = APPEARANCE_TYPE_DWARF_DUERGAR; break;

		case APPEARANCE_TYPE_HALFLING_STRONGHEART: iApp = 4015; break; // Halfling,Strongheart_Swim
		case 4015: iApp = APPEARANCE_TYPE_HALFLING_STRONGHEART; break;

		case APPEARANCE_TYPE_ELF_WILD: iApp = 4016; break; // Elf_Wild_NX1_Swim
		case 4016: iApp = APPEARANCE_TYPE_ELF_WILD; break;

		case APPEARANCE_TYPE_GENASI_EARTH: iApp = 4017; break; // Earth_Genasi_NX1_Swim
		case 4017: iApp = APPEARANCE_TYPE_GENASI_EARTH; break;

		case APPEARANCE_TYPE_GENASI_FIRE: iApp = 4018; break; // Fire_Genasi_NX1_Swim
		case 4018: iApp = APPEARANCE_TYPE_GENASI_FIRE; break;

		case APPEARANCE_TYPE_GENASI_AIR: iApp = 4019; break; // Air_Genasi_NX1_Swim
		case 4019: iApp = APPEARANCE_TYPE_GENASI_AIR; break;

		case APPEARANCE_TYPE_GENASI_WATER: iApp = 4020; break; // Water_Genasi_NX1_Swim
		case 4020: iApp = APPEARANCE_TYPE_GENASI_WATER; break;

		case APPEARANCE_TYPE_HALFDROW: iApp = 4021; break; // Half_Drow_NX1_Swim
		case 4021: iApp = APPEARANCE_TYPE_HALFDROW; break;

		case APPEARANCE_TYPE_YUANTIPUREBLOOD: iApp = 4022; break; // YuantiPureblood_Swim
		case 4022: iApp = APPEARANCE_TYPE_YUANTIPUREBLOOD; break;

		default: return;
	}

	SetCreatureAppearanceType(oPC, iApp);
}

 
 
ps
<pre>

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 **** ****

</pre>

1 Like

Seriously you two I really hope you copied and pasted that 2da stuff :dizzy_face:

2da lines yep, code nope

kevL_s… I’m very pleased to hear that for the sake of your mind and eyes.

I have a confession I only just started using copy and paste with the toolset on things like tags when I remade Serene before I just used it on conversations… And Ctrl Z (didn’t know about it at all ), now I can’t stop and use them for everything !

2 Likes

I actually figured this out on my own. Just had to leave the toolset for a couple of hours and then it was like:“…Wait a minute, since I’m using the numbers in the appearance.2da for switching to the swimming animations, I must be able to find all the constants/integers for all the other races there…”.
Then I went back here and saw you posting this, confirming what I had just discovered.

Your script, @kevL_s is of course much more compact than mine. I knew mine was a bit convoluted. I might use this, or continue with my own version, I don’t know. We’ll see.

EDIT: Alright, I’ll use your code here instead, but will keep mine among the list of scripts for the module, to boost my confidence and prove to myself that I actually solved this on my own (even though in a more convoluted way).
@kevL_s One thing in the code that I don’t get that’s new for me is the line:

What does that mean exactly. It returns after one of the cases maybe?

By the way, this is for my sixth module. Since my fifth module is on hold because I’m waiting for some stuff to be made for it (and darn it’s hard since it’s sci fi and not fantasy), and I’m waiting for my fourth to be beta tested by more people, I thought: “What the heck!” and started yet another module, even though I had said to myself that after the fifth one there’s not going to be any more modules or stories from me, but I can’t seem to let go of the toolset. It’s weird. I might have an addiction or something. :slightly_smiling_face: :upside_down_face:

EDIT 2: Interesting…I just noticed that when typing “const int” like this, they show up among the Globals in the script assist. I guess it’s no more mysterious than new functions showing when you have include scripts at the beginning of a script, I just never noticed it before.

1 Like

andgalf… Six modules ! That’s impressive.

I gave up with the toolset and said I’d never make another module then someone dropped a couple of bombs on my life and I needed a distraction so I fired it up again… It’s therapy !

But also addictive.

2 Likes

default: handles cases that aren’t defined by a case statement. So if a PC for whatever reason has an appearance-type that isn’t handled, default should/will catch that. By returning immediately this line gets bypassed:

SetCreatureAppearanceType(oPC, iApp);

in other words, don’t set an appearance if PC’s appearance is not accounted for in the switch/case block. Another way would be like this →

int iApp = -1;

// do switch case

if (iApp != -1)
    SetCreatureAppearanceType(oPC, iApp);
1 Like

Ah, I see. Good to know.

It really can be therapy. And when you succeed with something, like I succeeded in implementing swimming, it can be a bit of an ego-boost. :slight_smile:

1 Like

Well, I don’t know. I’ve only finished the fourth one, which is yet to be released since it is beta tested at the moment, and I’m only at the begining on the fifth one, so…well…I should probably have waited with starting a sixth one since it can become pretty confusing when going back to the other ones but…at the moment, I can’t do anything else with the toolset so…I’m not even sure this sixth one will be something I’ll release…Still, it’s fun just fooling around with the toolset sometimes.

2 Likes