Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
Nope it´s not.as in KaM planning is esssential?
Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
I disagree.Nope it´s not.as in KaM planning is esssential?
Former Site Admin
Posts: 3814
Joined: 08 Jan 2009, 23:00
Location: California - Pacific Time (UTC -8/-7 Summer Time)
Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
Pawel, would you also agree that it is good to have your farms far away from your swine farms, you coal-consuming buildings away from your coal, and your weapon workshops away from your sawmills?
Former Site Admin
Posts: 3814
Joined: 08 Jan 2009, 23:00
Location: California - Pacific Time (UTC -8/-7 Summer Time)
Former Site Admin
Posts: 3814
Joined: 08 Jan 2009, 23:00
Location: California - Pacific Time (UTC -8/-7 Summer Time)
Former Site Admin
Posts: 3814
Joined: 08 Jan 2009, 23:00
Location: California - Pacific Time (UTC -8/-7 Summer Time)
I seldom play a location more than once within a month of even seasonal amount of time. With the exception of Golden Cliffs location 5
With the exception of Golden Cliffs location 5
Golden Cliffs location 5
I'm either a 2 or 3, depending on how long it is taking people to set "ready" in lobby.
I seldom play a location more than once within a month of even seasonal amount of time. With the exception of Golden Cliffs location 5, Cursed Ravine location 7, and BitD location 8, I doubt I've played a location more than 5 times within a year. It is for this reason that I don't use thorough prebuilds: it's just not useful. Players who are playing the same locations repeatedly (which I find lame) probably find pre building more useful.
procedure aRevealResources;
var aiHouses: array of Integer;
var i: Integer;
var i2: Integer;
var iX: Integer;
var iY: Integer;
var aStartLoc: array of Record aX, aY: Integer; end;
var aStone: array of Record aX, aY, aSqrDist: Integer; end;
var aGold: array of Record aX, aY, aSqrDist: Integer; end;
var aIron: array of Record aX, aY, aSqrDist: Integer; end;
var aCoal: array of Record aX, aY, aSqrDist: Integer; end;
var aiSqrDistance: array of Integer;
begin
SetLength(aStartLoc, States.LocationCount);
SetLength(aStone, States.LocationCount);
SetLength(aGold, States.LocationCount);
SetLength(aIron, States.LocationCount);
SetLength(aCoal, States.LocationCount);
SetLength(aiSqrDistance, States.LocationCount);
for i := 0 to States.LocationCount-1 do begin
aStone[i].aSqrDist := -1;
aGold[i].aSqrDist := -1;
aIron[i].aSqrDist := -1;
aCoal[i].aSqrDist := -1;
iX := -1;
iY := -1;
if States.PlayerEnabled(i) = True then begin
aiHouses := States.PlayerGetAllHouses(i);
if Length(aiHouses) > 0 then begin
for i2 := 0 to Length(aiHouses)-1 do if States.HouseType(aiHouses[i2]) = 11 then begin
iX := States.HousePositionX(aiHouses[i2]);
iY := States.HousePositionY(aiHouses[i2]);
end;
if iX = -1 then iX := States.HousePositionX(aiHouses[0]);
if iY = -1 then iY := States.HousePositionY(aiHouses[0]);
end;
end;
aStartLoc[i].aX := iX;
aStartLoc[i].aY := iY;
end;
for iX := 1 to States.MapWidth-1 do for iY := 1 to States.MapHeight-1 do begin
if (States.MapTileType(iX, iY) >= 128) AND (States.MapTileType(iX, iY) <= 137) then begin //stone
for i := 0 to States.LocationCount-1 do begin
if (aStartLoc[i].aX > -1) AND (aStartLoc[i].aY > -1) then aiSqrDistance[i] := ((aStartLoc[i].aX-iX)*(aStartLoc[i].aX-iX)+(aStartLoc[i].aY-iY)*(aStartLoc[i].aY-iY));
if (aStartLoc[i].aX <= -1) OR (aStartLoc[i].aY <= -1) then aiSqrDistance[i] := -1;
if (aStone[i].aSqrDist = -1) AND (aiSqrDistance[i] > -1) then begin
aStone[i].aSqrDist := aiSqrDistance[i];
aStone[i].aX := iX;
aStone[i].aY := iY;
end;
end;
i2 := 0;
for i := 1 to States.LocationCount-1 do if ((aiSqrDistance[i] < aiSqrDistance[i2])) AND (aiSqrDistance[i] > -1) then i2 := i;
if aiSqrDistance[i2] < aStone[i2].aSqrDist then begin
aStone[i2].aSqrDist := aiSqrDistance[i2];
aStone[i2].aX := iX;
aStone[i2].aY := iY;
end;
end;
if (States.MapTileType(iX, iY) >= 144) AND (States.MapTileType(iX, iY) <= 147) then begin //gold
for i := 0 to States.LocationCount-1 do begin
if (aStartLoc[i].aX > -1) AND (aStartLoc[i].aY > -1) then aiSqrDistance[i] := ((aStartLoc[i].aX-iX)*(aStartLoc[i].aX-iX)+(aStartLoc[i].aY-iY)*(aStartLoc[i].aY-iY));
if (aStartLoc[i].aX <= -1) OR (aStartLoc[i].aY <= -1) then aiSqrDistance[i] := -1;
if (aGold[i].aSqrDist = -1) AND (aiSqrDistance[i] > -1) then begin
aGold[i].aSqrDist := aiSqrDistance[i];
aGold[i].aX := iX;
aGold[i].aY := iY;
end;
end;
i2 := 0;
for i := 1 to States.LocationCount-1 do if ((aiSqrDistance[i] < aiSqrDistance[i2])) AND (aiSqrDistance[i] > -1) then i2 := i;
if aiSqrDistance[i2] < aGold[i2].aSqrDist then begin
aGold[i2].aSqrDist := aiSqrDistance[i2];
aGold[i2].aX := iX;
aGold[i2].aY := iY;
end;
end;
if (States.MapTileType(iX, iY) >= 148) AND (States.MapTileType(iX, iY) <= 151) then begin //iron
for i := 0 to States.LocationCount-1 do begin
if (aStartLoc[i].aX > -1) AND (aStartLoc[i].aY > -1) then aiSqrDistance[i] := ((aStartLoc[i].aX-iX)*(aStartLoc[i].aX-iX)+(aStartLoc[i].aY-iY)*(aStartLoc[i].aY-iY));
if (aStartLoc[i].aX <= -1) OR (aStartLoc[i].aY <= -1) then aiSqrDistance[i] := -1;
if (aIron[i].aSqrDist = -1) AND (aiSqrDistance[i] > -1) then begin
aIron[i].aSqrDist := aiSqrDistance[i];
aIron[i].aX := iX;
aIron[i].aY := iY;
end;
end;
i2 := 0;
for i := 1 to States.LocationCount-1 do if ((aiSqrDistance[i] < aiSqrDistance[i2])) AND (aiSqrDistance[i] > -1) then i2 := i;
if aiSqrDistance[i2] < aIron[i2].aSqrDist then begin
aIron[i2].aSqrDist := aiSqrDistance[i2];
aIron[i2].aX := iX;
aIron[i2].aY := iY;
end;
end;
if (States.MapTileType(iX, iY) >= 152) AND (States.MapTileType(iX, iY) <= 155) then begin //coal
for i := 0 to States.LocationCount-1 do begin
if (aStartLoc[i].aX > -1) AND (aStartLoc[i].aY > -1) then aiSqrDistance[i] := ((aStartLoc[i].aX-iX)*(aStartLoc[i].aX-iX)+(aStartLoc[i].aY-iY)*(aStartLoc[i].aY-iY));
if (aStartLoc[i].aX <= -1) OR (aStartLoc[i].aY <= -1) then aiSqrDistance[i] := -1;
if (aCoal[i].aSqrDist = -1) AND (aiSqrDistance[i] > -1) then begin
aCoal[i].aSqrDist := aiSqrDistance[i];
aCoal[i].aX := iX;
aCoal[i].aY := iY;
end;
end;
i2 := 0;
for i := 1 to States.LocationCount-1 do if ((aiSqrDistance[i] < aiSqrDistance[i2])) AND (aiSqrDistance[i] > -1) then i2 := i;
if aiSqrDistance[i2] < aCoal[i2].aSqrDist then begin
aCoal[i2].aSqrDist := aiSqrDistance[i2];
aCoal[i2].aX := iX;
aCoal[i2].aY := iY;
end;
end;
end;
for i := 0 to States.LocationCount-1 do begin
if aStone[i].aSqrDist > -1 then Actions.FogRevealCircle(i, aStone[i].aX, aStone[i].aY, 3);
if aGold[i].aSqrDist > -1 then Actions.FogRevealCircle(i, aGold[i].aX, aGold[i].aY, 3);
if aIron[i].aSqrDist > -1 then Actions.FogRevealCircle(i, aIron[i].aX, aIron[i].aY, 3);
if aCoal[i].aSqrDist > -1 then Actions.FogRevealCircle(i, aCoal[i].aX, aCoal[i].aY, 3);
end;
end;
procedure OnMissionStart;
begin
aRevealResources;
end;
Return to “General / Questions”
Users browsing this forum: Ahrefs [Bot] and 1 guest
Powered by phpBB® Forum Software © phpBB Group Designed by ST Software |