求教版主alexliyu,请问你的内置超强修改器在当前版本还有用么?
就是这个http://bbs.3dmgame.com/thread-5723274-1-1.html 的内置超强修改器已经在metadataa修改了版本号当前游戏版本为238808,
15号的
其中alt+1的修改器页面打不开,麻烦版主指导下?
特别想要当中的在地图上添加资源的修改,能不能单独提取这一项,
想定向定点添加资源,本人已地图整齐规划癌症晚期了^-^
function AddNewSurDeposit(num, resource)
local amount = 1000000
CalcBuildableGrid()
local UnbuildableZ = buildUnbuildableZ()
-- local num = UICity:Random(def.param1, def.param2)
for i = 1, num do
local marker
marker = PlaceObject("SurfaceDepositMarker")
marker.resource = resource
marker.grade = "Very High"
marker.max_amount = amount * const.ResourceScale
marker.depth_layer = 0
for i = 1, 50 do
local sector_x = UICity:Random(1, 10)
local sector_y = UICity:Random(1, 10)
local sector = g_MapSectors
local minx, miny = sector.area:minxyz()
local maxx, maxy = sector.area:maxxyz()
local x = UICity:Random(minx, maxx)
local y = UICity:Random(miny, maxy)
local q, r = WorldToHex(x, y)
local pt = point(x, y)
if GetBuildableZ(q, r) ~= UnbuildableZ and terrain.IsPassable(pt) then
marker:SetPos(pt)
break
end
end
if marker:IsValidPos() then
marker.revealed = true
marker:PlaceDeposit()
else
printf("couldn't find position to place %s deposit", resource)
DoneObject(marker)
end
end
end
页:
[1]