Some thoughts about WML

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Some thoughts about WML

Post by Mille »

Well I studied the Wiki WML Reference the last days.
First of all i love this Markup Language. It gives you so much possibilities:)

Getting more and more in the material i noticed some things, that might give some more ideas, what might be interesting for campaignmakers and which at least are things i would love to see in future versions of Wesnoth.

Before continuing let me say two things. I know that the developer team wants to limit the options od Wesnoth as much as possible wants a clean, well balanced standard game. I fully agree to this, on the ther hand i think adding more WML options and interactions would go confirm with this, don´t touching the base of Wenoth, but it would allow the campaign makers to realize more of their creative ideas.

Perhaps i´m wrong in some points, and my wishes are already implemented. In this case i would be interested where to find out more about it. Perhaps there are things that you don´t find important or stupid, but please keep in mind, that this are only suggestions and ideas.

1.) WML supports the possibility to give out messages and it allows the user to make inputs in an own window. As far as i can see this input is limited to a simple options menu. It would be great, if there could be more WML scriptable interface possibilities.
- Simple Buttons
- A scrollbar with arrow buttons on the left an right
- A mouse layer system, which would allow you to click on some point of a displayed image and start an defined event.

2.) I would like to see a way in WML to make adaptions to the user interface of Wesnoth. E.g. I would like to see the possibility to add menu items to the right click menu. As well i would like to have the possibbility to have a user definable status bar, where additional informations can be displayed. (Similar to the standard status bar, but with user defined variables, miniicons and short infos). Additionally i would like to have additional, optional buttons in the right unit display frame, that can be activated for a user made campaign and . Perhaps this can also be realized a steadily shown overlay window that has additional interaction possibilities as i mentioned under 1

What do you think?
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

Do you know Theme WML?

That partly answers your question. The rest, I´d basically say no. Why do you need it?
Present why your idea is good and useful, and you may convince a coder of it.
First read, then think. Read again, think again. And then post!
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

I imagine something like a scenario-specific menu. It would include only scenario-defined commands. These commands can be executed only during player's turn, and they invoke a WML event.

For example, imagine a scenario where you fight against an opponent army, and once during the scenario you can "ask for help" and all your units become fully healed. This can be implemented today for example with having a special field on the map, and when your unit steps on the map, all units get healed, and the special field becomes normal. Having a scenario-specific menu would just rid player of the burden having one unit occupied by triggering the event.

Scenario-specific command could also be used to display a special information (via normal [message]).
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Theme WML

Post by Mille »

toms wrote:Do you know Theme WML?

That partly answers your question. The rest, I´d basically say no. Why do you need it?
Present why your idea is good and useful, and you may convince a coder of it.
No - I missed Theme WML and so this a good tip you gave regarding the right click context menu and the main meu, if i understand the wiki entry correct so far.
Be so nice and give me an example of how i could integrate a new item in the right click menu for example if i click on a new terrain (or a building, but in my campaign its included as a user terrain)


Regarding the rest of your answer - Thats exactly this kind of thread i didn´t wanted to start. I didn´t wnated to say to the coders: i would like to this and this and this game related feature in wesnoth, its not there - PLEASE code it.
I said - I like the philosophy of Wesnoth - I like the consistent, easy system. Stay with it for the official games - But it would be a great benefit
to give the WML additional features,

To be kind, i want to tell you some ideas i have to introduce in my campaign and some additional benefits, that can be accomplished by such a feature by other ones -

Sorry:
I will continue this later on
I have to do something at the moment at once :(
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Post by Mille »

Viliam wrote:I imagine something like a scenario-specific menu. It would include only scenario-defined commands. These commands can be executed only during player's turn, and they invoke a WML event.

For example, imagine a scenario where you fight against an opponent army, and once during the scenario you can "ask for help" and all your units become fully healed. This can be implemented today for example with having a special field on the map, and when your unit steps on the map, all units get healed, and the special field becomes normal. Having a scenario-specific menu would just rid player of the burden having one unit occupied by triggering the event.

Scenario-specific command could also be used to display a special information (via normal [message]).
Yes- Thats something like the things i thought of, but as well there are more things i though of. For example i would like to include riddles, where you can give an answer, have a dialog image window for a new buidlung, where you can recruit people of a special kind.

But to stay in in more general. This ideas are only small ones and for sure they want bring any coder to the point to code my request, but overall i think this would be one of the mightiest addons to the WML scripting possible, because it would make EVERYTHING possible.

Simply think on all the things commonly asked in the wished feature list over and over again, but that don´t match the philosophy of Wesnoth.

- More RPG like features
- A building system
- A advanced magic system
- Think about merging single units
- Or think on HOMM like in-city views

As far as i see it, a more sophisticated, more modular input output user interaction provided by WML would allows mostly all advanced ideas, without touching the basic Wesnoth code.

And to complete this, i dont think that it would need so much coding at all - At least this are simple wrapper functions that i wished, which wouldn´t disturb the standard wesnoth game, and which are not so difficult to implement (At least i think so) :oops:

And please - This is not a feature request for more in game options, this is a question of how much interaction should be allowed by the WML scripting. And at least it would make it even more easy to include speacial options to the official game for some single scenarios.
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Post by Sapient »

A WML-action slot in the right-click context menu is a good idea, and it is something that wouldn't be too hard to code. WML-buttons is a nice idea, but you'll just have to support them in ThemeWML and then figure out where to put them on the screen.

I'm not sure where you want to put scrollbars, though. Oh, and there is a text-entry box if you count "Rename Unit" :D
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Post by Mille »

Sapient wrote:A WML-action slot in the right-click context menu is a good idea, and it is something that wouldn't be too hard to code.
That sounds great. I would love to see this
WML-buttons is a nice idea, but you'll just have to support them in ThemeWML and then figure out where to put them on the screen.
I try to clarify it a bit, since i have read a bit more about the basic concept. After reading about WML-Themes i think the button system should be devided into two something similar functions. One should be for the Theme WML. Ther could be defined user buttons that should be displayed in the game main-window. Perhaps this can be good for button that should be displayed always. The other button system i think of, and which i find even more important, is more likely to appear in the INTERFACE Actions WML, which shows messages for example. I think of a message for example, where you can click on three different image buttons for example.
For sure you have to figure out, where to put the buttons on screen, in both cases. For the main game screen you could define a standard positions i think, perhaps the lower or left side of the game window, since this is somehow empty right now. That would take away problems with the game resolution.

It doesn´t make sense i think, to simply define an option in WML with X and Y values for the window button option as well, as you have to take in mind, that Wesnoth can be played in different resoultions. I think it is more likely to introduce a more basic position option like:

LEFT / CENTERED / RIGHT

but in this case there must be something like a "NEXT ROW" or so must be possible. This option would have to beed wrapped by the WML to a x y position for the WML processing function in dependency of the resolution.

I'm not sure where you want to put scrollbars, though. Oh, and there is a text-entry box if you count "Rename Unit" :D
It´s something similar to the button in the message window above. If you know "Heroes of Might and Magic 3" where you can define the number of units to recruit, you have an idea of what type of scrollbar im talking:)

A short summary of options, that should or might be needed, if such an interface WML wrapper would be introduced might be:

X
Y (Or Position)
Width X
Width Y
Image-File (to be used for a button)
Sound-File (to be played when clicking a button)
the event to call
...

The whole thing isn´t to hard to code i think. But it could give enormous number of additional possibilities to WMLing.
Post Reply