Currently Online

Latest Posts

Topic: Fog of War

Marlhin
Avatar
Joined: 2018-09-06, 18:33
Posts: 5
Ranking
Just found this site
Posted at: 2018-09-06, 18:37

Hey guys!

Been playing Widelands recently and it is a lot of fun! Although I like the graphical aestethics of The Settlers 2, the gameplay of Widelands is MUCH better. However, I've been struggling finding a way to disable the fog of war when playing against the AI or multiplayer. I expected to find a button to switch between on and off, like in Return to the Roots. Maybe I am just too blind to find this option but if it isn't there, would it be possible to add such feature in a later version?

Thanks! Marlhin


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1523
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-09-06, 18:50

Hi Marlhin and welcome to the forums face-smile.png

Glad you like the game.

Currently you can only select another type of game to turn the FOW of: Endless Game (No Fog) instead of Autocrat. A switch to turn it off during a normal game is not planned AFAIK. I think such a switch would also be unfair if you play multiplayer with other players.


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1133
Ranking
One Elder of Players
Posted at: 2018-09-06, 19:22

kaputtnik wrote:

A switch to turn it off during a normal game is not planned AFAIK. I think such a switch would also be unfair if you play multiplayer with other players.

On the other hand, if it was an ooption to be enabled before the match, and applied to all players, it would just add a tad more customization. And it shouldn't even be hard to code.


Top Quote
Marlhin
Avatar
Joined: 2018-09-06, 18:33
Posts: 5
Ranking
Just found this site
Posted at: 2018-09-06, 21:05

king_of_nowhere wrote:

kaputtnik wrote:

A switch to turn it off during a normal game is not planned AFAIK. I think such a switch would also be unfair if you play multiplayer with other players.

On the other hand, if it was an ooption to be enabled before the match, and applied to all players, it would just add a tad more customization. And it shouldn't even be hard to code.

This!

I played some multiplayer games on Return to the Roots and there you can switch off the fog of war if you like. If you don't want to play a no fog of war game, then just don't join such a server, or create a new one ;) Hence, adding an option to turn it off wouldn't "destroy" the fairness of the game. It is not that I only want to play this game with fog of war off, but it is sometimes funny to be able to see what your opponent is doing. Reminds me of the good old Settlers I times :D But I don't know if it is a simple task to add such an option!


Top Quote
Tinker
Avatar
Joined: 2014-09-12, 10:53
Posts: 183
Ranking
Widelands-Forum-Junkie
Location: DDR
Posted at: 2018-09-07, 10:40

You can always edit, add, files in Scripting/win_conditions folder to add more variety. Compare endless game and the fogless version, Editing any other, like collectors and adding

  -- reveal the whole map for every player

  local game = wl.Game()

  local map = game.map

  local fields = {}

  local i = 1

  for x=0, map.width-1 do

     for y=0, map.height-1 do

        fields[i] = map:get_field(x,y)

        i = i + 1

     end

  end

  for idx, plr in ipairs(game.players) do

     plr:reveal_fields(fields)

  end

then save as collectors_fogless it will then show up on the start new game page. To save the file over version updates store it in your overrides diectory, ~/.widelands on linux.

Edited: 2018-09-07, 10:42

The only way to prevent a mass extinction event is to remove homo sapiens, or stupiditus, from the planet. It may be to late for this final solution though.

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1021
Ranking
One Elder of Players
Location: Poland
Posted at: 2018-09-07, 11:15

@Tinker

Will it work also with multiplayer? For players who don't have such script on their computers?


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 18:17
Posts: 829
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-09-07, 12:20

It will work, if the script is manually copied to each player's widelands directory before the Widelands executeable is started and the game set up. How ever an automatic copying of the scripts to the other clients is not implemented (and from my point of view shouldn't be in the future as this would be an obvious security issue for installation of spyware, malware, etc.)

Making the fog of war an option in the game set up menu could be a good idea - after all having two sets of win conditions ( w/ and w/o fog of war) would double the amount of win conditions in the list without any additional functionality and by this make the setup screen more counter intuitive than the addition of a checkmark for fog of war would.


Top Quote
Marlhin
Avatar
Joined: 2018-09-06, 18:33
Posts: 5
Ranking
Just found this site
Posted at: 2018-09-07, 17:47

@Nasenbaer: Sounds reasonable! A switch option would be very handy.

@Tinker: Thanks for your advice! It is very cumbersome, though. This is hopefully a temporary method of playing Widelands without fog of war face-wink.png

Oh, and thanks kaputtnik for your warm welcome face-smile.png


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1523
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-09-07, 22:18

For each player you can set also plr.see_all set to true

plr.see_all = true

Edit: Link fix

Edited: 2018-09-07, 22:19
Top Quote
ypopezios
Avatar
Joined: 2018-04-20, 00:22
Posts: 220
Ranking
Widelands-Forum-Junkie
Posted at: 2018-09-08, 01:17

Nasenbaer wrote:

Making the fog of war an option in the game set up menu could be a good idea - after all having two sets of win conditions ( w/ and w/o fog of war) would double the amount of win conditions in the list without any additional functionality and by this make the setup screen more counter intuitive than the addition of a checkmark for fog of war would.

+1


Top Quote