Mission editor
Sat, 2013-01-19 18:12
Some people don't know ANY lua, so why not make this?
(Account blocked from further forum access due to: spam, verbal abuse, and other cases of misbehavior)
Some people don't know ANY lua, so why not make this?
(Account blocked from further forum access due to: spam, verbal abuse, and other cases of misbehavior)
maybe developpe your idea, how you imagine it would work etc....
plus, you can try and learn some lua code , trust me, i never touched it, but with help, and reading hedgewars wiki about lua, reading other mission file, i finally did a mission : the portal one.
at least, developp your idea
From what I've heard, Lua is easy to learn. I haven't looked at it yet but I'm going to as soon as I finish learning Python. (try poking mikade for tutorials or looking on the wiki)
A mission editor would be great, but I don't think it'll ever come 'till way after version 1, unless somebody has enough spare time to do so. Maybe when I get experienced enough in programming I'll look into it.
first thing to read, just to understand how it work : http://code.google.com/p/hedgewars/wiki/LuaGuide
second thing : http://code.google.com/p/hedgewars/wiki/LuaAPI
and finally, a bit harder maybe, more complex for me but can be usefull :
http://code.google.com/p/hedgewars/wiki/LuaLibraries
this doesn't say how lua work, but can help you to try a litlle script.
try first little scripting to test what it does, and understand it
then you can do missions etc....
also, i have in mind how mission editor could be but as its not complete in my mind i won't explain now
so, how do you see your mission editor ?
But there are people who don't want to type out every mission!
(Account blocked from further forum access due to: spam, verbal abuse, and other cases of misbehavior)
i just gave you keys to make it if you wanna, without wait for an hypothetical editor.
and really, how do you see the editor ? describe it if you want to see it one day you have to suggest how it should be.
A.K.A people who are lazy.
There are some people out there that are not lazy, but are either disabled or without a keyboard.
(Account blocked from further forum access due to: spam, verbal abuse, and other cases of misbehavior)
If you don't have a keyboard, then how are you typing these comments or playing hedgewars?
Also, what the heck do you mean by disabled?
You might wanna use the on screen keyboard!
Also, with disabilities is what i mean by disabled.
(Account blocked from further forum access due to: spam, verbal abuse, and other cases of misbehavior)
OOH! THAT EXPLAINS EVERYTHING!
Hi there. You can read about our editor and other upcoming features on the release schedule.
---> http://www.hedgewars.org/releaseschedule
mikade
Hedgewars Developer
It would be funny if it weren't for real...
I have limited sympathy for those who won't even outline their ideas. Also, feel free to lend a hand.
mikade
Hedgewars Developer
i have this idea in mind, and i imagine how it could look
not sure it is possible
i will try to make an image to show what I imagine about this
so, actually, my post is useless :p
but i like mikade shedule !
edit, http://www.hedgewars.org/gsoc_ideas2012.html
Editors
not every one playing and wanting to contribute to the game knows how two code or how the game works. Creating a mission editor with helpful features or a theme editor will allow many more to create content.
Skills: c++/lua, qt
Difficulty: medium
People to bug: unc0rr, henek, mikade, smaxx
Impact: easier creation of content and therefore more content
Eh, well, a fully functional editor implemented in frontend and/or engine would of course be pretty neat. That's outside my sphere of influence however, so I personally can't help there. Would be nice to get that as a finished GSoC project, sure.
There actually is a Hedgewars Editor of sorts already. I made one for belphegorr and the other GSoC applicants just before last year's GSoC started. It is entirely lua-based tho, so it doesn't really help people who aren't going to put in some level of effort to read the wikis and familiarize themselves with scripting basics. Depending on what projects are selecting this year I will think about maybe improving and or publishing it.
mikade
Hedgewars Developer
yeah share it mikade :p
that would help sometimes
TL;DR: What follows is a very long theoretical post which introduces the idea of a new declarative (rather than procedural) and radically simplified mission file format. The idea behind this is that such a file format may level the way to a mission editor.
Actually I do not see why a good graphical mission editor would be a bad thing after all. WYSIWYG would be a great thing and ease many things up. I can imagine it gets pretty annoying to get all the coordinates for all the hedgehogs and objects right. You probably waste time guessing them, replacing them, moving them again etc. instead of having a graphical editor which shows the map where you can place objects and hedgehogs freely simply by clicking and you can set their properties (health, etc.); probably you could even define some simple goals.
However, one question remains: How does this all fit together with Lua scripts? A graphical mission editor could auto-generate Lua code for the non-fancy stuff like spawning hedgehogs and objects but there is still a problem because such an editor would not be able to read a Lua script to import a mission because Lua allows much more fancy stuff. At least, I can't imagine it would be easy (if even possible) to implement this without going nuts.
The answer to this question probably is: WIYSIWYG does not fit together with Lua scripts at all. It sucks!
But wait: Most missions aren’t very fancy or scriptish: They have simple goals like “kill hedgehog X” or “capture crate Y” or something like that. Hedgehogs, crates, barrels and mines get placed on the map and have a short goal description. Most of the time the Lua script does not do more than simply placing hogs and objects and defining the objective—and that’s it! Lua scripts for such simple missions are clearly an overkill and way too fancy after all. While they are certainly useful for more complex missions, it also is an entry hurdle for people who just want to create simple missions. I think the existance of this thread should prove this beyond doubt. (Please note that I mean “simple” in the sense of “simple to reproduce”, not in the sense of “simple to win”.)
I have an idea how to radically simplify missions. We could define a dead simple file format just for missions, perhaps in the style of
.ini
files, let’s call itmission.ini
. What is different about my proposed file format that, unlike Lua script, it is declarative. This means the is no executable code at all. There are predefined keys and each key has a value. Unlike in Lua scripts, the order of appearance shall not matter in this file format.mission.ini
shall contain a lot of definitions for the following:Here is a rough example of how I’d imagine such a
mission.cfg
:Above example is a redefinition of the mission “Bamboo Thicket”. Please keep in mind that this is in no way the actual proposed file format, I posted the example only to give you an idea. If you read carefully, you also would have seen that I have no idea how to define the arsenal for now. Some thought still needs to be done on the actual file format.
Some of the fancier missions would not be definable with it. For example, ticker messages or speech bubbles would not be possible but they are not very important. But scripted events are of course also not possible. The following already existing missions could theoretically be created with this simple file format:
And if you remove the speech bubbles and other non-important stuff, additionally, following missions would be theoretically possible:
Following missions would not work because they are too fancy:
The benefits of a well-defined simple file format for missions instead of Lua are:
The drawback is:
To clarify: I do not aim to replace Lua scripts for missions at all. I suggest the proposed file format as an alternative to the Lua mission scripts, thus lowering the entry barrier for new players who want to create missions without scaring the experienced ones away. The mission creator has to choose wheather to use the simple definition file format or a fancy Lua script, but not both. If you need fancy stuff, you have to go for Lua but if you just want to place hedgehogs, crates, mines, barrels and the goal is "kill hog X" (or another pre-defined goal), you could go with the simple format.
Hi, I am a Hedgewars developer.
Yeah. The current editor is pretty WYSIWYG and works more-or-less as you describe. It lets you place gears via graphical interface, define some simple attributes about them, and then auto-generates a template lua script with that data inside it. From there, you just edit the auto-generated script if you want to change things or add additional complexity. I could probably add simple goal handling to it, but laziness and or lack of time usually get in the way.
But yeah, if YOU feel passionate about it, you could probably already just write a lua script that looks for your described cfg file and interprets it accordingly.
mikade
Hedgewars Developer
Funny, I was thinking the exact same thing as mikade when I read the description of the cfg. Heck. it wouldn't even require filesystem read.
Just telling people to add a one-line include at top of file, then stuff the config into a datastructure in lua format below it.
Then request that the supporting lib in the one-line include be tossed into the engine.
Done
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
mikade: I thought there isn’t any editor whatsover which is the reason why this thread had been created in the first place. AFAIK there are two binaries which get created when I build hw and stuffs: hedgewars and hwengine. IIRC hwengine is just for replaying demos and hedgewars starts the main game. No mission editing here. I have searched both wikis but found no reference for an editor. The "mission/script" tutorial just points to the Lua documentation which is not what I'm looking for. So what "current" editor are you talking about?
nemo: Interesting idea. I'll keep it in mind. I just don’t see why it wouldn’t require any read from the filesystem. How should Hedgewars know the mission data if it didn’t read it at some point?
Hi, I am a Hedgewars developer.
Well, "current" as in the editor used to create most of the missions that come with the game. It's not included because it's just something I messily threw together as a development tool. Programming software can also be used to create missions and we don't include that, either
I could upload it, but it's not like it comes with any documentation or is stable etc. Not really designed for use by the general public. That said, since the creation of this thread I've been trying to make it slightly more user-friendly and add a few new features so that people who are interested in making missions can try it out. If we choose making an editor as a GSoC project though, my little tool won't really be needed, so yar.
mikade
Hedgewars Developer
You can easily create all types of the hedgewars missions!
Concept Image
Just switch out any names with the new and edit versions of the mission modes, replace "Monster Arena" with HedgWwars Mission Editor, Change "Select Area" to "Select Mission Type," and make the HedgeWars background take the place of the background.
(Account blocked from further forum access due to: spam, verbal abuse, and other cases of misbehavior)
That's not a concept image, that's a direct copy of a Final Fantasy X menu...
Priceless... ^^
For everything else, there's mastercard!
Anyway, now that it it looks like we won't be getting a GSoC editor I guess I will go back to hammering on my hack. If we added a bit more stuff to engine it could probably become slightly less hackish in time.
mikade
Hedgewars Developer