MegaGlest Forum

Modding and game content creation => Tools => Topic started by: treba on 10 June 2010, 16:42:07

Title: scenario editor
Post by: treba on 10 June 2010, 16:42:07
Sourceforge page (http://sourceforge.net/projects/glestscenarioed/) | Git (http://glestscenarioed.git.sourceforge.net/git/gitweb-index.cgi)
hey everybody,

i just thought about making a little campaign, but when i started to work on a scenario, i found it really anoying how complex this task actually is.
in the past i used to build maps for starcraft and warcraft 3, which have really powerfull map-editors with inbuild trigger-editors. everybody could easily build their own campaigns without knowledge about scripting languages.
i know that mg and gae have great support for own scripts in lua, but it is very tricky at the moment to use is right. as far as i know do only a very few scenarios out there make use of the possabilities given, maybe because it´s so hard to use them.
to come to the point: i miss a easy to use trigger-editor for scenarios. just like the ones in sc and wc3.

to give you an idea how it looked in sc:
(http://img340.imageshack.us/img340/1011/trig7ok.png)
(http://www.suche-privat.de/artikel/autor_3/zerg_insane_trigger_einstellungen.jpg)

so what im thinking about is a simple gui that puts together the lua scripts.

here an example:
Code: [Select]
<scripts>
  <startup>
    ...
    giveResource('gold', 1, 1000)
    ...
  </startup>
  ...
</scripts>
these lines are an excerpt from the storming scenario. in the editor i am thinking about, you would select something like 'new trigger' and two boxes would appear, one for conditions and on for actions.
in this example, you would select something like "new condition". there, a drop down menu for conditions would appear. in this case you would pick "startup" or "initialisation".
then, you go to the "actions" box, select "add action", scroll down in the drop down menu for "add resource". more drop down menus or other input fields for the needed arguments would appear (resouce type, player, amount).
i hope you got the trick.

i know this is a lot work to be done, but works very simple. besides, the possible lua scripts could be build in step to step.
so it could start with giveResource and createUnit and would gain more and more possabilitys over time.

i don´t have much time atm, but i will try to write the basics needed for it.

so, do you also think this is usefull and possible? and does someone want to work on it?

greetz
Title: Re: scenario editor
Post by: Gabbe on 10 June 2010, 17:28:35
i want it badly...
Title: Re: scenario editor
Post by: John.d.h on 10 June 2010, 21:01:49
This would be awesome.  Without some kind of scenario maker/editor thingy, I'm (probably) never going to touch Lua.
Title: Re: scenario editor
Post by: ElimiNator on 10 June 2010, 23:45:16
I can do Lua, but its hard and take a extremely long time... I would LOVE a scenario editor. :)

Um, Go ahead get right on it...
Title: Re: scenario editor
Post by: treba on 20 June 2010, 01:41:31
just started with this some hours ago and the basic things work now (read out data from xml files etc.....took me a while since it´s my first c++ project).
but i don´t know the lua command myself, only those from scenarios like storming. is there a full documentation? especially for mg and gae?
Title: Re: scenario editor
Post by: silnarm on 20 June 2010, 04:31:18
is there a full documentation? especially for mg and gae?

The best reference for a starting point is https://docs.megaglest.org/Scenario_Editing which covers some basics you need to know, and has the complete Vanilla/Mega Glest function reference.

MG has no new lua functions as yet, and while it would be nice to think they'll just take ours, I doubt it will happen like that.

For the extended GAE only functionality, see http://sourceforge.net/apps/trac/glestae/wiki/LuaReference (this is a complete function reference, it also covers the original Glest functions).

Good luck, this is no small project!

Edit: As well as the new functions, GAE also includes lua error handling and reporting, so even if you are developing with Vanilla/Mega glest in mind, I strongly recommend using GAE while developing/testing.
Title: Re: scenario editor
Post by: treba on 20 June 2010, 16:12:02
@silnarm: thanks!  :)

as i said before, i don´t plan to include the whole bandwith of lua scripts. atm i think about a xml based system where everybody can add new lua commands. i will only do the basics, so i only want to understand the whole thing.

i´m thinking of sth. like this:

so to give the editor the possability to write sth like this:
Code: [Select]
createUnit('library', 2, startLocation(1))the xml file to add this function to the editor will have to look like this:
Code: [Select]
<?xml version="1.0" standalone="yes" ?>
<command>
<string>createUnit(%1, %2, %3)</string>
<1 value="unit_type"/>
        <2 value="player"/>
        <3 value="location"/>
</command>
the possabilitys for the values will come from other xml files or from the game files. so i myself only have to code the functions for the values, but not the real lua stuff. if everything works like exspected, i have to do much less than expected in the first moment.

to everybody who knows the lua a little bit: is there something i missed with that idea? is it going to work?
Title: Re: scenario editor
Post by: wciow on 21 June 2010, 00:15:08
Seems like a good plan Treba  :thumbup:

I can't see any problem with this format as it should work with the current Lua commands and keeps the flexibilty to add new LUA commands to the editor as the are created.

This would be a really helpful tool if you manage to finish it and might help kickstart the community to make more scenarios   :scientist:
Title: Re: scenario editor
Post by: John.d.h on 21 June 2010, 01:36:32
Cool, I'll be looking forward to it. :)
Title: Re: scenario editor
Post by: treba on 24 June 2010, 21:46:45
hey ho!

since this is my first real program (i only did php stuff before), it took me a bit to get into all this stuff. also, i was to lacy to use wxwidgets because i didn´t find a good ide for it. so i decided to use qt, witch is also platform independent and has all the necessary stuff like, even a xml library.
the program is far from being ready now, but i got the basics for it. that is good, because i now know how everything works.
that is why i now took the project to sourceforge.
if you are interested in it, you can check out the current code from svn (http://glestscenarioed.svn.sourceforge.net/viewvc/glestscenarioed/trunk/). the code is not very nice so far, but it will get better, i promise :)
i don´t know how qt programs are compiled under windows, but with linux, a simple
Code: [Select]
qmake
make
will do it, as long as qt is installed.

the version history will take place in three steps:
0.1: basic scenario settings can be handled via gui. data comes from the glest folder or the settings.xml. full compatibel with scenarios not created with editor.
0.2: scripts can be created via gui. code for scripts comes from xml files. not compatibel with scenarios not created with the editor.
maybe 0.3: compatibility with scenarios not created with editor.
1.0: everything is stable an will hopefully not need to be changed when changes to the format are made (like 8 players)

atm, we are at 0.1 alpha. basic editing works, files can be loaded and saved again, but some things don´t work as they should (like displaying right factions after loading a scenario if the faction can´t be found in the given techtree. but that´s only a detail). expect 0.1 in a few days.

some screens:
(http://s10.directupload.net/images/100624/temp/f2588e53.jpg) (http://s10.directupload.net/file/d/2200/f2588e53_jpg.htm)
(http://s7.directupload.net/images/100624/temp/uw9zmqd4.jpg) (http://s7.directupload.net/file/d/2200/uw9zmqd4_jpg.htm)

greetz,
treba
Title: Re: scenario editor
Post by: ElimiNator on 25 June 2010, 01:36:12
Cool! can't wait till its done!
Title: Re: scenario editor
Post by: Omega on 26 June 2010, 05:41:26
Might be interesting. I wouldn't need it, but you never know, might get some people who aren't any good at lua into making scenarios.
Title: Re: scenario editor
Post by: ElimiNator on 26 June 2010, 07:32:00
Might be interesting. I wouldn't need it, but you never know, might get some people who aren't any good at lua into making scenarios.
Sure you could use it! Making scenarios would be much faster.
Title: Re: scenario editor
Post by: ultifd on 26 June 2010, 15:58:33
Might be interesting. I wouldn't need it, but you never know, might get some people who aren't any good at lua into making scenarios.
Sure you could use it! Making scenarios would be much faster.
But if he knows already how to and can make more advanced ones, then it does not really have a use...just for people who don't know much about LUA and such...like me.  :O

Looks cool, Are you emulating windows on a mac? I see...  :)
Title: Re: scenario editor
Post by: treba on 26 June 2010, 16:30:55
Looks cool, Are you emulating windows on a mac? I see...  :)

it´s kde on linux ;)
Title: Re: scenario editor
Post by: ElimiNator on 26 June 2010, 17:19:25
I can do LUA but I think this editor might make it faster.
Title: Re: scenario editor
Post by: Omega on 1 July 2010, 22:52:28
Well, face it, editors are for the inexperienced at something. Once you get experienced enough, you can do it in just code. For example, a web design noob might use Microsoft Frontpage to make a website. But, frontpage is very limited, has horrid formatting, puts in a lot of junk that drastically increases filesize, and makes it based for IE. Once you are good at HTML, you'll make all your webpages from scratch in code, because it is better, allows you to do more, and overally increases performance (not to mention way more fun! :D).

Same applies to Lua (BTW, haven't you seen Lua's homepage? They state the ideal way to say it is "Lua" with the first letter capital and the rest lowercase.)

Quote from: http://www.lua.org/about.html
"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!

No wizard, editor, etc has ever been as good as human logic. This will be good for people new to Glest, but for those who hope to make scenarios that do something new and different (see the scenarios of Military for an instance, ALL which are Lua, and range from defeating the foe with limited units, having full bases of starting units, defending allies, following a storyline, surviving waves of enemies, or holding a location for a period of time), you will need to go through the code.
Title: Re: scenario editor
Post by: John.d.h on 2 July 2010, 00:18:12
Naturally, dealing with just the raw code itself is going to be more powerful, in the same way that working with a Unix or DOS prompt is a lot more powerful than using an operating system with a GUI, but the latter is a heck of a lot easier to work with, and the majority of people don't want to have to learn a new language.  Frankly, I've learned enough new skills for Glest (modeling, unwrapping, texturing, rigging animating... shall I go on?), and learning Lua is not on my to-do list.  For the truly hardcore scenario people, learning Lua is the best bet, but a graphical editor is a much preferable choice for the less dedicated, or those who just want to give it a try before committing wholly to it.
Title: Re: scenario editor
Post by: silnarm on 2 July 2010, 06:03:26
It's a tool. It will be useful even for 'hardcore scenario people', you'll still be able to add your own code, this will simply be a nice way to get it started, and will probably help less experienced programmers organise their code better.  If it turns out as well as I hope it does, I'll certainly use it :thumbup:
Title: Re: scenario editor
Post by: ultifd on 2 July 2010, 06:08:48
it´s kde on linux ;)
Sorry, sometimes my mind is...  :| blank?

Well, face it, editors are for the inexperienced at something. Once you get experienced enough, you can do it in just code. For example, a web design noob might use Microsoft Frontpage to make a website. But, frontpage is very limited, has horrid formatting, puts in a lot of junk that drastically increases filesize, and makes it based for IE. Once you are good at HTML, you'll make all your webpages from scratch in code, because it is better, allows you to do more, and overally increases performance (not to mention way more fun! :D).
...
Yeah, basically... but uh, who knows? This scenario editor might even be good enough for the pros... there aren't that many great scenarios for glest yet, none that are popular...anyways.  :|
So  :thumbup: Will be helpful for newbs. And maybe for others?  :|
Title: Re: scenario editor
Post by: Omega on 5 July 2010, 23:50:52
By the way, when working on the glest guide, I rediscovered the Scenario Editor. It had the ability to add custom resources quietly released a few months back. Of course, it has been used a small number of times... 273 people have viewed the scenario creator page, and 105 have gone through to the end and downloaded their work. Still, that's not to bad, seeing I didn't publicize it at all.

Not as functional as the planned idea here (haven't seen any progress, is this still alive?), but its a basic editor...
Title: Re: scenario editor
Post by: ultifd on 6 July 2010, 00:43:37
You mean the one on glest guide? Yeah, it isn't bad. But compared to this, I think this would be better. That is for more simple scenarios, as it is just to set up a game, etc. But that's nice. I did try it...
Hmm, I think this is still being worked on, just no reply...people don't have to...
Title: Re: scenario editor
Post by: treba on 14 July 2010, 11:44:49
hey, just wanted to say that the project is defenetly not dead but i started to make a break some weaks ago due to some preparations i have to do here. the project will be finished, i promise  :)
Title: Re: scenario editor
Post by: treba on 19 September 2010, 12:09:51
hey ho again.

here a few pictures of the current status:

(http://s13.directupload.net/images/100919/temp/e8bs2bu4.jpg) (http://s13.directupload.net/file/d/2287/e8bs2bu4_jpg.htm)
(http://s13.directupload.net/images/100919/temp/lolojnxk.jpg) (http://s13.directupload.net/file/d/2287/lolojnxk_jpg.htm)
(http://s13.directupload.net/images/100919/temp/f6j8alep.jpg) (http://s13.directupload.net/file/d/2287/f6j8alep_jpg.htm)
Title: Re: scenario editor
Post by: Omega on 19 September 2010, 17:47:49
Looks very impressive. You've been busy. :)
Title: Re: scenario editor
Post by: Gabbe on 19 September 2010, 20:31:57
SO Omega, will you use it? :P I certainly will!
Title: Re: scenario editor
Post by: Trappin on 19 September 2010, 21:27:14
If its as simple as using radio selection buttons and some testing - then I'll be using this tool for designing story driven multi-map mini campaigns.
Title: Re: scenario editor
Post by: John.d.h on 19 September 2010, 22:49:16
If not for the mountain of other things I've committed myself to, I'd jump all over it.  I still might anyway.
Title: Re: scenario editor
Post by: ultifd on 19 September 2010, 22:59:31
SO Omega, will you use it? :P I certainly will!
Hmm, I thought he was really good at LUA...still, I guess he could use it. Military has tons of scenarios already though... :-/

Looks nice.
Title: Re: scenario editor
Post by: Omega on 20 September 2010, 01:31:04
SO Omega, will you use it? :P I certainly will!
Hell, no. It just looks nice and will hopefully get more people into making scenarios.

I am more comfortable in good ol' source code and a cutting-edge mind ;).

Nothing will ever beat the amazing powers of the SOURCE. No tool, wizard, WYSIWYG program, etc will ever beat the powers of raw source coding. That's like trying to make a webpage with Microsoft Publisher compared to my raw XHTML powers (I have now made the transition to HTML 5! Check out the beautiful curved edges on the Wiki, on most of the templates and my signature, as well as the main page. To anyone on Firefox or a webkit browser (such as chrome or safari), you'll be able to see the difference, while degrading to boring corners on non-supportive browsers).

Hmm, I thought he was really good at LUA...
I am. ;)
Though, do note that them Lua folks don't like you writing Lua in capitals.:
Quote from: http://www.lua.org/about.html#name
"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!
Title: Re: scenario editor
Post by: ultifd on 20 September 2010, 04:58:16
That's funny, I was pretty sure a typed "Lua" not...
but, I see.
Title: Re: scenario editor
Post by: treba on 6 October 2010, 12:24:55
ok, next svn version is finally out. as already shown in the last post, you can now use icons for attribute selection. also, event, triggers and scripts can now be moved to other positions.

but overall, i actually dont have so much time and the inet connections in this part of india just suck. so dont wonder, that the process is going slower than espected :(
Title: Re: scenario editor
Post by: Trappin on 7 October 2010, 06:23:28
Looking forward to using this tool - don't burn out on us!
Title: Re: scenario editor
Post by: ultifd on 2 March 2011, 01:48:56
So what stage is this in now? SVN? Where?
Title: Re: scenario editor
Post by: Omega on 2 March 2011, 01:52:12
4 months = dead

No real sense posting here.
Title: Re: scenario editor
Post by: ultifd on 2 March 2011, 01:53:39
Not really, he did mention SVN. Projects are only usually/really dead if the developer announces that it is.
Anyways, I found the link. I'll try compiling it and uploading it for windows people.
Title: Re: scenario editor
Post by: treba on 2 March 2011, 14:45:50
hey everyone!

sorry that this project is currently "on hold" because i actually only have my netbook available here, with an gma500 chipset. that makes playing glest impossible with the current driver situation.
also, i work on other os projects at the sime time, that are somewhat "time critical" since they are needed by the ngo i'm currently working in (in india).

so as mentioned in this post (https://forum.megaglest.org/index.php?topic=5586.msg54955#msg54955) you can find the svn here (http://glestscenarioed.svn.sourceforge.net/viewvc/glestscenarioed/trunk/)

but it's actually not really the trunk...i remember to not have uploaded the last version. have to upload it to svn after looking it again.

but as long as there are people still interested in this, it will be worked on....betimes =)
greetz,
treba
Title: Re: scenario editor
Post by: ultifd on 2 March 2011, 17:48:21
I see. Well, update it when you can.
So, I sucessfully compilied it, but I'm having some trouble with the dlls... :/ I'll try again later.
Title: Re: scenario editor
Post by: Psychedelic_hands on 5 March 2011, 07:21:29
Oh wow, I'm glad this isn't forgotten. Hopefully maybe this can be developed beside the map editor and the g3d viewer one day soon.
Title: Re: scenario editor[Development Rev 19 Windows Version uploaded]
Post by: ultifd on 6 March 2011, 07:21:11
Here it is! Basically you can't really do too much now...but this gives you an idea at least. Please commit what you Treba, though...
Code: [Select]
http://www.mediafire.com/?6havwpcysihihel
Title: Re: scenario editor
Post by: Psychedelic_hands on 8 March 2011, 10:58:04
Not very stable or useful yet... But it has lots of potenial!
One thing I notice is you can only make scenarios with the megapack, I hope this will change soon'ish? right?  ::)
Title: Re: scenario editor
Post by: ultifd on 8 March 2011, 23:35:12
Well basically only the GUI is there...after all only 19 commits  ::)
One thing I notice is you can only make scenarios with the megapack, I hope this will change soon'ish? right?  ::)
What do you mean? That's not true...
Title: Re: scenario editor
Post by: treba on 10 March 2011, 19:10:43
hey ho

first of all, thanks for still paying attention to this  :D
just finished up the last changes i started with: you can now load and edit scripts...on a basic level. that means there are still bugs with more complicated, multiple or interlaced attributes.

the next and missing steps are:

if you want to try it, remember that you should start the program from the game folder (or link the following folders into the one you are starting it from: maps, tilesets and techs).
also, you shouldn't forget the se-data folder  ;)
i tried to not hardcode as much as possible. that's also why every tech tree you have in your techs folder should work perfectly.
greetz
Title: Re: scenario editor
Post by: Zoythrus on 10 March 2011, 19:15:34
idea, there should be a way of making a scenario that allows the player to choose the faction they want to play as. trying to complete the same scenario with different factions would make things interesting
Title: Re: scenario editor
Post by: treba on 10 March 2011, 19:24:47
hmm i think that's nothing to be discussed here....that's a decission that the developer of gae/mg have to make.....it would be easy to be included into the editor though (the player are not even hardcoded, so a simple new entry in the settings.xml would be enought)

just create a new thread for that
Title: Re: Scenario Editor Rev 20 by Treba
Post by: ultifd on 10 March 2011, 22:51:53
Thanks for the update!
Code: [Select]
[url=http://www.gamefront.com/files/20114560/Glest+Scenario+Editor+Rev+20+by+Treba.7z[/url]I've compiled revision 20 for windows people.[/url]
Quote
compatability profiles for vanilla, gae and mg - should be easy
Well, in some months or so (hopefully) MG and GAE will be merged...but I guess you could still do that.
Title: Re: scenario editor
Post by: treba on 11 March 2011, 08:34:03
yeah i think it should be there....espeacially for different version....like "mg >= 3.4.0" so you don't have to worry for changes too much and can stay compatible.

still, you should include the "se-data" folder into your upload. you can not really use the editor without any settings, events, attributes etc.
but thx again for compiling it....should i just give you rights to upload your packets to sourceforge? do you have an account?
Title: Re: scenario editor
Post by: ultifd on 11 March 2011, 08:41:44
Oh, sorry...forgot about that.  :-[ So that's why... :| Too tired these days...
Anyways, if you're OK with that, sure. http://sourceforge.net/users/ultifd
http://www.gamefront.com/files/20115590/Glest+Scenario+Editor+Rev+20+by+Treba.7z
With scripts and etc now...
Title: Re: scenario editor
Post by: havy2011 on 18 May 2011, 18:17:33
 shame theres no file to download  ::), as this would make life so so much easyer .. for a novic like me ;D
Title: Re: scenario editor
Post by: ultifd on 18 May 2011, 21:54:35
http://sourceforge.net/projects/glestscenarioed/files/in_development/Windows/Glest%20Scenario%20Editor%20Rev%2020.7z/download
Unless you don't have windows...  :-X
Title: Re: scenario editor
Post by: havy2011 on 19 May 2011, 23:47:47
THank's! your a saint.
Title: Re: scenario editor
Post by: titi_son on 29 June 2011, 12:43:27
I was bored so I made a sh-script which create a simple scenario , because i don't understand how to use this scenario_editor ( or can't you use it right now )   :D
It is an sh-script SO IT ONLY WORKS ON LINUX!

DOWNLOAD (http://www.titusgames.de/scenarios/scenario_maker_beta.7z)

Title: Re: scenario editor
Post by: Omega on 29 June 2011, 20:40:21
I was bored so I made a sh-script which create a simple scenario , because i don't understand how to use this scenario_editor ( or can't you use it right now )   :D
It is an sh-script SO IT ONLY WORKS ON LINUX!

DOWNLOAD (http://www.titusgames.de/scenarios/scenario_maker_beta.7z)

Except that's pretty much inferior to the Glest Guide's Scenario Creator (http://glestguide.co.cc/scenario_creator/) that I made long ago. It does all the same things, but works on literally every operating system, has a GUI, and can also allow you to give custom resources.
Title: Re: scenario editor
Post by: ultifd on 29 June 2011, 21:55:00
Meh, we could say that the online Scenario Creator is inferior to his script. I mean, offline use FTW.
Title: Re: scenario editor
Post by: Omega on 30 June 2011, 06:18:05
Meh, we could say that the online Scenario Creator is inferior to his script. I mean, offline use FTW.
Linux only though... If I made a windows only script, people would complain :P.
Title: Re: scenario editor
Post by: ultifd on 30 June 2011, 07:05:54
Well yeah, so that's why he made the script. :P
Title: Re: scenario editor
Post by: titi_son on 30 June 2011, 11:50:35
I was bored so I made a sh-script which create a simple scenario , because i don't understand how to use this scenario_editor ( or can't you use it right now )   :D
It is an sh-script SO IT ONLY WORKS ON LINUX!

DOWNLOAD (http://www.titusgames.de/scenarios/scenario_maker_beta.7z)

Except that's pretty much inferior to the Glest Guide's Scenario Creator (http://glestguide.co.cc/scenario_creator/) that I made long ago. It does all the same things, but works on literally every operating system, has a GUI, and can also allow you to give custom resources.

i know  :P i made it like this but at your glest guide a firefox update thing is allways above the buttons
Title: Re: scenario editor
Post by: Omega on 30 June 2011, 15:51:41
i know  :P i made it like this but at your glest guide a firefox update thing is allways above the buttons
Heh, yeah, I updated that one page to remove the disfunct firefox ad and fix the broken stylesheet link.
Title: Re: scenario editor
Post by: treba on 5 October 2011, 15:32:30
hey guys

fore those of you still waiting for my editor, there is great news. i did continue working on the editor from time to time and made a huge commit to the code yesterday (and today).
i rebuild big parts of it, under the hood as also the gui, and the biggest step, the saving and loading mechanism, which was very dirty and not very powerfull before, is done and teoretically able to save scripts of unlimited complexety (atleast i hope so).
still there is stuff missing, but we're comming closer.

i would really like to hear your feedback, espeacially concerning the guy.

thanks in advance,
treba

p.s.: i can't post screenshots in the moment as i have a weired driver issues with qt atm. maybe sb else likes to do it?
p.s.: ultifd, can you do a windows build again? that would be awesome =)
and if sb wants to volunteer and could make stand alone builds for linux or macos, feel free to contact me so we can put it on the sourceforge site

UPDATE:

i just added the possability to have nested attributes.

here is a little preview (with graphic issues  :( ):
(http://www.bilder-upload.eu/upload/1f64c2-1318429758.png)

as of now, all lua features of the original glest should be usable, despite loops (espeacially the if loop). these will come next.
after that i will add profiles for the different forks and then, it's finally ready  :)
Title: Re: scenario editor
Post by: Coldfusionstorm on 22 November 2011, 12:57:44
im keeping my eye on this
Title: Re: scenario editor
Post by: MuwuM on 22 November 2011, 21:44:07
I'm afraid I'm / We're producing faster new Lua stuff than, you can build it in your editor ;)



Now my question: Do you support both new engines ( GAE and MG ) or only Vanilla Glest?
Title: Re: scenario editor
Post by: treba on 24 November 2011, 15:27:07
by now, the editor (in my build here, not svn) does support profiles. so it supports whatever you want :)
so far i have a vanilla and a mg profile, but i will add gae support (atleast the basics)

most of the stuff is not hardcoded, so you can add all the stuff you need yourself, without needing to rebuild the editor (mostly, you don't even need to restart it)
so when the editor is in beta status, i might ask everyone who is interested in it to help include all the lua stuff. it's really easy and everybody should be able to do it =)

Title: Re: scenario editor
Post by: Omega on 25 November 2011, 04:01:17
This might help you then: https://docs.megaglest.org/Engines#Lua_scripting

It lists every Lua command available in all three engines, and which engines support which commands. You'll have to go to the individual engine pages for descriptions, though.
https://docs.megaglest.org/Lua/List
https://docs.megaglest.org/GAE/Lua
https://docs.megaglest.org/MG/Lua
Title: Re: scenario editor
Post by: treba on 27 December 2011, 14:18:53
just moved to git and put the current code there. it's unstable atm, though.
Title: Re: scenario editor
Post by: treba on 18 January 2012, 17:13:41
hey,

just wanted to share these images with you, showing how the editor is coming closer to its example, the wc3 trigger editor:

the original
(http://dl.dropbox.com/u/56789020/images/Screenshot%20at%202012-01-18%2017%3A54%3A42.png)

the glest version
(http://dl.dropbox.com/u/56789020/images/Screenshot%20at%202012-01-18%2017%3A56%3A35.png)

hope to come up with a beta, soon. but i said that a couple of times
Title: Re: scenario editor
Post by: wciow on 18 January 2012, 21:58:12
Nice work Treba  :thumbup: I will definitely make some scenarios with this when its done!
Title: Re: scenario editor
Post by: Trappin on 20 January 2012, 14:25:38
This will be pure fun. Campaign mode. Overland calvary, fording rivers, bridge crossings, rearguard action, earthen bulwarks, fixed cannon and mobile artillery..

https://secure.wikimedia.org/wikipedia/en/wiki/Battle_of_Yellow_Tavern

(click to show/hide)
Title: Re: scenario editor
Post by: Psychedelic_hands on 23 January 2012, 05:02:17
Wow, nice to see this project still kicking man!
Can't wait for the Beta, I've had some issues trying to make a scenario recently. Maybe this could help  :O.
Title: Re: scenario editor
Post by: Kiko on 23 January 2012, 06:59:19
Wow, nice to see this project still kicking man!

Double wow, Psych. I was thinking of having a go at a scenario sometime soon, but will wait for this.
Title: Re: scenario editor
Post by: Ishmaru on 23 January 2012, 12:18:36
Looks good Treba!
Title: Re: scenario editor
Post by: ultifd on 6 February 2012, 09:51:51
Wow, nice! Maybe I'll try to compile it for windows this week. I mean, if it's still possible. :D
Title: Re: scenario editor
Post by: treba on 6 February 2012, 23:37:53
when i tried to compile it on windows the last time, it crashed if you tried to add a script. but if that's still the case, i will have a look into it, soon.
actually a new pre-alpha release on sourceforge would be nice, as sometimes still download the version posted there (which has almost no code in common with the current git revision, believe me)
Title: Re: scenario editor
Post by: ultifd on 22 February 2012, 07:21:28
OK just PM me when you feel it's stable enough for a pre-alpha release. :D
Title: Re: scenario editor
Post by: Zhook on 14 July 2012, 16:50:59
 I'm not programmer. If you need help, my possibles:
creating pictures with gimp, inkscape ...
I can to translate into russian and test on linux ubuntu.
Title: Re: scenario editor
Post by: treba on 15 July 2012, 12:43:25
i'll ask you  :)
there's a lot of stuff which can be done without programming knowledge
Title: Re: scenario editor
Post by: Zhook on 15 July 2012, 14:10:25
Ok. I'll wait.  :)
Title: Re: scenario editor
Post by: treba on 12 October 2012, 20:56:31
hey

just wanted to let those of you, who would like to use this kind of editor, know that it's now quite fun to use.
i'm currently already using it for a map i'm building, but i didn't yet put a beta out as i'm always still adding small stuff.

(http://dl.dropbox.com/u/56789020/images/editor%20-%20main.png)
(http://dl.dropbox.com/u/56789020/images/editor%20-%20scripting.png)
Title: Re: scenario editor
Post by: Coldfusionstorm on 13 October 2012, 10:17:05
This look's great! And it's going to be nice to see your footmen frenzy like map :D.
Title: Re: scenario editor
Post by: MightyMic on 13 October 2012, 22:09:15
:thumbup: a bo$$
It'll be cool to see once it's finished. And if this can expedite scenario editing then maybe we can make a campaign
Title: Re: scenario editor
Post by: Omega on 14 October 2012, 08:38:39
:thumbup: a bo$$
It'll be cool to see once it's finished. And if this can expedite scenario editing then maybe we can make a campaign
To be honest, I don't really see such a program making a campaign more or less viable. The Lua syntax for scenarios is as simple as a scripting language can be (I'm STILL annoyed though, that nobody is willing to implement a way to display output without going through a language file; a scenario I made that used a timer required over 600 lines (http://pastebin.com/ECSG7LZ6) in the language file just to be able to display a timer without question marks). At any rate, the main things stopping a campaign are that (1) it's difficult to smoothly move from scenario to scenario in a lengthy campaign. (2) MegaGlest has literally no backstory. With all due respect, the MegaPack is just a bunch of totally different factions that people really liked, so decided to bundle together. They weren't made with a story in mind, and it'd be pretty hard to adapt a story involving indians, vikings, ancient egyptians, a bunch of death worshiping wizards, persians with flying carpets, and a steampunk medieval faction. (3) There's little ability for scenarios to particularly focus on specific units ("heros"). There's no way to reassign different models, stats, or names to a unit; there's no way to add new units into a techtree solely for a scenario; maps are limited to ten different objects, so no scaling a grand castle to kill an evil baron, etc etc. And (4) making a scenario takes a fair deal of effort and few people actually want to do it. In fact, recently, the entire modding community has been very slow. I don't think we've seen any new mods for a long time, just updates to a few, like Annex.

Finally, the posted image doesn't seem to show a much easier method of creating scenarios; the logic and flow is still the same, just no worries of syntax errors. The actions of the scenario in the screenshot above could be written in Lua as:
Code: [Select]
<unitDied>
if lastDeadUnitCauseOfDeath() == 1 then
  for i=1, 8 do
     player = player1
     player_ally = player2
     hero_player = hero_1
     
     if unitFaction(lastDeadUnitKiller()) == player and unitFaction(lastDeadUnit()) ~= player and unitFaction(lastDeadUnit()) ~= player_ally then
       if lastDeadUnitName() == 'swordsman' then
       
       end
     end
   end
end
</unitDied>
Though I have to admit, I've never liked how Lua uses "~=" for inequality and the use of then/do and end in place of braces.

My point is that you still have to think like a coder.
Title: Re: scenario editor
Post by: treba on 14 October 2012, 11:42:25
yip, that's true  :)
but for my part, this is how i learned how to think like a coder. and take a look on the wc3/sc2 modding community. most the (even quite complex) funmaps are made with the graphical interface like this, although coding it would be way faster and easier.

anyway, maybe this can motivate someone do make some nice scenarios, maybe not. for me, this whole think is just for educational purposes (and for fun)
Title: Re: scenario editor
Post by: MoLAoS on 14 October 2012, 13:15:08
It would probably make more sense to construct scenarios or campaigns in GAE since its designed for single player. Making a single player scenario and thusly a campaign containing many single player scenarios in MG makes about as much sense as playing multi player in GAE.

Of course I doubt people would like to have to download 2 separate games.
Title: Re: scenario editor
Post by: ElimiNator on 15 October 2012, 02:14:12
Then maybe we can make a campaign

Actually Tiger and I have been making a campaign of 10 scenarios, they include all mega-pack factions and follow a story.
The first 9 scenarios are complete but require bug testing. As soon as the 10th is finished I will post them for you guys to test.
Title: Re: scenario editor
Post by: Zhook on 31 October 2012, 02:21:47
I'm waiting.
I'll test and translate it into Russian as soon as be able to download it.
Title: Re: scenario editor
Post by: Ishmaru on 31 October 2012, 19:13:57
Treba: How is development of senario editor this going? Ill be happy to distribute this with annex releases when its complete. If its ok with you of course :)
Title: Re: scenario editor
Post by: treba on 4 November 2012, 20:07:19
i've been quite busy with studying lately, so i didn't feel that much like programming. however, the editor is in a good shape and pretty usable.
i'd appreciate if want to ship it, so i'll try to have a last look if there's stuff that really should be solved (didn't test on windows so far).
Title: Re: scenario editor
Post by: tomreyn on 7 November 2012, 20:15:06
The screenshot above looks very nice and I think this tool would make a modders' life easier (for some). And anything which can result in having more modders due to ease of access should be welcome in my opinion. So it would be good to discuss whether Trebas' scenario editor could be added to MegaGlest (which would also help getting current versions into Annex releases, I assume), both in terms of the giving (Treba) and the receiving (Titi would have to have a say, I guess) end.
Title: Re: scenario editor
Post by: Pizza90 on 20 June 2013, 17:13:19
Any update treba?? On sourceforge there are no alpha or beta downloadable,  i hope the project is not dead. From the screenshot it's amazing and very user friendly, once it's finished it should be included in megaglest imo.

Ps. if you need testing on windows 7 64bit i am here :)