Page 1 of 1
Help with mission editor and lua
Posted: 02 May 2013, 08:04
by daryl
Hi all,
I'm creating a mission with Mission Editor and I need to create GAIA units.
How I can create this kind of unit in Mission Editor ??
Re: Help with mission editor and lua
Posted: 02 May 2013, 13:18
by Forboding Angel
What is M.E.?
Re: Help with mission editor and lua
Posted: 02 May 2013, 13:28
by daryl
Forboding Angel wrote:What is M.E.?
Mission editor... sorry
Re: Help with mission editor and lua
Posted: 02 May 2013, 15:56
by Silentwings
I guess forb means, which Mission Editor are you using?
Re: Help with mission editor and lua
Posted: 02 May 2013, 16:03
by daryl
Silentwings wrote:I guess forb means, which Mission Editor are you using?
i'm using Zero-K mission editor
http://code.google.com/p/zero-k/wiki/Mi ... rStartPage
There are other mission editor?
Re: Help with mission editor and lua
Posted: 02 May 2013, 16:53
by Silentwings
Yes, there are other mission creators/editors/etc.
When I used the ZK mission editor a while back, I think it wasn't possible to create GAIA units, but probably one of the ZK guys can tell you for sure.
If I'm right, the best solution is to make a gadget that spawns the GAIA units you want and then just add that into the .sdz created by the ZK mission editor.
Re: Help with mission editor and lua
Posted: 02 May 2013, 17:48
by KingRaptor
Use the Custom Action (alternate) action (a.k.a. the "Lua it" action).
Code: Select all
local gaia = Spring.GetGaiaTeamID()
local unitID = Spring.CreateUnit(...) -- pass gaia as the team arg here
GG.mission.AddUnitGroup(unitID, "My Group")
edit: fix case in code
Re: Help with mission editor and lua
Posted: 02 May 2013, 23:21
by daryl
KingRaptor wrote:Use the Custom Action (alternate) action (a.k.a. the "Lua it" action).
Code: Select all
local gaia = Spring.GetGaiaTeamID()
local unitID = Spring.CreateUnit(...) -- pass gaia as the team arg here
GG.mission.AddUnitGroup(unitID, "My Group")
edit: fix case in code
please can you check my error?
i wrote:
Code: Select all
local gaia = Spring.GetGaiaTeamID()
local unitID =
Spring.CreateUnit("palmx",100,0,100,0,GetGaiaTeamID())
GG.mission.AddUnitGroup(unitID, "groupa")
where "palmx" is the name of the unit and "groupa" is the group that i assigned to unit...
but i don't found this unit at position of the map..what i wrong?
Re: Help with mission editor and lua
Posted: 04 May 2013, 03:52
by KingRaptor
Any errors in console/infolog?
Try creating the unit with a Y position of Spring.GetGroundHeight(100,100) instead of 0.
Re: Help with mission editor and lua
Posted: 04 May 2013, 08:45
by daryl
KingRaptor wrote:Any errors in console/infolog?
Try creating the unit with a Y position of Spring.GetGroundHeight(100,100) instead of 0.
hi King,
probably i did a mistake whit the code.
now it work but i used this code:
Code: Select all
local unitID = Spring.CreateUnit("PalmForest006",100,0,100,0,Spring.GetGaiaTeamID())
Spring.SetUnitNeutral (unitID, true)
GG.mission.AddUnitGroup(unitID, "groupa")
and now a palm appear at position 100, 100 of the map and it is a neutral unit of group "groupa" :)
thx for help!!
Re: Help with mission editor and lua
Posted: 24 May 2013, 12:06
by Jools
I need help with zK mission editor. I got it running, but when I want to create a mission it has a empty list of maps and mods. I did set the path to spring.exe correctly, but how can I set the path to maps and mods?
Re: Help with mission editor and lua
Posted: 25 May 2013, 06:51
by KingRaptor
Jools wrote:I need help with zK mission editor. I got it running, but when I want to create a mission it has a empty list of maps and mods. I did set the path to spring.exe correctly, but how can I set the path to maps and mods?
AFAIK it uses the unitsync of the Spring installation you set to find the maps/mods. Does spring.exe find those maps/mods when run directly?
Re: Help with mission editor and lua
Posted: 25 May 2013, 12:38
by Jools
Yes, but it does so using a variable in springsettings.cfg (SpringData = U:/bin/Spring/Data). I have spring.exe installed in C:\Spring, but the maps and mods are in U:/bin/Spring/Data. My C-drive is a SSD drive, so it's not a good solution to put all maps there (they are about 15 Gb)
I tested to create a mods and a maps dir in C:\Spring, and to put 1 mod and 1 map there. Then it finds them, but it crashes on Loading Mod (Unit Definitions).
Here's a pastebin of the error report windows wants to send:
http://pastebin.com/ySus8r2Q
Here's a pastebin on unitsync.log:
http://pastebin.com/ebAr22cd
Re: Help with mission editor and lua
Posted: 26 May 2013, 08:34
by KingRaptor
When the crash window pops up, could you click on "Show Error Log" and post the last entry (at the bottom of the file)?
Re: Help with mission editor and lua
Posted: 26 May 2013, 09:32
by Jools
It wants to send 3 files to microsoft. You mean the last of these?
1) WERE9E1.tmp.WERInternalMetadata.xml
2) WER223.tmp.appcompat.txt
3) WER2B0.tmp.mdmp
File 3 is binary. You sure you want it pasted? Here is 1 and 2:
1:
http://pastebin.com/MSjM3ZhR
2:
http://pastebin.com/EUGqMnh8
Re: Help with mission editor and lua
Posted: 26 May 2013, 09:50
by Jools
Here's a pastebin from the debug log from windbg, in case it helps:
http://pastebin.com/J4wEaRW3
Here's another paste from windbg, where I now chose to break on next unhandled exception:
http://pastebin.com/XR1V3sSR
Re: Help with mission editor and lua
Posted: 26 May 2013, 14:03
by KingRaptor
I'm looking for a text file (My Documents/My Games/Spring/MissionEditorErrors.txt), linked from the dialog box that pops up when Mission Editor crashes. Is it not even getting that? o_O

Re: Help with mission editor and lua
Posted: 26 May 2013, 15:15
by PicassoCT
I always wondered what ObjectOrientatedProblemSolving had to do with it all..
Re: Help with mission editor and lua
Posted: 28 May 2013, 00:51
by Jools
KingRaptor wrote:I'm looking for a text file (My Documents/My Games/Spring/MissionEditorErrors.txt), linked from the dialog box that pops up when Mission Editor crashes. Is it not even getting that? o_O
It's not getting to that dialog window, and I don't have such a file on my computer. The error i get is the standard windows error reporting one.
Also, I don't have anything installed under My Games. Mission editor is installed in U:\bin\Spring\Data\games and it has no other file there accompanying it.