EasyCoding

From The Battle for Wesnoth Wiki
Revision as of 22:44, 12 April 2013 by Mattsc (talk | contribs) (Debug Mode: add a task)

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 20:48, 3 October 2006 (CEST)


Since bugs are sometimes a good opportunity to get a first idea of the code, i will add some here that are easy to fix as soon as i stumble upon them (the one i had in mind is fixed already ;-).

--Yogi Bear, 28 February 2008 Reason for deletion: this seems to apply to a situation 5 years ago. Nobody seems to do this with current bugs.

MP related features

Add possibility to give reason for "ignore"

As per FR #16001 [1]

WML related features

Add support of [if] for [scenario]

As per FR #4539 [2] Reason for deletion: [show_if] is now supported in [objectives] tag, the original reason for this FR. Other tags for which this would be useful have those too by now. Are there any other reasons to keep this? The FR is marked as "won't fix".

Side-specific results

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

--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 for standalone multiplayer scenarios

There used to be support for standalone scenarios in the userdata tree, in reorganising the trees this feature got lost and an add-on is now required to add a scenario. Re-add this feature. It is probably a good idea to mirror the mainline multiplayer tree.


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 are simple tasks. Talk to Crab or mattsc.

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

  • 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. (This is not a simple task. Some first attempts to do it have been made, but work seems abandoned at the moment.)
  • Set up a capability for letting a custom AI choose what unit type a unit advances to at the time of leveling up.
  • Currently, setting goto_x, goto_y makes the unit go to that location in a straight line, even if that leads into a dead end. It would be nice to have this changed so that the unit uses the shortest possible path instead. All the pieces for this are in place, should be pretty easy to do.
  • A number of AI parameters (aspects) have been deprecated. Add deprecation messages for those. This also involves fixing the syntax of mainline campaigns that use deprecated parameters.
  • Add more replay-safe actions to the Lua AI actions. A first step could be to add an AI action (and add lua function to do that) to use a right-click menu item.

GUI related features


Note at the moment Mordante is working on a new GUI system, these changes will probably affect the way these items need to be implemented. Contact Mordante on IRC before starting to work on these.

--SkeletonCrew 14:04, 9 March 2008 (EDT)


Theme Changes

  • allow custom themes to display values of WML variables (FR #6209)
  • hide the hourglass item from the statusbar when there is no timer

Widget Changes

  • show side number, name and team association information in the status table
  • make games sortable in the lobby (open slots, total number of players, era, XP modifier, gold per village, fog/shroud)
  • input history (chat, commands, ..) - note: rujasu is working on this feature

Story Screen improvements

see http://www.wesnoth.org/forum/viewtopic.php?p=439346#p439346 for the suggestion and https://gna.org/patch/?1587 for a patch that already touched that area heavily

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.

At the moment there are no easy tasks available.

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 powerfull names to be generated. Understanding how it works should be quite easy, and a few usefull 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 sylabus" and "last sylabus" 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)
  • Add a right-click option in debug mode to kill the unit under the cursor

Add a cycle parameter to the unit animation WML

Animations have a "cycle" internal parameter that decides if the animation loops when it finishes.

Right now that parameter is decided purely by the engine depending on the circumstances, but it would make sense to move it to a frame paramter.

This task is mainly to add a new boolean parameter in the particle class and using/exposing it to WML in a way similar to a unit_frame

ask boucman for details

Bugs

See Also

NotSoEasyCoding