Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

864 lines
32 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
// lib_hos2_data - Read Back data from module object loaded from 2DAs
//==============================================================================
// by Deva B. Winblood. January 26th, 2008
////////////////////////////////////////////////////////////////////////////////
//////////////////////////
// CONSTANTS
//////////////////////////
const int UNIT_DISPLAY_NEVER = 0;
const int UNIT_DISPLAY_ALWAYS = 1;
const int UNIT_DISPLAY_UPGRADE = 2;
const int UNIT_DISPLAY_IFCANBUILD = -1;
const int UNIT_COMMAND_NONE = 0;
const int UNIT_COMMAND_FOLLOW_3 = 1;
const int UNIT_COMMAND_RAID_ATTACK = 2;
const int UNIT_COMMAND_RAID_STEAL = 3;
const int UNIT_COMMAND_CAPTURE = 4;
const int UNIT_COMMAND_ASSASSINATE = 5;
const int UNIT_COMMAND_GUARD_STATIONARY = 6;
const int UNIT_COMMAND_GUARD_AREA = 7;
const int UNIT_COMMAND_HARVEST_WOOD = 8;
const int UNIT_COMMAND_HARVEST_MINERALS = 9;
const int UNIT_COMMAND_HARVEST_MANA = 10;
const int UNIT_COMMAND_EXPLORE = 11;
const int UNIT_COMMAND_RETURN_TO_LAIR = 12;
const int UNIT_COMMAND_GATHER_SQUAD = 13;
const int UNIT_COMMAND_PROTECT = 14;
const int UNIT_COMMAND_FOLLOW_5 = 15;
const int UNIT_COMMAND_FOLLOW_8 = 16;
const int UNIT_COMMAND_GUARD_CTRLAREA = 17; // used for flag units
const int UNIT_COMMAND_PATROL_CTRLAREA = 18; // used for flag units
//////////////////////////
// PROTOTYPES
//////////////////////////
// FILE: lib_hos2_data FUNCTIONS: lib_DataGetStoredTeamID()
// Read the TeamID stored for specified Team Number.
string lib_DataGetStoredTeamID(int nTeamNumber);
// FILE: lib_hos2_data FUNCTIONS: lib_DataGetTeamNumber()
// Read the team number for this ID that is stored.
int lib_DataGetTeamNumber(string sTeamID);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamName()
// Read the team name for the team number.
string lib_DataGetTeamName(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamMemberName()
// This will return the name such as "Unclean" or what not that should be
// used to describe a single member of the specified team.
string lib_DataGetTeamMemberName(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamMemberNamePlural()
// This will return the name such as "Spiders" or what not that should be
// used to describe a multiple members of the specified team.
string lib_DataGetTeamMemberNamePlural(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamFlagResRef()
// This will return the resref of the placeable flag to use for this team.
string lib_DataGetTeamFlagResRef(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamFlagTag()
// This will return the tag of the placeable flag to use for this team.
string lib_DataGetTeamFlagTag(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamAlign()
// This will return the resref of the alignment to use for this team.
string lib_DataGetTeamAlign(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamLairTagPrefix()
// This will return the placeable flag to use for this team.
string lib_DataGetTeamLairTagPrefix(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamSpawnPoint()
// This will return the waypoint for this spawn point.
object lib_DataGetTeamSpawnPoint(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamRespawnPoint()
// This will return the waypoint for this spawn point.
object lib_DataGetTeamRespawnPoint(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamDarkElfHandle()
// Returns how the team should handle elves and dark elves.
// 0 = do nothing, 1 = Make all elves use dark elf friendly colors,
// -1 = make all elves use non-dark elf colors
int lib_DataGetTeamDarkElfHandle(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamDarkDwarfHandle()
// Returns how the team should handle dwarves and dark dwarves.
// 0 = do nothing, 1 = Make all dwarves use dark dwarf friendly colors,
// -1 = make all dwarves use non-dark dwarf colors
int lib_DataGetTeamDarkDwarfHandle(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamHalfOgreOK()
// Returns whether this team allows Half-Ogres or not.
int lib_DataGetTeamHalfOgreOK(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamBrownieOK()
// Returns whether this team allows Brownies or not.
int lib_DataGetTeamBrownieOK(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamWemicOK()
// Returns whether this team allows Wemics or not.
int lib_DataGetTeamWemicOK(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: lib_DataGetTeamReptileOK()
// Returns whether this team allows Reptiles or not.
int lib_DataGetTeamReptileOK(int nTeamNumber);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitName()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitName(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitNamePlural()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitNamePlural(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitResRef()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitResRef(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitTag()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitTag(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitAIWaypointTag()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitAIWaypointTag(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitRandomHeadString()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This is in the form of
// a random string <number of random elements>.<element>/<element>/<element>
string Unit_GetUnitRandomHeadString(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitRandomClothesString()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This is in the form of
// a random string <number of random elements>.<element>/<element>/<element>
string Unit_GetUnitRandomClothesString(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitRandomRightHandItemString()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This is in the form of
// a random string <number of random elements>.<element>/<element>/<element>
string Unit_GetUnitRandomRightHandItemString(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitRandomLeftHandItemString()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This is in the form of
// a random string <number of random elements>.<element>/<element>/<element>
string Unit_GetUnitRandomLeftHandItemString(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostAreaControl()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitCostAreaControl(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostItemHeld()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitCostItemHeld(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostItemConsumeable()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitCostItemConsumeable(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostModuleVariableTrue()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitCostModuleVariableTrue(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostUnitExistsTag()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitCostUnitExistsTag(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostPlaceableExistsTag()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
string Unit_GetUnitCostPlaceableExistsTag(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitSquadCommandSize()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitSquadCommandSize(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostMana()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostMana(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostGold()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostGold(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostWood()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostWood(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostIron()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostIron(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostMithril()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostMithril(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostAdamantium()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostAdamantium(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostGoldBar()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostGoldBar(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitDisplayStatus()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
// See UNIT_DISPLAY_ constants
int Unit_GetUnitDisplayStatus(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitUpgradeToUnit()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
// nSlot starts with 1 (default is max of 5)
int Unit_GetUnitUpgradeToUnit(int nTeamNumber, int nUnit,int nSlot);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitTimedUpgradeToUnit()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitTimedUpgradeToUnit(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitTimedUpgradeHours()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitTimedUpgradeHours(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitTax()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitTax(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanHarvestWood()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanHarvestWood(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanMine()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanMine(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanHarvestMana()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanHarvestMana(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitFrontSquad()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This will return the unit
// type to fill this squad position and supports levels 1-3.
int Unit_GetUnitFrontSquad(int nTeamNumber, int nUnit,int nLevel=1);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCenterSquad()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This will return the unit
// type to fill this squad position and supports levels 1-3.
int Unit_GetUnitCenterSquad(int nTeamNumber, int nUnit,int nLevel=1);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitRearSquad()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This will return the unit
// type to fill this squad position and supports levels 1-3.
int Unit_GetUnitRearSquad(int nTeamNumber, int nUnit,int nLevel=1);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostLevel()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostLevel(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCostSoul()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCostSoul(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanRaidAttack()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanRaidAttack(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanRaidSteal()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanRaidSteal(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanCapture()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanCapture(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanAssassinate()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanAssassinate(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCanExplore()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitCanExplore(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitCustomAbility()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
// nAbility = 1 - 3
string Unit_GetUnitCustomAbility(int nTeamNumber, int nUnit,int nAbility=1);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitRandomAppearanceString()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1. This is in the form of
// a random string <number of random elements>.<element>/<element>/<element>
string Unit_GetUnitRandomAppearanceString(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitSummoningVFX()
// This function will return the data for the specified team and unit number.
// nTeamNumber starts with 1, nUnit starts with 1.
int Unit_GetUnitSummoningVFX(int nTeamNumber, int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitHasSoul()
// Return TRUE if the unit has a soul.
int Unit_GetUnitHasSoul(int nTeamNumber,int nUnit);
// FILE: lib_hos2_data FUNCTION: Unit_GetUnitPredefinedCombat()
// This will return the predefined Combat AI number that should be used for
// this unit. It will return 0 if one is not defined.
int Unit_GetUnitPredefinedCombat(int nTeamNumber,int nUnit);
// FILE: lib_hos2_data FUNCTION: lib_NPCJoinFaction()
// This will make the NPC switch to the faction.
void lib_NPCJoinFaction(object oNPC,string sTeamID);
//////////////////////////
// FUNCTIONS
//////////////////////////
string lib_DataGetStoredTeamID(int nTeamNumber)
{ // PURPOSE: Return the team id
return GetLocalString(GetModule(),"sTeamID_"+IntToString(nTeamNumber));
} // lib_DataGetStoredTeamID()
int lib_DataGetTeamNumber(string sTeamID)
{ // PURPOSE: Return the team number
return GetLocalInt(GetModule(),"nTeamID_"+GetStringUpperCase(sTeamID));
} // lib_DataGetTeamNumber()
string lib_DataGetTeamName(int nTeamNumber)
{ // PURPOSE: Return the team name
return GetLocalString(GetModule(),"sTeamName_"+IntToString(nTeamNumber));
} // lib_DataGetTeamName()
string lib_DataGetTeamMemberName(int nTeamNumber)
{ // PURPOSE: Return the team member name
return GetLocalString(GetModule(),"sTeamMemberName_"+IntToString(nTeamNumber));
} // lib_DataGetTeamMemberName()
string lib_DataGetTeamMemberNamePlural(int nTeamNumber)
{ // PURPOSE: Return the team member name
return GetLocalString(GetModule(),"sTeamMemberNameP_"+IntToString(nTeamNumber));
} // lib_DataGetTeamMemberNamePlural()
string lib_DataGetTeamFlagResRef(int nTeamNumber)
{ // PURPOSE: Return the team flag res ref
return GetLocalString(GetModule(),"sTeamRR_"+IntToString(nTeamNumber));
} // lib_DataGetTeamFlagResRef()
string lib_DataGetTeamFlagTag(int nTeamNumber)
{ // PURPOSE: Return the team flag tag
return GetLocalString(GetModule(),"sTeamT_"+IntToString(nTeamNumber));
} // lib_DataGetTeamFlagTag()
string lib_DataGetTeamAlign(int nTeamNumber)
{ // PURPOSE: Return the team alignment
return GetLocalString(GetModule(),"sTeamAlign_"+IntToString(nTeamNumber));
} // lib_DataGetTeamAlign()
string lib_DataGetTeamLairTagPrefix(int nTeamNumber)
{ // PURPOSE: Return the team alignment
return GetLocalString(GetModule(),"sTeamLTP_"+IntToString(nTeamNumber));
} // lib_DataGetTeamLairTagPrefix()
object lib_DataGetTeamLairSpawnPoint(int nTeamNumber)
{ // PURPOSE: Return the team spawn waypoint
return GetWaypointByTag(GetLocalString(GetModule(),"sTeamSpawnPoint_"+IntToString(nTeamNumber)));
} // lib_DataGetTeamLairSpawnPoint()
object lib_DataGetTeamLairRespawnPoint(int nTeamNumber)
{ // PURPOSE: Return the team respawn waypoint
return GetWaypointByTag(GetLocalString(GetModule(),"sTeamRespawnPoint_"+IntToString(nTeamNumber)));
} // lib_DataGetTeamLairRespawnPoint()
int lib_DataGetTeamDarkElfHandle(int nTeamNumber)
{ // PURPOSE: Return the way to handle Dark Elves
return GetLocalInt(GetModule(),"bTeamDarkElf_"+IntToString(nTeamNumber));
} // lib_DataGetTeamDarkElfHandle()
int lib_DataGetTeamDarkDwarfHandle(int nTeamNumber)
{ // PURPOSE: Return the way to handle Dark Dwarves
return GetLocalInt(GetModule(),"bTeamDarkDwarf_"+IntToString(nTeamNumber));
} // lib_DataGetTeamDarkDwarfHandle()
int lib_DataGetTeamHalfOgreOK(int nTeamNumber)
{ // PURPOSE: Return whether this race is allowed
return GetLocalInt(GetModule(),"bTeamHalfOgreOK_"+IntToString(nTeamNumber));
} // lib_DataGetTeamHalfOgreOK()
int lib_DataGetTeamBrownieOK(int nTeamNumber)
{ // PURPOSE: Return whether this race is allowed
return GetLocalInt(GetModule(),"bTeamBrownieOK_"+IntToString(nTeamNumber));
} // lib_DataGetTeamBrownieOK()
int lib_DataGetTeamWemicOK(int nTeamNumber)
{ // PURPOSE: Return whether this race is allowed
return GetLocalInt(GetModule(),"bTeamWemicOK_"+IntToString(nTeamNumber));
} // lib_DataGetTeamWemicOK()
int lib_DataGetTeamReptileOK(int nTeamNumber)
{ // PURPOSE: Return whether this race is allowed
return GetLocalInt(GetModule(),"bTeamReptileOK_"+IntToString(nTeamNumber));
} // lib_DataGetTeamReptileOK()
string Unit_GetUnitName(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUName"+sUN);
} // Unit_GetUnitName()
string Unit_GetUnitNamePlural(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUNameP"+sUN);
} // Unit_GetUnitNamePlural()
string Unit_GetUnitResRef(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sURR"+sUN);
} // Unit_GetUnitResRef()
string Unit_GetUnitTag(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUTag"+sUN);
} // Unit_GetUnitTag()
string Unit_GetUnitAIWaypointTag(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUAIWP"+sUN);
} // Unit_GetUnitAIWaypointTag()
string Unit_GetUnitRandomHeadString(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUHEADR"+sUN);
} // Unit_GetUnitRandomHeadString()
string Unit_GetUnitRandomClothesString(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCLOTHR"+sUN);
} // Unit_GetUnitRandomClothesString()
string Unit_GetUnitRandomRightHandItemString(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sURIGHTHR"+sUN);
} // Unit_GetUnitRandomRightHandItemString()
string Unit_GetUnitRandomLeftHandItemString(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sULEFTHR"+sUN);
} // Unit_GetUnitRandomLeftHandItemString()
string Unit_GetUnitCostAreaControl(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCAREA"+sUN);
} // Unit_GetUnitCostAreaControl()
string Unit_GetUnitCostItemHeld(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCITEM"+sUN);
} // Unit_GetUnitCostItemHeld()
string Unit_GetUnitCostItemConsumeable(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCCONS"+sUN);
} // Unit_GetUnitCostItemConsumeable()
string Unit_GetUnitCostModuleVariableTrue(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCVAR"+sUN);
} // Unit_GetUnitCostModuleVariableTrue()
string Unit_GetUnitCostUnitExistsTag(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCEXU"+sUN);
} // Unit_GetUnitCostUnitExistsTag()
string Unit_GetUnitCostPlaceableExistsTag(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCEXP"+sUN);
} // Unit_GetUnitPlaceableUnitExistsTag()
int Unit_GetUnitSquadCommandSize(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUSQS"+sUN);
} // Unit_GetUnitSquadCommandSize()
int Unit_GetUnitCostMana(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCMAN"+sUN);
} // Unit_GetUnitCostMana()
int Unit_GetUnitCostGold(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCGOLD"+sUN);
} // Unit_GetUnitCostGold()
int Unit_GetUnitCostWood(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCWOOD"+sUN);
} // Unit_GetUnitCostWood()
int Unit_GetUnitCostIron(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCIRON"+sUN);
} // Unit_GetUnitCostIron()
int Unit_GetUnitCostMithril(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCMITH"+sUN);
} // Unit_GetUnitCostMithril()
int Unit_GetUnitCostAdamantium(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCADM"+sUN);
} // Unit_GetUnitCostAdamantium()
int Unit_GetUnitCostGoldBar(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCGOLDB"+sUN);
} // Unit_GetUnitCostGoldBar()
int Unit_GetUnitDisplayStatus(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUDISP"+sUN);
} // Unit_GetUnitDisplayStatus()
int Unit_GetUnitUpgradeToUnit(int nTeamNumber, int nUnit,int nSlot)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUUPG"+IntToString(nSlot)+sUN);
} // Unit_GetUnitUpgradeToUnit()
int Unit_GetUnitTimedUpgradeToUnit(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUTUP"+sUN);
} // Unit_GetUnitTimedUpgradeToUnit()
int Unit_GetUnitTimedUpgradeHours(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUTHR"+sUN);
} // Unit_GetUnitTimedUpgradeHours()
int Unit_GetUnitTax(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUTAX"+sUN);
} // Unit_GetUnitTax()
int Unit_GetUnitCanHarvestWood(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUHAW"+sUN);
} // Unit_GetUnitCanHarvestWood()
int Unit_GetUnitCanMine(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUHAM"+sUN);
} // Unit_GetUnitCanMine()
int Unit_GetUnitCanHarvestMana(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUMAH"+sUN);
} // Unit_GetUnitCanHarvestMana()
int Unit_GetUnitFrontSquad(int nTeamNumber, int nUnit,int nLevel=1)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUSQF"+IntToString(nLevel)+sUN);
} // Unit_GetUnitFrontSquad()
int Unit_GetUnitCenterSquad(int nTeamNumber, int nUnit,int nLevel=1)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUSQC"+IntToString(nLevel)+sUN);
} // Unit_GetUnitCenterSquad()
int Unit_GetUnitRearSquad(int nTeamNumber, int nUnit,int nLevel=1)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUSQR"+IntToString(nLevel)+sUN);
} // Unit_GetUnitRearSquad()
int Unit_GetUnitCostLevel(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCLEV"+sUN);
} // Unit_GetUnitCostLevel()
int Unit_GetUnitCostSoul(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCSOUL"+sUN);
} // Unit_GetUnitCostSoul()
int Unit_GetUnitCanRaidAttack(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bURATT"+sUN);
} // Unit_GetUnitCanRaidAttack()
int Unit_GetUnitCanRaidSteal(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bURSTEAL"+sUN);
} // Unit_GetUnitCanRaidSteal()
int Unit_GetUnitCanCapture(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUCAPT"+sUN);
} // Unit_GetUnitCanCapture()
int Unit_GetUnitCanAssassinate(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUASSA"+sUN);
} // Unit_GetUnitCanAssassinate()
int Unit_GetUnitCanExplore(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUEXPL"+sUN);
} // Unit_GetUnitCanExplore()
int Unit_GetUnitHasSoul(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"bUHSOUL"+sUN);
} // Unit_GetUnitHasSoul()
string Unit_GetUnitCustomAbility(int nTeamNumber, int nUnit,int nAbility=1)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUCAB"+IntToString(nAbility)+sUN);
} // Unit_GetUnitCustomAbility()
string Unit_GetUnitRandomAppearanceString(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalString(GetModule(),"sUAPPR"+sUN);
} // Unit_GetUnitRandomAppearanceString()
int Unit_GetUnitSummoningVFX(int nTeamNumber, int nUnit)
{ // PURPOSE: Return the data
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUVFX"+sUN);
} // Unit_GetUnitSummoningVFX()
int Unit_GetUnitPredefinedCombat(int nTeamNumber,int nUnit)
{ // PURPOSE: Return the predefined combat AI
string sUN="_"+IntToString(nTeamNumber)+"_"+IntToString(nUnit);
return GetLocalInt(GetModule(),"nUCAI"+sUN);
} // Unit_GetUnitPredefinedCombat()
void lib_NPCJoinFaction(object oNPC,string sTeamID)
{ // PURPOSE: Use Proxy to switch oNPC to Faction
object oProxy=GetObjectByTag("proxy_"+sTeamID);
if (GetIsObjectValid(oProxy))
{ // switch
ChangeFaction(oNPC,oProxy);
} // switch
} // lib_NPCJoinFaction()
//void main(){}