Question about Script usage

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

B1tchFight
 
Posts: 5
Joined: 13 Oct 2014, 13:49

Question about Script usage

Post by B1tchFight » 14 Jul 2019, 14:30

Hey guys, I am new to the forum but I already searched a little but and couldn't answer my questions. So I hope I can get some help here from the more experienced Mod-Devs.

Basically I know quite a bit about MySQL, Databases and Serverconfigurations but for some reason I can't figure out how to disable the Claim maintenance. For our YO Server we have quite a few changes including a economy system. People shouldn't need to feed the claim monument instead paying taxes to the Server as a ways to take money out of the game again.

As far as I noticed we can't disable or lower the claim maintenance cost in general. Mostly because it's hardcoded I think.

But I found a command line "$CmMaintenance::skipClaimsMaintenance = "1";" That needs to run on the console window and either I am to silly or I make a mistake.

Can anybody explain to me how to make a script running every once in a while to make this Line work automatically?

I thought about adding it to the patch.sql like the tree removal script but it runs only once and skips the next maintenance but not all. Or does is line state that ALL maintenances until next serverstart are skipped?

User avatar
KuraiSeraph
 
Posts: 39
Joined: 27 Mar 2017, 12:30

Re: Question about Script usage

Post by KuraiSeraph » 14 Jul 2019, 15:12

Hi,

if u have auto restart u can make a code on the patch.sql that give the monument support poins.

In the Database its the Table guild_lands and there SupportPoins.

(If u change supportpoins on running server u dont see the change. You can see the change if u sacrifice something)

mh maybe it is not the right way, becouse SupportPoins reset with new start

Ok i testet it. Put this Code in ur patch.sql

UPDATE `lif_1`.`guild_lands` SET `SupportPoints`='500000' WHERE `ID`>0;

Every time the server restart the monuments of all Guilds have 500 000 Supportpoins

Kurai


B1tchFight
 
Posts: 5
Joined: 13 Oct 2014, 13:49

Re: Question about Script usage

Post by B1tchFight » 15 Jul 2019, 16:08

Thank you :) This actually worked.

I hope you don't mind if I ask another question.

I used to change the Claim time of horses inside the object_types table several year back when I created a server but now it looks like it has no effect what so ever. Some values are saved others are not.

I went with a command line that needs to be entered on every serverstart but this includes ALL horses. What means that CARTS are also claimed for several hours and claim members can't use them. (end yes, the dump.sql is renamed)

I decided to try to use your example of adding a line to the patch.sql.

Could you help me and tell me how to change the line so I can address a special ID inside a table? Because your suggested changes the value inside the entire table.

Theoretically this would be correct, or?

UPDATE `lif_1`.`object_types` SET `OwnerTimeout`='750' WHERE `ID`=1497;

User avatar
KuraiSeraph
 
Posts: 39
Joined: 27 Mar 2017, 12:30

Re: Question about Script usage

Post by KuraiSeraph » 15 Jul 2019, 18:49

U can change the Value of OwnerTimeout in the objects_types table.
U said ur dump.sql is renamed so u can edit it in the database, if dump.sql not renamed than the dump.sql overwrite all what u change in the database.

Here are the ID´s

Horses:

773 Stallion
774 Warhorse
775 Spirited Warhorse
776 Hardy Warhorse
777 Heavy Warhorse
1108 Horse
1139 Royal Warhorse
1662 Moose
1684 Curier Horse

Horses on Cart:

1438 Stallion
1439 Horse
1472 Warhorse
1473 Spirited
1474 Hardy
1475 Heavy
1476 Royal
1664 Moose
1686 Curier Horse

Changes are active after restart


Theoretically this would be correct, or?

UPDATE `lif_1`.`object_types` SET `OwnerTimeout`='750' WHERE `ID`=1497;

Yes but it change only the OwnerTimeout of the ID 1497 (Horse Cart no Tent) and thats the time when u build the Cart


B1tchFight
 
Posts: 5
Joined: 13 Oct 2014, 13:49

Re: Question about Script usage

Post by B1tchFight » 15 Jul 2019, 19:36

KuraiSeraph wrote:U can change the Value of OwnerTimeout in the objects_types table.
U said ur dump.sql is renamed so u can edit it in the database, if dump.sql not renamed than the dump.sql overwrite all what u change in the database.

Here are the ID´s

Horses:

773 Stallion
774 Warhorse
775 Spirited Warhorse
776 Hardy Warhorse
777 Heavy Warhorse
1108 Horse
1139 Royal Warhorse
1662 Moose
1684 Curier Horse

Horses on Cart:

1438 Stallion
1439 Horse
1472 Warhorse
1473 Spirited
1474 Hardy
1475 Heavy
1476 Royal
1664 Moose
1686 Curier Horse

Changes are active after restart


Theoretically this would be correct, or?

UPDATE `lif_1`.`object_types` SET `OwnerTimeout`='750' WHERE `ID`=1497;

Yes but it change only the OwnerTimeout of the ID 1497 (Horse Cart no Tent) and thats the time when u build the Cart


Problem is, that I know this and I used to do this but what ever value I choose it set itself back to 3 minutes. Fun fact here: All other changes we made remain. Only the OwnerTimeout resets itself.

I already found all the IDs in the database and set them to 2 hours for example. And we already restarted. The databases stays @ 2 hours (7200 Seconds) but in game the time stays 3 minutes. We also respawned the horsed and spawned new horses. Any idea why?

And as I said ONLY the OwnerTimeout values are not affected by all my changes.

UPDATE `lif_1`.`object_types` SET `OwnerTimeout`='750' WHERE `ID`=1497;

Does this one set the value ONLY for the building stage? If so, I should be able to change it manually for the other horses in the patch.sql unless I find a fix for the problem.

User avatar
KuraiSeraph
 
Posts: 39
Joined: 27 Mar 2017, 12:30

Re: Question about Script usage

Post by KuraiSeraph » 15 Jul 2019, 20:37



B1tchFight
 
Posts: 5
Joined: 13 Oct 2014, 13:49

Re: Question about Script usage

Post by B1tchFight » 16 Jul 2019, 13:28

KuraiSeraph wrote:Maybe this Theard help

http://lifeisfeudal.com/forum/post74486 ... out#p74486


This is the console command that actually worked but It needs to be run every time on server start. Problem here: Every horse + Horsecarts are affected. That's not the goal because carts shouldn't be claimed as long as a horse because carts are used by multiple people in a claim or during RP.

That's why I try to use the manual overwrite at the end of the patch.sql for those horses that should be affected.

I will see how this works out.

Return to Game mods

cron