Some specs on the map file format would be really appreciated so I can write a conversion utility...
The things I find difficult about the built-in map editor are listed below. These aren't criticisms but simply things that don't fit my personal preferences:
1. The only major problem I have is not having both the map and the tiles on the same screen. It makes map-making very tiresome.
2. A small problem that could be solved easily is having to right-click and then choose the "copy" facility. A keyboard shortcut for this would be a huge improvement.
3. I would prefer it if the map didn't scroll when I move the mouse to the screen edge. I don't know about anyone else but I'd much rather use the keyboard for scrolling (which I know you can do but you can't de-activate mouse scrolling).
I might just have to get used to the map editor, SGDK is great in every other way and there's not really much competition...
A conversion utility would be possible, but probably not worth the effort. If you are really interested, SGDK is open source so you could probably just look at the .Save method of the Map class module (Map.mod) You don't even need VB 6 to do this as I believe .mod files are text based.
If all you're worried about is tile placement, all that is is a 2d byte array for every layer. you could possibly use a different utility to place tiles (make sure 2d grid is same size as layer) and if they are in the correct format, you could paste them into an xml file where the tile byte array is. If they aren't in correct format, a utility to reformat the array might be easier to make than a whole file conversion. This would take some pretty serious testing, but its worth a try.
Also, with a design time script, I think you could do 2 and 3 pretty easy, but 1 would be somewhat difficult and would probably be beyond the power of a design time script. I'd try to make the design time script for you, but I'm making leaps and bounds of progress on a game and don't want to lose momentum.
here is an example design time script: (edited from bluemonk's original creation distributed with SGDK)
' This is a generic map editing template script
' It connects to the map editor whenever it comes up.
' To customize the script to your own purpose, edit
' the second section (script number 1) in this file.
' ======== INITIAL STARTUP SCRIPT (Number 0) =========
Sub Project_OnEditMap(M)
Set HostObj.TempStorage = M
HostObj.StartScript=1
End Sub
HostObj.SinkObjectEvents ProjectObj, "Project"
HostObj.ConnectEventsNow()
#Split == MAP EDITING SCRIPT (Number 1) ============
Dim Rndm,totalclearcount
Dim MpEd
Set MpEd = HostObj.TempStorage
HostObj.TempStorage = Empty
Sub MapEd_OnEditInit()
Rndm=false
MpEd.DisplayMessage = "Map editing script connected, use" & vbCrLf & vbCrLf & "F-frame," & vbCrLf & "A-All" & vbCrLf & _
"C- Clear = " & vbCrLf & "4-left" & vbCrLf & "6-right" & vbCrLf & "8-up" & vbCrLf & "2-down"
End Sub
Sub MapEd_OnKeyPress(KeyAscii)
Dim TileWid, TileHgt
Dim Tmr, TmOut
'Dim Lyr0Dat, Lyr1Dat, Lyr2Dat,clear,totalclear
dim LyrDat, LyrBelowDat
Dim IntTemp
dim YStart, YEnd, XStart, XEnd, PerformScan, SolidityChange
'On Error Resume Next
'MpEd.disp.drawtext keyascii & " " & mped.editmode,20,20
If MpEd.EditMode >=9 Then Exit Sub
TmOut=8
HostObj.ScriptTimeOutSeconds = TmOut + .5
TileHgt = MpEd.theMap.MapLayer(0).TSDef.TileHeight
TileWid = MpEd.theMap.MapLayer(0).TSDef.TileWidth
'Set Lyr0Dat = MpEd.theMap.MapLayer(0).Data
'Set Lyr1Dat = MpEd.theMap.MapLayer(1).Data
'Set Lyr2Dat = MpEd.theMap.MapLayer(2).Data
set LyrDat = MpEd.theMap.MapLayer(MpEd.EditLayer).Data
clear=false
If KeyAscii = Asc("f") Then 'frame only
YStart = Int(MpEd.YOff / TileHgt)
YEnd = Int((MpEd.YOff+MpEd.theMap.ViewHeight) / TileHgt)- 1
XStart = Int(MpEd.XOff / TileWid)
XEnd = Int((MpEd.XOff+MpEd.theMap.ViewWidth) / TileWid)- 1
PerformScan = true
clear =false
'elseif keyascii = Asc("a") then 'all of layer
' YStart = 0
' YEnd = MpEd.theMap.MapLayer(0).Rows-2 '54
' Xstart = 0
' Xend = MpEd.theMap.MapLayer(0).Columns-1
' PerformScan = true
' clear =false
elseIf KeyAscii = Asc("c") Then 'clear
YStart = Int(MpEd.YOff / TileHgt)
YEnd = Int((MpEd.YOff+MpEd.theMap.ViewHeight) / TileHgt)- 1
XStart = Int(MpEd.XOff / TileWid)
XEnd = Int((MpEd.XOff+MpEd.theMap.ViewWidth) / TileWid)- 1
PerformScan = true
clear = true
elseif keyascii = asc("6") then
if MpEd.XOff+640<(MpEd.theMap.MapLayer(0).Columns-21)*32 then
MpEd.XOff=MpEd.XOff+640
else
MpEd.XOff=(MpEd.theMap.MapLayer(0).Columns-20)*32
end if
elseif keyascii = asc("4") then
if MpEd.XOff-640>0 then
MpEd.XOff=MpEd.XOff-640
else
MpEd.XOff=0
end if
elseif keyascii = asc("2") then
if MpEd.YOff+480<(MpEd.theMap.MapLayer(0).Rows-16)*32 then
MpEd.YOff=MpEd.YOff+480
else
MpEd.YOff=(MpEd.theMap.MapLayer(0).Rows-15)*32
end if
elseif keyascii = asc("8") then
if MpEd.YOff-480>0 then
MpEd.YOff=MpEd.YOff-480
else
MpEd.YOff=0
end if
else
PerformScan = false
end if
if PerformScan = true then
if clear=true then
For Y=ystart to yend
For X = xstart to xend
select case lyrdat.tilevalue(x,y)
case 25,222
lyrdat.tilevalue(x,y)=0
end select
next
next
else
For Y=ystart to yend
For X = xstart to xend
Select Case LyrDat.TileValue(X,Y)
Case 208,209,210,211,216,217,218,219 'draw cave faces from sides
'xend=0/0
select case lyrdat.tilevalue(x,y+1)
case 201, 220, 221, 228, 229,208,209,210,195,198,206,192,193,194
'nothing
case else
lyrdat.tilevalue(x,y+1)=lyrdat.tilevalue(x,y)+8
end select
case 1
select case left(MpEd.theMap.Name,3)
'case "Cav"
' lyrdat.tilevalue(x,y)=222
'case "Twn"
' lyrdat.tilevalue(x,y)=25
case "Cst"
lyrdat.tilevalue(x,y)=111
end select
case 0 'draw ground on blank tiles
select case left(MpEd.theMap.Name,3)
case "Cav"
lyrdat.tilevalue(x,y)=222
case "Twn"
lyrdat.tilevalue(x,y)=25
case "Cst"
lyrdat.tilevalue(x,y)=111
end select
Case Else
End Select
'If Err.Number <>0 Then Exit For
Next
'If Err.Number <>0 Then Exit For
Next
end if
'If Err.Number <> 0 Then MpEd.DisplayMessage = Err.Description
End If
' Tmr = Timer
'
' If Err.Number <> 0 Then MpEd.DisplayMessage = Err.Description
' If Timer-Tmr > TmOut Then MpEd.DisplayMessage = "Script Timeout at tile " & X & "," & Y
' HostObj.ScriptTimeOutSeconds = 2
' End If
End Sub
Sub MapEd_OnEditComplete()
HostObj.StartScript=0
End Sub
HostObj.SinkObjectEvents HostObj.AsObject(MpEd), "MapEd"
HostObj.ConnectEventsNow()
To link it, make a shortcut for the command insert this into the "Target" of the shortcuts properties:
"C:\Program Files\GameDev\gamedev.exe" "[.gdp full path]" /e "[script.vbs full path]"
(note im using the default gamdev.exe path, change as necessary)