Difference between revisions of "EasyCoding"

From The Battle for Wesnoth Wiki
(Foreword)
(GUI related features)
Line 79: Line 79:
  
 
== GUI related features ==
 
== GUI related features ==
-------------------
 
  
Note at the moment Mordante is working on a new GUI system, these
+
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.
changes will probably affect the way these items need to be implemented.
 
Contact Mordante on IRC before starting to work on these.
 
 
 
--[[User:SkeletonCrew|SkeletonCrew]] 14:04, 9 March 2008 (EDT)
 
  
 
=== Theme Changes ===
 
=== Theme Changes ===
Line 92: Line 87:
  
 
=== Widget Changes ===
 
=== Widget Changes ===
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud)  
+
* make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud) -- a GUI2 lobby is currently developed, ask in advance
 
* input history (chat, commands, ..)
 
* input history (chat, commands, ..)
  

Revision as of 00:33, 27 February 2014

Foreword

We are currently in the process of updating this page. Parts marked by strikeout 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.

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.

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....)

--Boucman


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

MP related features

Add possibility to switch off dependency checking

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).

WML related features

Side-specific results

Giving result=defeat or result=victory for specific sides. (FR #4960) -- dlr365 -- patch submitted [1]

--Boucman 08:58, 28 February 2010 (UTC) Patch seems abandonned, but can be used for further work feel free to take over the FR

Support for leaderless multiplayergames

Add support for the WML key victory_when_enemies_defeated= in the scenario tag during multiplayergames. (FR #8106)

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

Ask Boucman

Other Ideas

See FutureWML; some ideas there are easier than others.

Improvements to AI

Note: not all of these might be simple tasks. Talk to Crab or mattsc.

  • Add option to take avoided hexes into account in wesnoth.find_path()
  • Make the (old) simple aspect syntax work when the Lua engine is defined for a side. Setting aspects in the [side] tag like this:
[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).
  • 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.
  • 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.
    • 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.
  • Clean up Micro AI candidate actions code. The Micro AIs were developed over quite a long period while we were trying to figure out how all of this works (and in part also by students participating in the Google Code-in project). As a result, the code in some of them is quite inconsistent, not cleaned up, uncommented (or wrongly commented), etc. Important notes:
    • This is not meant as a single task, but rather as a series of tasks, involving individual MAIs or sets of related MAIs. Please do not submit a pull request in which the code of all MAIs has been modified.
    • The Micro AIs are still being worked on pretty constantly, so if you are planning to work on this task, please let mattsc know (either on IRC or via forum PM), so that we can avoid conflicts as much as possible.
  • 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 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) -- a GUI2 lobby is currently developed, ask in advance
  • input history (chat, commands, ..)

GUI2 related features

GUI2 is the new gui engine Mordante/SkeletonCrew is working on.

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.

Port the random map generator dialog to GUI2

The map generator currently doesn't use the GUI2 framework, but there's no reason why it couldn't. Ask lipk (forum)/lipkab (IRC).

Miscellaneous

More powerful village naming

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. 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

Debug Mode

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

wesnoth-optipng

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 both tools
  • if it provides a higher compression while not significantly slowing down decompression, adapt wesnoth-optipng to use PNGOut

Bugs

See Also

NotSoEasyCoding