Latest Posts

Topic: Empire Mission 4

Tibor

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

hessenfarmer wrote:

if anybody knows a way to determine the state of enemy first seen by scriot

What do you mean with this?


Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2651
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-10-02, 10:34

Sorry
that was to late to be clear face-wink.png

What I need is the possibility to check if the player sees the enemy. This means that at least one field owned by the computer player (AI) is visible to the player.
hope this made things clearer.

regards hessenfsarmer


Top Quote
WorldSavior
Avatar
Joined: 2016-10-15, 03:10
Posts: 2094
OS: Linux
Version: Recent tournament version
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-10-02, 18:18

hessenfarmer wrote:

(PS: managed the map today in 10 hours gametime still making some mistakes, anybody to beat me? ;-))

I'm waiting until the scenario is a part of the game, then I would like to outplay you face-wink.png


Wanted to save the world, then I got widetracked

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2441
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-10-02, 18:51

hessenfarmer wrote:

What I need is the possibility to check if the player sees the enemy. This means that at least one field owned by the computer player (AI) is visible to the player.

This should be doable with player:reveal_fields

Search the files of scenarios to find examples face-smile.png


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

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2651
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-10-02, 19:43

As far as I know reveal_fields does exactly this revealing fields to the player. But that is not what I am searching for I need to have a function to determine when and where on the map the player made first contact withg the enemy.
Hope this would make things clearer. I will have a look to the documentation if I find an idea there.


Top Quote
stdh
Avatar
Joined: 2013-08-04, 21:05
Posts: 41
Ranking
Pry about Widelands
Posted at: 2017-10-02, 21:29

The documentation mentions a function Player:seen_field, and also sees_field. That should be useful.

I tried your scenario and I think it's very nice. Maybe I'll give more detailed feedback later.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2441
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-10-02, 21:37

stdh wrote:

The documentation mentions a function Player:seen_field, and also sees_field. That should be useful.

Yes, in combination with field:owner this might do the trick.


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

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2017-10-03, 20:59

Yep, those 2 functions should do it.


Busy indexing nil values

Top Quote
hessenfarmer
Avatar
Topic Opener
Joined: 2014-12-11, 22:16
Posts: 2651
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2017-10-03, 21:06

Thanks I scripted a little helper function using this two properties. Need to fix only a small bug will upload the solution then.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 1954
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2017-10-04, 21:40

I played the scenario now. It took me 9½ hours (having read the script before, so I knew what was about to happen and made no mistakes).

The first objective was to dismantle some buildings. I immediately built new buildings and the game didn´t go forward. Only a look in the script told me I had to dismantle my newly built quarries to complete the objective. This should be fixed.

The road system of the monastry is the least efficient I have ever seen, including all the stuff the AI ever came up with during my training rounds and in all my years of playing Widelands. Your initial-roads-algorithm could take a leaf out of Vesta´s book face-wink.png

When I conquered the monastry, I was warned that bad things might be about to happen. On the contrary – my economy flourished (I found the whole scenario quite easy, perhaps a bit too easy face-smile.png ); I like the earlier suggestion of Vesta setting some buildings on fire.

What is the point of seafaring here? I found a port space, but I had no reason to build a port and couldn´t build a shipyard. The AI did build a shipyard and a weaving mill, but I don´t know what for.

You asked for ideas about the reason for all this mess. Here are some random ideas for concepts:

  • The previous ruler of the Empire was bribed by the barbarians to keep his land inefficient; he was rewarded with gold and the promise he would not be attacked.

  • The ruler had somehow seriously upset the gods, and they drove him into madness which was mirrored in his way of governing.

  • Several rulers died mysteriously after short time in office (Anger of the gods? Poisoned by barbarians?), and no-one wanted to govern anymore, so there was nobody to take care of the economy.

  • The previous ruler has a personal grudge against Lutius; knowing his "enemy" was about to claim power from him, he did all he could to give him a hard time.

My summary after actually playing: It wouldn´t hurt for the scenario to be more difficult, but the challenges, ideas and storyline are the most interesting in all the campaigns. It was more fun to play than any other scenario, mainly because of the objectives which can´t be found in start-from-scratch missions. An excellent scenario face-smile.png


Top Quote