Currently Online

Latest Posts

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

Arty
Avatar
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: 2823
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: 2823
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: 370
Ranking
Tribe Member
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: 1032
Ranking
One Elder of Players
Location: GER
Posted at: 2019-03-06, 21:42

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


“It's a threat to our planet to believe that someone else will save it.” - Robert Swan

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

bug report


Top Quote