Difference between revisions of "EasyCoding"

From The Battle for Wesnoth Wiki
(Engine related features)
(Debug mode: issue fixed on PR 8767)
 
(66 intermediate revisions by 16 users not shown)
Line 1: Line 1:
== Foreword ==
+
'''This page is outdated. For an up to date list of good starting issues, see [https://github.com/wesnoth/wesnoth/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%22 here].
 
 
'''We are permanently updating this page. Parts marked by <s>strikeout</s> will likely be deleted shortly.
 
  
 
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task.  
 
This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task.  
Line 7: Line 5:
 
If you are such a person, you should feel free to edit this page.
 
If you are such a person, you should feel free to edit this page.
  
If you're not, you should post a feature request and discuss your idea on the forum or IRC. A coder with better knowledge of the code might give you the green light to add your feature here.
+
If you're not, you should post a feature request and discuss your idea on the forum or IRC or Discord. A coder with better knowledge of the code might give you the green light to add your feature here.
  
 
Anybody should feel free to add "clues" to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.
 
Anybody should feel free to add "clues" to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.
  
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature I'll "free" it back (that is if you're not working on it. If you have problems implementing it, just tell us....)
+
If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature we'll "free" it back (that is if you're not working on it. If you have problems implementing it, just tell us....)
  
--[[User:Boucman|Boucman]]
+
If none of these are to your liking, feel free to check our [http://bugs.wesnoth.org/?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%22 bug tracker] with a broad spectrum of tasks.
 
 
 
 
If none of these are to your liking, feel free to check our [http://gna.org/bugs/?group=wesnoth bug tracker] with a broad spectrum of tasks.
 
  
 
== Engine related features ==
 
== Engine related features ==
  
=== <s> Make a context menu option for command mode </s> ===
+
=== Make a "map diff" tool to visualizes changes between two version of a map ===
  
Make an alternate pathway to the command mode, normally activated with `:`. Some players have trouble getting used to this, a right click menu option may be easier for them.
+
Maintainers of maps often make small tweaks for balance purposes. For someone who doesn't know the map like the back of their hand it may be very difficult to spot exactly what changed. There isn't any really good way to do this right now -- using the 'diff' tool at command line doesn't give good results for .map files.
  
See forum discussion here: http://forums.wesnoth.org/viewtopic.php?f=12&t=40300
+
Such a tool would be helpful for someone who maintains a map pool containing maps made by others, also for someone who wants to browse a repository and examine balance changes on several maps, which could be instructive for someone who wants to make and balance their own maps.
  
Zappaman - 10/07/2014
+
There's any number of ways to actually do this, one might be to have a feature in the map editor that takes the name of another map and adds map labels to indicate what hexes changed. It could also be a command accessible in debug mode when playing the game, or it could be an additional command-line argument (--diff [map1] [map2] ?) for the game. (It could be a standalone application but that's probably going to end up with much more work for you.)
  
=== <s> Make a preference to disable the "automatic moves" at the beginning of a turn </s> ===
+
https://github.com/wesnoth/wesnoth/issues/2323
  
There is already an option in the loadgame dialog to cancel all "planned" actions before loading your turn in SP. However it would also be nice esp. for MP to have a preference that would disable this behavior entirely, as for some players it can be quite frustrating.  
+
Note that the current status here is that a "map diff" tool now actually exists as a GitHub action that runs on pull requests with changed maps, although there are some bugs with it that could be fixed, and having a native "map diff" tool that runs as part of Wesnoth itself would fit the original request better.
  
See feature request here: https://gna.org/bugs/?9906
+
=== Add an option to not store replays ===
https://gna.org/bugs/?17195
 
  
Thanks to LovCAPONE for this.
+
As noted in https://wiki.wesnoth.org/SavefileWML all normal savefiles usually contain [replay] and [replay_start] tags that usually take over 50% of the total savefile size and are only used for providing the possibility to replay scenarios. It's be nice to have an option to skip these information to reduce the savefile size. Alternatively one could create a tool integrated in a load/savegame dialog to remove the replay information from a given savegame file.
  
=== <s> Make a "play single move" button in the replay viewer </s> ===
+
See the feature request https://github.com/wesnoth/wesnoth/issues/1457
  
This is an often requested feature. The idea is to have a third `play` button which plays until a move or attack command appears, then stops again.
+
== MP related features ==
  
https://gna.org/bugs/?9354
+
=== Add possibility to switch off mod dependency checking ===
 +
MP modifications can define dependencies. Currently there's no way to force a "broken" configuration, although overzealous use of the system by UMC authors could make this feature useful. Add an option to the MP game creation screen to switch on/off dependency checking. Ask lipk (forum)/lipkab (IRC).
  
Thanks to Zappaman for this.
+
https://github.com/wesnoth/wesnoth/issues/2324
  
== MP related features ==
+
=== Make a header for the add-on when we organize scenarios by add-on in the MP create dialog ===
  
=== Add possibility to switch off dependency checking ===
+
Using an established GUI technique to signal when one block of scenarios for an add-on ends and the next begins would make it much easier to use this dialog, if the user has several add-ons.
MP add-ons can define dependencies. Currently there's no way to force a "broken" configuration, although overzealous use of the system by UMC authors could make this feature useful. Add an option to the MP game creation screen to switch on/off dependency checking. Ask lipk (forum)/lipkab (IRC).
 
 
 
=== Make a header for the add-on when we organize scenarios by add-on in the mp create dialog ===
 
 
 
Using an established gui technique to signal when one block of scenarios for an add-on ends and the next begins would make it much easier to use this dialog, if the user has several add-ons.
 
  
 
See one proposal here:
 
See one proposal here:
https://gna.org/bugs/?21653
+
https://github.com/wesnoth/wesnoth/issues/1365
 
 
=== Make it possible to host a game which only registered players are allowed to join ===
 
  
See feature request here:
+
=== Timer pause button ===
https://gna.org/bugs/?14138
 
 
 
=== Timer Pause Button ===
 
  
 
Longstanding feature request here:
 
Longstanding feature request here:
https://gna.org/bugs/?16733
+
https://github.com/wesnoth/wesnoth/issues/1237
  
 
Request is for either a button, or a simple chat command like :pause, :unpause, to allow players to put the timer on hold if they are interrupted.
 
Request is for either a button, or a simple chat command like :pause, :unpause, to allow players to put the timer on hold if they are interrupted.
  
Ideally would be accompanied with a multiplayer-only scenario attribute "number_of_pauses" which decreases each time a client pauses the game. Pause should use a blindfold object to black out the screen, and send a chat message automatically when it occurs / resume occurs. For an example of how it might look, start a local hotseat mp game and enable the Preferences->General->Turn Dialog option. (This behavior introduced in this commit: https://github.com/wesnoth/wesnoth/commit/bab03d554bea92f1ce6f585ef1123202173a3491)
+
Ideally would be accompanied with a multiplayer-only scenario attribute "number_of_pauses" which decreases each time a client pauses the game. Pause should use a blindfold object to black out the screen, and send a chat message automatically when it occurs / resume occurs. For an example of how it might look, start a local hotseat mp game and enable the Preferences->General->Turn Dialog option. (This behavior was introduced in this commit: https://github.com/wesnoth/wesnoth/commit/bab03d554bea92f1ce6f585ef1123202173a3491)
  
Wintermute also has other ideas about how the timer should / could work. For example, instead of their client ending their turn, the networked opponents could be required to "confirm" the time out. (This is probably a networked mp-only idea.)
+
Wintermute/happygrue also has other ideas about how the timer should/could work. For example, instead of their client ending their turn, the networked opponents could be required to "confirm" the time out. (This is probably a networked MP-only idea.)
  
 
A very fancy implementation might instead of a counter, allow the other players to vote on whether a pause request is granted.
 
A very fancy implementation might instead of a counter, allow the other players to vote on whether a pause request is granted.
Line 77: Line 62:
 
Make sure that the paused client still responds to network commands, so that it is possible to kick a person who pauses and then doesn't ever unpause.
 
Make sure that the paused client still responds to network commands, so that it is possible to kick a person who pauses and then doesn't ever unpause.
  
== WML related features ==
+
=== Add a "concede" button ===
  
=== Side-specific results ===
+
Often times in mp, players concede the game before their leader is actually killed. When the game ends 'officially' the map is revealed, which can sometimes be instructive for the losing player. Additionally, it makes it easier to analyze the results of many games, for purposes of balancing, or for maintaining a ladder. So while it may seem small, this would actually be a pretty useful feature.
Giving result=defeat or result=victory for specific sides. ([http://gna.org/bugs/index.php?4960 FR #4960]) -- [[User:dlr365|dlr365]] -- patch submitted [https://gna.org/bugs/index.php?4960]
 
  
--[[User:Boucman|Boucman]] 08:58, 28 February 2010 (UTC) Patch seems abandonned, but can be used for further work feel free to take over the FR
+
There was a PR to fix this, but it never got merged due to being broken: https://github.com/wesnoth/wesnoth/pull/535
  
=== <s>Support for leaderless multiplayergames</s> ===
+
This could be implemented in lua.
Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. ([https://gna.org/bugs/index.php?8106 FR #8106])
 
  
Actually this was solved... will put a reference soon.
+
=== Show [options] values in the mp lobby gameslist ===
  
=== Support variable village healing, variable poison properties ===
+
It'd be useful for a newly-joining player to see the chosen [options] of a mp game, since most likely there isn't enough space we could for example wigher show the options via an extra dropdown button in the lobby or show them in the mp waiting dialog instead.
  
See a feature request here:
+
See the featurerequest https://github.com/wesnoth/wesnoth/issues/1514
  
https://gna.org/bugs/index.php?20919
+
== WML-related features ==
  
Suggested approach -- new read/writeable values in wesnoth.game_config:
+
=== Support variable poison properties ===
  
http://wiki.wesnoth.org/LuaWML:Misc#wesnoth.game_config
+
See a feature request here:
 
 
=== Support shuffled music playlist ===
 
 
 
https://gna.org/bugs/?19653
 
 
 
Zappaman - 20/07/2014
 
 
 
=== Support variable recall cost in wml ===
 
see https://gna.org/bugs/?16538
 
 
 
the syntax needs to be discussed and refined, but the overall idea is good
 
  
make sure to update whiteboard to handle this correctly
+
https://github.com/wesnoth/wesnoth/issues/1339
  
Ask Boucman
+
=== Events Manipulation ===
  
Aishiko 5 Mar 2014
+
* [event] persistent="yes" - creates an event that lasts for the rest of the campaign
 +
* [disable_event][/disable_event] disables the event within which it appears (useful with conditionals). A more complex take on first_time_only=yes/no.
 +
''This is largely possible with event IDs, but could be useful when multiple copies of an event should be floating around''
  
=== Other Ideas ===
+
https://github.com/wesnoth/wesnoth/issues/2326
See [[FutureWML]]; some ideas there are easier than others.
 
  
 
== Improvements to AI ==
 
== Improvements to AI ==
  
Note: not all of these might be simple tasks.  Talk to Crab or mattsc.
+
=== Existing bugs or undesirable features ===
  
* Add a cost function to the C++ path finding code that takes avoided hexes into account, that is, hexes defined in an [ai][avoid] tag onto which the AI never moves.  Also add an option to the Lua wesnoth.find_path() function with which using this cost functions can be turned on and off.
+
Most of these are probably relatively easy to fix, although we can, of course, not guarantee that.
**The background behind this task is the way how the default AI's move-to-targets candidate action works.  It does path finding for units without taking avoided hexes into account, and ''afterwards'' eliminates moves for which the end point falls onto an avoided hex.  As a result, some units might not move at all, even if it is, in principle, easily possible to move around an avoided area.  The inclusion of the new path-finding in the AI's move-to-targets phase could therefore be a follow-up task.
 
  
* Make the (old) simple aspect syntax work when the Lua engine is defined for a side.  Setting aspects in the [side] tag like this:
+
* Bug: Adding a candidate action mid-turn does not include it where it belongs in terms of its evaluation score. Instead, it gets added at the end of the candidate action list and might not be executed on the current turn, because other CAs with lower scores get evaluated first.
[ai]
 
    aggression=0.123
 
[/ai]
 
does not work if the Lua engine is defined. You either need to use the [aspect] tag in the [side] tag with 'engine=lua', or use the code above in a [modify_side] tag in an event.  Making the above syntax available (as it is with the c++ engine) would be nice.  The same also applies to the FAI engine and to aspects set for AI sides in MP games.
 
  
* Add a Lua function ai.get_individual_attacks() that returns all the single attacks the side can do (as opposed to attack combinations).  This needs to include an option to recalculate and take the current situation on the map into account (making the function believe that the game state has changed).
+
https://github.com/wesnoth/wesnoth/issues/2345
  
* Set up an option the allows us to exclude units from the move-to-targets phase similar to [filter_own] for the combat phase (other than setting ai_special=guardian, which has a number of other side effects). Actually, having this option for all CA's would be nice.
+
* Bug: ai.get_new_enemy_dst_src and related functions have several problems:
 
 
* Change the aspects "passive_leader", "passive_leader_shares_keep", "leader_ignores_keep" to work with multiple leaders. The idea is to change the type of those aspects from yes/no to string so both "passive_leader=yes" and "passive_leader=leader_id_1,leader_id_2" is possible.
 
 
 
* ai.get_new_enemy_dst_src and related functions have several problems:
 
 
** They use the current moves of the enemy units, which generally are all zero.
 
** They use the current moves of the enemy units, which generally are all zero.
 
** Hexes occupied by other enemy units count as not reachable.
 
** Hexes occupied by other enemy units count as not reachable.
**Units with zero moves are not listed at all, not even for the hex they are on.
+
** Working around this with a Lua wrapper makes this actually slower than ai_helper.get_enemy_dst_src, which makes the functions pretty much useless, as speed is the only thing speaking for them.
**Working around this with a Lua wrapper makes this actually slower than ai_helper.get_enemy_dst_src, which makes the functions pretty much useless, as speed is the only thing speaking for them.
 
 
 
* Add new options (keys or tags) to the Micro AIs.  As an example, some (but certainly not all) Micro AIs might benefit from taking some (but certainly not all) of the default AI aspects into account.
 
 
 
* Write a script that automatically changes WML from the deprecated [ai][target] to the new [ai][goal] syntax.  Ideally, this would be part of wmllint.
 
** There are [http://wiki.wesnoth.org/AiWML#Deprecated_AI_Targeting_Aspects more deprecated AI aspect] which should eventually be added to this, but the [target] -> [goal] change would be a good and important start.
 
 
 
== GUI related features ==
 
 
 
Although Mordante developed the new GUI system GUI2, some dialogs still use the older GUI1 and could be improved or transferred. You should contact Mordante on IRC before starting to work on these.
 
 
 
=== Theme Changes ===
 
 
 
* hide the hourglass item from the statusbar when there is no timer
 
 
 
=== Widget Changes ===
 
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud)<br>a GUI2 lobby is currently being developed, ask mordante whether this is still relevant
 
* input history (chat, commands, ..)
 
 
 
=== Add a lua interpreter dialog ===
 
  
When troubleshooting scenarios, one invaluable tool for WML developers is the gamestate inspector, which dumps all the contents of all the current variables. For scenarios written mostly in lua there is no equivalent system -- this is partly by design, in general no part of the scenario state should be saved to the lua environment because that is not saved in savegame files, nor can it be if we want the save file structure to be simple plaintext.
+
https://github.com/wesnoth/wesnoth/issues/2346
  
However, it is still quite common to use the :lua command repeatedly when debugging lua routines in a scenario, or debugging any scenario really. It would be nice if we could add a lua interpreter dialog with a text field where commands could be entered, and a text box where the results of "print" statements are redirected, similar to what one observes when using the standard lua interpreter from the command line. The advantage here would be that it runs in the wesnoth lua environment, and so it would actually be useful for debugging wesnoth scenario code.
+
== GUI2 features ==
  
== GUI2 related features ==
+
Although mordante developed a new GUI system, GUI2, some dialogs still use the older GUI1 and could be improved or transferred. mordante has since disappeared, leaving GUI2's core code unmaintained; shadowm and vultraz should be able to answer most GUI2 (and even GUI1) related questions in his absence.
GUI2 is the new gui engine Mordante/SkeletonCrew is working on.  
 
* Information on the wiki can be found here http://www.wesnoth.org/wiki/GUIToolkit
 
* The source code is under src/gui/
 
* The configuration config files are under data/gui/default
 
  
Some tasks need the --new-widgets since the code is only shown in the experimental mode. Tasks which need this switch have the * in the title.
+
* Information on the wiki can be found under [[GUIToolkit]] on the wiki.
 +
* The source code is under [https://github.com/wesnoth/wesnoth/tree/master/src/gui src/gui/]
 +
* All mainline GUI2 WML resides in [https://github.com/wesnoth/wesnoth/tree/master/data/gui data/gui/]
  
=== Port the random map generator dialog to GUI2 ===
+
* Make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud)
The map generator currently doesn't use the GUI2 framework, but there's no reason why it couldn't. Ask lipk (forum)/lipkab (IRC).
+
* The biggest feature yet to be converted to GUI2 is the in-game Help documentation (first available from the main screen).
 +
** There was an [https://github.com/wesnoth/wesnoth/pull/3653 initial effort to convert Help to GUI2], but appears to be pending on the implementation of a [https://github.com/wesnoth/wesnoth/issues/2687 rich-text label widget].
  
 
== Miscellaneous ==
 
== Miscellaneous ==
  
=== <s>More powerful village naming</s> ===
+
=== Debug mode ===
'''Adding mountain names and other features to village names, having a second random name in village names'''
 
  
Currently the village naming engine has a very good structure that could allow more powerful names to be generated.
+
* New debug command functionality (setting additional status.variables, possibly terrain)
Understanding how it works should be quite easy, and a few useful improvements could be added.
 
 
 
* Currently villages can use lake names and river names, this should be extended to other features like bridges, swamps, mountains etc...
 
* It would be nice to have a separate list of "first syllabus" and "last syllabus" for naming. That's not really needed in English, but some translations could use it
 
* Again, it is common to have villages with more than one "random" word in them. having a $name2 variable would be nice
 
 
 
Turns out this was already done, and should be removed.
 
 
 
=== Use friends list as a fallback for tab completion ===
 
 
 
Currently wesnoth will use the list of current players, lobby members, as candidates for tab completion of names when whispering. The OP requests that the friends list also be merged in, in case one of your friends whispered you. Even better, could also remember names of anyone who whispered you in the last hour.
 
 
 
https://gna.org/bugs/?9742
 
  
=== Debug Mode ===
+
=== woptipng / wesnoth-optipng ===
* New debug command functionality (setting additional status.variables, possibly terrain)
 
  
=== wesnoth-optipng ===
+
For lossless png compression we use woptipng, a script using an external toolchain (ImageMagick, OptiPNG, Advdef, oxipng). Perhaps the performance could be improved by using oxipng or PNGOut instead of advdef. This task includes:
For lossless png compression we use wesnoth-optipng, a script using an external toolchain (ImageMagick, OptiPNG, Advdef). Perhaps the performance could be improved by using PNGOut instead of advdef. This task includes
+
* a quick profiling of compression ratio and decompression speed for all relevant tools
* a quick profiling of compression ratio and decompression speed for both tools
+
* if it provides a higher compression while not significantly slowing down decompression, adapt woptipng to use PNGOut or oxipng (whichever makes more sense)
* if it provides a higher compression while not significantly slowing down decompression, adapt wesnoth-optipng to use PNGOut
+
* note that there is a separate repository for woptipng: [https://github.com/matthiaskrgr/woptipng https://github.com/matthiaskrgr/woptipng] (with its own issue tracker, etc.)
  
 
== Bugs ==
 
== Bugs ==

Latest revision as of 17:23, 29 April 2024

This page is outdated. For an up to date list of good starting issues, see here.

This page is here to document easy to do coding tasks. It is not here to double the feature request database, and should only be filled by people that know the code well enough to judge the difficulty of a given task.

If you are such a person, you should feel free to edit this page.

If you're not, you should post a feature request and discuss your idea on the forum or IRC or Discord. A coder with better knowledge of the code might give you the green light to add your feature here.

Anybody should feel free to add "clues" to any tasks, that is entry points, traps to avoid, person to contact to discuss and so on.

If you plan to work on a feature, write your name at the bottom of the feature, with the date. Note that if you are too long at working on a feature we'll "free" it back (that is if you're not working on it. If you have problems implementing it, just tell us....)

If none of these are to your liking, feel free to check our bug tracker with a broad spectrum of tasks.

Engine related features

Make a "map diff" tool to visualizes changes between two version of a map

Maintainers of maps often make small tweaks for balance purposes. For someone who doesn't know the map like the back of their hand it may be very difficult to spot exactly what changed. There isn't any really good way to do this right now -- using the 'diff' tool at command line doesn't give good results for .map files.

Such a tool would be helpful for someone who maintains a map pool containing maps made by others, also for someone who wants to browse a repository and examine balance changes on several maps, which could be instructive for someone who wants to make and balance their own maps.

There's any number of ways to actually do this, one might be to have a feature in the map editor that takes the name of another map and adds map labels to indicate what hexes changed. It could also be a command accessible in debug mode when playing the game, or it could be an additional command-line argument (--diff [map1] [map2] ?) for the game. (It could be a standalone application but that's probably going to end up with much more work for you.)

https://github.com/wesnoth/wesnoth/issues/2323

Note that the current status here is that a "map diff" tool now actually exists as a GitHub action that runs on pull requests with changed maps, although there are some bugs with it that could be fixed, and having a native "map diff" tool that runs as part of Wesnoth itself would fit the original request better.

Add an option to not store replays

As noted in https://wiki.wesnoth.org/SavefileWML all normal savefiles usually contain [replay] and [replay_start] tags that usually take over 50% of the total savefile size and are only used for providing the possibility to replay scenarios. It's be nice to have an option to skip these information to reduce the savefile size. Alternatively one could create a tool integrated in a load/savegame dialog to remove the replay information from a given savegame file.

See the feature request https://github.com/wesnoth/wesnoth/issues/1457

MP related features

Add possibility to switch off mod dependency checking

MP modifications can define dependencies. Currently there's no way to force a "broken" configuration, although overzealous use of the system by UMC authors could make this feature useful. Add an option to the MP game creation screen to switch on/off dependency checking. Ask lipk (forum)/lipkab (IRC).

https://github.com/wesnoth/wesnoth/issues/2324

Make a header for the add-on when we organize scenarios by add-on in the MP create dialog

Using an established GUI technique to signal when one block of scenarios for an add-on ends and the next begins would make it much easier to use this dialog, if the user has several add-ons.

See one proposal here: https://github.com/wesnoth/wesnoth/issues/1365

Timer pause button

Longstanding feature request here: https://github.com/wesnoth/wesnoth/issues/1237

Request is for either a button, or a simple chat command like :pause, :unpause, to allow players to put the timer on hold if they are interrupted.

Ideally would be accompanied with a multiplayer-only scenario attribute "number_of_pauses" which decreases each time a client pauses the game. Pause should use a blindfold object to black out the screen, and send a chat message automatically when it occurs / resume occurs. For an example of how it might look, start a local hotseat mp game and enable the Preferences->General->Turn Dialog option. (This behavior was introduced in this commit: https://github.com/wesnoth/wesnoth/commit/bab03d554bea92f1ce6f585ef1123202173a3491)

Wintermute/happygrue also has other ideas about how the timer should/could work. For example, instead of their client ending their turn, the networked opponents could be required to "confirm" the time out. (This is probably a networked MP-only idea.)

A very fancy implementation might instead of a counter, allow the other players to vote on whether a pause request is granted.

Make sure that the paused client still responds to network commands, so that it is possible to kick a person who pauses and then doesn't ever unpause.

Add a "concede" button

Often times in mp, players concede the game before their leader is actually killed. When the game ends 'officially' the map is revealed, which can sometimes be instructive for the losing player. Additionally, it makes it easier to analyze the results of many games, for purposes of balancing, or for maintaining a ladder. So while it may seem small, this would actually be a pretty useful feature.

There was a PR to fix this, but it never got merged due to being broken: https://github.com/wesnoth/wesnoth/pull/535

This could be implemented in lua.

Show [options] values in the mp lobby gameslist

It'd be useful for a newly-joining player to see the chosen [options] of a mp game, since most likely there isn't enough space we could for example wigher show the options via an extra dropdown button in the lobby or show them in the mp waiting dialog instead.

See the featurerequest https://github.com/wesnoth/wesnoth/issues/1514

WML-related features

Support variable poison properties

See a feature request here:

https://github.com/wesnoth/wesnoth/issues/1339

Events Manipulation

  • [event] persistent="yes" - creates an event that lasts for the rest of the campaign
  • [disable_event][/disable_event] disables the event within which it appears (useful with conditionals). A more complex take on first_time_only=yes/no.

This is largely possible with event IDs, but could be useful when multiple copies of an event should be floating around

https://github.com/wesnoth/wesnoth/issues/2326

Improvements to AI

Existing bugs or undesirable features

Most of these are probably relatively easy to fix, although we can, of course, not guarantee that.

  • Bug: Adding a candidate action mid-turn does not include it where it belongs in terms of its evaluation score. Instead, it gets added at the end of the candidate action list and might not be executed on the current turn, because other CAs with lower scores get evaluated first.

https://github.com/wesnoth/wesnoth/issues/2345

  • Bug: ai.get_new_enemy_dst_src and related functions have several problems:
    • They use the current moves of the enemy units, which generally are all zero.
    • Hexes occupied by other enemy units count as not reachable.
    • Working around this with a Lua wrapper makes this actually slower than ai_helper.get_enemy_dst_src, which makes the functions pretty much useless, as speed is the only thing speaking for them.

https://github.com/wesnoth/wesnoth/issues/2346

GUI2 features

Although mordante developed a new GUI system, GUI2, some dialogs still use the older GUI1 and could be improved or transferred. mordante has since disappeared, leaving GUI2's core code unmaintained; shadowm and vultraz should be able to answer most GUI2 (and even GUI1) related questions in his absence.

  • Information on the wiki can be found under GUIToolkit on the wiki.
  • The source code is under src/gui/
  • All mainline GUI2 WML resides in data/gui/
  • Make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud)
  • The biggest feature yet to be converted to GUI2 is the in-game Help documentation (first available from the main screen).

Miscellaneous

Debug mode

  • New debug command functionality (setting additional status.variables, possibly terrain)

woptipng / wesnoth-optipng

For lossless png compression we use woptipng, a script using an external toolchain (ImageMagick, OptiPNG, Advdef, oxipng). Perhaps the performance could be improved by using oxipng or PNGOut instead of advdef. This task includes:

  • a quick profiling of compression ratio and decompression speed for all relevant tools
  • if it provides a higher compression while not significantly slowing down decompression, adapt woptipng to use PNGOut or oxipng (whichever makes more sense)
  • note that there is a separate repository for woptipng: https://github.com/matthiaskrgr/woptipng (with its own issue tracker, etc.)

Bugs

See Also

NotSoEasyCoding

This page was last edited on 29 April 2024, at 17:23.