Page 1 of 1

How port mod to map?

Posted: 26 Jan 2012, 22:29
by Pithikos
I made a mod some time ago which adds a new gameplay(something like king of the hill) to BA. 8)

Is there a tutorial or something to easily port the mod to a map? The mod has only one unit which is controlled by GAIA and the rest is just lua and GUI. (I don't remember anything about maps[folder hierarchy, etc])

Re: How port mod to map?

Posted: 26 Jan 2012, 22:43
by Beherith
Slap your mod into an existing map. Presto!

Re: How port mod to map?

Posted: 26 Jan 2012, 22:46
by knorke
It is basically the same, you can use the same folders as for mods.
Put your lua into LuaRules\Gadgets and LuaUI\widgets
For the units use units\, objects3d\ and unittextures\

Instead of resources.lua maps use resources_map.lua

If the unit is mobile, it is a bit tricky because you do not know if the movedef will be present in every game. (most likely it is not)
( http://springrts.com/phpbb/viewtopic.php?f=13&t=26827 )

Re: How port mod to map?

Posted: 28 Jan 2012, 00:56
by Pithikos
Ok, I managed to port it. However I am wondering how I can make the mod options appear in the map. Would it work to just rename "ModOptions.lua" to "MapOptions.lua"?

Re: How port mod to map?

Posted: 28 Jan 2012, 05:42
by knorke
Would it work to just rename "ModOptions.lua" to "MapOptions.lua"?
yup. and change it in the gadget where you read it ofc.