Currently Online

Latest Posts

Topic: auto_speed problem

hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2646
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2021-12-05, 22:16

actual speed is displayed in the status bar which is in the bottom now. look in the left corner.
Why should game().is_auto_speed() should have been broken?


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2021-12-06, 15:46

I had a feeling that command line is not parsed properly, but indeed it works.

Indeed, when I manually increase the speed, the new entry with speed occurs, so yes, it is there.... I did not know


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

glad to hear it is working.
I fiddled a bit with the numbers to achieve higher gamespeeds. Gamespeed is leveled in latest comit around 13x-15x. Do you remeber what gamespeeds were achievable on average with the old versions based on fps


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2021-12-06, 16:09

Well, I did not said it worked face-smile.png

I am POSITIVE that game().is_auto_speed() returns NO, even if CLI argument is properly parsed.

Maybe the problem is how I run it. I have savegames of single player games and load them like:

widelands --autosave=50000 --loadgame=/home/tibor/.widelands/save/crossing_barb.wgf --script=/home/tibor/.widelands/scripting/125min_extra_res.lua --datadir=/var/widelands2/git/trunk/data --nosound --auto_speed --ai_training --verbose

So either:

* we will enable auto speed in single player game
* or perhaps there is a way how to start network game, with all slots AI

What do you think? The second option would be better, because It would not require preparation of savegames


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-12-06, 16:14

auto_speed only works in multiplayer, --loadgame starts a singleplayer game


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2021-12-06, 16:21

Yes, this matches my observations.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1928
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2021-12-06, 16:22
  • or perhaps there is a way how to start network game, with all slots AI

Just create a game template and use --new_game_from_template, see https://github.com/widelands/widelands/pull/4884


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2021-12-06, 16:32

I will investigate


Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2021-12-06, 16:34

How can I pass custom lua script?

EDIT: I presume that I can use --script parameter

Edited: 2021-12-06, 16:41

Top Quote
Tibor

Topic Opener
Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2021-12-06, 16:57

--new_game_from_template=/var/widelands2/TRAINING/template1.txt

Is this OK? Or is there prescribed location where the template should be. I am getting:

[00:00:00.589 real] WARNING: There's no configuration file, using default values.
terminate called after throwing an instance of 'WException'
  what():  [/var/widelands2/git/trunk/src/io/profile.cc:603] in "template1.txt" section [global] not found

I put it also in data/templates/ and the same result

Edited: 2021-12-06, 16:58

Top Quote