Latest Posts

Topic: New experimental tribe: Europeans

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-12-04, 17:49

I'll open this thread for all users who don't look into the German player forum. A year ago I wrote about a new tribe that I am developing. See also https://www.widelands.org/forum/topic/4732/

Originally it was just a "Supertribe", a combination / fusion of the buildings, wares and workers of the Atlanteans, Barbarians and Empire.

It has now developed into an independent tribe, which brings three additional wares (ore, rye and european bread).

The "ore" replaces iron and gold ore. It can be refined into both iron and gold and is mined in both iron and gold mines. The background to this change is the future introduction of more metals for new tools and weapons. So you don't have to invent new resources on the map in the game. The idea came to me through the barbarian bronze ax. Bronze is an alloy of copper and tin. Metals that are not available in the game. But an economy based on bronze would be interesting and realistic ... after all, there was a bronze age in comparison to stone ege and iron age.

Otherwise the basic orientation of the tribe is on the gameplay of "Empire Earth". So every building, with a few exceptions, can be upgraded to at least two advanced versions. Since I'm a bad graphic designer and also a little lazy, I adapted the buildings of the Barbarians, Atlanteans and the Empire for the Europeans. The barbarian buildings serve as the base building, the atlantean buildings as the first upgrade, and the empire buildings as the second upgrade.

In the following repository on Github you can view and download the current development status. -> https://github.com/MarkMcWire/widelands
I'm trying to keep the code up to date with the current master version.

It would be nice if some of you test the Europeans tribe and give me feedback here in the thread.

It's not finally done yet. Currently, the workers' upgrades still have to be incorporated. At the moment they all have a "build cost" instead of an experience upgrade. The building programs are also still in the middle of development. Apart from the Scouts House, no new buildings will be added in the near future. It has now cost me a week of work to convert the code from Build 21 to Build 22 (master) and introduce some improvements.

Edited: 2020-12-04, 17:57

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-12-04, 22:07

The workers are now all adjusted and are upgraded by experience points.

16 from basic to normal
24 from normal to advanced

Edited: 2020-12-04, 22:07

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-12-05, 22:54

I have now incorporated the Amazons' ability to terraform land into the Advanced Europeans Forester. Waited for the Terraform code to be finished. However, terraforming is much slower than that of the Amazons, so that the Europeans have only a minimal advantage. Costs 2 units of water per field segment to terraform.


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2020-12-13, 06:32

I revised the economy of the Europeans. I removed the bakery and the smokery and replaced them with a tavern/inn. The tavern produces rations and snacks, the inn produces meals from flour, water, fish and meat.

The smoked fish, smoked meat and european bread are omitted as wares. Since the Europeans already have more building types and larger space requirements than the other tribes, this change makes sense to me. The mill is preserved, even without bakery.

The European economy is very sluggish. It takes a long time until it starts up and you need a relatively large number of initial wares. However, the productivity is clearly superior to the other tribe. Once all building types exist and there are enough primary wares such as logs, ore, corn and water, many soldiers can be fully trained in a relatively short time.

Edited: 2020-12-13, 06:33

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-17, 14:20

My tribe are now complete with scouts house. And I have integrated a recruitement center (used the intermin headquarter graphics of barbarians for this), in which the workers are created.


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-24, 16:22

I've introduced a new feature for the European tribe. The time-dependent and more important ware-dependent activation of buildings. I've incorporated and tested it in the "Headquarters" starting condition and it works pretty well.
There is the AI hint "prohibited_till =", but in rare cases the AI ignores it or the effect is to small. Because its time-dependent but ignores the actual economical status. This leads to buildings being build or upgraded where it is not necessary, which means that building materials for other essential buildings are lacking and, in extreme cases, the entire economy can hang up.
Through the Lua script, I can tell that a certain building like charcoal will only be unlocked when there is enough log and at the same time there is a need for coal.
So you can control the economy of the AI very precisely. Better than the AI hints.

-- =======================================================================
--              Headquarters Starting Conditions for Europeans
-- =======================================================================

include "scripting/infrastructure.lua"
include "scripting/debug.lua"

push_textdomain("tribes")

init = {
   -- TRANSLATORS: This is the name of a starting condition
   descname = _ "Headquarters",
   -- TRANSLATORS: This is the tooltip for the "Headquarters" starting condition
   tooltip = _"Start the game with your headquarters only",
   func =  function(plr, shared_in_start)

   local sf = wl.Game().map.player_slots[plr.number].starting_field
   if shared_in_start then
      sf = shared_in_start
   else
      plr:allow_workers("all")
   end

   plr:forbid_buildings("all")
   plr:allow_buildings{"europeans_guardhouse", "europeans_tower", "europeans_castle", "europeans_port", "europeans_warehouse_basic"}
   plr:allow_buildings{"europeans_well_basic", "europeans_lumberjacks_house_basic", "europeans_foresters_house_basic", "europeans_quarry_basic", "europeans_reed_yard"}
   plr:allow_buildings{"europeans_fishers_house_basic", "europeans_hunters_house_basic", "europeans_gamekeepers_hut", "europeans_beekeepers_house", "europeans_farm_basic"}
   prefilled_buildings(plr, { "europeans_headquarters", sf.x, sf.y,
        wares = {
            water = 256,
            log = 256,
            granite = 64,
            coal = 64,
            planks = 64,
            reed = 64,
            cloth = 48,
            marble = 48,
            quartz = 48,
            iron = 32,
            corn = 32,
            grout = 32,
            brick = 32,
            spider_silk = 16,
            spidercloth = 16,
            diamond = 16,
        },
        workers = {
            europeans_carrier = 32,
            europeans_farmer_basic = 24,
            europeans_builder = 12,
            europeans_miner_basic = 12,
            europeans_trainer = 6,
            europeans_lumberjack_basic = 6,
            europeans_forester_basic = 4,
            europeans_carpenter_basic = 2,
            europeans_stonecutter_basic = 2,
            europeans_stonemason_basic = 2,
            europeans_charcoal_burner_basic = 2,
            europeans_hunter_basic = 2,
            europeans_fisher_basic = 2,
            europeans_fishbreeder = 2,
            europeans_miller_basic = 2,
            europeans_baker_basic = 2,
            europeans_smoker_basic = 2,
            europeans_brewer_basic = 2,
            europeans_breeder_normal = 2,
            europeans_weaver_basic = 2,
            europeans_smelter_basic = 2,
            europeans_smith_basic = 2,
            europeans_shipwright = 2,
            europeans_beekeeper = 1,
            europeans_gamekeeper = 1,
            europeans_geologist = 1
      },
        soldiers = {
            [{0,0,0,0}] = 32,
      }
   })
    for i = 1, 120 do
        -- Delay of 5 min between actions
        sleep(300000)
        
        -- Ware-dependent activation
        if plr:get_wares("marble") < 8 then
           plr:allow_buildings{"europeans_quarry_normal"}
        end
        if plr:get_wares("quartz") < 4 then
           plr:allow_buildings{"europeans_quarry_advanced"}
        end
        if plr:get_wares("diamond") < 4 then
           plr:allow_buildings{"europeans_quarry_advanced"}
        end
        if plr:get_wares("log") > 8 and plr:get_wares("planks") < 16 then
           plr:allow_buildings{"europeans_sawmill_basic"}
        end
        if plr:get_wares("log") > 16 and plr:get_wares("coal") < 8 then
           plr:allow_buildings{"europeans_charcoal_kiln_basic"}
        end
        if plr:get_wares("coal") > 8 and plr:get_wares("ore") > 8 and plr:get_wares("iron") < 8 then
           plr:allow_buildings{"europeans_smelting_works_basic"}
        end
        if plr:get_wares("water") > 8 and plr:get_wares("clay") < 16 then
           plr:allow_buildings{"europeans_clay_pit"}
        end
        if plr:get_wares("granite") > 8 and plr:get_wares("grout") < 16 then
           plr:allow_buildings{"europeans_lime_kiln"}
        end
        if plr:get_wares("clay") > 8 and plr:get_wares("brick") < 16 then
           plr:allow_buildings{"europeans_lime_kiln"}
        end
        if plr:get_wares("marble") > 8 and plr:get_wares("marble_column") < 4 then
           plr:allow_buildings{"europeans_stonemasons_house"}
        end
        if plr:get_wares("water") > 8 and plr:get_wares("reed") < 8 then
           plr:allow_buildings{"europeans_reed_yard"}
        end
        if plr:get_wares("water") > 8 and plr:get_wares("barley") < 8 then
           plr:allow_buildings{"europeans_farm_basic"}
        end
        if plr:get_wares("water") > 8 and plr:get_wares("corn") < 8 then
           plr:allow_buildings{"europeans_farm_level_1"}
        end
        if plr:get_wares("water") > 16 and plr:get_wares("blackroot") < 8 then
           plr:allow_buildings{"europeans_farm_level_2"}
        end
        if plr:get_wares("water") > 32 and plr:get_wares("fruit") < 8 then
           plr:allow_buildings{"europeans_farm_level_3"}
        end
        if plr:get_wares("corn") > 8 and plr:get_wares("spider_silk") < 8 then
           plr:allow_buildings{"europeans_spiderfarm"}
        end
        if plr:get_wares("blackroot") > 8 and plr:get_wares("wool") < 8 then
           plr:allow_buildings{"europeans_sheepfarm"}
        end
        if plr:get_wares("reed") > 16 and plr:get_wares("cloth") < 16 then
           plr:allow_buildings{"europeans_weaving_mill_basic"}
        end
        if plr:get_wares("spider_silk") > 8 and plr:get_wares("spidercloth") < 8 then
           plr:allow_buildings{"europeans_weaving_mill_normal"}
        end
        if plr:get_wares("wool") > 8 and plr:get_wares("armor") < 8 then
           plr:allow_buildings{"europeans_weaving_mill_advanced"}
        end
        if plr:get_wares("barley") > 8 and plr:get_wares("beer") < 8 then
           plr:allow_buildings{"europeans_brewery_basic"}
        end
        if plr:get_wares("barley") > 8 and plr:get_wares("mead") < 8 then
           plr:allow_buildings{"europeans_brewery_normal", "europeans_beekeepers_house"}
        end
        if plr:get_wares("grape") > 8 and plr:get_wares("fruit") > 8 and plr:get_wares("wine") < 8 then
           plr:allow_buildings{"europeans_brewery_winery", "europeans_brewery_advanced"}
        end
        if plr:get_wares("rye") > 8 and plr:get_wares("wheat") > 8 and plr:get_wares("flour") < 8 then
           plr:allow_buildings{"europeans_mill_basic"}
        end
        if plr:get_wares("flour") > 8 and plr:get_wares("meat") > 8 and plr:get_wares("ration") < 8 then
           plr:allow_buildings{"europeans_tavern_basic", "europeans_tavern_level_1", "europeans_tavern_level_2"}
        end
        if plr:get_wares("flour") > 8 and plr:get_wares("meat") > 8 and plr:get_wares("snack") < 8 then
           plr:allow_buildings{"europeans_tavern_level_3", "europeans_tavern_level_4", "europeans_tavern_level_5"}
        end
        if plr:get_wares("flour") > 8 and plr:get_wares("meat") > 8 and plr:get_wares("meal") < 8 then
           plr:allow_buildings{"europeans_inn_basic", "europeans_inn_level_1", "europeans_inn_level_2"}
        end
        if plr:get_wares("beer") > 8 and plr:get_wares("ration") > 8 and plr:get_wares("coal") < 8 then
           plr:allow_buildings{"europeans_coalmine_basic", "europeans_coalmine_level_1", "europeans_coalmine_level_2"}
        end
        if plr:get_wares("beer") > 8 and plr:get_wares("ration") > 8 and plr:get_wares("iron") < 8 then
           plr:allow_buildings{"europeans_goldmine_basic", "europeans_goldmine_level_1", "europeans_goldmine_level_2", "europeans_ironmine_basic", "europeans_ironmine_level_1", "europeans_ironmine_level_2"}
        end
        if plr:get_wares("mead") > 8 and plr:get_wares("snack") > 8  and plr:get_wares("coal") < 8 then
           plr:allow_buildings{"europeans_coalmine_level_3", "europeans_coalmine_level_4"}
        end
        if plr:get_wares("mead") > 8 and plr:get_wares("snack") > 8 and plr:get_wares("iron") < 8 then
          plr:allow_buildings{"europeans_goldmine_level_3", "europeans_goldmine_level_4", "europeans_ironmine_level_3", "europeans_ironmine_level_4"}
        end
        if plr:get_wares("wine") > 8 and plr:get_wares("meal") > 8 and plr:get_wares("coal") < 8 then
           plr:allow_buildings{"europeans_coalmine_level_5"}
        end
        if plr:get_wares("wine") > 8 and plr:get_wares("meal") > 8 and plr:get_wares("iron") < 8 then
           plr:allow_buildings{"europeans_goldmine_level_5", "europeans_ironmine_level_5"}
        end

        -- Time-dependent activation
        if i > 12 then
           plr:allow_buildings{"europeans_smithy_basic", "europeans_smithy_level_1", "europeans_smithy_level_2", "europeans_recruitement_center_basic", "europeans_ferry_yard_basic", "europeans_shipyard_basic"}
        end
        if i > 24 then
           plr:allow_buildings{"europeans_sawmill_normal", "europeans_charcoal_kiln_normal", "europeans_smelting_works_normal", "europeans_mill_normal", "europeans_well_normal", "europeans_scouts_house_basic"}
        end
        if i > 36 then
           plr:allow_buildings{"europeans_smithy_level_3", "europeans_trainingscamp_basic", "europeans_labyrinth"}
        end
        if i > 48 then
           plr:allow_buildings{"europeans_smithy_level_4", "europeans_smithy_level_5", "europeans_smithy_level_6", "europeans_guardhall", "europeans_trainingscamp_normal", "europeans_arena"}
        end
        if i > 60 then
           plr:allow_buildings{"europeans_smithy_level_7", "europeans_smithy_level_8", "europeans_smithy_level_9", "europeans_dungeon", "europeans_trainingscamp_advanced", "europeans_colosseum"}
        end
        if i > 72 then
           plr:allow_buildings{"europeans_sawmill_advanced", "europeans_charcoal_kiln_advanced", "europeans_smelting_works_advanced", "europeans_mill_advanced", "europeans_well_advanced"}
        end
        if i > 84 then
           plr:allow_buildings{"europeans_lumberjacks_house_normal", "europeans_foresters_house_normal", "europeans_hunters_house_normal", "europeans_fishers_house_normal", "europeans_scouts_house_normal", "europeans_shipyard_normal"}
        end
        if i > 96 then
           plr:allow_buildings{"europeans_lumberjacks_house_advanced", "europeans_foresters_house_advanced", "europeans_hunters_house_advanced", "europeans_fishers_house_advanced", "europeans_scouts_house_advanced", "europeans_shipyard_advanced"}
        end
        if i > 108 then
           plr:allow_buildings("all")
        end 
    end
end
}
pop_textdomain()
return init
Edited: 2021-01-24, 19:50

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2726
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-01-24, 19:50

the idea is nice however it increases the potential for deadlocks. Eg when there is no coal but you don't have more then 8 logs but lets say 7 you might want to have a charcoal kiln just to get that one coal for the next tool urgently needed. Further more if a human player is to play with this SC the games get pretty linear and monotonic.
Another point is that this is depenmdent that a player or an AI stockpiles some wares which is not efficient in terms of gameplay. especially for "higher" wares which are made from basic wares.

Additionally this might be very map dependent. on some maps it is pretty good on others it might be a deadock.


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-24, 19:58

The SC ist only for AI use and recommend not to used to play by human player. I've remove all "prohibited_till" AI Hints for my trainings- and productionssites.

Edited: 2021-01-24, 20:01

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2726
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-01-24, 20:03

I believe the problem for you is that the upgrade code in the AI is not that advanced then the rest and your tribe uses upgraded building very heavily. so this might be an interim fix for your tribe but I really would vote for improving the Ai Code to deal with upgradeable buildings. In general lua is much to slow to implement to much functionality


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 21:06
Posts: 341
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2021-01-24, 20:14

The problem is, that the AI is completely drowning and everytime loses the game. The AI consumes the wares in an almost uncontrolled manner and upgrades its building at random, which means that there is a very strong shortage of building materials at the beginning. In addition, it takes at least 6-8 hours of play until the AI has the necessary structures and wares to train its soldiers. That's why, compared to the other tribes, I start with huge amounts of building materials. However, a human player can be totally superior due to the large amount of starting wares required for the AI.

Edited: 2021-01-24, 20:20

My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote