//:://///////////////////////////////////////////// //:: [Tileset & Terrain include File] //:: [ds_inc_tilesets.nss] //:: [Jaysyn - NWNDS 20220514] //:://///////////////////////////////////////////// //:: Test Void Main //:: void main () {} int GetTerrainType(object oArea); //:: Define Terrain Types // const int TERRAIN_TYPE_INVALID = -1; const int TERRAIN_TYPE_UNKNOWN = 0; const int TERRAIN_TYPE_AQUATIC = 1; const int TERRAIN_TYPE_DESERT = 2; const int TERRAIN_TYPE_FOREST = 3; const int TERRAIN_TYPE_HILLS = 4; const int TERRAIN_TYPE_MARSH = 5; const int TERRAIN_TYPE_MOUNTAINS = 6; const int TERRAIN_TYPE_PLAINS = 7; const int TERRAIN_TYPE_UNDERGROUND = 8; const int TERRAIN_TYPE_URBAN = 9; //:: Define CEP & Custom tilesets // string TILESET_RESREF_DS_DESERT_CITY = "ttd21"; //:: Dark Sun Megaset - NWNDS Team string TILESET_RESREF_DS_INTERIOR2 = "dsi01"; //:: Dark Sun Interior - NWNDS Team string TILESET_RESREF_DESERT_AND_CITY = "tpc40"; //:: Desert and City - Pasili and Kaith string TILESET_RESREF_DESERT_ENRICHED = "tw004"; //:: Desert Enriched - ??? string TILESET_RESREF_DWARVEN_HALLS = "tzs01"; //:: Dwarven Halls - JDA string TILESET_RESREF_NATURAL_CAVES = "tmr01"; //:: Natural Caves - Helvene string TILESET_RESREF_DLA_SEWERS = "DLS10"; //:: Sewers - DLA Team string TILESET_RESREF_DLA_SEWERS_NO_MAPS = "DLS11"; //:: Sewers (No Maps) - DLA Team string TILESET_RESREF_UNDERGROUND_CITY = "drw01"; //:: Underground City - Gribbo string TILESET_RESREF_DUNGEON_3_ALT = "eld59"; //:: Dungeon 3 Alt - Eldonorian string TILESET_RESREF_GOTHIC_ESTATES = "gg"; //:: RL Gothic Estates - Chandigar string TILESET_RESREF_GOTHIC_INTERIOR = "GI"; //:: RL Gothic Interior - Chandigar string TILESET_RESREF_MAZE = "mze40"; //:: Maze tiles - Helvene string TILESET_RESREF_SKY = "SKY01"; //:: Sky tileset - ??? string TILESET_RESREF_ROCKY_MOUNTAINS = "tbm01"; //:: Rocky Mountains - Bloodmonkey string TILESET_RESREF_DESERT_CITY_V2 = "tbodc"; //:: Desert City v2 - Bodangly string TILESET_RESREF_CTP_BABYLON = "tced0"; //:: Babylon Tileset - CTP Team string TILESET_RESREF_CRIMSON_TOWER = "Tcr01"; //:: Crimson Tower - The Hanker Chief string TILESET_RESREF_DAGGERDALE_SWAMP = "TDD01"; //:: Daggerdale Swamp - Daggerdale Team string TILESET_RESREF_ELVEN_CITY = "TEC01"; //:: Elven City - LittleBaron & PogoMudder string TILESET_RESREF_TOWER_INTERIOR = "VWZ01"; //:: Tower Interior - Velmar string TILESET_RESREF_OUTER_LIMITS = "wcc01"; //:: Outer Limits - WoRM string TILESET_RESREF_DESERT_PLAINS = "WDP01"; //:: Desert Plains - WoRM string TILESET_RESREF_SCORCHED_EARTH = "wlf01"; //:: Scorched Earth - WoRM string TILESET_RESREF_UNDERSEA = "wut01"; //:: Undersea Tileset - WoRM string TILESET_RESREF_ELVEN_INTERIOR = "pie23"; //:: Elven Interior - Pasilli string TILESET_RESREF_DS_INTERIORS = "ISC02"; //:: Dark Sun Tent / Wezer Interiors - NWNDS Team string TILESET_RESREF_HUT_INTERIORS = "HUT80"; //:: Hut Interiors - Lord Rosenkrantz string TILESET_RESREF_DEEP_CAVERNS = "TMD19"; //:: Deep Caverns EE - Merricksdad string TILESET_RESREF_JUNGLE_MOUNTAINS = "tjj01"; //:: Jungle Mountains - WoRM string TILESET_RESREF_RED_SAND = "trd21"; //:: Red Sand EE - Merricksdad string TILESET_RESREF_CEP_WIZARD_TOWER = "ptw01"; //:: [CEP] Wizard Tower (Pstemarie) string TILESET_RESREF_CEP_CITY_EXT = "ZCN01"; //:: [CEP] City Exterior string TILESET_RESREF_CEP_CRYPTS = "ZDC01"; //:: [CEP] Crypts string TILESET_RESREF_CEP_DUNGEON = "ZDE01"; //:: [CEP] Dungeon string TILESET_RESREF_CEP_MINES = "ZDM01"; //:: [CEP] Mines and Caverns string TILESET_RESREF_CEP_BEHOLDER_INT = "ZIB01"; //:: [CEP] Beholder Interior string TILESET_RESREF_CEP_CASTLE_INT_1 = "ZIC01"; //:: [CEP] Castle Interior 1 string TILESET_RESREF_CEP_DROW_INT = "ZID01"; //:: [CEP] Drow Interior string TILESET_RESREF_CEP_CITY_INT_1 = "ZIN01"; //:: [CEP] City Interior 1 string TILESET_RESREF_CEP_SWAMP = "ZKW01"; //:: [CEP] Swamp (CODI/CRP) string TILESET_RESREF_CEP_DESERT = "ZTD01"; //:: [CEP] Desert string TILESET_RESREF_CEP_FOREST = "ZTF01"; //:: [CEP] Forest string TILESET_RESREF_CEP_FROZEN_WASTES = "ZTI01"; //:: [CEP] Frozen Wastes string TILESET_RESREF_CEP_RURAL_GRASS = "ZTR01"; //:: [CEP] Rural Grass string TILESET_RESREF_CEP_RURAL_WINTER = "ZTS01"; //:: [CEP] Rural Winter string TILESET_RESREF_CEP_UNDERDARK = "ZTU01"; //:: [CEP] Underdark //:: Vanilla tilesets for reference // /* TILESET_RESREF_BEHOLDER_CAVES tib01 Beholder Caves TILESET_RESREF_CASTLE_INTERIOR tic01 Castle Interior TILESET_RESREF_CITY_EXTERIOR tcn01 City Exterior TILESET_RESREF_CITY_INTERIOR tin01 City Interior TILESET_RESREF_CRYPT tdc01 Crypt TILESET_RESREF_DESERT ttd01 Desert TILESET_RESREF_DROW_INTERIOR tid01 Drow Interior TILESET_RESREF_DUNGEON tde01 Dungeon TILESET_RESREF_FOREST ttf01 Forest TILESET_RESREF_FROZEN_WASTES tti01 Frozen Wastes TILESET_RESREF_ILLITHID_INTERIOR tii01 Illithid Interior TILESET_RESREF_MICROSET tms01 Microset TILESET_RESREF_MINES_AND_CAVERNS tdm01 Mines and Caverns TILESET_RESREF_RUINS tdr01 Ruins TILESET_RESREF_RURAL ttr01 Rural TILESET_RESREF_RURAL_WINTER tts01 Rural Winter TILESET_RESREF_SEWERS tds01 Sewers TILESET_RESREF_UNDERDARK ttu01 Underdark TILESET_RESREF_LIZARDFOLK_INTERIOR dag01 Lizardfolk Interior TILESET_RESREF_MEDIEVAL_CITY_2 tcm02 Medieval City 2 TILESET_RESREF_MEDIEVAL_RURAL_2 trm02 Medieval Rural 2 TILESET_RESREF_EARLY_WINTER_2 trs02 Early Winter 2 TILESET_RESREF_SEASHIPS tss13 Sea Ships TILESET_RESREF_FOREST_FACELIFT ttf02 Forest - Facelift TILESET_RESREF_RURAL_WINTER_FACELIFT tts02 Rural Winter - Facelift TILESET_RESREF_STEAMWORKS tsw01 Steamworks TILESET_RESREF_BARROWS_INTERIOR tbw01 Barrows Interior TILESET_RESREF_SEA_CAVES tdt01 Sea Caves TILESET_RESREF_CITY_INTERIOR_2 tni01 City Interior 2 TILESET_RESREF_CASTLE_INTERIOR_2 tni02 Castle Interior 2 TILESET_RESREF_CASTLE_EXTERIOR_RURAL tno01 Castle Exterior, Rural TILESET_RESREF_TROPICAL ttz01 Tropical TILESET_RESREF_FORT_INTERIOR twc03 Fort Interior */ //:: Returns the terrain type depending on area settings. int GetTerrainType(object oArea) { //:: Aquatic Terrain if (GetIsAreaNatural(oArea) == TRUE && GetTilesetResRef(oArea) == TILESET_RESREF_SEASHIPS || GetTilesetResRef(oArea) == TILESET_RESREF_UNDERSEA || GetLocalString(oArea, "TERRAIN_TYPE") == "AQUATIC") return TERRAIN_TYPE_AQUATIC; //:: Desert Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == FALSE && GetTilesetResRef(oArea) == TILESET_RESREF_DS_DESERT_CITY || GetTilesetResRef(oArea) == TILESET_RESREF_DESERT_ENRICHED || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_DESERT || GetTilesetResRef(oArea) == TILESET_RESREF_RED_SAND || GetTilesetResRef(oArea) == TILESET_RESREF_DESERT_AND_CITY || GetTilesetResRef(oArea) == TILESET_RESREF_DESERT_CITY_V2 || GetTilesetResRef(oArea) == TILESET_RESREF_DESERT || GetLocalString(oArea, "TERRAIN_TYPE") == "DESERT") return TERRAIN_TYPE_DESERT; //:: Forest Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == FALSE && GetTilesetResRef(oArea) == TILESET_RESREF_CEP_FOREST || GetTilesetResRef(oArea) == TILESET_RESREF_FOREST || GetTilesetResRef(oArea) == TILESET_RESREF_FOREST_FACELIFT || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_RURAL_WINTER || GetTilesetResRef(oArea) == TILESET_RESREF_RURAL || GetTilesetResRef(oArea) == TILESET_RESREF_TROPICAL || GetTilesetResRef(oArea) == TILESET_RESREF_ELVEN_CITY || GetLocalString(oArea, "TERRAIN_TYPE") == "FOREST") return TERRAIN_TYPE_FOREST; //:: Hills Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == FALSE && GetLocalString(oArea, "TERRAIN_TYPE") == "HILLS") return TERRAIN_TYPE_HILLS; //:: Marsh Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == FALSE && GetTilesetResRef(oArea) == TILESET_RESREF_DAGGERDALE_SWAMP || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_SWAMP || GetLocalString(oArea, "TERRAIN_TYPE") == "MARSH") return TERRAIN_TYPE_MARSH; //:: Mountain Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == FALSE && GetTilesetResRef(oArea) == TILESET_RESREF_ROCKY_MOUNTAINS || GetTilesetResRef(oArea) == TILESET_RESREF_JUNGLE_MOUNTAINS || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_FROZEN_WASTES || GetLocalString(oArea, "TERRAIN_TYPE") == "MOUNTAINS") return TERRAIN_TYPE_MOUNTAINS; //:: Plains Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == FALSE && GetTilesetResRef(oArea) == TILESET_RESREF_DESERT_PLAINS || GetTilesetResRef(oArea) == TILESET_RESREF_SCORCHED_EARTH || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_RURAL_GRASS || GetTilesetResRef(oArea) == TILESET_RESREF_MEDIEVAL_RURAL_2 || GetTilesetResRef(oArea) == TILESET_RESREF_CASTLE_EXTERIOR_RURAL || GetLocalString(oArea, "TERRAIN_TYPE") == "PLAINS") return TERRAIN_TYPE_PLAINS; //:: Underground Terrain if (GetIsAreaNatural(oArea) == TRUE && GetIsAreaInterior(oArea) == TRUE || GetTilesetResRef(oArea) == TILESET_RESREF_UNDERDARK || GetTilesetResRef(oArea) == TILESET_RESREF_DWARVEN_HALLS || GetTilesetResRef(oArea) == TILESET_RESREF_NATURAL_CAVES || GetTilesetResRef(oArea) == TILESET_RESREF_UNDERGROUND_CITY || GetTilesetResRef(oArea) == TILESET_RESREF_DUNGEON_3_ALT || GetTilesetResRef(oArea) == TILESET_RESREF_DEEP_CAVERNS || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_CRYPTS || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_DUNGEON || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_MINES || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_BEHOLDER_INT || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_DROW_INT || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_UNDERDARK || GetTilesetResRef(oArea) == TILESET_RESREF_BEHOLDER_CAVES || GetTilesetResRef(oArea) == TILESET_RESREF_CRYPT || GetTilesetResRef(oArea) == TILESET_RESREF_DROW_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_ILLITHID_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_MINES_AND_CAVERNS || GetTilesetResRef(oArea) == TILESET_RESREF_RUINS || GetTilesetResRef(oArea) == TILESET_RESREF_BARROWS_INTERIOR || GetLocalString(oArea, "TERRAIN_TYPE") == "UNDERGROUND") return TERRAIN_TYPE_UNDERGROUND; //:: Urban Terrain if (GetIsAreaNatural(oArea) == FALSE || GetTilesetResRef(oArea) == TILESET_RESREF_UNDERGROUND_CITY || GetTilesetResRef(oArea) == TILESET_RESREF_GOTHIC_ESTATES || GetTilesetResRef(oArea) == TILESET_RESREF_GOTHIC_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_DESERT_CITY_V2 || GetTilesetResRef(oArea) == TILESET_RESREF_CTP_BABYLON || GetTilesetResRef(oArea) == TILESET_RESREF_ELVEN_CITY || GetTilesetResRef(oArea) == TILESET_RESREF_TOWER_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_DS_INTERIORS || GetTilesetResRef(oArea) == TILESET_RESREF_DS_INTERIOR2 || GetTilesetResRef(oArea) == TILESET_RESREF_ELVEN_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_WIZARD_TOWER || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_CITY_EXT || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_CASTLE_INT_1 || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_DROW_INT || GetTilesetResRef(oArea) == TILESET_RESREF_CEP_CITY_INT_1 || GetTilesetResRef(oArea) == TILESET_RESREF_CASTLE_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_CITY_EXTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_CITY_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_DROW_INTERIOR || GetTilesetResRef(oArea) == TILESET_RESREF_DLA_SEWERS || GetTilesetResRef(oArea) == TILESET_RESREF_DLA_SEWERS_NO_MAPS || GetTilesetResRef(oArea) == TILESET_RESREF_SEWERS || GetTilesetResRef(oArea) == TILESET_RESREF_CITY_INTERIOR_2 || GetTilesetResRef(oArea) == TILESET_RESREF_CASTLE_INTERIOR_2 || GetLocalString(oArea, "TERRAIN_TYPE") == "URBAN") return TERRAIN_TYPE_URBAN; return TERRAIN_TYPE_UNKNOWN; }