Latest Posts

Topic: "Northmen" Tribe Page

Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-10-14, 19:04

Nordfriese wrote:

When I made an enemy of the AI who started as my ally, it never attacked me although it was lots stronger than me. Bug?

I would say this is new functionality. I am not aware about way how to change team membership during the game. Is there any way?

So AI "reads" team membership once during initialization and remembers it. It has to be changed in the code....


Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-10-14, 20:27

@Nordfriese

I need a syntax for lua script that changes team of a player, I would like to test this functionality and probably there is no other way...


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

Team membership can be changed at any time using lua scripting. Just set

wl.Game ().players [x].team = y

So the AI needs to check its alliances at frequent intervals. But when attack bans can be set, I´ll probably replace all teams with temporary truces.


Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-10-14, 20:43

AI updates this infomation as needed, but not sooner then after 15 seconds and no more than after 60 seconds.


Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-10-14, 22:28

So I created the branch ai_small_requests, it compiles, team switching seem to work - it does not crash at least, but I did not have patience to watch the AI players if they really do what is expected. So please test it..


Top Quote
Nordfriese
Avatar
Topic Opener
Joined: 2017-01-17, 18:07
Posts: 1929
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2017-10-15, 13:36

I played a test game with this branch: No crashes or unexpected behaviour, and as soon as the AI became my enemy, it attacked and defeated me. All seems to work fine face-smile.png


Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2017-10-15, 19:16

Thanks, the branch waits for some other issue to be resolved and then I will propose merging it.


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-10-15, 23:11

thats very good news this will give a lot of advantages for scenario design
thanks to both of you for the idea and the solution
regards hessenfarmer


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: 2017-10-15, 23:56

Nordfriese wrote:

I played a test game with this branch: No crashes or unexpected behaviour, and as soon as the AI became my enemy, it attacked and defeated me. All seems to work fine face-smile.png

Maybe the new AI should train you a little bit more face-wink.png


Wanted to save the world, then I got widetracked

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 10:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2017-11-06, 16:36

I just managed to get a working install of widelands and started a run through of the scenario. I had to pause after I was given the warehouse and I could no longer load the save game.

Error message that tribe Frisians does not define building type "empire_warehouse".


Top Quote