share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
changeset 12646 28183c98a3a9
parent 12627 32fe36654299
child 12647 f190ed9df875
equal deleted inserted replaced
12645:a4a04a700153 12646:28183c98a3a9
     1 ---------------------------------------------------------------
     1 -----------------------------------------------------------
     2 --- HEDGE EDITOR 0.9 (for use with Hedgewars 0.9.22 and up)
     2 --- HEDGE EDITOR (for use with Hedgewars 0.9.22 and up) ---
     3 ---------------------------------------------------------------
     3 -----------------------------------------------------------
     4 -- a horrible mission editor by mikade
     4 -- A not-so-horrible mission editor.
     5 -- place gears like a boss
     5 -- Place gears like a boss!
       
     6 
       
     7 -- Original author: mikade
     6 
     8 
     7 -- feel free to shower me with your adoration and/or hate mail
     9 -- feel free to shower me with your adoration and/or hate mail
     8 -- more info can be found at http://hedgewars.org/HedgeEditor
    10 -- more info can be found at http://hedgewars.org/HedgeEditor
     9 
    11 
    10 -- special thanks to nemo, unC0Rr, sheepluva and koda for their assistance
    12 -- special thanks to nemo, unC0Rr, sheepluva and koda for their assistance
    37 
    39 
    38 -- read in data from a previously generated map and allow the map to be edited/saved again
    40 -- read in data from a previously generated map and allow the map to be edited/saved again
    39 
    41 
    40 -- contextual cursor and menu graphics
    42 -- contextual cursor and menu graphics
    41 -- placement sounds that are slightly more soothing
    43 -- placement sounds that are slightly more soothing
    42 
       
    43 -- meaningless version number
       
    44 -- extra whitespace
       
    45 -- fewer capital letters than ideal
       
    46 
    44 
    47 -- upon saving, all level data will be output to logs/game0.log.
    45 -- upon saving, all level data will be output to logs/game0.log.
    48 -- game0.log also includes a lot of other data so if you only want to see the relevant lines of code
    46 -- game0.log also includes a lot of other data so if you only want to see the relevant lines of code
    49 -- you can use GameLogExtractor.html to extract and prune the log into a cleaner form of data,
    47 -- you can use GameLogExtractor.html to extract and prune the log into a cleaner form of data,
    50 -- specifically: either as an automagically generated template mission, just core data, or hwmap points.
    48 -- specifically: either as an automagically generated template mission, just core data, or hwmap points.
    81 -- copy paste/these points at the START of a converted HWMAP and then convert the map back to HWMAP format.
    79 -- copy paste/these points at the START of a converted HWMAP and then convert the map back to HWMAP format.
    82 -- following the above procedure it is then possible to load the map in frontend and play it using a
    80 -- following the above procedure it is then possible to load the map in frontend and play it using a
    83 -- script like TechRacer (or HedgeEditor itself) that can interpret the points using InterpretPoints()
    81 -- script like TechRacer (or HedgeEditor itself) that can interpret the points using InterpretPoints()
    84 
    82 
    85 ---------------------------------------
    83 ---------------------------------------
    86 -- DISCLAIMER
    84 -- MIKADE'S DISCLAIMER
    87 ---------------------------------------
    85 ---------------------------------------
    88 -- well, I really just made this for myself, so it's usage might be a little complicated for others.
    86 -- well, I really just made this for myself, so it's usage might be a little complicated for others.
    89 -- it also probably has a million errors, and has grown rather bloated over time due to the addition of
    87 -- it also probably has a million errors, and has grown rather bloated over time due to the addition of
    90 -- more and more features that my initial design didn't take into account.
    88 -- more and more features that my initial design didn't take into account.
    91 
    89 
   108 -- checking if there is only 1 hog, etc.
   106 -- checking if there is only 1 hog, etc.
   109 
   107 
   110 -- possibly try show landflag addcaption constantly like we do for superdelete when
   108 -- possibly try show landflag addcaption constantly like we do for superdelete when
   111 -- using girders / rubbers.
   109 -- using girders / rubbers.
   112 
   110 
   113 -- check to what extent hog info is preserved on saving (does health/weps really save correctly?)
       
   114 -- atm I think it's only for missions so I don't think it is preserved in core data
       
   115 
       
   116 -- check if we lose a mission when the enemy collects our crate (we should)
       
   117 
       
   118 -- How about a weapons profile tool that is used with team ammo
   111 -- How about a weapons profile tool that is used with team ammo
   119 -- and then hog identity tool would only be available if gfPerHogAmmo is set
   112 -- and then hog identity tool would only be available if gfPerHogAmmo is set
   120 
   113 
   121 -- INVESTIGATE when you can bother to do so
   114 -- [high]       check if we lose a mission when the enemy collects our crate (we should)
   122 -- is airmine still missing anywhere, e.g. the weplist generated FOR THE TEMPLATE SCRIPT
       
   123 
   115 
   124 -- [high] 	waypoints don't reload yet
   116 -- [high] 	waypoints don't reload yet
   125 
   117 
   126 -- [high] 	add missing weps/utils/gears as they appear
   118 -- [high] 	add missing ammo types as they appear
   127 --			some gameflags and settings are probably missing, too (diff border types etc)
       
   128 --			and also ScriptParam
       
   129 
   119 
   130 -- [med] 	add a limited form of save/load within level before mass-output
   120 -- [med] 	add a limited form of save/load within level before mass-output
   131 
   121 
   132 -- [med]	maybe incorporate portal effects / ufo tracking into the template generated script if
   122 -- [med]	maybe incorporate portal effects / ufo tracking into the template generated script if
   133 -- 			you want the missions to use it
   123 -- 			you want the missions to use it
   134 
   124 
   135 -- [med]	improve ammo handling (if possible, take more scheme settings into account)
   125 -- [med]	improve ammo handling (if possible, take more scheme settings into account)
   136 -- 			also be sure to generate wep data so crates don't have 0 in them (done?)
       
   137 
   126 
   138 -- [low] 	break up the division of labor of the tools into airstrike, minestrike, napalm, etc.
   127 -- [low] 	break up the division of labor of the tools into airstrike, minestrike, napalm, etc.
   139 			--[[
   128 			--[[
   140 			girder =		"Girder Placement Mode",
   129 			girder =		"Girder Placement Mode",
   141 			rubber =		"Rubber Placement Mode",
   130 			rubber =		"Rubber Placement Mode",
   166 							"Waypoint Editing Mode"
   155 							"Waypoint Editing Mode"
   167 							}]]
   156 							}]]
   168 
   157 
   169 -- [low]	improve support for ShoppaBalance and ConstructionMode, see ranking)
   158 -- [low]	improve support for ShoppaBalance and ConstructionMode, see ranking)
   170 
   159 
   171 -- [low] 	consider combining landflags
       
   172 
       
   173 -- [low] 	periodically rework the code to make it less terrible (hahahahahaha!)
       
   174 
       
   175 -- [low]	eventually incorporate scripted structures into the editor / mission mode
   160 -- [low]	eventually incorporate scripted structures into the editor / mission mode
   176 
   161 
   177 -- [low] 	some kind of support for single team training missions
   162 -- [low] 	some kind of support for single team training missions
   178 -- 			we could possibly add gfOneClanMode and kill the other team we're playing with?
   163 -- 			we could possibly add gfOneClanMode and kill the other team we're playing with?
   179 
   164 
   180 -- [never?] more detailed goal tagging and multi-stage triggers
   165 -- [never?] more detailed goal tagging and multi-stage triggers
   181 
   166 
   182 -- [never?]	theoretically might be possible to create forts (and other grouped objects)
       
   183 --			that can be mirrored and generated/placed in a big enough space
       
   184 
       
   185 -- [never?]	add a pulsing glow thing for sprites you have selected,
   167 -- [never?]	add a pulsing glow thing for sprites you have selected,
   186 --			kind of like the invaders in SpaceInvader (currently they are just displayed as purple)
   168 --			kind of like the invaders in SpaceInvader (currently they are just displayed as purple)
   187 
       
   188 -- [never?] add the thing that would be useful for this editor, but that others might use to cheat
       
   189 
   169 
   190 -- [never?]	add GUIs for editing ammo, init settings, additional gear attributes
   170 -- [never?]	add GUIs for editing ammo, init settings, additional gear attributes
   191 -- 			perhaps using precise with timer to enable/disable certain features
   171 -- 			perhaps using precise with timer to enable/disable certain features
   192 
   172 
   193 --[[ gui menu ideas that have long since been abandoned
   173 --[[ gui menu ideas that have long since been abandoned
  1597 	WriteLnToConsole("	WaterRise = " .. WaterRise)
  1577 	WriteLnToConsole("	WaterRise = " .. WaterRise)
  1598 	WriteLnToConsole("	HealthDecrease = " .. HealthDecrease)
  1578 	WriteLnToConsole("	HealthDecrease = " .. HealthDecrease)
  1599 
  1579 
  1600 	WriteLnToConsole("	Ready = " .. Ready)
  1580 	WriteLnToConsole("	Ready = " .. Ready)
  1601 	WriteLnToConsole("	AirMinesNum = " .. AirMinesNum)
  1581 	WriteLnToConsole("	AirMinesNum = " .. AirMinesNum)
  1602 	--WriteLnToConsole("	ScriptParam = " .. ScriptParam)
  1582 	WriteLnToConsole("	ScriptParam = " .. ScriptParam)
  1603 	WriteLnToConsole("	GetAwayTime = " .. GetAwayTime)
  1583 	WriteLnToConsole("	GetAwayTime = " .. GetAwayTime)
  1604 	WriteLnToConsole("	WorldEdge = " .. WorldEdge)
  1584 	WriteLnToConsole("	WorldEdge = " .. WorldEdge)
  1605 
  1585 
  1606 	WriteLnToConsole("")
  1586 	WriteLnToConsole("")
  1607 
  1587