Latest Posts

Topic: scenario AI

kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-03-24, 06:38

I've changed the image and updated the branch. Use the command bzr pull in the folder where your branch is stored on your hard drive to get the changes face-smile.png


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

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2017-03-24, 09:12

@ GunChleoc and Tibor

As I live in a third world country where internet access for many is still only dial up, Apart from the time needed to d/l 4 Gb it would use most of my bandwidth for a month so is not an option especially as I only need to run the scenario in my game install to give feedback, advice and sometimes code snippets. I tried to grab the scenario online but could find no way to do that.


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

This reminds us how privileged we are in Europe.

Do you know how to use patch and diff? We could provide code diffs, this way you will only need to download a small text file, unless there are new images, which you will need to grab separately.


Busy indexing nil values

Top Quote
Ex-Member
Avatar
Joined: 2014-09-12, 09:53
Posts: 184
Ranking
Widelands-Forum-Junkie
Posted at: 2017-03-25, 09:33

I am quite happy testing with the file that hesssenfarmer sends me, life doe not need to be more complicated.

I tried a run throgh and most things went well, better than earlier versions, it was especially helpful as I found the second big site on the first island this time, the clue to move buildings AND rods was there but I rarley think of moving roads. The objectives got a bit muddled after I built my second expedition but that was my fault, from playing this so often I know gold will be a problem when I get to upgrading soldiers and I usually send the second expedition East to start clearing the stone fields to get to the gold there before the barbarians find it. The third expedition I send North West so I can get some more big sites for training grounds. This may not be a problem with new players as they will not know some of the tricks to playing this map, it will leave them with a problem of a gold shortage for training equipment,

The artifacts objective code looks rather complex and prone to typo's, if the is not an inbuilt function to return the total number of player buildings perhaps you should just check the number of ports and barracks => 5, as the barracks is not enabled until the destoy the enemy objective is given, by which time there should be three ports the player needs to build one more and the code should be easier to read. There is in any case a mismatched } in line 45/


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

@hessenfarmer: I implemented the functions that you requested, c.f.

https://bugs.launchpad.net/widelands/+bug/1675179

You weren't very specific on what you need for the economy, let me know if you need anything more.


Busy indexing nil values

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-03-26, 12:16

I have tried to fix the messages related to the artifacts and added code to scroll the map to where an artifact is found/uncovered.

Testing this is very hard, because every change to the lua files needs a complete new start of the game.... face-sad.png


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-03-26, 12:25

Maybe you can fake some of it by marking some objectives as done? Just comment them with NOCOM so that we won't accidentally commit the hacks to trunk when we're done.

Temporarily giving yourself a lot of starting resources can also speed up testing.

I have tested our already existing scenarios ad nauseam, so I feel your pain.

Edited: 2017-03-26, 12:26

Busy indexing nil values

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

Regarding testing: I adjusted the map or/and commented some code and run some functions over the scripting console to check my changes and soon get failures. But for a final test the whole game has to be run.

Tinker wrote:

The artifacts objective code looks rather complex and prone to typo's, if the is not an inbuilt function to return the total number of player buildings perhaps you should just check the number of ports and barracks => 5, as the barracks is not enabled until the destoy the enemy objective is given, by which time there should be three ports the player needs to build one more and the code should be easier to read.

This should be a decision of hessenfarmer.

There is in any case a mismatched } in line 45/

Couldn't find that.

There was a piece of Neptunes shrine which i couldn't reach (make it inside my border). So i modified the map a little bit to get a buildings space for a blockhouse.


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

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

wow this is amazing.
I just went for a last little skiing weekend just to come back and see all the progress that has been made. thnaks for all your effort. but this will take definitely the whole wek to check all of this out.

just some first thoughts 1. I chose the trigger for the artifacts objective to decouple it from the other objectives especially frm the build training infrastructure objective. So far it went well for me. Although I would be more than hapy to have a funtion to check for the total number of buildings of a player. So for the moment being I would keep it as it is.
2. the artifacts were all reachable on the map although you might need to build towers to reach them. But I'm quite happy with a blockhouse building spot as well. I assume it was the artifact on the island southwest of the starting island? could you please provide the coordinates where you made the change?
3. @Tinker where did you find gold in the east I never noticed there is some. Coordinates would be fine. I only mindfully provided little gold on the main island and on the southwest island in addition to the big mouintain on the northern island.
4. @ kaputtnik: did your improvements regarding the messages work?

thanks again for all your contribution
hessenfarmer


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-03-27, 23:26
  1. the artifacts were all reachable on the map although you might need to build towers to reach them. But I'm quite happy with a blockhouse building spot as well. I assume it was the artifact on the island southwest of the starting island? could you please provide the coordinates where you made the change?

The artifact i couldn't reach was on coordinate 92/13. I have tried to build towers to reach it, but i failed. So i adjusted the height to get a small building space on coordinate 91/18.

  1. @ kaputtnik: did your improvements regarding the messages work?

Yes face-smile.png Played a game with 10x speed until the end and all messages appear as they should, imho.

Currently i try to make a function count_buildings() to make the code a bit easier to read and less error prone, but this lua stuff is not easy.... face-upset.png

The new function to hide parts of the map is also very nice and i think it should be used here.


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

Top Quote