Is possible to add custom [section] and [topic] inside help?
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.
Is possible to add custom [section] and [topic] inside help?
New problem:
I'm currently trying to add custom section into in-game help system. After few researches, I think it may be possible from the engine point of view, but i have no idea how can I add [help][toplevel][/toplevel][/help] tags. It looks like wesnoth consider only those in core data and then dismiss all others
. If anyone has any idea how it can be done, or know where it was done, please, consider sharing that knowledge.
Old problem:
Well, i want the player to be able to read some text data shown from [set_menu_item] even if it is not his turn. Eventually, i would like to link the command to help files like you can do about units. Is that possible? How should i start? Current problem is that [message] tag ask for side, and i have no idea how can i distinguish which side is player who want to read my novels
.
I'm currently trying to add custom section into in-game help system. After few researches, I think it may be possible from the engine point of view, but i have no idea how can I add [help][toplevel][/toplevel][/help] tags. It looks like wesnoth consider only those in core data and then dismiss all others

Old problem:
Well, i want the player to be able to read some text data shown from [set_menu_item] even if it is not his turn. Eventually, i would like to link the command to help files like you can do about units. Is that possible? How should i start? Current problem is that [message] tag ask for side, and i have no idea how can i distinguish which side is player who want to read my novels

Last edited by Elrood on January 13th, 2011, 1:19 pm, edited 1 time in total.
Re: Text informations for player whos side isn't active?
The custom menu item commands are disabled on non-player turns for synchronization protection. Unfortunately, this means you can't use them for browsing any informational popups when it's not your turn. However, you could allow the active player to send the information popup to all the inactive player sides via a custom menu item.
AFAIK, the only change to gamestate that may be initiated by a non-player side is the renaming of units. So you may be able to key an event based off of that, but it would really be an ugly hack.
AFAIK, the only change to gamestate that may be initiated by a non-player side is the renaming of units. So you may be able to key an event based off of that, but it would really be an ugly hack.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Text informations for player whos side isn't active?
You could auto-display (that is, fired by an engine event like side turn) something side-specific using side_for= key. That key only works if the message hasn't input however. And then the user would need to dismiss it if he doesn't want to read.
(Maybe you can make it so that while the player has his turn he chooses an option "Do you want to read the help (or whatever) while the others have their turn ?" and if yes it gets auto-displayed when he ends his turn. When the turn bell rings he can dismiss the message. (Would need to check whether the turn bell rings under this circumstances, and if not there should be some mean to notify the player.) Would be particularly useful in e.g. my MP addon so people can do something while they are waiting.)
EDIT
Um, no. The turn bell rings only after the player has dismissed messages displayed to him (from a side turn event previously to his side's side turn event. Would be nice to have some mean here if this is compatible with the engine.)
(Maybe you can make it so that while the player has his turn he chooses an option "Do you want to read the help (or whatever) while the others have their turn ?" and if yes it gets auto-displayed when he ends his turn. When the turn bell rings he can dismiss the message. (Would need to check whether the turn bell rings under this circumstances, and if not there should be some mean to notify the player.) Would be particularly useful in e.g. my MP addon so people can do something while they are waiting.)
EDIT
Um, no. The turn bell rings only after the player has dismissed messages displayed to him (from a side turn event previously to his side's side turn event. Would be nice to have some mean here if this is compatible with the engine.)
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Is possible to add custom [section] and [topic] inside h
Forcing player to dismiss every turn or even side change, is what i don't like. Well, there is one more thing i can try. Will have to check if message inside objectives can support options. If so, all my troubles end there . That way i would have callable "help" like system in game on player request.
edit:
Well, thats not the option .
edit2:
Well, there is a possibility of using themes. Now the main question is: is there a way to display scenario variable inside theme. For the moment i think the answer is "no" but still looking, as the threads i found so far are at least a year old.
Not with 1.8.5
Well, i will have to stay with [message] option showing at the end of turn + at request in menu when side is active .
Actually, there is still hope. I only have to find how tag [help] works.
Edit3:
New problem:
I'm currently trying to add custom section into in-game help system. After few researches, I think it may be possible from the engine point of view, but i have no idea how can I add [help][toplevel][/toplevel][/help] tags. It looks like wesnoth consider only those in core data and then dismiss all others . If anyone has any idea how it can be done, or know where it was done, please, consider sharing that knowledge.
edit:
Well, thats not the option .
edit2:
Well, there is a possibility of using themes. Now the main question is: is there a way to display scenario variable inside theme. For the moment i think the answer is "no" but still looking, as the threads i found so far are at least a year old.
Not with 1.8.5
Well, i will have to stay with [message] option showing at the end of turn + at request in menu when side is active .
Actually, there is still hope. I only have to find how tag [help] works.
Edit3:
New problem:
I'm currently trying to add custom section into in-game help system. After few researches, I think it may be possible from the engine point of view, but i have no idea how can I add [help][toplevel][/toplevel][/help] tags. It looks like wesnoth consider only those in core data and then dismiss all others . If anyone has any idea how it can be done, or know where it was done, please, consider sharing that knowledge.
Re: Is possible to add custom [section] and [topic] inside h
I didn't try it, but I would try to put it in the _main.cfg, outside any other tag (but inside of the campaign #ifdef):Elrood wrote: Edit3:
New problem:
I'm currently trying to add custom section into in-game help system. After few researches, I think it may be possible from the engine point of view, but i have no idea how can I add [help][toplevel][/toplevel][/help] tags. It looks like wesnoth consider only those in core data and then dismiss all others . If anyone has any idea how it can be done, or know where it was done, please, consider sharing that knowledge.
Code: Select all
[+help]
[+toplevel]
sections=...
topics=...
[/toplevel]
# new sections and topics
[section]
...
[/section]
[topic]
...
[/topic]
...
[/help]
Re: Is possible to add custom [section] and [topic] inside h
Unfortunately it didn't work.
Intresting fact, in cache + disappeared from [+help] and [+toplevel]. This file is created with all macros already are resolved.
Well, i'm pretty sure now, that even if it is possible to add additional sections into in-game help system, it is impossible to do it from add-ons
. Probably (i don't have enough time now to dive into source code and check it) [help] tag is resolved only once, before the add-ons. Any later changes are ommited, as unrecognized
. Pity.
Thanks for help Sapient, Anonymissimus, pauxlo.
Intresting fact, in cache + disappeared from [+help] and [+toplevel]. This file is created with all macros already are resolved.
Well, i'm pretty sure now, that even if it is possible to add additional sections into in-game help system, it is impossible to do it from add-ons


Thanks for help Sapient, Anonymissimus, pauxlo.