Modding the tunnel decay

Place for sharing your game modifications for Life is Feudal: Your Own

Vanstechelman.arne
True Believer
 
Posts: 4
Joined: 05 Jan 2017, 12:28

Modding the tunnel decay

Post by Vanstechelman.arne » 19 Jan 2017, 05:30

Hiya,

So i'm kinda new to starting a new topic and all so here's to hoping it's in the right category :beer:

My and some friends are playing on the server i'm running over at gameservers.com for LiF:YO and we wanted to have a sort of permanent tunnel going from the mainland to the island on the map.

We know we can reinforce the tunnel but even with decay set to 0, the supports and eventually the tunnel disappear after +- a week.
Is there any "mod" i could install or some change to the sql i could make to prevent this from happening?
Like increase the amount of durability the beams have or something?
Mind you, i'm also very new and a huge noob at editing sql files or working with a database :oops:

Any advice/info would be much appreciated! ':'


Sycopata666
True Believer
 
Posts: 87
Joined: 22 Oct 2016, 15:06

Re: Modding the tunnel decay

Post by Sycopata666 » 20 Jan 2017, 12:37

you cant dig a tunnel under lvl 0 of heigh then you cand dig a tunnel under the water.

in the tunneling information:

tunnels decay: depending on lvl off tunneling skill, depending on days after you dig the tunnel.
the way to make your tunnel stay up is reforcing it.
And you have 2 tiers: the wall reinforcement and the floor reinforcement.
Wen you reinforce the tunnel you delay the decay but wen time past , your tunnel decay. You can prevent it. why no decay inmediately.
you can see how floor reinforcement decay. and this is a sign to reinforce it again. if you no reinforce the colums the nex on decay is the wall reinforcement, and the tunnel cell.

Then if you want a permanent tunnel you have to mantain it.


Vanstechelman.arne
True Believer
 
Posts: 4
Joined: 05 Jan 2017, 12:28

Re: Modding the tunnel decay

Post by Vanstechelman.arne » 21 Jan 2017, 09:05

Hi,

First off, thanks for the reply! :good:
Second, we figured out that we can't dig below the 0 line aswell but we kinda changed it up a bit now.

We still want a permanent tunnel though and I found a post relating to this (see below this line) but haven't figured out how to make it work yet...

Gchristopher wrote:Here's a workaround. This is a SQL update that I'm using to increase the durability of all reinforced tunnels.

Code: Select all
UPDATE geo_patch AS a
INNER JOIN (SELECT TerID, GeoDataID, Altitude, MAX(Version) MaxVersion
              FROM geo_patch c
          GROUP BY TerID, GeoDataID, Altitude) AS b
    ON (    a.TerID = b.TerID
        AND a.GeoDataID = b.GeoDataID
        AND a.Altitude = b.Altitude
        AND a.Version = b.MaxVersion)
  SET a.Quantity = 5000
WHERE a.Substance = 0
  AND a.Quantity > 10;


Testing seems to match it up to the tunnels on a small server.

Key points: (I think)
  • geo_data.substance = 0 is air, which indicates a tunnel.
  • Join geo_patch against itself to only check the highest (most recent) Version number for that tile and altitude.
  • Quantity is the remaining durability of a tunnel reinforcement. Only increase ones that are already greater than 10. (Unreinforced tunnels are at most 4?)
  • The game seems to be okay with absurdly high numbers, and at 2 points/game day, a 5000 Quantity tunnel reinforcement will last a very long time.
  • Shut down the server, back up the database, and make any changes before restarting the server. It seems to only reads the database state at startup, so any changes applied when the server is already running will at best be ignored, and at worst corrupt the database.


Any help trying to figure this out and get it to work would be much appreciated again :D


Asimov
 
Posts: 212
Joined: 09 Sep 2015, 12:34

Re: Modding the tunnel decay

Post by Asimov » 22 Jan 2017, 11:03

I dont know anything about tunnel decay, but yes you can tunnel under water. It is very very difficult but possible


Alakar
Beta Tester
 
Posts: 203
Joined: 23 Jan 2015, 07:39

Re: Modding the tunnel decay

Post by Alakar » 22 Jan 2017, 17:55

Not for sure but you could try changing

$cm_config::Geo::TunnelDecayValue = "1";

to 0 on the server that may stop tunnel decay.


Vanstechelman.arne
True Believer
 
Posts: 4
Joined: 05 Jan 2017, 12:28

Re: Modding the tunnel decay

Post by Vanstechelman.arne » 24 Jan 2017, 09:45

That's a nice idea to be honest but not so much what we are aiming for.
If we mod that value it means that none of our tunnels will ever collapse which is gonna become an issue since we usually dig a tunnel and let it collapse so we can shovel the dirt away in that spot to reduce the height of the tile for example.

We want it to specifically target reinforced tunnels so only those never collapse or have a very long decay rate

But thanks for the reply nonetheless ;)

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: Modding the tunnel decay

Post by Leaf » 31 Jan 2019, 17:46

Necro bump.

Looking for a way to do this also.

Return to Game mods