The Fixing System
4 4

75 posts in this topic

Recommended Posts

Hello, here is how the fixing system for you item and weapon works, it'll be in the upcoming version.

 

It may need to be balanced in the couple of days, after some testing, please use this thread to talk about this, ask question, suggest... And not to talk about my horrible english skillz (use PM for this, so I can answer in French ;))

 

wi3LFzD.png
 
1) The fixing.txt

Each fixing is define like a recipe, here's an example (not balanced, it's just for the purpose of my testing) :

You can find this file in the script/ folder.
 

module Base
{
    fixing Fix Axe
    {
       Require : Axe,
       
       Fixer : Woodglue=2; Woodwork=2; Farming=2,
       Fixer : DuctTape=2,
       Fixer : Glue,
       Fixer : Nails,
    }
}

What does this mean ?

  • Require : Axe

Simply the required item to fix.

  • List of fixers

Every Fixer : you add is an item used to fix the Required item (here, an Axe).
First fixer give you + 50% condition (here Duct tape), second 25% (here Wooden glue) and 10% for every other in the list.
 
Now, you can also use Drainable item to fix, for example the Duct tape, here by adding Ducttape=2, I'm gonna use 2 times the Duct tape (and because it have a 0.25 use delta, i'm gonna use 50% of it).

But if the item is not a Drainable (ex pistol=2), I'll need 2 pistols to make my fix.
 
Also, you can add skill requirements for each fixer, for example the Wooden glue will require a level 2 of Carpentry (woodwork) and a level 2 of Farming (still an example ;)), BUT you can still try to fix your item with the wooden glue with no wood work skills, but you'll have great chance of fail !
 
2) Condition


When your weapon condition reach 0, it break, meaning you can't equip it anymore, his name change (for "Broken itemName") and a small icon (red cross) is added to show you again that this weapon is broken.
 
Every time you successfully repair your item, the condition will up, depending on the fixer selected (reminder : first fixer + 50%, 2nd = +25%, others = +10%).
But it also take in count the number of time you already repaired the item, an example :
 
My axe have a condition of 0, a max condition of 10.
I repair it one time with wooden glue, my new axe condition is : (condition max - condition) * 25% * (1 / number of time repaired) = 10 * 25% * 1/1 = condition (0) + 2.5 (round to 2).
I repair it a second time with duct tape, my new axe condition is (condition max - condition) * 50% * (1 / number of time repaired) = 8 * (50% * 1/2) = condition (2) + 2.
Etc.
 
3) Chance of fail
 
You have a base chance of failing of 5%.
Everytime a skill is required and you are below, we add 30% for each missing skill level.
We also add +2% for everytime you already repaired the weapon.
But we remove 3% for each skill point above the required skill level.
 
So for example, if I try to fix my axe with the wooden glue (require a carpentry level of 2) and having 0 carpentry skill, the chance of fail will be : 5% + (2-0) * 30%, resulting in a 65% of fail.
 
A fail mean you gonna use the fixer (for example use 2 times the duct tape), and maybe result in a condition -1 of your weapon.
 
4) Luck ?

2 new traits have been added, Lucky and Unlucky.
A lucky trait cut by 5% the chance of failing the repair, while unlucky add 5% of chance to fail. (so if I have 50% chance of fail, with the Lucky trait I'll have 45% chance of fail, but with the Unlucky trait 55%).
Those traits will also be used for other stuff (chance of loot, chance of lower the condition of the weapon when hiting something, etc.)

 

5) Current fixing

 

This is the list of the current fix you can do :

 

module Base
{
    fixing Fix Axe
    {
       Require : Axe,
       
       Fixer : Woodglue=2; Woodwork=2; Farming=2,
       Fixer : DuctTape=2,
       Fixer : Glue=2,
       Fixer : Scotchtape=4,
    }

    fixing Fix Baseball Bat
    {
       Require : BaseballBat,

       Fixer : Woodglue=2; Woodwork=2;,
       Fixer : DuctTape=2,
       Fixer : Glue=2,
       Fixer : Scotchtape=4,
    }

    fixing Fix Nailed Baseball Bat
    {
       Require : BaseballBatNails,

       Fixer : Woodglue=2; Woodwork=2;,
       Fixer : DuctTape=2,
       Fixer : Glue=2,
       Fixer : Scotchtape=4,
       Fixer : Nails,
    }

    fixing Fix Sledgehammer
    {
       Require : Sledgehammer,

       Fixer : Woodglue=2; Woodwork=2;,
       Fixer : DuctTape=2,
       Fixer : Glue=3,
       Fixer : Scotchtape=4,
    }

    fixing Fix Golf club
    {
       Require : Golfclub,

       Fixer : DuctTape=2,
       Fixer : Scotchtape=3,
    }

    fixing Fix Pistol
    {
       Require : Pistol,

       Fixer : Pistol; Aiming=3,
    }

    fixing Fix Shotgun
    {
       Require : Shotgun; Aiming=4,

       Fixer : Shotgun,
    }

    fixing Fix ShotgunSawnoff
    {
       Require : ShotgunSawnoff; Aiming=4,

       Fixer : ShotgunSawnoff,
    }

    fixing Fix Hammer
    {
       Require : Hammer,

       Fixer : Woodglue; Woodwork=1;,
       Fixer : DuctTape,
       Fixer : Glue=2,
       Fixer : Scotchtape=3,
    }

    fixing Fix Pan
    {
       Require : Pan,

       Fixer : DuctTape,
       Fixer : Glue=2,
       Fixer : Scotchtape=3,
    }

    fixing Fix Kitchen Knife
    {
       Require : KitchenKnife,

       Fixer : DuctTape,
       Fixer : Glue,
       Fixer : Scotchtape=2,
    }
}

 

As you can see, a pistol require another pistol, meaning if you have 2 broken pistol, you can merge them in one with 50% of it's condition ;)

Share this post


Link to post
Share on other sites

Are the calculations done in lua or hardcoded? For example can we do our own percentages for repairs and add them to a certain weapon?

 

Also are we still able to use broken weapons in regular recipes? If so I think the option should be taken away so that we can't eg. craft a working nailed bat out of a broken bat. And if needed maybe add an option in the items.txt to disable this. Or the other way around. :D

 

Great work in any case!! (clyde)

Share this post


Link to post
Share on other sites

 

Quick question will the repair rate be based on luck, carpentry, etc? or will it be random o:

Did you read the OP?

The answer to your question is there...

 

I skimmed it o .o 

Share this post


Link to post
Share on other sites

A thought on fixing firearms:

 

It looks like the current thoughts are "you need a second firearm of the same type to fix your firearm", so a second pistol to fix your original pistol.  I see a problem with this: why not just use the second pistol, since all pistols are the same?  The only reason you would do this is if both pistols had low condition.  Can you use a broken pistol to fix another broken pistol?  If not, this will require you to carefully monitor pistol condition to make sure you almost, but not quite, break it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
4 4