TethysGame::SetVortex(24,35,26,37,3,5);
SCRIPT_API int InitProc()
{
_Player *Player, *Computer;
Player = &::Player[0];
Computer = &::Player[1];
Player->GoEden();
Player->SetColorNumber(0);
Player->SetOre(5000);
Player->SetFoodStored(3000);
Player->SetWorkers(28);
Player->SetScientists(13);
Player->SetKids(15);
Player->CenterViewOn(60, 210);
Computer->GoPlymouth();
Computer->SetColorNumber(1);
Computer->SetOre(5000);
Computer->SetFoodStored(3000);
Computer->SetWorkers(28);
Computer->SetScientists(13);
Computer->SetKids(15);
TethysGame::ForceMoraleGood(-1);
TethysGame::SetDaylightMoves(-1);
TethysGame::SetDaylightEverywhere(0);
TethysGame::SetCheatFastUnits(0);
TethysGame::SetCheatFastProduction(0);
TethysGame::SetCheatUnlimitedResources(0);
TethysGame::SetCheatProduceAll(0);
TethysGame::SetMeteor(Xpos,YPos,size)
TethysGame::SetInitialLight(value);
GameMap::SetInitialLightLevel(-96);
TethysGame::SetDaylightEverywhere(0);
TethysGame::CreateBeacon((map_id)0x51, xpos+31, ypos-1, 0, ?yield?, 0xFFFFFFFF);
__declspec(dllexport) _cdecl int InitProc(TethysGame Game)
{
Game.CreateBeacon(map_Mining_Beacon, 0x41, 0x19, 0x0, 0x0, -1);
};
int unknown1, unknown2, unknown3;
_Player OP2 Player[6];
int x, y;
int ID;
_inline LOCATION::LOCATION(int map_x, int map_y)
{
x = map_x;
y = map_y;
};
_inline LOCATION::LOCATION(void) { };
_inline Unit::Unit(void)
{
ID = 0;
};
__declspec(dllexport) _cdecl int InitProc(void)
{
Player[plr_1].GoEden();
Player[plr_1].SetColorNumber(0x00);
Player[plr_2].GoPlymouth();
Player[plr_2].SetColorNumber(0x01);
Unit RetUnit;
TethysGame::CreateUnit(RetUnit, map_ConVec, LOCATION(0x41, 0x19), plr_1, map_Default, 0);
RetUnit.SetCargo(map_Command_Center, map_Default);
//* RetUnit.DoBuild(RetUnit.GetCargo(), LOCATION(0x40, 0x20));
RetUnit.DoBuild(map_Command_Center, LOCATION(0x40, 0x20));
RetUnit.DoSetLights(1);
TethysGame::CreateUnit(RetUnit, map_Cargo_Truck, LOCATION(0x41, 0x18), plr_1, map_Default, 0);
RetUnit.SetTruckCargo(trck_Rare_Metal, 0);
RetUnit.SetDamage(30);
RetUnit.DoTransfer(plr_2);
// RetUnit.DoDeath();
// RetUnit.DoSelfDestruct();
Unit CargoTruck1 = RetUnit;
TethysGame::CreateUnit(RetUnit, map_Lynx, LOCATION(0x41, 0x1A), plr_1, map_RPG, 0);
RetUnit.SetWeapon(map_Microwave);
RetUnit.DoAttack(CargoTruck1);
// RetUnit.DoMove(LOCATION(0x20, 0x20));
Player[plr_1].CenterViewOn(0x41, 0x19);
Player[plr_1].SetFoodStored(3000);
Player[plr_1].SetKids(20);
Player[plr_1].SetWorkers(20);
Player[plr_1].SetScientists(15);
int RetTile = GameMap::GetTile(LOCATION(0x51, 0x13));
GameMap::InitialSetTile(LOCATION(0x41, 0x16), RetTile);
GameMap::SetTile(LOCATION(0x42, 0x17), RetTile);
GameMap::SetInitialLightLevel(0x40);
LOCATION TestLoc(0x10, 0x10);
TestLoc.Add(LOCATION(0x31, 0x01));
TethysGame::CreateUnit(RetUnit, map_Command_Center, TestLoc, plr_2, map_Default, 0);
TethysGame::ForceMoraleGreat(-1);
// TethysGame::ForceMoraleGood(-1);
// TethysGame::ForceMoraleOK(-1);
// TethysGame::ForceMoralePoor(-1);
// TethysGame::ForceMoraleRotten(-1);
TethysGame::SetDaylightMoves(1);
TethysGame::SetDaylightEverywhere(0);
TethysGame::SetCheatFastUnits(0);
TethysGame::SetCheatFastProduction(0);
TethysGame::SetCheatUnlimitedResources(0);
TethysGame::SetCheatProduceAll(0);
Player[plr_1].SetTechLevel(9);
TethysGame::CreateBeacon(map_Mining_Beacon, 0x41, 0x1B, beacon_rare, yield_3, -1);
TethysGame::CreateUnit(RetUnit, map_Mine, LOCATION(0x41, 0x1B), plr_1, map_Default, 0);
TethysGame::CreateWallOrTube(0x41, 0x1D, 0, map_Microbe_Wall);
return 1; // return 1 if OK; 0 on failure
};
map_id OP2 GetCargo(void);
enum map_id {
map_Default = 0,
map_Cargo_Truck,
map_ConVec,
map_Spider,
map_Scorpion,
map_Lynx,
map_Panther,
map_Tiger,
map_Robo_Surveyor,
map_Robo_Miner,
map_GeoCon,
map_Scout,
map_Robo_Dozer,
map_Evacuation_Transport,
map_Repair_Vehicle,
map_Earthworker,
map_Tube = 0x11,
map_Wall,
map_Lava_Wall,
map_Microbe_Wall,
map_Mine = 0x15,
map_Guard_Post = 0x17,
map_Light_Tower,
map_Common_Storage,
map_Rare_Storage,
map_Forum,
map_Command_Center,
map_MHD_Generator,
map_Residence,
map_Robot_Command,
map_Trade_Center,
map_Basic_Lab,
map_Medical_Center,
map_Nursury,
map_Solar_Power_Array,
map_Recreation_Facility,
map_University,
map_Agridome,
map_DIRT,
map_Garage,
map_Magma_Well,
map_Meteor_Defense,
map_Geothermal_Plant,
map_Arachnid_Factory,
map_Consumer_Factory,
map_Structure_Factory,
map_Vehicle_Factory,
map_Standard_Lab,
map_Advanced_Lab,
map_Observatory,
map_Reinforced_Residence,
map_Advanced_Residence,
map_Common_Ore_Smelter,
map_Spaceport,
map_Rare_Ore_Smelter,
map_GORF,
map_Tokamak,
map_Acid_Cloud = 0x3B,
map_EMP,
map_Laser,
map_Microwave,
map_Rail_Gun,
map_RPG,
map_Starflare,
map_Supernova,
map_ESG = 0x46,
map_Stickyfoam,
map_Thors_Hammer,
map_Mining_Beacon = 0x51
};
enum Truck_Cargo {
trck_Empty = 0x00,
trck_Food,
trck_Common_Ore,
trck_Rare_Ore,
trck_Common_Metal,
trck_Rare_Metal,
trck_Common_Rubble = 0x06,
trck_Rare_Rubble,
trck_Spaceport = 0x08,
trck_Garbage = 0x09,
trck_Unit = 0x03F8
};
// PlayerID's
#define plr_1 0
#define plr_2 1
#define plr_3 2
#define plr_4 3
#define plr_5 4
#define plr_6 5
// Mining beacon's
#define beacon_common 0
#define beacon_rare 1
// Yield Type's
#define yield_3 0
#define yield_2 1
#define yield_1 2
// TethysGame:
CreateBeacon(map_id BeaconType, int X, int Y, int Type, int Yield, int l3);
CreateUnit(Unit &ReturnUnit, map_id UnitType, LOCATION, int PlayerNum, map_id Weapon, int l9);
CreateWallOrTube(int X, int Y, int m5, map_id Type);
// GameMap:
CenterViewOn(int X, int Y);
// Unit:
SetCargo(map_id Cargo, map_id Default);
SetFactoryCargo(int Bay, map_id UnitType, map_id Default);
SetTruckCargo(Truck_Cargo Cargo, int Attrib);
struct SDescBlock{
int type;
int unknown1;
int unknown2;
int unknown3;
};
SCRIPT_API SDescBlock DescBlock = { COLONY, 2, 0x0C, 0 };
// Create a line of wall or tube
// Draw along the horizontal first:
// If coordinates represent a bent wall/tube then draw
// horizontal between x1 and x2 (along y1) and then
// vertical between y1 and y2 (along x2)
void CreateTubeOrWallLine(int x1, int y1, int x2, int y2, map_id type)
{
int i;
int vert;
int horz;
// Adjust coordinates for odities of the game
x1 += 31; x2 += 31;
y1 -= 1; y2 -=1;
// Determine which edges to draw along
vert = x2;
horz = y1;
// Make sure (x1 < x2) and (y1 < y2)
if (x1 > x2){ x1 ^= x2; x2 ^= x1; x1 ^= x2; }
if (y1 > y2){ y1 ^= y2; y2 ^= y1; y1 ^= y2; }
// Create horizontal section
for (i = x1; i <= x2; i++)
TethysGame::CreateWallOrTube(i, horz, 0, type);
// Create vertical section
for (i = y1; i <= y2; i++)
TethysGame::CreateWallOrTube(vert, i, 0, type);
}
int Workers() const;
; 02101 Agridome
; 02103 Command Center
; 02104 Structure Factory
; 02106 Basic Laboratory
; 02107 Light Tower
; 02108 Common Ore Mine
; 02109 Residence
; 02110 Common Ore Smelter
; 02111 Common Metals Storage Tanks
; 02112 Tokamak
; 02114 Tube
; 02115 Trade Center
; 03101 Standard Lab
; 03301 DIRT
; 03302 GORF
; 03303 Medical Center
; 03304 Nursery
; 03305 University
; 03501 Robot Command Center
; 03502 Vehicle Factory
; 03601 Scout
; 03602 Laser Turret
; 03603 Microwave Turret
; 03604 Cargo Truck
; 03605 Construction Vehicle
; 03606 Earthworks Constructor
; 03607 Evacuation Transport
; 03608 Robo-Dozer
; 03609 Robo-Miner
; 03610 Robo-Surveyor
; 03801 Guard Post
; 03851 Light Combat Chassis
; 05101 Consumer Goods Factory
; 05102 Garage
; 05104 Advanced Lab
; 05105 Recreation Facility
; 05106 Walls, Concrete
; 05107 ASE Converter (MHD Generator, I believe)
; 05108 Forum
; 05110 Rare Ore Mine
; 05115 Geothermal Constructor
; 05116 Factory, Arachnid and Spider
; 05201 Medium Combat Chassis
; 05202 StickyFoam Turret
; 05301 Earthquake Prediction
; 05302 Electrical Storm Prediction
; 05303 Vortex Prediction
; 05304 Volcanic Eruption Prediction
; 05401 Repair Vehicle
; 05501 Rare Ore Smelter
; 05502 Rare Metals Storage Tanks
; 05503 SULV
; 05504 EDWARD Satellite
; 05506 Rail Gun Turret
; 05508 EMP Turret
; 05602 Cannon Turret (RPG, I believe)
; 07102 Starflare Turret
; 07103 ESG Turret
; 07104 Scorpion
; 08051 Observatory
; 08102 Lava Wall
; 08103 Magma Well
; 08104 Advanced Residence
; 08105 Reinforced Residence
; 08106 Meteor Defense
; 08201 Heavy Combat Chassis
; 08203 Supernova Turret
; 08317 Volcanic Eruption Prediction
; 08401 Microbe Wall
; 08503 Corrosive Acid Turret (Acid Cloud)
; 08601 Orbital Space Station (Skydock)
; 08801 Starship Superstructure I (?)
; 08901 Starship Superstructure II (?)
; 10101 RLV
; 10102 Thor's Hammer Turret
; 10202 Ship's Computer (Command Module)
; 10203 Ship's Propulsion System (I think Ion Drive or Fusion Drive)
; 10204 Solar Power Satellite & Array
; 10205 Starship Hull and Shielding (Maybe habitat ring?)
; 10206 Starship Long-Range Sensors (Sensor package?)
; 10207 Starship Superstructure III (?)
; 10208 Suspended animation (Stasis Systems)
; 10209 Starship Short-Range Sensors (Sensor package?)
; 10401 Ship's Power Distribution System (Ion Drive or Fusion Drive)
; 12201 EMP Missiles
Player[0].MarkResearchComplete(3801);
Player[0].MarkResearchComplete(5506);
Trigger trig;
trig = CreateTimeTrigger(1, 1, 101, "NoResponseToTrigger");
trig = CreateTimeTrigger(1, 1, 301, "NoResponseToTrigger");
trig = CreateTimeTrigger(1, 1, 501, "NoResponseToTrigger");
trig = CreateTimeTrigger(1, 1, 701, "NoResponseToTrigger");
trig = CreateTimeTrigger(1, 1, 901, "NoResponseToTrigger");
//trig = CreateEvacTrigger(1, 1, 1, "NoResponseToTrigger");
CreateVictoryCondition(1, 1, trig, "Text that appears in objective list");
//CreateFailureCondition(1, 1, trig, "Not sure what this is for");
char buffer[64];
scr_snprintf(buffer, 64, "Opponents Workers: %d", Player[1].Workers());
TethysGame::AddMessage(-1,-1,buffer,0,0);
// My old call:
enum map_id __thiscall Unit::GetCargo(void)" (__imp_?GetCargo@Unit@@QAE?AW4map_id@@XZ)
// The const-version:
enum map_id const __thiscall Unit::GetCargo(void)" (__imp_?GetCargo@Unit@@QAE?BW4map_id@@XZ)
?GetCargo@Unit@@QBE?AW4map_id@@XZ
struct SDescBlock
{
int ID, unknown2, unknown3, unknown4;
char *MAPNAME, *TECHTREE, *LEVELDESC;
int unknown8;
};
SCRIPT_API SDescBlock DescBlock = {-3, 2, 12, 0, MapName, TechtreeName, LevelDesc, 0};
// TethysGame:
static int __fastcall CreateUnitBlock(_Player &Player, char const *BlockName, int m2);
TethysGame::CreateUnitBlock(Player[plr_1], "Units\0", 0);
SCRIPT_API UnitBlock Units(UnitRec);
UnitRecord UnitRec[] = {
{map_Vehicle_Factory, 0x30, 0x10, 0, 0, map_Default, 0x10, 0, 0},
{map_Structure_Factory, 0x30, 0x14, 0, 0, map_Default, 0x10, 0, 0},
{map_Command_Center, 0x30, 0x17, 0, 0, map_Default, 0x10, 0, 0},
{map_Common_Ore_Smelter,0x30, 0x1A, 0, 0, map_Default, 0x10, 0, 0},
{map_Rare_Ore_Smelter, 0x30, 0x1E, 0, 0, map_Default, 0x10, 0, 0},
{map_Tokamak, 0x23, 0x03, 0, 0, map_Default, 0x10, 0, 0},
{map_ConVec, 0x32, 0x14, 0, 0, map_Default, 0x10, 0, 0},
{map_Cargo_Truck, 0x34, 0x10, 0, 0, map_Default, 0x10, trck_Rare_Metal, 1000},
{map_Tiger, 0x34, 0x17, 0, 0, map_Thors_Hammer, 0x10, 0, 0},
{map_Default, 0, 0, 0, 0, map_Default, 0, 0, 0}
};
struct UnitRecord {
map_id Type;
int X, Y;
int unknown1, unknown2;
map_id Weapon;
int unknown3;
short Cargo;
short Attrib;
};
enum compare_mode {
cmp_Default = 0,
cmp_Equal = 0,
cmp_Lower_Equal,
cmp_Greater_Equal,
cmp_Lower = 3,
cmp_Greater = 4
};
enum trig_res {
res_common_ore = 0x01,
res_rare_ore
};
// Global Functions
Trigger OP2 __fastcall CreateTimeTrigger(int Enable, int BoolNoRepeat, int TMin, int TMax, char const *TriggerFunc);
Trigger OP2 __fastcall CreateTimeTrigger(int Enable, int BoolNoRepeat, int Time100, char const *TriggerFunc);
Trigger OP2 __fastcall CreateVehicleCountTrigger(int Enable, int BoolNoRepeat, int PlayerNum, int RefCount, compare_mode, char const *TriggerFunc);
Trigger OP2 __fastcall CreateBuildingCountTrigger(int Enable, int BoolNoRepeat, int PlayerNum, int RefCount, compare_mode, char const *TriggerFunc);
Trigger OP2 __fastcall CreateResourceTrigger(int Enable, int BoolNoRepeat, trig_res, int RefAmount, int PlayerNum, compare_mode, char const *TriggerFunc);
Trigger OP2 __fastcall CreateVictoryCondition(int Enable, int dd6, Trigger &, char const *ConditionText);
// PlayerID's
#define plr_all -1
Trigger TTrig = CreateTimeTrigger(0, 1, 1, "NoResponseToTrigger\0");
Trigger RetTrig;
// RetTrig = CreateVictoryCondition(0, 1, TTrig, "Test-Condition 1.");
// TTrig = CreateTimeTrigger(1, 1, 200, "TestTrigger\0");
TTrig = CreateTimeTrigger(1, 1, 100, 1000, "TestTrigger\0");
// TTrig.Enable();
TTrig = CreateVehicleCountTrigger(1, 0, plr_1, 0x4, cmp_Lower_Equal, "TestTrigger2\0");
TTrig = CreateResourceTrigger(1, 1, res_rare_ore, 500, plr_all, cmp_Greater, "TestTrigger2\0");
// TTrig = CreateTimeTrigger(1, 1, 100, "NoResponseToTrigger\0");
RetTrig = CreateVictoryCondition(1, 1, TTrig, "Test-Condition 3.");
TTrig = CreateBuildingCountTrigger(1, 1, plr_1, 0x7, cmp_Greater, "TestTrigger2");
SCRIPT_API void TestTrigger(void)
{
Unit RetUnit;
TethysGame::CreateUnit(RetUnit, map_Tiger, LOCATION(0x21, 0x01), plr_1, map_RPG, 0);
};
SCRIPT_API void TestTrigger2(void)
{
Unit RetUnit;
TethysGame::CreateUnit(RetUnit, map_Tiger, LOCATION(0x27, 0x07), plr_1, map_Acid_Cloud, 0);
};
LIBRARY t15
EXPORTS
AIProc @1
DescBlock @2
GetSaveRegions @3
InitProc @4
LevelDesc @5
MapName @6
NoResponseToTrigger @7
StatusProc @8
TechtreeName @9
TestTrigger @10
TestTrigger2 @11
map_id GetCargo() const;
map_Mining_Beacon = 0x51,
map_Magma_Vent,
map_Fumarole
// Create common ore beacons
TethysGame::CreateBeacon(map_Mining_Beacon, x-28, y-21, beacon_common, yield_3, 0);
TethysGame::CreateBeacon(map_Mining_Beacon, x-25, y+7, beacon_common, yield_3, 0);
// Create rare ore beacons
TethysGame::CreateBeacon(map_Mining_Beacon, x+17, y+31, beacon_rare, yield_3, 0);
// Create magma wells
TethysGame::CreateBeacon(map_Magma_Vent, x-25, y+40, -1, -1, -1);
// Create fumaroles
TethysGame::CreateBeacon(map_Fumarole, x+1, y-24, -1, -1, -1);
TethysGame::CreateBeacon(map_Fumarole, x-5, y+38, -1, -1, -1);
// Note: CAN NOT use playerNum = -1 for all players
void SetAllVehicleLightsForPlayer(int playerNum, int bOn)
{
PlayerVehicleEnum unitEnum(playerNum); // Enumerate vehicles for given player
Unit curUnit;
// Enumerate through all vehicles of this player
while (unitEnum.GetNext(curUnit))
{
curUnit.DoSetLights(bOn); // Turn on the headlights
}
}
class OP2 PlayerVehicleEnum {
public:
// GetNext: If there are units left to enumerate, copies current
// unit into curUnit and returns 1, otherwise it returns 0
int GetNext(Unit &curUnit);
PlayerVehicleEnum(int playerNum);
};
// Create victory conditions for - Colony, Starship
trig = CreateCountTrigger(1, 1, -1, map_Evacuation_Module, (map_id)-1, 1, cmp_Greater_Equal, "NoResponseToTrigger");
CreateVictoryCondition(1, 1, trig, "Evacuate 200 colonists to spacecraft");
trig = CreateCountTrigger(1, 1, -1, map_Food_Cargo, (map_id)-1, 1, cmp_Greater_Equal, "NoResponseToTrigger");
CreateVictoryCondition(1, 1, trig, "Evacuate 10000 units of food to spacecraft");
trig = CreateCountTrigger(1, 1, -1, map_Common_Metals_Cargo, (map_id)-1, 1, cmp_Greater_Equal, "NoResponseToTrigger");
CreateVictoryCondition(1, 1, trig, "Evacuate 10000 units of Commom Metals to spacecraft");
trig = CreateCountTrigger(1, 1, -1, map_Rare_Metals_Cargo, (map_id)-1, 1, cmp_Greater_Equal, "NoResponseToTrigger");
CreateVictoryCondition(1, 1, trig, "Evacuate 10000 units of Rare Metals to spacecraft");
map_Disasterous_Building_Explosion = 0x55,
map_Catastrophic_Building_Explosion,
map_Athiest_Building_Explosion,
map_EDWARD_Satellite = 0x58,
map_Solar_Satellite,
map_Ion_Drive_Module,
map_Fusion_Drive_Module,
map_Command_Module,
map_Fueling_Systems,
map_Habitat_Ring,
map_Sensor_Package,
map_Skydock,
map_Stasis_Systems,
map_Orbital_Package,
map_Pheonix_Module,
map_Rare_Metals_Cargo,
map_Common_Metals_Cargo,
map_Food_Cargo,
map_Evacuation_Module,
map_Children_Module,
map_SULV,
map_RLV,
map_EMP_Missile,
map_Impulse_Items = 0x6C,
map_Wares,
map_Luxury_Wares,
map_Inter_Colony_Shuttle = 0x6F,
map_Spider_3_Pack,
map_Scorpion_3_Pack,
map_Pretty_Art = 0x72
TethysGame::CreateUnit(retUnit, map_Spaceport, LOCATION(x-8, y-1), playerNum, map_Default, 0);
retUnit.SetFactoryCargo(-1, map_RLV, map_Default); // Note: Any bay number will place this on the launch pad
retUnit.SetFactoryCargo(0, map_Common_Metals_Cargo, map_Default);
retUnit.SetFactoryCargo(1, map_Rare_Metals_Cargo, map_Default);
retUnit.SetFactoryCargo(2, map_Food_Cargo, map_Default);
retUnit.SetFactoryCargo(3, map_Evacuation_Module, map_Default);
retUnit.SetFactoryCargo(4, map_EDWARD_Satellite, map_Default);
retUnit.SetFactoryCargo(5, map_Solar_Satellite, map_Default);
//TethysGame::SetTornado(loc.x, loc.y, duration, 1, 1, 1);
class OP2 PlayerBuildingEnum {
public:
int GetNext(Unit &curUnit);
PlayerBuildingEnum(int playerNum, map_id buildingType);
int unknown1, unknown2;
};
Unit curUnit;
LOCATION loc(0, 0);
// Find a player building
if (enumBuilding.GetNext(curUnit))
{
loc = curUnit.Location();// Get the coordinates of the building
TethysGame::SetMeteor(loc.x, loc.y, 500); // Send a big rock at it ;>
}
else
{
enumBuilding = PlayerBuildingEnum(0, map_Default);
}
PlayerBuildingEnum enumBuilding(0, map_Default); // All buildings
PlayerBuildingEnum enumBuilding(0, map_Command_Center); // Just the command centers
class ScGroup {
public:
int PlayerKI;
void AddUnits(UnitBlock &AddUnits);
int GetFirstOfType(Unit &ReturnUnit, UnitClassifactions);
int GetFirstOfType(Unit &ReturnUnit, map_id Type, map_id Weapon);
void RemoveUnit(Unit);
ScGroup(void);
void SetLights(int BoolOn);
void TakeUnit(Unit);
int TotalUnitCount(void);
int UnitCount(UnitClassifactions);
~ScGroup(void);
};
enum UnitClassifactions {
cls_Attack = 0,
cls_ESG,
cls_EMP,
cls_Stickyfoam,
cls_Convecs = 5,
cls_Cargo_Trucks = 7,
cls_Earthworkers = 8,
cls_Robo_Dozers = 9,
cls_test = 4 // No special need
};
TethysGame::CreateUnit(RetUnit, map_Tiger, LOCATION(0x41, 0x1B), plr_2, map_EMP, 0);
// TethysGame::CreateUnit(RetUnit, map_Scout, LOCATION(0x41, 0x1B), plr_2, map_Default, 0);
ScGroup UBGroup;
UBGroup.PlayerKI = 0; // obviously must be PlayerNum -1 of all included units
// UBGroup.AddUnits(Units);
UBGroup.TakeUnit(RetUnit); // Adds Unit to the group
UBGroup.SetLights(1);
UBGroup.GetFirstOfType(RetUnit, map_Tiger, map_EMP);
//UBGroup.RemoveUnit(RetUnit); // Removes Unit from group but not from game
//RetUnit.DoSelfDestruct();
char buffer[64];
scr_snprintf(buffer, 64, "Unit Count: %d", UBGroup.UnitCount(cls_Defense));
TethysGame::AddMessage(-1, -1, buffer, 0, 0);
BuildingGroup OP2 __fastcall CreateBuildingGroup(_Player);
FightGroup OP2 __fastcall CreateFightGroup(_Player);
MiningGroup OP2 __fastcall CreateMiningGroup(_Player);
map_Energy_Cannon, // (Scorpion)
class _Player {
public:
int OP2 canDoResearch(int decResearchID);
int OP2 HasTechnology(int decResearchID) const;
void OP2 MarkResearchComplete(int decResearchID);
void OP2 SetTechLevel(int TechLevel);
};
Player[plr_1].SetTechLevel(9);
There's two "Heat Dissipation Systems" research things on your list. You didn't mark them as Eden or Plymouth...Oh - I must have overlooked that.
GameMap::SetVirusUL(LOCATION(locX,locY), 1);
TethysGame::SetMicrobeSpreadSpeed(0xa0);
TethysGame::AddMessage(1712, 6544, "Hello There!", 0, 0);
class OP2 MiningGroup : public ScGroup {
void OreRoute(int player)
{
Unit u1, u2, u3, u4, u5;
MAP_RECT rectMineGrp(LOCATION(60, 203), LOCATION(68, 210));
TethysGame::CreateBeacon(map_Mining_Beacon, 62, 215, beacon_common, yield_3, 1 /*variant*/);
TethysGame::CreateUnit(u1, map_Command_Center, LOCATION(62, 202), player, map_Default, 0);
TethysGame::CreateUnit(u2, map_Mine, LOCATION(62, 215), player, map_Default, 0);
TethysGame::CreateUnit(u3, map_Common_Ore_Smelter, LOCATION(62, 205), player, map_Default, 0);
MiningGroup miningGrp = CreateMiningGroup(Player[player]);
miningGrp.Setup(u2, u3, rectMineGrp);
TethysGame::CreateUnit(u4, map_Cargo_Truck, LOCATION(62,210), player, map_Default, 0);
TethysGame::CreateUnit(u5, map_Cargo_Truck, LOCATION(62,210), player, map_Default, 0);
miningGrp.TakeUnit(u4);
miningGrp.TakeUnit(u5);
}
~MiningGroup() {};
class ScStub & ScStub::operator=(class ScStub const &);
class Trigger & operator=(class Trigger const &);
class Pinwheel & operator=(class Pinwheel const &);
class ScGroup & operator=(class ScGroup const &);
class BuildingGroup & operator=(class BuildingGroup const &);
class FightGroup & operator=(class FightGroup const &);
class MiningGroup & operator=(class MiningGroup const &);
void BaseLayout(int player)
{
Unit u1, u2, u3, u4, u5, u6;
TethysGame::CreateUnit(u1, map_Command_Center, LOCATION(62, 205), player, map_Default, 0);
TethysGame::CreateUnit(u2, map_Structure_Factory, LOCATION(58, 205), player, map_Default, 0);
TethysGame::CreateUnit(u3, map_Common_Ore_Smelter, LOCATION(53, 205), player, map_Default, 0);
TethysGame::CreateUnit(u4, map_Tokamak, LOCATION(60, 197), player, map_Default, 0);
TethysGame::CreateUnit(u5, map_ConVec, LOCATION(60, 207), player, map_Agridome, 0);
TethysGame::CreateUnit(u6, map_ConVec, LOCATION(60, 207), player, map_Standard_Lab, 0);
BuildingGroup &bldGrp = CreateBuildingGroup(Player[player]);
bldGrp.TakeUnit(u2);
bldGrp.TakeUnit(u5);
bldGrp.TakeUnit(u6);
bldGrp.RecordBuilding(LOCATION(62, 202), map_Agridome, map_Default);
bldGrp.RecordBuilding(LOCATION(62, 208), map_Standard_Lab, map_Default);
bldGrp.RecordBuilding(LOCATION(48, 205), map_Vehicle_Factory, map_Default);
bldGrp.SetRect(MAP_RECT(58, 207, 59, 208));
bldGrp.SetDeleteWhenEmpty(1);
}
struct BufferDesc
#pragma pack(1)
struct BufferDesc
{
void *bufferStart;
int length;
};
#pragma pack()
SCRIPT_API void GetSaveRegions(struct BufferDesc *buffDesc)
{
buffDesc->bufferStart = &DLLGlobalVars;
buffDesc->length = sizeof(DLLGlobalVars);
}
High 1 50 14 60 50 30we have a 3 bar mine, this is the first variant of it, the initial ore yield is 500, the yield increases linearly over a period of 14 truck loads from 500 to a peak of 600, and then it decreases linearly over a period of 50 truck loads from 600 down to 300 at which it remains stable.
static int __fastcall CreateBeacon(map_id beaconType, int x, int y, int type, int yield, int variant);
struct BufferDesc
{
void *bufferStart;
int length;
};
SCRIPT_API void __cdecl GetSaveRegions(struct BufferDesc &bufDesc);
// Used for storing DLL specific data to a saved game file
void __cdecl GetSaveRegions(struct BufferDesc &bufDesc)
{
bufDesc.bufferStart = &enumBuilding;
bufDesc.length = sizeof(enumBuilding);
}
// For use in multiplayer. Note: Computer controlled opponents do not count towards this.
// You win when there is only one human opponent left or all surviving human players are allied.
// This also creates corresponding failure conditions
void CreateLastOneStandingVictoryCondition()
{
Trigger trig;
trig = CreateOnePlayerLeftTrigger(1, 1, "NoResponseToTrigger");
CreateVictoryCondition(1, 1, trig, "Eliminate your opponents.");
}
// Player fails if the number of active Command Centers (for player 0) becomes equal to 0.
void CreateNoCommandCenterFailureCondition()
{
Trigger trig;
trig = CreateOperationalTrigger(1, 1, 0, map_Command_Center, 0, cmp_Equal, "NoResponseToTrigger");
CreateFailureCondition(1, 1, trig, "");
}
OP2 class Trigger __fastcall CreateOperationalTrigger(int boolEnable, int boolNoRepeat, int playerNum, enum map_id buildingType, int refValue, enum compare_mode compareType, char const *triggerFunction);
extern "C" void MyTriggerFunction()
{
// Do stuff in here
}
00496E85 E8 C89F0200 CALL <JMP.&WSOCK32.#20>
00496E85 E8 367D0300 CALL Outpost2.004CEBC0
004CEBC0 C747 16 44924F64 MOV DWORD PTR DS:[EDI+16],<your external IP address>
004CEBC7 ^EB F7 JMP SHORT Outpost2.004CEBC0; Jump to winsock function
static int __fastcall CreateUnit(class Unit &returnedUnit, enum map_id unitType, struct LOCATION location, int playerNum, enum map_id weaponType, int rotation);
#define X(n) n+31
#define Y(n) n-1
// example
LOCATION loc(X(3),Y(3)); // would equal 3,3 in game reality
void ResetPlayerResources(_Player &player)
{
// reset player resources
player.SetWorkers(20);
player.SetOre(10000);
player.SetRareOre(5000);
}
void AIProc()
{
// reset everything every tick
int i = 0;
// reset everyone's resources
for (i=0; i<TethysGame::NoPlayers()-1; i++) {
ResetPlayerResources(Player[i]);
}
// restore all the buildings to 0 damage
for (i=0; i<TethysGame::NoPlayers()-1; i++) {
playerCC[i].SetDamage(0);
playerVF[i].SetDamage(0);
playerCS[i].SetDamage(0);
playerAF[i].SetDamage(0);
playerRS[i].SetDamage(0);
playerSP[i].SetDamage(0);
}
}
static int __fastcall CreateWreck(int x, int y, enum map_id, int boolNoIdea); // **Figure out last param**
static void __fastcall SetEMPMissile(int launchX, int launchY, int, int destX, int destY); // Set third param to 0
map_None = 0,
static int __fastcall CreateWreck(int x, int y, enum map_id techNum, int boolNoIdea);
SCRIPT_API SDescBlock DescBlock = { MULTI_LastOneStanding, 4 /*number of players*/, 0x0C, 0, MapName, LevelDesc, TechtreeName, 0};
// Structure for important data exports needed for OP2 to recognize the level
struct SDescBlock{
int missionType; // For campaign games, this is the level number (positive values)
int numPlayers; // For multiplayer, this is the number of players
int unknown2;
int unknown3;
char *MapName;
char *LevelDescription;
char *TechtreeName;
int unknown4;
};
// missionType defines (and prefix needed on DLL name)
#define COLONY -1 //0xFFFFFFFF // c
#define AUTODEMO -2 //0xFFFFFFFE // a
#define TUTORIAL -3 //0xFFFFFFFD // t
#define MULTI_LandRush -4 //0xFFFFFFFC // mu(x)
#define MULTI_SpaceRace -5 //0xFFFFFFFB // mf(x)
#define MULTI_ResourceRace -6 //0xFFFFFFFA // mr(x)
#define MULTI_Midas -7 //0xFFFFFFF9 // mm(x)
#define MULTI_LastOneStanding -8 //0xFFFFFFF8 // ml(x)
Does anyone know if the .map files could potentially have extra data stored at the end which could be accessed by the DLL? I was thinking we might be able to store stuff like Mine, Magma Vent, Fumarole, or Unit data into the map file and have it processed by the DLL. It might make it easier to add support for these things into a map editor.Yea, you can add data to the end of the map file without suffering any ill consequences. I've done it before (and old versions of my map editor did it, too. there was a bug that has now been fixed that added about 20K of redundant data every time you saved... so some maps were 5mb in size, because of this crap on the end)
_Player *Player;
_Player *Computer;
Player->SetOre(5000);
_Player &Player = Player[0];
_Player &Computer = Player[1];
Player.SetOre(5000);
_Player &Player = Players[0];
_Player &Computer = Players[1];
_Player &plyr = Player[0];
_Player &comp = Player[1];
plyr.SetOre(5000);
comp.SetOre(5000);
OP2 class _Player Player[7];
static int __fastcall GetRand(int range); // Returns a number from 0 to (range-1)
static void __fastcall SetSeed(unsigned int randNumSeed); // Set random number seed
// Note: Uses TethysGame::GetRand();
void RandomizeList(int numItems, int list[])
{
int i;
int next;
int temp;
// Randomly reorder the list (backwards)
for (i = numItems-1; i; i--)
{
// Determine which item to place next in list
next = TethysGame::GetRand(i+1);
// Swap the 'next' item into place
temp = list[i];
list[i] = list[next];
list[next] = temp;
}
}
static void __fastcall AddMessage(int x, int y, char *message, int recipientPlayerNum, int soundToPlay);
static void __fastcall AddMessage(class Unit, char *message, int recipientPlayerNum, int soundToPlay);
static int __fastcall CreateWreck(int x, int y, enum map_id techID, int boolAllPlayers); // Note: techID must be >= 8000 but < (8000+4096)
TethysGame::CreateWreck(95, 63, (map_id)8201, 0); // Tech #11999 - tiger speed upgrade
static void __fastcall ForceMoraleGood(int playerNum);
static void __fastcall ForceMoraleGreat(int playerNum);
static void __fastcall ForceMoraleOK(int playerNum);
static void __fastcall ForceMoralePoor(int playerNum);
static void __fastcall ForceMoraleRotten(int playerNum);
static void __fastcall FreeMoraleLevel(int playerNum);
FreeMoraleLevel(1);
all i can say is that someone needs to make a GUI based program for all of theless code saavy ppl and also for the ppl who don't have the time on their hands to do it this way (such as me)Keep in mind that a graphical editor is a major time commitment for the coders, who also don't have a lot of time on their hands.
OP2 class Trigger __fastcall CreateResearchTrigger(int boolEnable, int boolNoRepeat, int techID, int playerNum, char const *triggerFunction);
// Research techIDs
enum TechID
{
// Group I (No predecessors)
CyberneticTeleoperation = 3401,
EmergencyResponseSystems = 3301,
EnvironmentalPsychology = 3406,
FocusedMicrowaveProjection = 3408,
HealthMaintenance = 3303,
HighTemperatureSuperconductivity = 3402,
HydroponicGrowingMedia = 3403,
LargeScaleOpticalResonators = 3407,
Metallogeny = 3405,
MetalsReclamation = 3302,
OffspringEnhancement = 3304,
ResearchTrainingPrograms = 3305,
Seismology = 3201,
// Group II (All predecessors in Group I)
AdvancedVehiclePowerPlant = 3901,
AutomatedDiagnosticExaminations = 5307,
Consumerism = 5101,
DIRTProceduralReview = 5305,
DisasterResistantHousing = 8105,
ExpandedHousing = 8104,
HeatDissipationSystemsPlymouth = 5601,
HypnopaediaEden = 5309,
HypnopaediaPlymouth = 5310,
LeisureStudies = 3306,
MobileWeaponsPlatform = 3851,
PublicPerformance = 5108,
RareOreProcessing = 5110,
RecyclerPostprocessing = 5306,
RobotAssistMechanicEden = 5051,
RobotAssistMechanicPlymouth = 5052,
RoboticImageProcessing = 5318,
Vulcanology = 3202,
// Group III (All predecessors in Group II or earlier)
AdvancedCombatChassis = 5201,
AdvancedRoboticManipulatorArmEden = 7213,
AdvancedRoboticManipulatorArmPlymouth = 7214,
DissipatingAdhesives = 5202,
EnhancedDefensizeFortifications = 8306,
ExplosiveCharges = 7102,
ForumReconfiguration = 5408,
GeothermalPower = 5115,
HotCrackingColumnEfficiency = 7202,
IndependentTurretPowerSystems = 5111,
LavaDefenses = 5701,
Magnetohydrodynamics = 5107,
Meteorology = 5302,
MultitainmentConsoleUpgrade = 8307,
RareOreExtraction = 7201,
ReinforcedVehicleConstruction = 5317,
ScoutClassDriveTrainRefit = 7206,
SmelterPostprocessing = 7203,
// Group IV (All predecessors in Group III or earlier)
AcidWeaponry = 8503,
AdvancedArmoringSystems = 10303,
ArachnidWeaponry = 7104,
ExtendedRangeProjectileLauncherPlymouth = 7212,
HighPoweredExplosives = 8203,
IncreasedCapacitanceCircuitry = 7403,
MagmaPurityControl = 10301,
SpaceProgram = 5405,
SpiderMaintenanceSoftwareRevision = 8319,
// Group V (All predecessors in Group IV or earlier)
DualTurretWeaponsSystems = 8201,
DirectionalMagneticFields = 5506,
ElectromagneticPulsing = 5508,
HeatMining = 8304,
LeggedRobots = 5116,
MagmaRefining = 8103,
MultipleMineProjectileSystem = 7103,
ReducedFoamEvaporation = 8320,
ReinforcedPantherConstruction = 8309,
RocketPropulsion = 5599,
SevereAtmosphericDisturbances = 5303,
// Group VI (All predecessors in Group V or earlier)
ArachnidDurability = 8321,
ArtificialLightning = 10102,
EfficiencyEngineeringEden = 8301,
EfficiencyEngineeringPlymouth = 8302,
ExtendedRangeProjectileLauncherEden = 7211,
GrenadeLoadingMechanismPlymouth = 10306,
ImprovedLaunchVehicle = 10101,
MeteorWatchObservatory = 8049,
PrecisionTrajectoryProjectionSoftware = 10309,
RocketAtmosphericReEntrySystem = 12201,
ScorpionPowerSystems = 7405,
Skydock = 8601,
SolarPower = 10204,
StasisSystems = 10208,
// Group VII (All predecessors in Group VI or earlier)
HabitatRing = 10205,
GrenadeLoadingMechanismEden = 10305,
HeatDissipationSystemsEden = 12101,
HighEnergyRayCompositeProjector = 8106,
IonDriveModule = 8801,
CommandModule = 10202,
MeteorDetection = 8316,
OrbitalPackage = 10209,
SensorPackage = 10206,
// Group VIII (All predecessors in Group VII or earlier)
FuelingSystems = 8951,
FusionDriveModule = 8901,
// Group IX (All predecessors in Group VIII or earlier)
PhoenixModule = 10401,
// Special Technologies
TigerSpeedModification = 11999,
// Free Technologies
Spider = 2099,
Agridome = 2101,
CommandCenter = 2103,
StructureFactory = 2104,
LightTower = 2107,
CommonOreMine = 2108,
Residence = 2109,
CommonOreSmelter = 2110,
CommonMetalsStorageTanks = 2111,
Tokamak = 2112,
Tube = 2114,
TradeCenter = 2115,
StandardLab = 3101,
ConcreteWalls = 5106,
AdvancedLab = 5104,
RobotCommandCenter = 3501,
VehicleFactory = 3502,
Scout = 3601,
LaserTurret = 3602,
MicrowaveTurret = 3603,
CargoTruck = 3604,
ConstructionVehicle = 3605,
EarthworksConstructor = 3606,
RoboDozer = 3608,
RoboMiner = 3609,
RoboSurveyor = 3610,
GuardPost = 3801,
Garage = 5102,
Repairvehicle = 5401,
RareOreConstructionSmelter = 5501,
RareMetalsStorageTanks = 5502,
RocketLauncher = 5602,
Observatory = 8051,
SULV = 5503,
EDWARDSatellite = 5504,
MeteorDetectionConstruction = 8317,
EvacuationModule = 12599,
// Unavailable Technologies
BasicLaratory = 2106,
EvacuationTransport = 3607,
MicrobeWall = 8401,
ChildrensModule = 12499
};
// for compatibility with the old SDK
#define map_Default map_None
#define double(i) i+i
double(i++); // Increments the value of "i" twice
void DoSimpleCommand(int commandType);
void PutInGarage(int bay, int tileX, int tileY);
TethysGame::CreateUnit(unit3, map_Garage, LOCATION(46, 10), 0, map_None, 0);
TethysGame::CreateUnit(unit3, map_Cargo_Truck, LOCATION(45, 10), 0, map_None, 0);
unit3.PutInGarage(0, 46, 10);
TethysGame::CreateUnit(unit2, map_Command_Center, LOCATION(46,10), 0, map_None, 0);
struct SDescBlock{
int missionType;
int numPlayers;
int techLevel; // Tech-level you start with (in combination with the SetTechLevel function
bool unitMission; // false= base mission; true= unit mission (no base commands available)
char *MapName;
char *LevelDescription;
char *TechtreeName;
int unknown4;
};
Or even how many fields should be in this structure?This is definately THE number of arguments, although the last "unknown" argument seems to be always zero, and has no effect when changed...
struct SDescBlock{
int missionType; // For campaign games, this is the level number (positive values)
int numPlayers; // For multiplayer, this is the number of players. For singleplayer, set to 2 when using computer opponent !
int techLevel; // Tech level for available research
bool unitMission; // true=unitmission; false=basemission
char *MapName;
char *LevelDescription;
char *TechtreeName;
int unknown;
};
Unit convec1,convec2;
int x=60,y=10;
EXPORT void CreateTrucks()
{
TethysGame::CreateUnit(convec1,map_ConVec,LOCATION(46,0),0,map_Command_Center,1);
convec1.DoBuild(map_Command_Center,LOCATION(x,y));
TethysGame::CreateUnit(convec2,map_ConVec,LOCATION(48,0),0,map_Structure_Factory,1);
convec2.DoBuild(map_Structure_Factory,LOCATION(x+5,y+1));
CreateOperationalTrigger(1,1,1,map_Structure_Factory,1,cmp_Equal,"Base1");
}
EXPORT void Base1()
{
BuildingGroup &bldGrp1 = CreateBuildingGroup(Player[0]);
bldGrp1.TakeUnit(convec1);
bldGrp1.TakeUnit(convec2);
bldGrp1.RecordBuilding(LOCATION(x+1,y+3),map_Agridome,map_None);
}
#define EXPORT extern "C" __declspec(dllexport)
Just remove all the qualifiers from the function prototype and add the function name to the .def file (which should be part of the project).Well, i find it easier this way: i've been programming for 19 years now, and i'm the kind of guy that can be compared mostly to what nature doez: resist changes { you know, the things Newton and Einstein propagate }
Code: [Select]Unit convec1,convec2;
int x=60,y=10;
EXPORT void CreateTrucks()
{
TethysGame::CreateUnit(convec1,map_ConVec,LOCATION(46,0),0,map_Command_Center,1);
convec1.DoBuild(map_Command_Center,LOCATION(x,y));
TethysGame::CreateUnit(convec2,map_ConVec,LOCATION(48,0),0,map_Structure_Factory,1);
convec2.DoBuild(map_Structure_Factory,LOCATION(x+5,y+1));
CreateOperationalTrigger(1,1,1,map_Structure_Factory,1,cmp_Equal,"Base1");
}
EXPORT void Base1()
{
BuildingGroup &bldGrp1 = CreateBuildingGroup(Player[0]);
bldGrp1.TakeUnit(convec1);
bldGrp1.TakeUnit(convec2);
bldGrp1.RecordBuilding(LOCATION(x+1,y+3),map_Agridome,map_None);
}
Unknown1 does NOT point to a Unit class, since casting to a Unit and accessing a member causes Outpost to crash !Yes, most definately. These aren't really unknown anymore. Just that the values aren't really useful and I'd rather people not try and use them. (And I'm too lazy to update the header file :P ) Besides, what have you been told about accessing class member veriables! :lol:
PlayerBuildingEnum enm(playerNum, buildingType);
Unit unit;
enm.GetNext(unit);
While(GetNext(unit))
{
// whatever
}
Code: [Select]Unit convec1,convec2;
int x=60,y=10;
EXPORT void CreateTrucks()
{
TethysGame::CreateUnit(convec1,map_ConVec,LOCATION(46,0),0,map_Command_Center,1);
convec1.DoBuild(map_Command_Center,LOCATION(x,y));
TethysGame::CreateUnit(convec2,map_ConVec,LOCATION(48,0),0,map_Structure_Factory,1);
convec2.DoBuild(map_Structure_Factory,LOCATION(x+5,y+1));
CreateOperationalTrigger(1,1,0,map_Structure_Factory,2,cmp_Equal,"Base1");
}
EXPORT void Base1()
{
PlayerBuildingEnum bldgs=PlayerBuildingEnum(0,map_Structure_Factory);
bldgs.GetNext(unit);
BuildingGroup bldGrp1 = CreateBuildingGroup(Player[0]);
bldGrp1.TakeUnit(unit); // the structure factory
bldGrp1.TakeUnit(convec2);
bldGrp1.RecordBuilding(LOCATION(x+1,y+5),map_Agridome,map_None);
}
AIProc is called every game cycle (or every 4 games cycles) so you can put any continuous checks you need in there. (Probably better ways to do most of that though).Thats how i did it at first, before reading about the triggers. It's just that the whole thing is missing one important trigger: BuildingDone or something likewise. But anyway: the BuildingGroup makes it a lot easier to make an AI.
enum trig_res {
res_food = 0,
res_common_ore,
res_rare_ore,
res_kids,
res_workers,
res_scientists,
res_colonists
};
struct OP2 PatrolRoute {
int unknown1;
LOCATION *waypoints;
int unknown[10];
};
void SetPatrol()
{
LOCATION scoutRoute[]=
{
LOCATION(120, 14),
LOCATION( 80, 14),
LOCATION( 96, 24),
LOCATION( -1, -1)
};
PatrolRoute route1;
route1.waypoints=scoutRoute;
patrolGrp=CreateFightGroup(Player[1]);
patrolGrp.SetPatrolMode(route1);
patrolGrp.TakeUnit(scout1); // assuming scout1 was already created
}
static void __fastcall SetMusicPlayList(int numSongs, int repeatStartIndex, enum SongIds *songIdList);
enum SongIds {
songEden11 = 0,
songEden21,
songEden22,
songEden31,
songEden32,
songEden33,
songEP41,
songEP42,
songEP43,
songEP51,
songEP52,
songEP61,
songEP62,
songEP63,
songPlymth11,
songPlymth12,
songPlymth21,
songPlymth22,
songPlymth31,
songPlymth32,
songPlymth33,
songStatic01,
songStatic02,
songStatic03,
songStatic04,
songStatic05
};
// Note: Recorded voice messages can be played by specifying the right soundID
static void __fastcall AddGameSound(int soundID, int recipientPlayerNum);
static void __fastcall AddMapSound(int soundID, struct LOCATION location);
static void __fastcall AddMessage(int pixelX, int pixelY, char *message, int recipientPlayerNum, int soundID);
static void __fastcall AddMessage(class Unit, char *message, int recipientPlayerNum, int soundID);
#define USE_OLDNAMES
#include "../Outpost2DLL.h"
namespace newNames {
enum map_id {
// blah
}
}
using namespace newNames;
... newNames::LYNX ...
map_None = 0,
map_Cargo_Truck, // 01
map_ConVec, // 02
map_Spider, // 03
map_Scorpion, // 04
map_Lynx, // 05
map_Panther, // 06
map_Tiger, // 07
map_Robo_Surveyor, // 08
map_Robo_Miner, // 09
map_GeoCon, // 0A
map_Scout, // 0B
map_Robo_Dozer, // 0C
map_Evacuation_Transport, // 0D
map_Repair_Vehicle, // 0E
map_Earthworker, // 0F
map_SmallCapacityAirTransport, // Crashes game when it moves (looks like a scout)
map_Tube = 0x11,
map_Wall, // 12
map_Lava_Wall, // 13
map_Microbe_Wall, // 14
map_Mine, // 15
map_Rare_Ore_Mine, // 16
map_Guard_Post, // 17
map_Light_Tower, // 18
map_Common_Storage, // 19
map_Rare_Storage, // 1A
map_Forum, // 1B
map_Command_Center, // 1C
map_MHD_Generator, // 1D
map_Residence, // 1E
map_Robot_Command, // 1F
map_Trade_Center, // 20
map_Basic_Lab, // 21
map_Medical_Center, // 22
map_Nursery, // 23
map_Solar_Power_Array, // 24
map_Recreation_Facility, // 25
map_University, // 26
map_Agridome, // 27
map_DIRT, // 28
map_Garage, // 29
map_Magma_Well, // 2A
map_Meteor_Defense, // 2B
map_Geothermal_Plant, // 2C
map_Arachnid_Factory, // 2D
map_Consumer_Factory, // 2E
map_Structure_Factory, // 2F
map_Vehicle_Factory, // 30
map_Standard_Lab, // 31
map_Advanced_Lab, // 32
map_Observatory, // 33
map_Reinforced_Residence, // 34
map_Advanced_Residence, // 35
map_Common_Ore_Smelter, // 36
map_Spaceport, // 37
map_Rare_Ore_Smelter, // 38
map_GORF, // 39
map_Tokamak, // 3A
map_Acid_Cloud = 0x3B, // 3B
map_EMP, // 3C
map_Laser, // 3D
map_Microwave, // 3E
map_Rail_Gun, // 3F
map_RPG, // 40
map_Starflare, // 41
map_Supernova, // 42
map_Starflare2, // 43 increased power
map_Supernova2, // 44 increased power
map_Normal_Explosion = 0x45
map_ESG = 0x46,
map_Stickyfoam, // 47
map_Thors_Hammer, // 48
map_Energy_Cannon, // 49
map_EMP_Missile_Damage = 0x4A
map_Electrical_Storm = 0x4C
map_Tornado = 0x4D
map_EarthQuake = 0x4E
map_Lava_Eruption = 0x4F
map_Meteor = 0x50
map_Mining_Beacon = 0x51,
map_Magma_Vent, // 52
map_Fumarole, // 53
map_Discovered, // 54
map_Disasterous_Building_Explosion = 0x55,
map_Catastrophic_Building_Explosion, // 56
map_Athiest_Building_Explosion, // 57
map_EDWARD_Satellite = 0x58, // Lynx (in Cargo Truck)
map_Solar_Satellite, // Wreckage (in Cargo Truck)
map_Ion_Drive_Module, // Gene Bank 5 (in Cargo Truck)
map_Fusion_Drive_Module, // 5B
map_Command_Module, // 5C
map_Fueling_Systems, // 5D
map_Habitat_Ring, // 5E
map_Sensor_Package, // 5F
map_Skydock, // 60
map_Stasis_Systems, // 61
map_Orbital_Package, // 62
map_Pheonix_Module, // 63
map_Rare_Metals_Cargo, // 64
map_Common_Metals_Cargo, // 65
map_Food_Cargo, // 66
map_Evacuation_Module, // 67
map_Children_Module, // 68
map_SULV, // 69
map_RLV, // 6A
map_EMP_Missile, // 6B
map_Impulse_Items = 0x6C,
map_Wares, // 6D
map_Luxury_Wares, // 6E
map_Inter_Colony_Shuttle = 0x6F,
map_Spider_3_Pack, // 70
map_Scorpion_3_Pack, // 71
map_Pretty_Art = 0x72,
map_Any = -1
#define plr_all -1