• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to: Tree bridge (River)

Rik123

Into the abyss
Joined
Mar 16, 2010
Messages
890
Reaction score
712
Location
The Netherlands
Ola,

I'm not sure if there's a thread already about it, so I'll make one now.

download.jpg

Result:
finished.png


Step one:
Make the river or creek where you want to place the bridge.step1.png

Step two:
To make it easier and to make sure you're not skipping a tile, press O, so you will see the unwalkable tiles. After this, figure out where you want to place to bridge.
step2.png
Step three:
Now, the bridge is still unwalkable, let's change that. First of all, go to the Terrain pallete > nature > select the unwalkable water tiles (see image). In case you couldn't find it for some reason, the IDs are 4820-4825. Once you did that, draw the line of the spot where you want to place the bridge (see image)
step3.png step4.png
Step four:
Now, the tree is walkable but the borders aren't. Change the borders with the walkables - found at RAW > borders. Or the easy way, CTRL+J and search for the IDs 4828-4831. Do not forget to remove the old, unwalkable borders, else they're still not walkable!
step5.png


 
Does anyone know how to make this work in 10.98? I mean, this solution works, but it weirds me out when my character starts swimming across the log
 
Does anyone know how to make this work in 10.98? I mean, this solution works, but it weirds me out when my character starts swimming across the log

You can just remove swimming (movements.xml) for X tiles (ie 4820) so you can use that as walkable and leave the others (4821-4825) for swimmable.
 
You can just remove swimming (movements.xml) for X tiles (ie 4820) so you can use that as walkable and leave the others (4821-4825) for swimmable.
Aah, I didn't realize that swimming was part of the lua code in movements. I changed the code in movements.xml to not include 4825 and now it works! Thanks.
 
Is problem there. Is swimming :(
PROBLEM:
Bez tytułu.png
Post automatically merged:

Ok I do this from solution. Work! But have question. Where change this to not making autotile from 4825? When I use Terrain palette.
 

Attachments

Last edited:
I eventually solved this by adding an exception in the swimming.lua file:
Lua:
if item.actionid == 13338 then
        return true
    end

Then I just add that action ID to any walkable water I don't want to swim in, i.e. water under logs.
 
I eventually solved this by adding an exception in the swimming.lua file:
Lua:
if item.actionid == 13338 then
        return true
    end

Then I just add that action ID to any walkable water I don't want to swim in, i.e. water under logs.
Thanks, is better I think. But where you put this? In bottom, in center in script? You can put example script? THX And action I can change to another number, yes?
 
Thanks, is better I think. But where you put this? In bottom, in center in script? You can put example script? THX And action I can change to another number, yes?
These are often at the start of the function, because if this condition is true, you don't really want to evaluate anything else when walking on/off that tile. So it is the first thing that comes after running the functions. The "return true" basically means that the script is telling your TFS that everything is fine and it should not do anything else. It's also a good idea to add it to addItem, otherwise you'll get troubles when moving lootbags, killing monsters or dying on top of the log :)


Lua:
local condition = Condition(CONDITION_OUTFIT)
condition:setOutfit({lookType = 267})
condition:setTicks(-1)

local conditions = {
    CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY,
    CONDITION_PARALYZE, CONDITION_DRUNK, CONDITION_DROWN,
    CONDITION_FREEZING, CONDITION_DAZZLED, CONDITION_CURSED,
    CONDITION_BLEEDING
}

function onStepIn(creature, item, position, fromPosition)
    if item.actionid == 13338 then
        return true
    end
    for i = 1, #conditions do
        creature:removeCondition(conditions[i])
    end
    if creature:isPlayer() then
        creature:addAchievementProgress("Waverider", 100000)
    end
   
    creature:addCondition(condition)
    return true
end

function onStepOut(creature, item, position, fromPosition)
    if item.actionid == 13338 then
        return true
    end

    creature:removeCondition(CONDITION_OUTFIT)
    return true
end


function onAddItem(moveitem, tileitem, position)
    if tileitem.actionid == 13338 then
        return true
    end
    moveitem:remove()
    position:sendMagicEffect(CONST_ME_WATERSPLASH)
    return true
end

Oh and yea, take any actionID that makes sense on your OT
 
These are often at the start of the function, because if this condition is true, you don't really want to evaluate anything else when walking on/off that tile. So it is the first thing that comes after running the functions. The "return true" basically means that the script is telling your TFS that everything is fine and it should not do anything else. It's also a good idea to add it to addItem, otherwise you'll get troubles when moving lootbags, killing monsters or dying on top of the log :)


Lua:
local condition = Condition(CONDITION_OUTFIT)
condition:setOutfit({lookType = 267})
condition:setTicks(-1)

local conditions = {
    CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY,
    CONDITION_PARALYZE, CONDITION_DRUNK, CONDITION_DROWN,
    CONDITION_FREEZING, CONDITION_DAZZLED, CONDITION_CURSED,
    CONDITION_BLEEDING
}

function onStepIn(creature, item, position, fromPosition)
    if item.actionid == 13338 then
        return true
    end
    for i = 1, #conditions do
        creature:removeCondition(conditions[i])
    end
    if creature:isPlayer() then
        creature:addAchievementProgress("Waverider", 100000)
    end
 
    creature:addCondition(condition)
    return true
end

function onStepOut(creature, item, position, fromPosition)
    if item.actionid == 13338 then
        return true
    end

    creature:removeCondition(CONDITION_OUTFIT)
    return true
end


function onAddItem(moveitem, tileitem, position)
    if tileitem.actionid == 13338 then
        return true
    end
    moveitem:remove()
    position:sendMagicEffect(CONST_ME_WATERSPLASH)
    return true
end

Oh and yea, take any actionID that makes sense on your OT
"It's also a good idea to add it to addItem..."
Thank you. But this is a higher driving school hehe. I'm still learning :)
 
For some strange reason, when I kill a monster exactly in the tree where the water border is below, the corpse dissappears showing a water effect. Engine is TFS1.3. As you can see the tiles are walkable and everything is fine, in game you can walk completely fine. The problem is ONLY when monster dies specifically in each of sqm where the shallow water border is below. Does this happen to you? Do you have any clue about it? What to test, what to check?
Thank you, if you need more info just drop a message. If you wanna try to replicate the bug maybe would be fine too.
I attach a picture of how the tree bridge is made:

1700324744754.png
Cheers
 
Back
Top