[Brainstorm] Features for another type of wml-editor
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
[Brainstorm] Features for another type of wml-editor
[Background]
Ok, so one thing that seems to pop-up from time to time are requests for a 'better' more feature full editor for BfW. This is mostly shoot down by some or all of:
1. no, it's a map editor
2. use campgen
3. learn wml
I agree with 1, the map editor should stay a map editor. Campgen does seem a bit difficult to use (from my own experience I couldn't really get anything working, but then again, I didn't know WML then). Learn WML, yes, this is a must but a good editor can actually help with that and make the transition from ignorant to wml-guru shorter.
[/Background]
So, how should a good wml-editor work? What features are essential? What would be good to have? Brainstorm away, and maybe, just maybe we will have a nice spec that we can work with and convince a coder to do it or actually code it ourselves.
/tsr - just trying to focus peoples imagination, etc
Ok, so one thing that seems to pop-up from time to time are requests for a 'better' more feature full editor for BfW. This is mostly shoot down by some or all of:
1. no, it's a map editor
2. use campgen
3. learn wml
I agree with 1, the map editor should stay a map editor. Campgen does seem a bit difficult to use (from my own experience I couldn't really get anything working, but then again, I didn't know WML then). Learn WML, yes, this is a must but a good editor can actually help with that and make the transition from ignorant to wml-guru shorter.
[/Background]
So, how should a good wml-editor work? What features are essential? What would be good to have? Brainstorm away, and maybe, just maybe we will have a nice spec that we can work with and convince a coder to do it or actually code it ourselves.
/tsr - just trying to focus peoples imagination, etc
-
- Posts: 250
- Joined: November 19th, 2007, 7:46 pm
- Location: One among the Fence
Probably something that you can set certain parameters, set things up, so that you could program a moderately customized scenario...
And the WML would appear to the right of whatever you were doing!
So basically, as you enter in things, you see the WML generate, so that you can learn how it works. Plus, it would let you edit the WML if you wanted. So it could easily be a training tool.
(Just some rough ideas, concepts, not thinking about application yet)
And the WML would appear to the right of whatever you were doing!
So basically, as you enter in things, you see the WML generate, so that you can learn how it works. Plus, it would let you edit the WML if you wanted. So it could easily be a training tool.
(Just some rough ideas, concepts, not thinking about application yet)
Glory in Blood...Needs Programming Help!
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
In my opinion a good WML editor should always provide you with a list of tags/attributes available in given content... also with a short description what they do.
It should also come with a few templates or wizards, like "normal day-night cycle", "underground", "create unit", "say message", etc... for frequently used parts of WML code. At least it should have some wizard for creating a new scenario.
It should also come with a few templates or wizards, like "normal day-night cycle", "underground", "create unit", "say message", etc... for frequently used parts of WML code. At least it should have some wizard for creating a new scenario.
I'd say all the WML the scenario is capable of inserting with a few clicks should be based on templates, which are not hard-coded but specified in some reasonably simple language in an external file. That way, people could easily contribute templates for any action imaginable ("change units from side x to side y on turn z if condition foo is true", "auto-recall unit on scenario start", whatever). If you hardcode all the things the editor can do, it'll be a pain to maintain.Viliam wrote:It should also come with a few templates or wizards, like "normal day-night cycle", "underground", "create unit", "say message", etc... for frequently used parts of WML code.
Such a template for a "say message" action could look like this:
Code: Select all
event_action::speak(unit_filter who, string message) {
insert {
[message]
{{who}}
message= _ "{{message}}"
[/message]
}
}
IMO what would be nice is something like BlueFish which makes it very easy to edit HTML.
I'm not sure how easy BlueFish would be to extend/make a module for for WML, but it might be worth looking into.
David
I'm not sure how easy BlueFish would be to extend/make a module for for WML, but it might be worth looking into.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
A few of my own thoughts:
- I've noticed that there are quite a few wml-tools in the main data-dir of wesnoth, hopefully those could be used (And esr will continue to improve on them)
- I'd like some 'wizards' for bulk-actions that are boring, tedious and easy (like creating a standard SP/MP scenario)
- Whatever tool is used should have an up-to-date wml-reference (maybe it's possible to get (and reformat?) the wiki-ref from w.o)
- It should be possible to launch the map-editor from the wml-tool
- It should be possible to one-click change the scenario back and forth to [test] (for easy testing)
- I'd like for the tool to handle directories/binary_path's
-------------
Bluefish does look nice (it sure has evovled since I looked at it last time ),
/tsr
- I've noticed that there are quite a few wml-tools in the main data-dir of wesnoth, hopefully those could be used (And esr will continue to improve on them)
- I'd like some 'wizards' for bulk-actions that are boring, tedious and easy (like creating a standard SP/MP scenario)
- Whatever tool is used should have an up-to-date wml-reference (maybe it's possible to get (and reformat?) the wiki-ref from w.o)
- It should be possible to launch the map-editor from the wml-tool
- It should be possible to one-click change the scenario back and forth to [test] (for easy testing)
- I'd like for the tool to handle directories/binary_path's
-------------
Bluefish does look nice (it sure has evovled since I looked at it last time ),
/tsr
Ok, so I'm trying to find a suitable host to do this on, and so far I've found jEdit, but I would like to have other options (not emacs/vi - since they are not newbie friendly atm).
Bluefish seems to lack some flexibility, but maybe I'm just awful at reading/finding the correct documentation
jEdit seems very powerful in how you can extend it, otoh it's written in java which I'm a bit scared of.I posted a small list of features I wanted to have and it seems that it can do those.
Anything else 'we' want/wish, etc?
/tsr
Bluefish seems to lack some flexibility, but maybe I'm just awful at reading/finding the correct documentation
jEdit seems very powerful in how you can extend it, otoh it's written in java which I'm a bit scared of.I posted a small list of features I wanted to have and it seems that it can do those.
Anything else 'we' want/wish, etc?
/tsr
I particularly like the wizard feature (of all the proposed ones).
The wml reference would have to be up-to-date, perhaps reading some html documentation that could be shipped with BfW?
Some things I would consider really interesting:
a) macro capabilities: standard macros should be generated wherever possible instead of wml tags. This is something I recognized recently: if you use macros, your content can weather the changes in WML much better than if you use only the tags directly. Plus it's more efficient. I think macro usage should be encouraged wherever possible.
It should also be able to expand those macros on the click of a button - so that you can go down to the pure wml level.
Indeed, macros could bridge the gap for the templates that zookeeper mentioned. Actions could be tied to a macro name in an editor action template. Then the editor takes the macro definition and assigns attributes according to the macro arguments. Now that wmllint is doing some type-checks on macro arguments and they get standardized names wherever possible, it would be feasible to base a template system on macros.
b) map component: I follow the argument that the map editor should stay a map editor. But to have a (non-artistic - that means no transitions, perhaps not even images) representation of the map bundled with the code would be a great time saver. And it would lower the hurdle to the code for people who aren't programmers, as it ties the underlying code to something which is closer to the player experience (which happens on a map).
Also, this map component wouldn't choke on custom terrain (something which made working on UtBS awful...). It wouldn't have to, as it could simply display the terrain letter code and perhaps color-codes the hexes based on that (it would be terrain-agnostic).
Select a number of hexes on the map, click on moveto event - and you have a filter on those hexes. Select a [unit] tag and the hex that the unit is placed in is highlighted in the map. Need to change the terrain in one hex quickly? Click the hex and select the terrain from a dropdown (or edit the letter code). That would be fantastic.
This is of course a different scale of undertaking than writing a plugin/theme/extension to an existing editor application to trigger scripts, enable highlighting syntax and code autocompletion. Perhaps jEdit even has an api for wizards?
For the bells-and-whistles approach, one could perhaps throw together Scintilla, an open-source cross-platform editor component, and the map part of Atlantis Little Helper, an open-source hex map pbem client using wxWidgets? Both are written in C++. Might not be quite what you had in mind, though...
The wml reference would have to be up-to-date, perhaps reading some html documentation that could be shipped with BfW?
Some things I would consider really interesting:
a) macro capabilities: standard macros should be generated wherever possible instead of wml tags. This is something I recognized recently: if you use macros, your content can weather the changes in WML much better than if you use only the tags directly. Plus it's more efficient. I think macro usage should be encouraged wherever possible.
It should also be able to expand those macros on the click of a button - so that you can go down to the pure wml level.
Indeed, macros could bridge the gap for the templates that zookeeper mentioned. Actions could be tied to a macro name in an editor action template. Then the editor takes the macro definition and assigns attributes according to the macro arguments. Now that wmllint is doing some type-checks on macro arguments and they get standardized names wherever possible, it would be feasible to base a template system on macros.
b) map component: I follow the argument that the map editor should stay a map editor. But to have a (non-artistic - that means no transitions, perhaps not even images) representation of the map bundled with the code would be a great time saver. And it would lower the hurdle to the code for people who aren't programmers, as it ties the underlying code to something which is closer to the player experience (which happens on a map).
Also, this map component wouldn't choke on custom terrain (something which made working on UtBS awful...). It wouldn't have to, as it could simply display the terrain letter code and perhaps color-codes the hexes based on that (it would be terrain-agnostic).
Select a number of hexes on the map, click on moveto event - and you have a filter on those hexes. Select a [unit] tag and the hex that the unit is placed in is highlighted in the map. Need to change the terrain in one hex quickly? Click the hex and select the terrain from a dropdown (or edit the letter code). That would be fantastic.
This is of course a different scale of undertaking than writing a plugin/theme/extension to an existing editor application to trigger scripts, enable highlighting syntax and code autocompletion. Perhaps jEdit even has an api for wizards?
For the bells-and-whistles approach, one could perhaps throw together Scintilla, an open-source cross-platform editor component, and the map part of Atlantis Little Helper, an open-source hex map pbem client using wxWidgets? Both are written in C++. Might not be quite what you had in mind, though...
Try some Multiplayer Scenarios / Campaigns
I really like both of your ideas Rhuvaen, and yes that would mean building something from 'scratch' more than creating a mode.
Do you have any thoughts on how the macro-thing could work (logically I mean), should it be hard coded into the app or should it parse all the standard macros and whenever you try to write a tag that occurs in it it suggests to use a standard macro instead? Should it aim to have a parser that can see when code is repeated inside a project (unit, era, scenario) and suggest breaking it out into a macro? (Not that I know if that's even possible)
About the map thingy, I like! Maybe it can use a similiar system as the [ map] code from the forum to display a basic map (without transitions).
Keep it coming!
/tsr
Do you have any thoughts on how the macro-thing could work (logically I mean), should it be hard coded into the app or should it parse all the standard macros and whenever you try to write a tag that occurs in it it suggests to use a standard macro instead? Should it aim to have a parser that can see when code is repeated inside a project (unit, era, scenario) and suggest breaking it out into a macro? (Not that I know if that's even possible)
About the map thingy, I like! Maybe it can use a similiar system as the [ map] code from the forum to display a basic map (without transitions).
Keep it coming!
/tsr
Nothing as fancy as suggesting macros for what you type... no, I just thought that there would be some "actions" (menu / buttons whatever) that could be configured to use specific macros. For instance:tsr wrote:Do you have any thoughts on how the macro-thing could work (logically I mean)
Code: Select all
ACTION_TERRAIN_CHANGE = 'MODIFY_TERRAIN'
Perhaps it would come supplied with a number of special macros that wouldn't be of general use, but implement editor features (macros for generic events...).
The user then presses the button / selects the menu item that is linked to the terrain change action, and can fill in the arguments (X and Y could be done by mouseclick, for instance).
I don't think it would be sane to try to make a program suggest macro substitutions - that would be like backward macro expansion!
Try some Multiplayer Scenarios / Campaigns
- scienceguy8
- Posts: 226
- Joined: June 27th, 2007, 2:54 pm
- Location: Middle of Nowhere, U.S.A.
- Contact:
One of the things I really hated about CampGen, aside from the fact that it did not come with clear instructions, was that it required you to create a new campaign in order to create a new race. It would not let you save your work otherwise. I just want to develop a race at the moment, not a campaign. Unit, race, and era templates would be great.
"You can't kill an unarmed, upside down man!"
Dr. Rodney McKay
Stargate Atlantis
Runner
Gilberti Industries
scienceguy8
Proud Member of the Marching Salukis
Dr. Rodney McKay
Stargate Atlantis
Runner
Gilberti Industries
scienceguy8
Proud Member of the Marching Salukis
It would be cool if the auto completion is as Borland Delphi: based on the location different options are shown, e.a. in a leadership tag it only show you the valid keys. Delphi also remember the names of Variables and show them too. And on an array[x]. It only displays attributes of that array.
~ I'll heal you by 4 hp if you post next to me ~
Have a look at the Era of Strife, featuring Eltireans, Eventide, Minotaurs, Saurians and Triththa
Have a look at the Era of Strife, featuring Eltireans, Eventide, Minotaurs, Saurians and Triththa
Ok, what I'm thinking of right now is to create a stand alone app that would feature:
- the UI is divided into:
1. a leftsided panel that will show two tree views of
a) top area: your local data-dir
b) bottom area: wesnoth-install dir/core/data
2. an editing area
- when you create a new project you decide what that project will be (scenario, campaign, multiplayer, era, race, unit, ai, map, others?), a bunch of relevant dirs/files are created and filled with some code-snippets
- each file is associated with a filetype so that the editing area acts in different ways for different kinds of files
- map-files have the default option to be shown using images so that you can point and click/drag for hexes/areas to get info to be used in other files (like coordinates/terrain type, etc?)
- path-handling is done automagicly so that you can move around/rename your files/dirs without breaking your project
- syntax highlighting and auto-completion for WML, terrain codes and python (for AI writing)
- links to or incorporated wml and pythonAI reference
- extensive use of wizards (like when you create a new project you chose what kind of project, name, etc) but for a lot of things like events, variable-manipulation, etc
- autoloaded core macro snippets (/wizards)
- forced indentation using wmllint or something similar
- some kind of sanitychecking, either by using wmllint or by writing a basic wml-parser
I think I didn't forget anything, and remember this is still a brainstorm/wishlist-generator so don't shoot down ideas for lack of unimplementationality just focus on adding useful features and refine the thoughts so far (and not only mine).
/tsr
- the UI is divided into:
1. a leftsided panel that will show two tree views of
a) top area: your local data-dir
b) bottom area: wesnoth-install dir/core/data
2. an editing area
- when you create a new project you decide what that project will be (scenario, campaign, multiplayer, era, race, unit, ai, map, others?), a bunch of relevant dirs/files are created and filled with some code-snippets
- each file is associated with a filetype so that the editing area acts in different ways for different kinds of files
- map-files have the default option to be shown using images so that you can point and click/drag for hexes/areas to get info to be used in other files (like coordinates/terrain type, etc?)
- path-handling is done automagicly so that you can move around/rename your files/dirs without breaking your project
- syntax highlighting and auto-completion for WML, terrain codes and python (for AI writing)
- links to or incorporated wml and pythonAI reference
- extensive use of wizards (like when you create a new project you chose what kind of project, name, etc) but for a lot of things like events, variable-manipulation, etc
- autoloaded core macro snippets (/wizards)
- forced indentation using wmllint or something similar
- some kind of sanitychecking, either by using wmllint or by writing a basic wml-parser
I think I didn't forget anything, and remember this is still a brainstorm/wishlist-generator so don't shoot down ideas for lack of unimplementationality just focus on adding useful features and refine the thoughts so far (and not only mine).
/tsr
That might be because of the way add-ons work, everything is a campaign, even if there isn't one in it. EE is a campaign for instance.scienceguy8 wrote:One of the things I really hated about CampGen, aside from the fact that it did not come with clear instructions, was that it required you to create a new campaign in order to create a new race. It would not let you save your work otherwise. I just want to develop a race at the moment, not a campaign. Unit, race, and era templates would be great.
-
- Posts: 250
- Joined: November 19th, 2007, 7:46 pm
- Location: One among the Fence
I'd like to mention that IMO, wizards are a must.
Glory in Blood...Needs Programming Help!
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past
If you have time, check out my ongoing serial story...
The Hidden: Secrets of the Future's Past