recursal/Fanatic-Fandom huggingface dataset:
ActionBuilding Class

Inherits: Action

## Contents

### Properties

building

buildingConfig

### Functions

init

process

resetPreview

rotate

update

updatePreview

visualReset

## Properties

### .building

```
Type: Building
[Read Only]

```

### .buildingConfig

```
Type: BuildingConfig
[Read Only]

```

## Functions

### init()

```
function **init**()

```

### process()

```
function **process**() -> boolean

```

### resetPreview()

```
function **resetPreview**()

```

### rotate()

```
function **rotate**()

```

### update()

```
function **update**(dt number)

```

### updatePreview()

```
function **updatePreview**(controller ActionController)

```

### visualReset()

```
function **visualReset**()

```
Apiary Class

Inherits: Building

## Functions

### calaculateHivesInApiary()

```
function **calaculateHivesInApiary**()

```

### createWindow()

```
function **createWindow**()

```

### generateFence()

```
function **generateFence**()

```

### generateResourceArea()

```
function **generateResourceArea**()

```

### getHivesInLength()

```
function **getHivesInLength**()

```

### getHivesInWidth()

```
function **getHivesInWidth**()

```

### init()

```
function **init**()

```

### isSizableBuilding()

```
function **isSizableBuilding**()

```

### load()

```
function **load**(saveData)

```

### onPivotsGeneration()

```
function **onPivotsGeneration**()

```

### onPrefabChange()

```
function **onPrefabChange**()

```

### onStateChange()

```
function **onStateChange**()

```

### save()

```
function **save**(saveData)

```

### updateIcons()

```
function **updateIcons**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```

### updateWork()

```
function **updateWork**(dt)

```

### updateWorker()

```
function **updateWorker**(w)

```
Life is Feudal: Forest Village Wiki/Section 1

**Welcome to the Official Life is Feudal: Forest Village Wiki!**
The comprehensive Life is Feudal: Forest Village wiki reference written and maintained by the players.
We are currently maintaining 1,215 pages (603 articles).
Please feel free to contribute by creating new articles or expanding existing ones.

**About Life is Feudal: Forest Village**
**Life is Feudal: Forest Village** is a game being created and developed by Forest Village Game. Forest Village is a medieval city-building survival strategy game

In the Forest Village you lead a group of people who set off in search of new lands. Your group has arrived in a boat carrying all resources necessary for survival – food, tools, clothes and construction materials. They will help the people to establish a new settlement and ensure its prosperity.

Begin construction of your village with a few houses. They will protect the settlers from bad weather and give them a place to cook food, take rest and warm up. Think over and plan the development of your settlement. Take care of inhabitants and do everything possible to provide them with everything they need.

The new lands are full of resources that you can use. Minerals will be used by the settlers to build and expand the city; meat, mushrooms and berries will satisfy hunger. Your workers can both collect resources from the surface, and extract them from the ground in mines and quarries.

Life is Feudal: Forest Village was launched on August 26th, 2016 for Steam. [Find more information about Life is Feudal: Forest Village]
Hoffnarrenkostüm II

Das Hofnarrenkostüm II ist ein Brustpanzer aus dem Hofnarr II-Set in Swag and Sorcery. Der Bauplan kann ausschließlich im Endlosen Abenteuer erbeutet werden. Die Herstellung der Rüstung erfolgt im Zauberladen mit mindestens blauer Seltenheit.

## Attribute

* 30-70 Rüstung (Attribut)
* 100-180 Gesundheit
* 1 Zufälliger Effekt

## Rüstungsset

Weitere Teile aus dem Hofnarr II-Set sind:

* Hofnarrenhut II
* Hofnarrenstiefel II

## Bilder

* Eddie mit Hofnarrenkostüm II
* Eddie komplettem Hofnarren II-Set
How to change start condition

Level creation occurs in several stages many of which you can change:

* First of all, game engine generates landscape by settings from the *New Game* window. You can set your own landscape through creation of custom map.
* Next, engine flattens out small area in the landing place. You can also change position and radius of this area in your map settings.
* At this point, script that named LevelDirector is performed. This is where default buildings and workers have created. You can change this behaviour as you like by overriding some of it functions.
* Finally, engine generates animals, trees and others resources on the map.
Animals

The following is a list of Animals in the game Forest Village.

Animals will also provide your settlement with hides that are necessary for tailors to make warm clothes that will protect people from winter frosts and autumn rains. Clothes are very important – without them inhabitants can get sick and even die in severe frosts.

The population of wild animals will significantly reduce in areas of excessive wood cutting. In bad weather animals can migrate and it will be difficult to track them down, which will inevitably lead to reduction of food stocks, therefore, do not focus on production of only one type of food.

## List of Animals

### Domestic animals

* Cow produces milk and meat eats Grass/Hay
* Chicken produces eggs and meat, eats Oats
* Sheep produce wool and meat, eats Grass/Hay
* Pig produce meat, eat Oats
* Donkey is used for transport, eats Grass/Hay
BuildingConfig

This is how typical BuildingConfig looks like:

```
fv.core.Apiary.config =
{
   name = "Apiary",
   totalBuildTimeSec = 55,
   buildTime = 11000,
   durability = 102400,
   resourceTimeSec = 91,
   logs = 6,
   stone = 0,
   clay = 0,
   ore = 0,
   hay = 2,
   maxBuilder = 1,
   damageIgnore = true,
   buildCellsOrientation = false,
   widthCells = 0,
   lengthCells = 0,
   foundationWidth = 3,
   foundationLength = 3,
   foundationOffsetX = 0,
   foundationOffsetY = 0,
   modelCenter = "1.9 1.7",
   actionRadius = 0,
   happiness = 20,
   class = "WORK",
   workTimeScale = 1,
   profession = "apiary",
   maxWorker = 1,
   allowAngle = 18,
   fireChance = 0,
   extinguishCount = 3,
   fireSpreadTimer = 15000,
   fireChanceBySpread = 0,
   fireRadius = 10,
   fireCheckTimer = 960000,
   hideInside = false,
   materialGroupPosIgnore = false,
   housesBarn = false,
   storedResource = false,
   capacity = 10000,
   doorPosition = "0 0",
   createTexture = 2,
   destroyTexture = -1,
   buildMaskTexture = "textures/BuildMask-field-diff.dds",
   workMaskScale = 4,
   icon = "GameLook1/iconapiary",
   burnedPrefab = "/models/house/beehive/bhv5.prefab",
   damagedPrefab = "/models/house/beehive/bhv5.prefab",
   destroyPrefab = "/models/house/beehive/bhv5.prefab",
   prefabSteps = {
       "/models/house/beehive/bhv1.prefab",
       "/models/house/beehive/bhv2.prefab",
       "/models/house/beehive/bhv3.prefab",
       "/models/house/beehive/bhv4.prefab",
       "/models/house/beehive/bhv5.prefab"
   },
   distToWell = 8,
   extinquishCountTime = 9,
   extinguishTime = 151,
   Tornado_durability = 10
}

```
Caravan Stables

**Caravan Stables** are one of the Buildings in the game Forest Village.

Stables allow for transporting Resources between Barns,Warehouses and the Market using  Donkeys.

Each stable can support up to 5 donkeys but is initially provided with only 1 (pregnant female?) donkey. In order for Donkeys to reproduce, a Donkey Farm is required.

Each working donkey can handle up to 8 regular routes for redistributing resources

To Create a route

1. Bring up the Caravan Window
2. Hit the + button to add a route
3. Select the commodity (or class of commodity) that you wish to transport
4. Select the "From" barn or shed by left clicking on it
5. Select the "To" barn by clicking on it.

To Cancel a route

1. Bring up the Caravan Window
2. Click on the asterisk button to the right of the route you wish to cancel

## See Also

* Building
* Donkey
* Donkey Farm
Castle academy Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### createWithChance()

```
function **createWithChance**(b_percent, UIDname, mat, prefabPath)

```

### createWithChanceOnGround()

```
function **createWithChanceOnGround**(b_percent, UIDname, mat, prefabPath)

```

### init()

```
function **init**()

```

### load()

```
function **load**(saveData)

```

### save()

```
function **save**(saveData)

```

### updateWork()

```
function **updateWork**(dt)

```

### updateWorker()

```
function **updateWorker**(w)

```
Blast furnace

Blast furnace is used to produce Steel, the main ingredient of Steel tools. To create steel you require 4 Ore and 4 Charcoal.

It should be noted that there is a flaw in the model design that can result in workers (and any passing through the structure) getting trapped and eventually starving to death.

With 9 Blast furnaces set-up in a grid and 3 sides blocked off (to prevent all but workers access), 5-12 villagers will die a year (12-60+ with no sides blocked off)...
FloatWindow Class

Inherits: Window

## Functions

### close()

```
function **close**()

```

### init()

```
function **init**(...)

```

### limitPosition()

```
function **limitPosition**()

```

### onActivated()

```
function **onActivated**()

```

### onClose()

```
function **onClose**()

```

### onCloseButtonClick()

```
function **onCloseButtonClick**(args)

```

### onCloseButtonDown()

```
function **onCloseButtonDown**(args)

```

### onDeactivated()

```
function **onDeactivated**()

```

### onDestroy()

```
function **onDestroy**()

```

### onEndDrag()

```
function **onEndDrag**()

```

### onHidden()

```
function **onHidden**()

```

### onMoved()

```
function **onMoved**()

```

### onPinClick()

```
function **onPinClick**()

```

### onStartDrag()

```
function **onStartDrag**()

```

### runAppearingAnimation()

```
function **runAppearingAnimation**()

```

### set3DPosition()

```
function **set3DPosition**(scenePos, heightOffset)

```

### setClipped()

```
function **setClipped**(value)

```

### setIcon()

```
function **setIcon**(iconName)

```

### setPinned()

```
function **setPinned**(value)

```

### setTitleColor()

```
function **setTitleColor**(color)

```

### setTitleText()

```
function **setTitleText**(text)

```

### update()

```
function **update**(dt)

```
(Daily) (Elite) Hunting rebels and deserters - Repeatable

## Description

This is an optional daily quest that you can take from the Mission Board which can be found in the Ithilis Fortress in Turimnan Valley.

*Acts of vandalism on this board will be considered treason against King Ronfraine III and will be punished to the full extent of Hakanas law.*

## Upon accepting

To complete this quest you will have to defeat a few elite mobs in the Deserter Habitat area of Turimnan Valley and collect 20 of their Ithilis Soldier Badges as proof of their death.

*Job Request to hunt Ithilis deserters and rebel officers hiding along with the refugees, bring me anything that will prove their defeat. A mark or token would be good. Complete the job and you will be rewarded handsomely.*

## Completion

Another job well done. Go back to Ithilis Fortress and talk to the commander in order to receive your reward.

*(Hands over the rebel's mark)*

*This marks, this is certainly the insignia of the kingdom. You did it! Those cowards...They won't need these marks anymore. You have served the kingdom well, and the job is complete, here is your reward soldier. Now safe travels!*

'
Fires

**Fires** are something that can occur and destroy your Buildings. It is possible to burn your entire City.

* However if there is a well nearby and sufficient people available to tote water the building MAY be saved.
* Clicking on the engulfed building will bring up a firefighting progress window

*This article is a stub. You can help Life is Feudal: Forest Village Wiki by expanding it.*
Field

The **Field** is one of the Buildings in the game Forest Village.

The Field allows you to grow several crops which produce food and resources:

## Standard Crops

* Flax: Used to make  Light Clothes in the weaver's workshop, in addition to wool =>  Warm Clothes.
* Grass: It is a renewable resource of hay, which is used as a building material in several buildings.
* Oats: Are used to feed chickens in the coops.
* Potato: It is a vegetable food, which is used to Bake Pies or feed on your villagers as it is.
* Wheat: Yields Grain which can be made into Bread and is needed to make flour at the mill which is used for  Baking pies.

## Size

To maximize the efficiency of your of your fields, it is recommended to design your farms considering the amount of farmers used in the field.

* The number needed is shown in GOLD when you are laying out the field
* 7 potatoes per a field, 3 of any others per a field. Therefore, 13x15 field will produce (13-2)x(15-2)\*7 = 11x13x7 = 1001 Potatoes or 429 of any others.
	+ Note: substract 2 from field length because fences occupy cells of periphery.
* For 1 farmer, the maximum field size is 11×17. It will produce 945 Potatoes or 405 of any other crops assuming one harvest per season.
* For 2 farmer, the maximum field size is 15×18. It will produce 1456 Potatoes or 624 of any other crops assuming one harvest per season.

* Other research has found that the following field sizes are optimal in terms of maximizing the amount of land that can be worked by each farmer.
* The feudal **"Are"** is 1/100th of a Hectare. (An Acre is .4 Hectares)

* For a **complete** chart of orchard & field sizes see Phono plays! Field Sizes chart

NOTE: for startup, build fields of size 13x14, adjacent to a house, barn and well; you will be able to harvest your whole field in time with a yield of approx. 900

## Hints

* A Scarecrow will improve the field's yield (growing rate).
* A nearby well will also improve yields as farmers can irrigate their crops more effectively.

## See also

* Buildings
* Scarecrow

## References

SteamCommunity forum: Resources Explained.

Phono plays! Tips and Tricks: Farming Guide for Life is Feudal: Forest Village

Phono plays! Fruit & Vegetable Growth Chart
AnimalConfig Class

## Contents

### Properties

ageDieFrom

ageDieTo

ageGrown

ageSlaughtering

animalsPerPastureCell

buttonId

collisionRadius

dieSound

fearPeople

foodResource

hunterPriority

kind

luaClass

modelRotateAngle

moveSpeed

name

prefabCount

productionTime

reproductionTime

resourcesOut

resourcesProduction

saddleManHeight

saddleWomanHeight

satietyCritical

satietyMax

satietyPerFood

satietyReduceTemperature

sphereCenter

sphereRadius

visionRadius

waterSatietyCritical

waterSatietyMax

waterSatietyPerWater

wild

### Functions

getPrefab

haveResourcesProduction

icon

## Properties

### .ageDieFrom

```
Type: number
[Read Only]

```

### .ageDieTo

```
Type: number
[Read Only]

```

### .ageGrown

```
Type: number
[Read Only]

```

### .ageSlaughtering

```
Type: number
[Read Only]

```

### .animalsPerPastureCell

```
Type: number
[Read Only]

```

### .buttonId

```
Type: string
[Read Only]

```

### .collisionRadius

```
Type: number
[Read Only]

```

### .dieSound

```
Type: string
[Read Only]

```

### .fearPeople

```
Type: boolean
[Read Only]

```

### .foodResource

```
Type: string
[Read Only]

```

### .hunterPriority

```
Type: number
[Read Only]

```

### .kind

```
Type: boolean
[Read Only]

```

### .luaClass

```
Type: string
[Read Only]

```

### .modelRotateAngle

```
Type: number
[Read Only]

```

### .moveSpeed

```
Type: number
[Read Only]

```

### .name

```
Type: string
[Read Only]

```

### .prefabCount

```
Type: number
[Read Only]

```

### .productionTime

```
Type: number
[Read Only]

```

### .reproductionTime

```
Type: number
[Read Only]

```

### .resourcesOut

```
Type: table
[Read Only]

```

### .resourcesProduction

```
Type: table
[Read Only]

```

### .saddleManHeight

```
Type: Vector2
[Read Only]

```

### .saddleWomanHeight

```
Type: Vector2
[Read Only]

```

### .satietyCritical

```
Type: number
[Read Only]

```

### .satietyMax

```
Type: number
[Read Only]

```

### .satietyPerFood

```
Type: number
[Read Only]

```

### .satietyReduceTemperature

```
Type: number
[Read Only]

```

### .sphereCenter

```
Type: Vector2
[Read Only]

```

### .sphereRadius

```
Type: number
[Read Only]

```

### .visionRadius

```
Type: number
[Read Only]

```

### .waterSatietyCritical

```
Type: number
[Read Only]

```

### .waterSatietyMax

```
Type: number
[Read Only]

```

### .waterSatietyPerWater

```
Type: number
[Read Only]

```

### .wild

```
Type: boolean
[Read Only]

```

## Functions

### getPrefab()

```
function **getPrefab**(num number) -> string

```

### haveResourcesProduction()

```
function **haveResourcesProduction**() -> boolean

```

### icon()

```
function **icon**() -> string

```
Hospital Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### createWithChance()

```
function **createWithChance**(b_percent, UIDname, mat, prefabPath)

```

### init()

```
function **init**()

```

### onBuildProgress()

```
function **onBuildProgress**()

```

### onLoaded()

```
function **onLoaded**()

```

### onStateChange()

```
function **onStateChange**()

```

### refreshModules()

```
function **refreshModules**()

```

### updateIcons()

```
function **updateIcons**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```

### updateWork()

```
function **updateWork**(dt)

```

### updateWorker()

```
function **updateWorker**(w)

```
(COMPLETE) Scheduled Maintenance - October 19, 2016

We will be performing a scheduled maintenance on Wednesday, October 19, 2016. We anticipate the maintenance to last approximately 4 hours. Please note that the estimated length of time for each maintenance is subject to change without notification.

Thanks for your patience!

**Time:**

October 19, 2016

* Pacific Daylight Time: 6:00 AM to 10:00 AM
* Eastern Daylight Time: 9:00 AM to 1:00 PM
* Central European Summer Time: 3:00 PM to 7:00 PM
* Australian Eastern Daylight Time: Midnight to 4:00 AM [October 20]

What will be unavailable:

All Riders of Icarus game servers.

Changes and Updates:

* Halloween theme added in Hakain's Crossing
	+ Halloween-themed Ellora's Shop and events added
* Blade mark now drops from field raid bosses in Tritael Rift
* Red Horn Galadoku Mark and Galadoku's Mark recipe drops from field raid bosses in Tritael Rift
	+ The Breach boss "Supreme Commander Izhora" will drop Galadoku's Mark recipe
* Field Raid bosses are immune to de-stabilizing attacks and take 75% less damage from mounted lances and crossbow attacks
* The Ellun Box(85) will continue to be available under the NX Plus tab in Ellora's Shop indefinitely.

Known Issues:

* Earnest Pumpkin head, Wailing Pumpkin Head, and Mischevious Pumpkin Head are mislabeled as 1 day items. They are 3 day items.
Coop

The **Coop** is one of the Buildings in the game Forest Village.

Chickens kept in the **Coop** produce meat and eggs.

* There are currently no upgrades for Coops.

## Size

As with fields, building a coop involves efficiency considerations.

* For 1 poultry farmer, the maximum coop size is 14×22, which will raise 45 chickens (Base Game).

## Hints

* At current production values 1 poultry farmer will produce more meat and eggs than they can carry to the barns at maximum flock size. Periodic reduction of the flock size will yield meat and eggs.

* If one uses the More Productive Animals Mod, a coop of 14x22 will house 67 chickens but they will produce more eggs and meat and require more oats and water than one farmer can carry. Periodic reduction of the flock size will yield meat and eggs. A smaller size is recommended.

* Once an area is assigned as coop, the land will became barren and has dark-mud-like color on the earth. This is a permanent change to the appearance of this area.
ConstructionWindow Class

Inherits: BuildingWindow

## Functions

### cacheValues()

```
function **cacheValues**(...)

```

### checkBuildingState()

```
function **checkBuildingState**()

```

### getConstructionResources()

```
function **getConstructionResources**()

```

### init()

```
function **init**(building, layoutName)

```

### onUpdate()

```
function **onUpdate**(dt)

```

### refreshInventory()

```
function **refreshInventory**()

```

### updateAtBuildingState()

```
function **updateAtBuildingState**()

```

### updateAtDestroyState()

```
function **updateAtDestroyState**()

```

### updateAtNeedDestroyState()

```
function **updateAtNeedDestroyState**()

```

### updateAtWorkingState()

```
function **updateAtWorkingState**()

```

### updateCancelUpgrade()

```
function **updateCancelUpgrade**()

```

### updateConstruction()

```
function **updateConstruction**()

```
How to add new resource

Let’s create mod that adding new resource to game. As an example, it will be a mod that allows make nails from ore and pig iron at smith and use it for construction some buildings. You can download the whole mod example at the end of article.

### Resources

1. First of all, create new Steam Workshop mod. Edit *icon.png* and *localization.csv* as you like.
2. Create imageset with 25x25 resource icon and place it in mod folder. Be sure, that you use full path to imagefile in your imageset and check it name. It is highly recommended to use for imageset the same name as your mod id.
3. Create \*.lua script.

### Code

Now let’s fill script.lua. Start by loading our imageset by filename:

```
loadImageset('937284520.imageset')

```

Then define our resource at *resParamsConfig*:

```
fv.core.resParamsConfig.nails
{
  weight = 1500,
  storageClass = "MATERIAL",
  sequence = 32,
  limitCategory = "LOGS\_CATEGORY",
  mine = 7000,
  icon = "937284520/nailIcon",
  prefab = "/models/resources/Wood\_stack\_01.prefab",
  transportPrefab = "/models/resources/Trans\_wood\_stack\_01.prefab",
  transportAnimation = "transport",
  visibleName = loc("nails")
}

```

You can start with one of exsiting resource config and edit some parameters. As you can see, we set *icon* to image from our imageset and set *visibleName* to nails record from our localization.csv by *loc* function.

Next step is editing *craftConfig* that contains information about all craft recipes. Add new record called *nailCraft* in it:

```
fv.core.craftConfig.nailCraft =
{
  resourceOut = "nails",
  resources = {
    pig_iron = 1,
    ore = 2
  },
  craftCount = 3,
  time = 4500,
  visibleName = loc("nails"),
}

```

Now you can add this craft recipe to existing craft building. For instance, to the smithy. Redefine *init* function of it. It is good practice to save original function and call it in start of overridden function:

```
local originalSmithyInit = fv.core.Smithy.init

function fv.core.Smithy:init()
  originalSmithyInit(self)
  self:addCraftRecipes("nailCraft")
end

```

Finally, add *nails* to price of some buildings:

```
fv.core.House_small1.config.price.nails = 3
fv.core.House_small1_2.config.price.nails = 3

```

That’s all.

### Further improvements

Well... it's not *really* all yet.

If you go back and check the code for *resParamsConfig*, then you'll notice, that our new ressource is still using the 3D model of the woodstack. You can of cause edit this (upload a new 3D model) so your new ressource actually looks different, too.

```
 prefab = "/models/resources/Wood_stack_01.prefab",
 transportPrefab = "/models/resources/Trans_wood_stack_01.prefab",

```

### Download

You can download the whole mod example here: [nails example].
LevelDirector

LevelDirector script is performed after landscape generation but before placing of animals, trees and other resources on the map. It is the best moment to create workers and buildings.

By default, LevelDirector generates base buildings and 10 people in the landing place. Landing place is small area that automatically flattens out to simplify building placing. But you can extend this area by modify heights of landscape if it needed through gameMap:setTerrainHeight function.

To change default behaviour of LevelDirector you need to override perform function in your mod:

```
function fv.core.LevelDirector:perform(transferData)
   self:initStartPlace() -- default behaviour. Change it as you like.
end

```

initStartPlace implemented like this:

```
function fv.core.LevelDirector:initStartPlace()
  local startPosition = gameMap:getStartPoint()
  self:createDefaultBuildings(startPosition)
  self:createDefaultCitizens(startPosition)
end

```

Another option is override only the function that you want to modify. For instance, createDefaultBuildings or createDefaultCitizens. Default versions of this function shown below:

```
function fv.core.LevelDirector:createDefaultCitizens(startPosition)
  self:createPeasant(startPosition, 10, 1,  false, false)
  self:createPeasant(startPosition, 10, 2,  false, false)
  self:createPeasant(startPosition, 10, 3,  true,  false)
  self:createPeasant(startPosition, 10, 4,  false, false)
  self:createPeasant(startPosition, 10, 16, true,  true)
  self:createPeasant(startPosition, 10, 19, false, true)
  self:createPeasant(startPosition, 10, 22, false, true)
  self:createPeasant(startPosition, 10, 25, true,  true)
  self:createPeasant(startPosition, 10, 28, false, true)
  self:createPeasant(startPosition, 10, 31, true,  true)
end

```

```
function fv.core.LevelDirector:createDefaultBuildings(startPosition)
  local barn = self:createBuilding('Barn', startPosition + Vec2(0, -5), 2)
  self:addResources(barn, {
      fruits = 100,
      fish = 700,
      firewood = 340,
      skin = 10,
      bread = 900,
      oat = 300,
      dress = 3,
      improve_dress = 3,
      improve_tool = 30
  })

  local warehouse = self:createBuilding('Warehouse', startPosition + Vec2(12, -5), 2)
  self:addResources(warehouse, {
      hay = 100,
      clay = 100,
      ore = 100,
      logs = 200,
      stone = 120
  })

  self:createBuilding('Well', startPosition + Vec2(-7.5, -1.5), 0)
  local shackOffsets = {
      Vec2(-11, 6),
      Vec2(-1, 6),
      Vec2(9, 6)
  }

  for offset in iter(shackOffsets) do
      local shack = self:createBuilding('Shack', startPosition + offset, 1)
      self:addResources(shack, {
          fruits = 60,
          fish = 60,
          firewood = 20
      })
   end
end

```
House2 Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### generateFence()

```
function **generateFence**()

```

### init()

```
function **init**()

```

### isConsume()

```
function **isConsume**(resName)

```

### onPrefabChange()

```
function **onPrefabChange**()

```

### onResourceChange()

```
function **onResourceChange**()

```

### onStateChange()

```
function **onStateChange**()

```

### onTimeout()

```
function **onTimeout**()

```

### refreshAnimation()

```
function **refreshAnimation**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```
Donkey Farm

The **Donkey Farm** is one of the Buildings in the game Forest Village.

It allows for Donkey breeding using Hay and Water to feed them.

 Donkeys can be used by the Caravan Stables.

Donkey farm requires 5 workers by default, however if Hay and Water are nearby reducing this to 1 worker doesn't impact the functionality.

## Hint

* Donkeys are obtainable by building Caravan Stables or through expeditions via a Port.
* Donkeys in farms are susceptible to animal attacks so be sure your farm is protected by a nearby hunter.
* Apparently Donkeys (like Tribbles) are born pregnant. Only 1 donkey is required for donkeys to reproduce.
* Donkeys which have spent time on a Donkey Farm have been known to reproduce between trips at the Caravan Stables

## See Also

* Building
* Donkey
* Caravan Stables
Highlight

```
function a(b, c)
    if self.countLabel then
        local visible = self:getCurrentProductName() ~= nil
        self.countLabel:setVisible("efefe")
        if visible then
            self.countLabel:setText(curRes)
        end
    end
    return 0 -- efef
end

```

```
function a(b, c)
    if self.countLabel then
        local visible = self:getCurrentProductName() ~= nil
        self.countLabel:setVisible("efefe")
        if visible then
            self.countLabel:setText(curRes)
        end
    end
    return 0 -- efef
end

```

```
function a(b, c)
    if self.countLabel then
        local visible = self:getCurrentProductName() ~= nil
        self.countLabel:setVisible("efefe")
        if visible then
            self.countLabel:setText(curRes)
        end
    end
    return 0 -- efef
end

```
(Event)(Daily) The Eternity List

### **Quest Text**

"The lake is riddled with a lot of death and corruption and it's getting really boring. How about you do some cleaning? Here's the list, go get'em."

### **Objective**

- Defeat Psychic Wraith (Eternal Sentry) 0/25

- Defeat Poelle 0/15

- Defeat Spirit Hunter (Eternal Sentry) 0/10

### **Completion Text**

"Nice! It's Cle... Nevermind, spoke too soon."

### **EXP/Reward Money**

**EXP:** 500

**Money:** 5 Silver

**Items:**  New Year PVP Trials Stub x2
Fisherman Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### generateResourceArea()

```
function **generateResourceArea**()

```

### init()

```
function **init**()

```

### onAnimation()

```
function **onAnimation**(dt)

```

### onEvent()

```
function **onEvent**(s, p1, p2)

```

### onHeightCalculation()

```
function **onHeightCalculation**()

```

### onStateChange()

```
function **onStateChange**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```

### updateWorker()

```
function **updateWorker**(w)

```
In-game console

Forest Village has in-game console for cheats and test mods.

Run game with "-console" key to enable console feature and press grave (~) during game:

Type any expression or function call at opened window and press Enter. It will be executed as normally lua script and result (or error) will be printed out to event log window of game.
Chicken pasture Class

## Contents

### Functions

createWindow

generateFence

generateResourceArea

init

onPrefabChange

updateIcons

updatePlayer

updateWorker

## Properties

### .sizableBuilding

```
Type: \_Class
[Read Only]

```

## Functions

### createWindow()

```
function **createWindow**() -> \_Class

```

### generateFence()

```
function **generateFence**() -> \_Class

```

### generateResourceArea()

```
function **generateResourceArea**() -> \_Class

```

### init()

```
function **init**() -> \_Class

```

### onPrefabChange()

```
function **onPrefabChange**() -> \_Class

```

### updateIcons()

```
function **updateIcons**() -> \_Class

```

### updatePlayer()

```
function **updatePlayer**(w \_Class, checkAction \_Class) -> \_Class

```

### updateWorker()

```
function **updateWorker**(w \_Class) -> \_Class

```
Classes

Forest Village introduces concept of Classes for lua. Is scripted in class.lua, file is inside "scripts/system folder" (you need to extract scripts.pak, see Package to know how to do it)

It is very similar for classes from any other programming language. Use this syntax to define custom class:

```
A = Class("A") *--// Define A class with class-name "A"*

function A:init(arg1, arg2)
   --// This is constructor function.
   --// It has been called at object's creation.
   --// It can has one or several arguments.
end

function A:fooBar(arg)
   --// Regular function of class.
end

```

Than you can create instance of this class and use it functions:

```
local instance = A(1, 2)
instance:fooBar(3)

```

Note that in both cases (define and call function) a semicolon character are used (instead of dot in some lua examples). The use of consistent notation is highly important to proper passing arguments. The difference is that with semicolon form instance will be passed to function along with other arguments. It is passed as hidden argument «self». You can access it in function body to call other functions or pass futher:

```
function A:func(arg1, arg2)
  globalFunction(self, arg2)
  self:fooBar(arg1)
end

```

Moreover, class instances can behaves like normal lua table. Create and read any custom fields if you need it for some reason:

```
self.customField = 44
self.customData = {
 name = "data",
 value = 44
}
print(self.customData.value)

```

### Inheritance

Classes supports inheritance. Check this out:

```
A = Class("A")

function A:function_a()
  print("function\_a")
end

B = Class("B", A) --// new class B that inherits A

function B:function_b()
  self:function_a() -- call inerited function
end

```

You can get base class of variable or class by «base» field. It is often useful if you override some function in inherited class but still want to call base version of function:

```
function A:fooBar(arg)
  print("A")
end

function B:fooBar(arg)
  B.base.fooBar(self, arg) --// call original A version of fooBar\*
  print("B") --// new logic
end

```

\* Note that in this case you are forced to use dot character and explicit pass self as first argument. This is one of the rare exceptions when semicolon syntax is imposible.
House small1 2 Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### init()

```
function **init**()

```

### isConsume()

```
function **isConsume**(resName)

```

### onBuildProgress()

```
function **onBuildProgress**()

```

### onPrefabChange()

```
function **onPrefabChange**()

```

### onResourceChange()

```
function **onResourceChange**()

```

### onStateChange()

```
function **onStateChange**()

```

### refreshAnimation()

```
function **refreshAnimation**()

```

### refreshModules()

```
function **refreshModules**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```
Game Menu

GameMenu is set of game control buttons organized in tree by groups and subgroups.

You can access to GameMenu by fv.core.GameMenu. The most interesting thing is model field of this class (fv.core.GameMenu.model).
Model represents button's hierarchy and can be modified at mod's loading time.

At low level model is just a tree of nodes. Where each node is a regular lua table that represents button and contains some fields such as: name, icon, tooltip, onClick, childs and some other. The main node is available by root field. So, you can inspect and modify tree manually:

```
local model = fv.core.GameMenu.model
for i, node in ipairs(model.root.childs) do
   if node.name == 'food' then
       table.remove(model.root.childs, i)
       break
   end
end

```

Model also provides some useful functions to adding new content.

```
local model = fv.core.GameMenu.model
model:regGroup("decorations", "GameLook1/iconDecor", "@btnDecorate@")
model:regBuilding(Pointer1, "decorations.pointer1", "GameLook1/iconpointer1", "@pricePointer1@")

```

### regGroup()

```
function MenuModel:regGroup(fullName, icon, tooltip, priority)

```

Function for adding group button (that contains other buttons).

* fullName is name of group. If it is nested group it must include full path. For instance, "decorations.flowers".
* icon is name of icon for button.
* tooltip is tooltip message for button.
* priority is optional number. It is used for order buttons inside group. Can be fractional.

### regButton()

```
function MenuModel:regButton(fullName, icon, tooltip, priority, onClick, isSelectedFunc)

```

Function for adding button (end node).

* fullName is name of button. It must include full path. For instance, "decorations.flowers.rose".
* icon is name of icon for button.
* tooltip is tooltip message for button.
* priority is optional number. It is used for order buttons inside group. Can be fractional.
* onClick is function that will be called on button click.
* isSelectedFunc is function that check is button highlighted (return true or false).

### regBuilding()

```
function MenuModel:regBuilding(building, fullName, icon, tooltip, priority)

```

Function for adding building button.

* building is building Class. Alternatively you can pass list of classes for random selection in game. Possible syntax:
	+ Scarecrow1
	+ {Scarecrow1, Scarecrow2}
	+ "Scarecrow1,Scarecrow2"
* fullName is name of button. It must include full path. For instance, "houses.cottage".
* icon is name of icon for button.
* tooltip is tooltip message for button.
* priority is optional number. It is used for order buttons inside group. Can be fractional.
GameInfo Class

## Contents

### Properties

availableAnimals

availablePlants

availableTrees

climatType

ecosystemTimeCoeficient

landSize

levelCode

resourcesBlockStates

resourcesLimits

resourcesStored

startGameInfo

tutorial

### Functions

addStoredResource

checkLandSize

getCategoryLimit

getCategoryLimitStored

getResourceLimit

getResourceStored

isAvailableAnimals

isAvailablePlant

isAvailableTree

isResourceBlocked

setAvailableAnimal

setAvailablePlant

setAvailableTree

setCategoryLimit

setResourceBlocked

setResourceLimit

updateStoredResources

## Properties

### .availableAnimals

```
Type: table
[Read Only]

```

### .availablePlants

```
Type: table
[Read Only]

```

### .availableTrees

```
Type: table
[Read Only]

```

### .climatType

```
Type: ClimatType
[Read Only]

```

### .ecosystemTimeCoeficient

```
Type: number
[Read Only]

```

### .landSize

```
Type: number

```

### .levelCode

```
Type: string
[Read Only]

```

### .resourcesBlockStates

```
Type: table
[Read Only]

```

### .resourcesLimits

```
Type: table
[Read Only]

```

### .resourcesStored

```
Type: table
[Read Only]

```

### .startGameInfo

```
Type: StartGameInfo

```

### .tutorial

```
Type: boolean
[Read Only]

```

## Functions

### addStoredResource()

```
function **addStoredResource**(srcName string, count number)

```

### checkLandSize()

```
function **checkLandSize**()

```

### getCategoryLimit()

```
function **getCategoryLimit**(srcName string) -> number

```

### getCategoryLimitStored()

```
function **getCategoryLimitStored**(category string) -> number

```

### getResourceLimit()

```
function **getResourceLimit**(srcName string) -> number

```

### getResourceStored()

```
function **getResourceStored**(srcName string) -> number

```

### isAvailableAnimals()

```
function **isAvailableAnimals**(type string) -> boolean

```

### isAvailablePlant()

```
function **isAvailablePlant**(type string) -> boolean

```

### isAvailableTree()

```
function **isAvailableTree**(type string) -> boolean

```

### isResourceBlocked()

```
function **isResourceBlocked**(srcName string) -> boolean

```

### setAvailableAnimal()

```
function **setAvailableAnimal**(type string, enable boolean)

```

### setAvailablePlant()

```
function **setAvailablePlant**(type string, enable boolean)

```

### setAvailableTree()

```
function **setAvailableTree**(type string, enable boolean)

```

### setCategoryLimit()

```
function **setCategoryLimit**(srcName string, limit number)

```

### setResourceBlocked()

```
function **setResourceBlocked**(resource string, state boolean)

```

### setResourceLimit()

```
function **setResourceLimit**(srcName string, limit number)

```

### updateStoredResources()

```
function **updateStoredResources**(dtGame number)

```
ActionSizableBuilding Class

Inherits: Action

## Contents

### Functions

init

onChangePoints

process

resetPreview

rotate

updatePreview

visualReset

## Properties

### .building

```
Type: Building
[Read Only]

```

## Functions

### init()

```
function **init**()

```

### onChangePoints()

```
function **onChangePoints**()

```

### process()

```
function **process**() -> boolean

```

### resetPreview()

```
function **resetPreview**()

```

### rotate()

```
function **rotate**()

```

### updatePreview()

```
function **updatePreview**(controller ActionController)

```

### visualReset()

```
function **visualReset**()

```
Forest Village Reference

AcademicTask

AcademyPage

ActionManager

AddBuffTask

AiTask

Animal

AnimalConfig

Animation

Apiary

Arrow

Bakery

Barn

BarnsList

BaseObject

Bathhouse

Bear

BindDonkeyTask

BreedAnimalTask

Bridge

Building

BuildingArea

BuildingConfig

BuildingPage

BuildingWindow

ButtonClickStep

CameraBase

CameraManager

CameraMoveStep

CancelActionStep

Carpenter

Castle\_academy

Castle\_accountant

Castle\_barn

Castle\_building

Castle\_building2

Castle\_building3

Castle\_building4

Castle\_gate

Castle\_gate2

Castle\_gate3

Castle\_market

Castle\_smithy

Castle\_stable

Castle\_tower1\_1

Castle\_tower1\_2

Castle\_tower1\_3

Castle\_tower2\_1

Castle\_tower2\_2

Castle\_tower2\_3

Castle\_wall

Castle\_wall2

Castle\_wall3

Cemetery

CemeteryPage

Chicken\_pasture

CityArea

Clay\_mine

ClearInventoryTask

Console

ConstructionPage

CraftBuilding

CraftConfig

CraftWithSmokeTask

Crypt1

DeltaStatisticPage

DiseaseConfig

Donkey

EatTask

EquipCartTask

EventStep

ExitActionsStep

ExpeditionPage

ExtinguishTask

Extra

ExtrasManager

FakeDepositTask

Fisherman

FloatWindow

Forester

ForestryPage

Fox

FuncStep

GC

Game

GameEventUidTask

GameGrowingResource

GameInfo

GameMap

GameMenu

GameResourceSource

GameTime

GardenHouse

Gatherer

GeneralPage

GlobalMeta

Grave

HarborWindow

HealTask

Hit

Hospital

Hostel

Hostel\_upgrade

House

House1

House1\_2

House2

House2\_2

House\_small1

House\_small1\_2

Human

HumanConfig

Hunter

IgnoreSurviveUpdateTask

IndexWrapper

InstructionStep

Inventory

KillTask

Kiln

Lamppost1

LandingInfo

LevelDirector

LiveObject

MDIWindow

MapInfo

MenuButtonStep

MenuModel

MenuPanel

Mill

MinePage

NewRoutePage

Ore\_mine

Ore\_mine\_upgrade

Page

Pasture

PasturePage

Peasant

Pet

Pivot

Plant

PlantCell

PlantConfig

PlantationPage

Playground

Pos2Dint

PredationTask

ProductionPage

Projectile

ProxyMatrix

PutToStorageStep

Quest

QuestFunctions

QuestManager

QuestStep

QuestStepsRegistrator

Rect2Dint

ResUnblockStep

ResidentsPage

ResourceConfig

ResourceOut

ResourceSourceConfig

ResourceStorage

ResourcesConfig

Road

SaveManager

Sawmill

Sawmill\_simple

Scarecrow1

Scarecrow2

Scenario

School

SchoolUpgrade

SelectPlantStep

SelectStep

SelectTabStep

Serializable

SetSpinnerStep

SetUnemployedStep

Shack

Shack2

SizeConfig

Smeltery

Smithy

Stable4

StablePage

StartExpeditionPage

StartGameInfo

StatisticPage

Statue

StepTask

Stone\_mine

StoragePage

StudyTask

SunParams

TabbedPane

Tailor

TakeDressTask

TakeToolTask

Task

Tavern

TechnologyConfig

ThrowTorchTask

Timer

TipsWindow

TooltipStep

Torch

TradePage

Trade\_fair

TransportWay

Traveler

TravelerExpedition

TravelerShip

UID

UpdateManager

UpgradeClickStep

UpgradePage

UseAbilityStep

Vector2

Vector3

Vector4

Viking

VikingShip

VisitorsPage

WaitHouseResStep

Warehouse

Well

WellPage

WildAnimal

Window

WindowGame

WindowManager

Witch\_doctor

Wolf

WorkerWindow

WorkersPage

\_M
Castle smithy Class

Inherits: CraftBuilding

## Functions

### createWindow()

```
function **createWindow**()

```

### createWithChance()

```
function **createWithChance**(b_percent, UIDname, mat, prefabPath)

```

### init()

```
function **init**()

```

### onBuildProgress()

```
function **onBuildProgress**()

```

### onLoaded()

```
function **onLoaded**()

```

### onStateChange()

```
function **onStateChange**()

```

### refreshModules()

```
function **refreshModules**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```

### updateWorker()

```
function **updateWorker**(w)

```
Castle wall2 Class

Inherits: Building

## Functions

### createGrass()

```
function **createGrass**(prefabname)

```

### createShield()

```
function **createShield**(prefabname, X, Y, Z)

```

### createWindow()

```
function **createWindow**()

```

### createWood()

```
function **createWood**(prefabname, angle, X, Y, Z)

```

### createWoodSmall()

```
function **createWoodSmall**(prefabname, angle, X, Y, Z)

```

### init()

```
function **init**()

```

### onBuildProgress()

```
function **onBuildProgress**()

```

### onStateChange()

```
function **onStateChange**()

```

### refreshModules()

```
function **refreshModules**()

```
Diseases

The following is a list of diseases in the game Forest Village.

The diet of your inhabitants should be diversified; it will strengthen their health and immunity. If people eat only meat or only vegetables, their immunity will be weaker, which may lead to frequent diseases. An herb doctor collects medicinal herbs in the woods; he will cure mild diseases. And a doctor in an infirmary (Healer's shop) will help to cope with more serious diseases.

## List of diseases

### Light diseases

* Avitaminosis
* Pneumonia

### Heavy diseases

* Plague
* Rabies
Carpenter's shop

The **Carpenter's shop** is one of the Resource Gathering Buildings in the game Forest Village

The Carpenter's shop produces Primitive tools from Logs and Stone.

* The Carpenter's Shop employs 2 workers at the most.
* Primitive tools are the most basic tools in the game.

* The Carpenters shop currently has no upgrade.
House1 Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### generateFence()

```
function **generateFence**()

```

### init()

```
function **init**()

```

### isConsume()

```
function **isConsume**(resName)

```

### onPrefabChange()

```
function **onPrefabChange**()

```

### onResourceChange()

```
function **onResourceChange**()

```

### onStateChange()

```
function **onStateChange**()

```

### onTimeout()

```
function **onTimeout**()

```

### refreshAnimation()

```
function **refreshAnimation**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```
Clay mine

The **Clay mine** is one of the Buildings in the game Forest Village.

* A Mine is required to harvest the building resource Clay from the earth.
* When placing mines and quarries there is a resource map which shows Green zones high yield (Good) zones and red low yield (Bad) zones.
* The lifetime yield of the potential mine is also shown in the placement window.
* There are no upgrades currently available for mines.
Hostel Class

Inherits: Building

## Functions

### createWindow()

```
function **createWindow**()

```

### generateFence()

```
function **generateFence**()

```

### init()

```
function **init**()

```

### isConsume()

```
function **isConsume**(resName)

```

### onPrefabChange()

```
function **onPrefabChange**()

```

### onResourceChange()

```
function **onResourceChange**()

```

### onStateChange()

```
function **onStateChange**()

```

### onTimeout()

```
function **onTimeout**()

```

### refreshAnimation()

```
function **refreshAnimation**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```
Bakery Class

Inherits: CraftBuilding

## Functions

### createWindow()

```
function **createWindow**()

```

### generateResourceArea()

```
function **generateResourceArea**()

```

### init()

```
function **init**()

```

### onBuildProgress()

```
function **onBuildProgress**()

```

### onLoaded()

```
function **onLoaded**()

```

### onStateChange()

```
function **onStateChange**()

```

### refreshModules()

```
function **refreshModules**()

```

### updatePlayer()

```
function **updatePlayer**(w, checkAction)

```

### updateWorker()

```
function **updateWorker**(w)

```
Food

The following is a list of Food in the game Forest Village.

Food can be produced in Fields. Instruct your people to plant orchards, cultivate crops and raise livestock, they will continually refill your stocks of food, which is vital for the survival of the settlement. Fruit trees in orchards grow for many years; you need to take good care of them to ensure that you gather a rich crop every year without heavy expenditures.

Unlike orchards, fields need to be seeded every year. They give grain, corn and other crops every autumn. Don’t forget to harvest on time as cereals are a good supplement to the diet of your inhabitants.

Food has a  nutritional value measured in kcal. The higher that value the longer will your people be fed.

## List of food

 Alcohol

 Bread

 Eggs

 Fish

 Fish pie

 Flour

 Fruit

 Fruit pie

 Grain

 Honey

Honey pie

 Meat

 Meat pie

 Milk

 Vegetable pie

 Vegetables

 Alcohol

 Bread

 Eggs

 Fish

 Fish pie

 Flour

 Fruit

 Fruit pie

 Grain

 Honey

Honey pie

 Meat

 Meat pie

 Milk

 Vegetable pie

 Vegetables

## See also

* Resources
* Nutrition