WMLEditor - WesEdit - (NEED SOMEONE TO TAKE SCREENSHOT!)

General feedback and discussion of the game.

Moderator: Forum Moderators

User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

WMLEditor - WesEdit - (NEED SOMEONE TO TAKE SCREENSHOT!)

Post by appleide »

18/06/05 GO HERE TO VOLUNTEER TO TAKE A SCREENSHOT:http://www.wesnoth.org/forum/viewtopic. ... 183#184183

EDIT: Development of WesEdit will be frozen until end of September <edit:defrosting>because of yearly exams.
This is the thread I will post about the progress of the WMLEditor I am making. I'd like to call it "WesEdit".

It is a text editor that is supposed to assists WML developers.
Going to feature:
Indentation, tag color. (Done, but will redo to improve)
Notepad features (fonts, size, etc)
A list of tags, when you click one, it copies into your work. (Done, but needs a database)
Dictionary; spell checks your tags. (starting)

Might feature: (I haven't tested if I am capable of this; will work on last)
When you are typing, there will be a list of items, the first item is what that list is guessing you are typing. As you type more, the list narrows down.

I need help with the database; any volunteers? You don't need to know any programming, just create templates for the tags and put it into the respective folder.

eg:

Code: Select all

[event]
name=""
[/event]
with more stuff, of course. After doing this, save as plain text and name file "[event]", or whatever the tag's name is. and then put the file under
~/WesnothWML/User-Mods/Scenario/Events . And then go on to make "[if]" tag, and put in the same events folder too.

This editor, when finished, will not only be useful for WML. Can also use for eg. "TNTBasic" templates, "Escortwing", etc, etc.

Here is the directory; it is currently empty. It is also zipped. if you think the directory should be in some other form, tell me.

EDIT: JUST TO REMIND PEOPLE THE DIRECTORY IS EMPTY. IT IS FOR VOLUNTEERS WHO ARE WILLING TO FILL UP ALL THE TAG TEMPLATES.
Attachments
WesnothWML.zip
(6.26 KiB) Downloaded 199 times
Last edited by appleide on September 18th, 2006, 12:05 pm, edited 4 times in total.
Why did the fish laugh? Because the sea weed.
PsychoticMuffin
Posts: 29
Joined: August 1st, 2006, 7:52 pm

Post by PsychoticMuffin »

Sounds cool, would definitely be helpful to beginning WML scripters. If you can pull it off, I know that I will definitely use it.
Starev91
Posts: 31
Joined: June 21st, 2006, 7:19 pm

Post by Starev91 »

It would be very useful to begining wml editors, I know I would use it. Hmm... I need to stop coming up with excuses not to learn WML (procrastination on my part, plus a bit of summer schoolwork).
Think numbers in a username is wierd? Think maybe I should've gone for something original? I was thinking maybe Terevet, but if someone knew me elsewhere they wouldn't recognize me then :)

Terevet is my MP name however.
Infinisearch
Posts: 32
Joined: October 6th, 2005, 12:08 am

Post by Infinisearch »

Is this integrated into campgen somehow or is it a seperate application?
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

thx =)

this is much different to campgen. It is simply a text editor with a bunch of tag templates, which you can click on to automatically paste into the text field.
Why did the fish laugh? Because the sea weed.
ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming »

This is very interesting.

I have two questions:

1. Should the directory include all possible subtags?

2. What shound go after the equals sign if the value is a number?
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

ILikeProgramming wrote:This is very interesting.

I have two questions:

1. Should the directory include all possible subtags?

2. What shound go after the equals sign if the value is a number?
1. Yes. I am trying to have as many tag templates as possible. Also, I have finished the interface for editing templates in that directory from within the editor.

2. You may leave it blank, or even put comment on the next line "this should be filled with a number."

Thanks for the interest.
Why did the fish laugh? Because the sea weed.
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

One more idea: If you type an '$', you get a clickable list of all variables you initialized in this file.
First read, then think. Read again, think again. And then post!
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

*UPDATE* I've basically finished the spell-checker. There are still some problems.. It cannot check the first tag placed. It is unreliable in finding unclosed tags. It only is 95% reliable in terms of finding and highlighting spelling mistakes. There is an add function for adding unrecognised tags. highlight the tag you want to add and click "add" (remember that spelling 'mistakes' are automatically-highlighted). I hope that is intuitive enough.

It is also possible to have multiple dictionaries. just select whichever one you want to use in the preference pane.
toms wrote:One more idea: If you type an '$', you get a clickable list of all variables you initialized in this file.
Interesting. I'll think about it.

I will also ask volunteers to fill up the dictionary of tags. It is uploaded here. Just add new tags onto the latest line. (without the "[" and "]"s.) I've only done a couple. Once you think you have done enough just pm it back to me, or upload it here.
Last edited by appleide on September 2nd, 2006, 8:56 am, edited 1 time in total.
Why did the fish laugh? Because the sea weed.
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

Maybe it would be useful to have a list of all tags; and for each tag a list of all subtags and attributes; and for each attribute some additional information e.g. whether this tag is optional, whether it should be localizable, etc. With this information, editor could do WML validation, and possibly highlight invalid code.

Example:

Code: Select all

TAG: campaign
TAGS:
  about OPTIONAL MULTIPLE
ATTRIBUTES:
  icon OPTIONAL
  name REQUIRED TRANSLATABLE
  image OPTIONAL
  description TRANSLATABLE
  define UNTRANSLATABLE
  difficulties UNTRANSLATABLE
  difficulty_descriptions TRANSLATABLE
  first_scenario REQUIRED
  rank OPTIONAL
  id OBSOLETE
I do not suggest using exactly this syntax; it was only an example to show the idea. Each tag should have list of allowed subtags and attributes. Any other tag a attribute will display warning. Additional flags for subtags and attributes will display warnings and errors, for example:

flags for subtags and attributes:
REQUIRED - displays error is subtag or attribute is missing
OPTIONAL - does nothing; just opposite of REQUIRED
OBSOLETE - displays warning if subtag or attribute is present

flags for subtags only:
SINGLE - displays error if more such subtags are present
MULTIPLE - does nothing; just opposite of SINGLE

flags for attributes only:
TRANSLATABLE - displays warning if value does not contain "_" operator
UNTRANSLATABLE - displays error if value contains "_" operator
teinedraig
Posts: 2
Joined: January 25th, 2005, 9:11 am
Location: Australia

Post by teinedraig »

That sound sreally good. I have been using UltraEdit (as work has it and I have it at home). I have done up an incomplete wordfile for it (I have attached it). This may be of help or not - at least it gives us a highlighting editor ;)
Attachments
wmlUltraEditWordFile.txt
(3.13 KiB) Downloaded 216 times
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

*UPDATE*
Features completed:
Basic Notepad like editor's features.
The Spellchecker also is for now 100% reliable.
Tag list

Features working on:
Thinking of redoing Tag list.
Highlighting + indenting editor.
A list box that tries to guess what you are typing, also to guess the structure of tag.

Will Definately work on:
Pressing $ to bring up list of variables.

Thanks to Viliam for overestimating me. When I think I am capable I will reassess to determine whether or not to do that feature.
teinedraig wrote:That sound sreally good. I have been using UltraEdit (as work has it and I have it at home). I have done up an incomplete wordfile for it (I have attached it). This may be of help or not - at least it gives us a highlighting editor ;)
Thanks!! Really useful. Thanks to this I now have an idea how to redo the highlighting part properly.

The Wml's Dictionary now looks like this:

Code: Select all

Startoftag:[
endoftag:]
StartofDisindentTag:[/
endofDisindentTag:]
DICTIONARY:
¬
unit
event
object
units
generator
object
EDIT: I've copied all the tags from the UltraEdit word file. Thanks very much. ;)
Why did the fish laugh? Because the sea weed.
teinedraig
Posts: 2
Joined: January 25th, 2005, 9:11 am
Location: Australia

Post by teinedraig »

Glad to be of help.

Found a few more missing tags from my file

[defend] [/defend]

ignore_global_traits=
undead_variation=


that is all so far - I find them when I open a ifle to change something ... Too lazy to troll the wiki :)

Have fun!
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

I am releasing windows version of "WesEdit", with all "features more than text editor" disabled, because they aren't "perfected" yet. I am asking for someone to launch it, click the menu->tools->font->font window. Then take a screenshot and send it back to me. Thanks.

Also, suggest any texteditor-features I should include, and any critisms(i doubt there be any though, its only a text editor, although I haven't put wrap text on yet...)

http://www.geocities.com/appleide/index.htm
Why did the fish laugh? Because the sea weed.
User avatar
Baufo
Inactive Developer
Posts: 1115
Joined: January 29th, 2006, 4:53 pm
Location: Vienna, Austria

Post by Baufo »

Screenshot:
Attachments
wesedit.jpg
wesedit.jpg (60.85 KiB) Viewed 4300 times
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
Post Reply