Map Idea - Is this possible?

Map Idea - Is this possible?

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Map Idea - Is this possible?

Post by TheFatController »

I was wondering since it seems with Speed_Ball and Duck_Fusions and such its possible to add new mod units within the map file, could wrecks of units be added to a map that could be resurrected to create custom units (from the map file).

My immediate idea is an Experimental Scrapyards map for BA4.7 where the theme was all sorts of corpses in a metal world that could be resurrected into unique units such as an Orcone or stuff like 'Flash Tank MkII' that had a different gun and any other crazy stuff. If possible the stuff wouldn't be reclaimable and it would lead to some fun gameplay having people fight over the rights to resurrect the more powerful units.
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

think of the mod imbalances :)

On a serious note tho, you cabt resurrect features that are placed on the map by the mapmaker.
Would be really cool, but alas, it is not meant to be.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

LuaGaia can be used to do what you want:

Code: Select all

local featureID = Spring.CreateFeature("name", x, y, z, heading)
Spring.SetFeatureResurrect(featureID, "armcom", facing)
You could also use the map defined features rather then create your own:

Code: Select all

local mapX, mapY = Game.mapX * 512, Game.mapY * 512
for _,fID in ipairs(Spring.GetFeaturesInRectangle(0,0, mapX, mapY)) do
  local fDefID = Spring.GetFeatureDefID(fID)
  local fDef = FeatureDefs[fDefID]
  if (fDef.name == "treetype0") then
    Spring.SetFeatureResurrect(fID, "armmav")
  end
end
Last edited by trepan on 28 Mar 2007, 02:29, edited 1 time in total.
Daan

resurrecting things on map

Post by Daan »

Wow +1

This really would rock if this was ahppening not only ppl would start fighting on metal but also resurecting great units. This would also be very usefull in a campain story line where new tecnology could be gained by reserecting nuke facilitys for example
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

Yeah... it could be fun. But it would probaly be even funnier if those units would stay hiden and you had to waste resources in some searching facilities to find em...
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

trepan: what happens when there's no 'armcom' unit defined in the mod? is it possible to make resurrection possible only if a given name actually exists?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Not much happens if there's no "armcom" or "armmav".
The resurrector keeps trying to resurrect a unit that can't
be resurrected.

It's easy to determine if a mod has a particular unit. You
can set up the UnitDefs table to have bidirectional mapping
(the CMD and CMDTYPE tables have the name mapping
already done for you, but not the Defs tables).

Code: Select all

for _,ud in pairs(UnitDefs) do
  UnitDefs[ud.name] = ud
end
Then:

Code: Select all

if (UnitDefs["unitName"]) then ... end
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

So is it also possible to place units on a map now, with script and stuff? To a team which no player can control?
Post Reply

Return to “Map Creation”