Login

russian armor

noob map builder help

4 Sep 2014, 20:01 PM
#1
avatar of _light_

Posts: 7

when I make a new map or when i modify the veronoi on imported maps, the map can't end, when there normally should be a vicory when you destoy the opposite base. It simply never ends. I have tested the maps on annihilation mode. I don't know if it is different on other modes. Is there an easy way to test if the map is working?

Can any one tell me what I'm doing wrong. There is no error when I save and export the map.

I have made two maps which can be downloaded. They are called "pripiat Winter tank battle" and "pripiat summer tank battle". They are modified from original coh2 maps, but I would like to be able to make my own maps.

best regards Light
4 Sep 2014, 20:03 PM
#2
avatar of Sarantini
Honorary Member Badge
Donator 22

Posts: 2181

Are you sure you are playing on annihilation and not on "no win condition" ?
Do you have base buildings placed in the out of bounds?
Those are the 2 things I can come up with now
7 Sep 2014, 18:50 PM
#3
avatar of _light_

Posts: 7

when I make a new map or when i modify the veronoi on imported maps, the map can't end, when there normally should be a vicory when you destoy the opposite base. It simply never ends. I have tested the maps on annihilation mode. I don't know if it is different on other modes. Is there an easy way to test if the map is working?

Can any one tell me what I'm doing wrong. There is no error when I save and export the map.

I have made two maps which can be downloaded. They are called "pripiat Winter tank battle" and "pripiat summer tank battle". They are modified from original coh2 maps, but I would like to be able to make my own maps.

best regards Light


I think I found out why I could not end the map with Victory. In the map that didn't Work, I used a "scar" script I found on coh2.org:

not working:

scar begin --->
function OnInitID()

--Population cap override value
g_popCapOverRide = 400

for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_SetPopCapOverride(player, g_popCapOverRide)
end
-- [[ Markers ]]

-- [[ Squad Groups ]]
sg_elefant = SGroup_CreateIfNotFound("sg_elefant")
sg_ht_251 = SGroup_CreateIfNotFound("sg_ht_251")
sg_isu_152 = SGroup_CreateIfNotFound("sg_isu_152")
sg_m5 = SGroup_CreateIfNotFound("sg_m5")
sg_panther = SGroup_CreateIfNotFound("sg_panther")
sg_su_85 = SGroup_CreateIfNotFound("sg_su_85")
sg_tiger = SGroup_CreateIfNotFound("sg_tiger")

-- [[ Entity Groups ]]

-- List all vehicles to abandon in this table. Use comma as separator.
local t_AbandondedVehicles = {sg_elefant, sg_isu_152, sg_panther, sg_su_85, sg_tiger}

local player = World_GetPlayerAt(1)

for key, sgroup in ipairs(t_AbandondedVehicles) do
Command_PlayerSquadCriticalHit(player, sgroup, PCMD_CriticalHit, BP_GetCriticalBlueprint("vehicle_abandon"), 1, false)
end




local _vehicleAbilities = {
"mechanized_grenadier_group", "supply_truck", "tiger_tank", "mortar_halftrack", "elefant_unlock", "tiger_tank_ace", "stug_short_barrel", "stug_iii_e", "armor_commander",
"mechanized_assault_group", "cmd_kv-8_unlock_mp", "cmd_advanced_t34_85_medium_tank", "cmd_t34_85_medium_tank", "cmd_isu-152", "cmd_is2_heavy_tank", "cmd_kv-1_unlock", "kv-2",
}

local SBP_IsVehicle = function(sbp)
--Skip problematic squads (pak creates splats, panzer_iii causes an error due to not existing yet)
local _skip_sbp = {
[1] = {
name = "pak43",
isVehcle = false,
},
[2] = {
name = "panzer_iii",
isVehcle = true,
},
}
local isVehcle = false
local pos = World_Pos(-512, -512, -512)
local skipSBP = false

for key, _sbp in ipairs(_skip_sbp) do
if string.find(BP_GetName(sbp), _sbp.name) then
isVehcle = _sbp.isVehcle
skipSBP = true
end
end

if not skipSBP then
local squad = Squad_CreateAndSpawnToward(sbp, World_GetPlayerAt(1), 1, pos, pos)
local entity = Squad_EntityAt(squad, 0)
if Entity_IsOfType(entity, "vehicle") and not Entity_IsOfType(entity, "team_weapon") then
isVehcle = true
else
isVehcle = false
end
Squad_Destroy(squad)
end
return isVehcle
end

for key, race in pairs(SBP) do
for key, sbp in pairs(race) do
if SBP_IsVehicle(sbp) then
for i = 1, World_GetPlayerCount() do
Player_SetSquadProductionAvailability(World_GetPlayerAt(i), sbp, ITEM_REMOVED)
end
end
end
end

for key, abp in ipairs(_vehicleAbilities) do
for i = 1, World_GetPlayerCount() do
Player_SetAbilityAvailability(World_GetPlayerAt(i), BP_GetAbilityBlueprint(abp), ITEM_REMOVED)
end
end
end
Scar_AddInit(OnInit)
scar end --->
When I use above script in my map it will not end in Victory.

I have modified it into what I have used in the previous version of this map, that worked. Btw this "scar" script is also found from coh2.org, but is less advanced than the one above.

working:
scar begin --->
function OnInitID()

--Population cap override value
g_popCapOverRide = 400

for i = 1, World_GetPlayerCount() do
local player = World_GetPlayerAt(i)
Player_SetPopCapOverride(player, g_popCapOverRide)
end
-- [[ Markers ]]

-- [[ Squad Groups ]]
sg_elefant = SGroup_CreateIfNotFound("sg_elefant")
sg_ht_251 = SGroup_CreateIfNotFound("sg_ht_251")
sg_isu_152 = SGroup_CreateIfNotFound("sg_isu_152")
sg_m5 = SGroup_CreateIfNotFound("sg_m5")
sg_panther = SGroup_CreateIfNotFound("sg_panther")
sg_sherman = SGroup_CreateIfNotFound("sg_sherman")
sg_su_85 = SGroup_CreateIfNotFound("sg_su_85")
sg_tiger = SGroup_CreateIfNotFound("sg_tiger")

-- [[ Entity Groups ]]

-- List all vehicles to abandon in this table. Use comma as separator.
local t_AbandondedVehicles = {sg_elefant, sg_isu_152, sg_panther, sg_sherman, sg_su_85, sg_tiger}

local player = World_GetPlayerAt(1)

for key, sgroup in ipairs(t_AbandondedVehicles) do
Command_PlayerSquadCriticalHit(player, sgroup, PCMD_CriticalHit, BP_GetCriticalBlueprint("vehicle_abandon"), 1, false)
end
end
Scar_AddInit(OnInit)

scar end --->

With above script the map will end in Victory. Yeahh :)

P.S. If anyone will debug the scripts, it should be possible to make a diff of the two. In the later script I have added sg_sherman, so there is a Little difference between the two.

best regards Light
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

558 users are online: 558 guests
11 posts in the last 24h
34 posts in the last week
146 posts in the last month
Registered members: 45041
Welcome our newest member, dem89
Most online: 2043 users on 29 Oct 2023, 01:04 AM