[Request] Toolbelt items having charges & Fuel tanks have limited Fuel

Is it possible to make tool-belt items have charges and a chance to fail as well.

Personally I'd like it so that items in the game are less indestructible and more consumable oriented. Allow me to elaborate and give a few examples of what i'm talking about:

Hatchets - Give them a chance to break each time they are used. Give them a max life expectancy as well.

Knives - Same idea as above. Base it off of the number of meats gutted or something. So 1 charge = 1 meat as well as the random chance of breaking it.

Matches - Allow shitty matches to have a chance to fail. Perhaps make the rate of failure higher in very poor weather conditions.

Flashlights and NVGs having a max battery life. Die after X usage time.

Toolbox & Entrenching tools - Chance to break at random and suffer from damages when used.


If this concept was to be extended - Ideally when looting items, you'd look for ones with the most charge / best conditions... this way not all matches or hatchets are spawned as equals.

Main reasons I'd want these things are to promote returning to residential areas rather than simply it being the first part of the game and completely forgotten afterwards.

-----

The second half is about limiting the amount of fuel in fuel tanks. Why I think this is desirable is to once again make people travel and earn their survival. lots of places should have fuel tanks, but not all of them should have much or any fuel at all. Ideally the quantity of fuel in each tank would be randomized as to prevent people from seeking out the same ones after every restart.

This will put more pressure on players to go out there and get things done rather than never having to worry about fuel. This would make chopper maintenance and usage FAR more challenging than it currently is. Even if you've got tons of choppers on your map, not many will be able to get them off the ground for extended periods of time without significant effort or at least paying attention to their flying habits.
 

kikyou2

Valued Member!
I really like this ideas!

However I can't help you to realize this :(

Hope somebody with experienced coding skills give it a try
 
I really like this ideas!

However I can't help you to realize this :(

Hope somebody with experienced coding skills give it a try
Pretty much wondering if its possible, I mean the way ammo is counted in a clip and saved in the DB, was wondering if such a thing could apply to the toolbelt as well... I myself don't have the skills to do this, figured i'd put it out there as an idea.
 
I think its not possible, the same way as the ammos on choppers... (they dont get saved on DB)

Sorry for my bad english
When you own a toolbelt item, it is saved in the DB, why not have it like ammo would be something like "ItemMatchbox", 2 just like the ammo appears.
 

Player2

Valued Member!
When you own a toolbelt item, it is saved in the DB, why not have it like ammo would be something like "ItemMatchbox", 2 just like the ammo appears.
I don't think you can include extra information like that in the survivor table inventory without the game having a fit.

However, it might be possible to create an extra table to track every single tool on the server.
If you have a separate table for it then you could track quite a few values, e.g. damage, breakage chance (%), use count, maximum use, damage increment per use, etc
 
I'd rather this not disappear as an idea, mostly because I don't believe in items being indestructible. I know in the case of base building, if you attempt to dismantle someone elses building, you have a 70% chance of losing your toolbox and a 95% chance of failure to remove it.

If it isn't possible to have it added to the DB in the form of charges (or if its overly complicated), I'd still think that a chance to break on use should be implemented.
 
Hi, a chance to destroy or fail on actions is possible to implement. If you want I can try to build it.
Sounds awesome, what prevents the items being written to the DB similar to how ammo is in a magazine that isn't full? If that's overly complicated I do understand.

Regardless I stand by the desire to make regular every day items part of the continuing need to survive, not just bigger better guns.

By chance would you know anything about fuel tanks with limited fuel?
All I think of is have it so that you have siphon fuel script enabled and somehow make vehicles/a fuel tank invulnerable + give it a specific amount of fuel in it and have it in the mission.sqm, so each restart it resets.. But its such a crude method that i dont even know would work, what's your take?
 

Player2

Valued Member!
Basically thinking aloud about an idea for them limited fuel tanks:

In the fn_actions you could use the cursorTarget to get the object, then use buildingPos on that object to get a variable from it that separates it from all the other tanks with the same name.
So then you can create an array or some data structure containing each new fuel tanker the player comes across.
Set up a public server side variable with all the positions and a fuel value in the server pbo.
Then, if the pos matches a fuel tank you've set up in the server pbo, have it get the value of fuel currently in there, if theres enough, then take some away from the value, and fill the jerry can, if not enough, tell the player the tanker is empty.

Untested, 5 mins of thought, too lazy/stoned to write a load of code at the moment. Might not even work anyway.
 
When you own a toolbelt item, it is saved in the DB, why not have it like ammo would be something like "ItemMatchbox", 2 just like the ammo appears.
The ammo isn't saved to the db shoot 1 bullet, disconnect and reconnect you will see your ammo is full.

I doesn't say it can't be make (maybe we can use the same concept as food,etc)
 
Chance of fail and or destroy would be much easier than having "ammo" for a tool.

Take look at the wooden arrow for instance. It has a chance of breaking when picking it up. Im sure you could adapt the script to work for a tool as well.
 

CommanderRetra

Moderator
Staff member
I don't see how writing the variable/timeout the the db isn't practical. You could just attach it to the survivor table and have a new row that is set as null when player hasn't picked up nvgs/rangefinder/flashlight. Then have a customisable amount of time (battery life)
 
Chance of fail and or destroy would be much easier than having "ammo" for a tool.

Take look at the wooden arrow for instance. It has a chance of breaking when picking it up. Im sure you could adapt the script to work for a tool as well.
I both agree and disagree. implementing BOTH a chance of fail AND a set number of times an item can be used before destroyed would be, in my opinion, a pretty cool idea. The way i'd do this is the chance of fail be random set at a smaller number like 10% (if failed you simply don't get the wood/food/or lit fireplace desired), then at the start of your woodgather/meatgather/lightfire scripts have it call a variable (number of uses) we set later on from the database (setting the variable at 0 if database entry = null) and then setting the variable to the data base +1 at the end of the script. Then code it in such that after x number of uses the item is destroyed.

I could and would very much like to start coding this. However i don't know how to set/call variables from a database. that's the only missing piece of puzzle i'd need. So if someone with a greater scripting knowledge could write up a few lines of code such that it calls entries from the DB for uses of the hatchet, knife, so on and then sets those entries (+1) so that i can use them to write the rest of this up i'd greatly appreciate it.
 

mmmyum

Valued Member!
It's pretty complex to write to the DB but I think some other people were working on getting it to work - search for a thread on it. I think it was hivewrite child 999 or something for the custom call to write, but of course you'll also have to create a new database or at least a column to store the data.
 

mmmyum

Valued Member!
@ Rossymond - I've got limited fuel scripts that should work on my github - some people said they were testing but haven't got back to me yet. Should work - but it won't last over server restart. I've been talking with manatee hunter too and I know he's got tool chance to break working, i'll ask him about it next time I talk to him.
 
Top