Donation

Help us to pay our server!
(: Consider a donation :)



Social Media

  • Facebook
  • Google+

Latest Posts

Topic: What is the difference between swamp and dead?

kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1386
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-11-25, 09:05

Is there a difference between dead terrains and swamp? Or: Why isn't swamp shown as dead in the editor?

AFAIK there is nor difference. Both are impassable and irreclaimable (no buildings, no immovables)


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2432
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-11-25, 10:40

The terrain types in C++ are:

  • kGreen,
  • kDry
  • kWater
  • kDead
  • kMountain
  • kImpassable

And assigned from Lua as:

Lua "is" Editor info tool C++
green arable kGreen
dry treeless kDry
water aquatic kWater, kDry, kImpassable
dead dead kDead, kDry, kImpassable
mountain mountainous kDry, kMountain
impassable impassable kDry, kImpassable

The Editor terrain tool then has the following rules for the tooltips (I am using pseudocode for readability):

        if (kGreen) {
            "arable"
        } else {
            if (kWater) {
                "aquatic"
            }
            else if (kMountain) {
                "mountainous"
            }
            if (kDead) {
                "dead"
            }
            if (kImpassable) {
                "impassable"
            }
            if (kDry) {
                 "treeless"
            }
        }

Swamp is defined as is = "impassable", not as is = "dead".

The definitions in C++ also have implications on the placing of immovables, walkability etc. That code works on the edges between the terrains though and is quite tricky. The extra property for "dead" is "kDead", which can places additional restrictions on walkability next to the terrain.

Edited: 2015-11-25, 10:46
Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1076
Ranking
One Elder of Players
Posted at: 2015-11-25, 10:57

basically, you can make roadds on the edges of swamp, touchinng the terrain. you can't make roads at the edges of lava.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1386
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-11-25, 17:43

king_of_nowhere wrote:

basically, you can make roadds on the edges of swamp, touchinng the terrain. you can't make roads at the edges of lava.

Aha, thats what i've searched for face-smile.png thanks

@ GunChleoc

I want to change the terms of the vars, better: I've done this. Because it's tricky, as you said, i wanted to ask for the special cases of swamp because it needs an exception. More on my changes i will write in a bugreport with an attached branch. For now: These changes does not affect compatibility with old maps, because only the name of a terrain is stored in a map.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2432
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-11-25, 18:01

Yes, you can rename the "is" values without any problems. Do you feel up to giving them identical names in C++ too? If not, I can take care of it once you have done what you can face-smile.png


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1386
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-11-25, 18:23

Pushed a bug report with an attached branch

Everyone is called to test this branch, maybe i've overlooked some special cases. Comments are welcome to the bug report.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2432
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-12-04, 14:04

I have done a code redesign now to get rid of some old complicated code duplication.

I am in favour of renaming "impassable" to "unwalkable" - water is "navigable and impassable" in this branch, which looks like a contradiction.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1386
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-12-04, 20:59

GunChleoc wrote:

I have done a code redesign now to get rid of some old complicated code duplication.

I am in favour of renaming "impassable" to "unwalkable" - water is "navigable and impassable" in this branch, which looks like a contradiction.

Hm, i couldn't find "unwalkable" either in dict.cc nor in dict.leo.org. But if you think it is better then we should use it face-smile.png

Currently i play test the last changes.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2432
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-12-05, 01:16
http://findwords.info/term/unwalkable

Oxford English Dictionary
unwalkable unˈwalkable, a.

a. Unfit for walking in. b. Unable to walk. c. Unfit for walking on.
1813 F. Burney Diary (1846) VII. 7 How teased I am..by this eternal unwalkable weather! 1831 Howitt Seasons 273 Even the unwalkable infant sits propt with sheaves. 1976 N.Y. Times Mag. 12 Sept. 85/2 The top step is 2 feet high and unwalkable. 1981 New Scientist 16 July 141 A nasty mixture of coal slurry and raw sewage makes the sand unwalkable. 1982 London Rev. Bks. IV. xxiv. 8/3 These proud owners of this awful model house, tripping around on an artistic but farcically unwalkable pattern of paving-stones.., conduct themselves with a sober sense of import and duty.
- See more at: http://findwords.info/term/unwalkable#sthash.FXqqNPju.dpuf

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2432
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-12-10, 14:44

This has been merged in r7665.


Top Quote