Currently Online

Latest Posts

Topic: encyclopedia data doesn't match actual behaviour / inconsitent lua file

Arty
Avatar
Topic Opener
Joined: 2018-08-03, 12:14
Posts: 20
Ranking
Pry about Widelands
Posted at: 2018-08-12, 18:29

I noticed some info in an encyclopedia entry that doesn't match actual building behaviour. It matches an inconsistency in the lua file though, so am I correct to assume that encyclopedia entries for buildings etc. are automatically generated (at least partially) from the corresponding lua files (or maybe from the data generated by the lua files)?

The mentioned inconsistency is in the recent program version "master-3549-Release_x64" for the Frisian buidling "Training Camp". In short, the encyclopedia entry says that both health and defense training require Beer AND Bread while they actually require Beer OR Bread.

More detailed:

The encyclopedia entry lists as food requirements for both health training and defense training Smoked Fish or Smoked Meat | Beer | Bread (http://prntscr.com/khp55x), which is also what the lua file for the Training Camp lists in the parameter table of new_trainingsite_type:

   ["soldier health"] = {
      min_level = 0,
      max_level = 0,
      food = {
         {"bread_frisians"},
         {"beer"},
         {"smoked_fish", "smoked_meat"},
      },
      weapons = {
         "helmet",
      }
   },
   ["soldier defense"] = {
      min_level = 0,
      max_level = 0,
      food = {
         {"bread_frisians"},
         {"beer"},
         {"smoked_fish", "smoked_meat"},
      },
      weapons = {
         "fur_garment_studded",
      }
   },

This is different from what the lua file for the Training Camp lists in its programs table:

      upgrade_soldier_health_0 = {
         ...
         actions = {
            ...
            "consume=helmet bread_frisians,beer smoked_fish,smoked_meat",
            ...
         }
      },
      upgrade_soldier_defense_0 = {
         ...
         actions = {
            ...
            "consume=fur_garment_studded bread_frisians,beer smoked_fish,smoked_meat",
            ...
         }
      },

which - in both cases - is Smoked Fish or Smoked Meat | Beer or Bread.

Whether Beer AND Bread or Bear OR Bread is what it's supposed to be, one of those should be adjusted to match the other.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-08-13, 10:13

Good catch! face-smile.png

I have created a branch: https://code.launchpad.net/~widelands-dev/widelands/fix-frisian-trainingsites-food-help


Busy indexing nil values

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-08-16, 08:54

Fix has been merged with r8787. Thanks for reporting!


Busy indexing nil values

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2019-03-06, 20:06

The online encyclopedia for the frisian well has a wrong purpose text: https://wl.widelands.org/encyclopedia/frisians/buildings/frisians_well/


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 04:10
Posts: 2091
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-03-06, 21:42

face-grin.png ("[The well] cultivates reed that serves three different purposes for the Frisians").


Wanted to save the world, then I got widetracked

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2433
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2019-03-06, 22:15

bug report


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote