fodev.net
15.08.2009 - 23.06.2013
"Wasteland is harsh"
Home Forum Help Login Register
  • November 23, 2024, 03:53:07 pm
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Play WikiBoy BugTracker Developer's blog
Pages: [1] 2

Author Topic: Repair Formula (?)  (Read 2560 times)

Wallace

  • "Not a bug. It's a feature"
  • Offline
Repair Formula (?)
« on: January 24, 2010, 01:30:21 pm »

I'd like to know what is the excact repair formula

When i was improving my repair skill it seemed i was able to repair about 1/6 of my skill (or somewhat less)

But since my repair went above 200% it seems that max single repair is capped at max 32% deterioration...
That is a strange number and i'm wondering a bit if it works properly or it should be 1/6 as it were before 200% of rep. skill

If devs would give repair formula it would be much appreciated :)
Logged

craft, Craft, CRAFT! (armors)
sometimes repair dismantle stuff
Roleplay!
...and most of all; DEATH TO NERFING!!!

Wallace

  • "Not a bug. It's a feature"
  • Offline
Re: Repair Formula (?)
« Reply #1 on: January 31, 2010, 08:28:35 pm »

over 170 views and still no info...

does anyone have an idea how repair works?
Logged

craft, Craft, CRAFT! (armors)
sometimes repair dismantle stuff
Roleplay!
...and most of all; DEATH TO NERFING!!!
Re: Repair Formula (?)
« Reply #2 on: January 31, 2010, 08:32:08 pm »

It's sad beacous not only one person wait for this info...
I (and i think not only I) will be very satisfied if some admin/gm/moderator give uss stright anwser.
Logged
Re: Repair Formula (?)
« Reply #3 on: February 06, 2010, 12:10:55 am »

I'd like to know what is the excact repair formula
Me to  :-\

A. Jambot

  • You again, come to see Victor.
  • Offline
Re: Repair Formula (?)
« Reply #4 on: April 03, 2010, 03:00:24 am »

Yep, I'd sure like to get some figures here too.
And I'd also like to know what bonuses do the tools provide.
Logged

Wallace

  • "Not a bug. It's a feature"
  • Offline
Re: Repair Formula (?)
« Reply #5 on: October 04, 2011, 09:07:49 pm »

600 reads and still no answer??

Devs... please say something on that
Logged

craft, Craft, CRAFT! (armors)
sometimes repair dismantle stuff
Roleplay!
...and most of all; DEATH TO NERFING!!!

Crazy

  • Drugged Childkiller
  • Offline
Re: Repair Formula (?)
« Reply #6 on: October 04, 2011, 09:46:06 pm »

Quote
// Author: cvet

#include "_macros.fos"
#include "_msgstr.fos"


bool TryRepairItem(Critter& cr, Item& item) // Export
{
   if(not item.IsDeteriorable()) return true;

   if(cr.Timeout[TO_BATTLE]>0)
   {
      cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_TIMEOUT_BATTLE_WAIT);
      return true;
   }

   if(cr.Timeout[TO_SK_REPAIR]>0)
   {
      cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_SKILL_WEARINESS);
      return true;
   }

   if(FLAG(item.BrokenFlags,BI_ETERNAL) || FLAG(item.BrokenFlags,BI_NOTRESC))
   {
      cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_DETERIORATION_NO_RESC);
      return true;
   }

   // Repair
   int repair=cr.Skill[SK_REPAIR];
   uint8 mode=0;
   uint16 activePid=cr.GetSlotProto(SLOT_HAND1,mode).ProtoId;
   if(activePid==PID_MULTI_TOOL)
   {
      repair+=25;
      if(Random(0,30)==0) cr.DeleteItem(PID_MULTI_TOOL,1);
   }
   else if(activePid==PID_SUPER_TOOL_KIT)
   {
      repair+=50;
      if(Random(0,30)==0) cr.DeleteItem(PID_SUPER_TOOL_KIT,1);
   }

   // Repair
   if(FLAG(item.BrokenFlags,BI_BROKEN))
   {
      if(FLAG(item.BrokenFlags,BI_HIGHBROKEN)) repair-=100; //áûëî 150
      else if(FLAG(item.BrokenFlags,BI_NORMBROKEN)) repair-=75; //áûëî 100
      else if(FLAG(item.BrokenFlags,BI_LOWBROKEN)) repair-=25; // áûëî 50

      repair-=item.BrokenCount*50/MAX_BROKENS; //áûëî 100
      repair=CLAMP(repair,6,95);

      if(repair>=Random(1,100))
      {
         item.Deterioration=0;
         UNSETFLAG(item.BrokenFlags,BI_BROKEN);
         cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_DETERIORATION_REPAIR_SUCC);
         cr.StatBase[ST_EXPERIENCE]+=40;
      }
      else
      {
         item.BrokenCount++;
         if(item.BrokenCount>=MAX_BROKENS) SETFLAG(item.BrokenFlags,BI_NOTRESC);
         cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_DETERIORATION_REPAIR_FAIL);
      }
   }
   // Service
   else
   {
      if(FLAG(item.BrokenFlags,BI_SERVICE)) repair-=25;
      repair-=item.BrokenCount*50/MAX_BROKENS;
      repair=CLAMP(repair,6,95);

      if(repair>=Random(1,100))
      {
         SETFLAG(item.BrokenFlags,BI_SERVICE);
         if(activePid==PID_OIL_CAN)
         {
            item.Deterioration=0;
            cr.DeleteItem(PID_OIL_CAN,1);
         }
         else
         {
            int cnt=repair*MAX_DETERIORATION/100;
            if(cnt>item.Deterioration) item.Deterioration=0;
            else item.Deterioration-=cnt;
         }
         cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_DETERIORATION_SERVICE_SUCC);
         cr.StatBase[ST_EXPERIENCE]+=20;
      }
      else
      {
         DeteriorateItem(cr,item,MAX_DETERIORATION/5);
         cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_DETERIORATION_SERVICE_FAIL);
      }
   }

   item.Update();
   cr.TimeoutBase[TO_SK_REPAIR]=REPAIR_TIMEOUT(cr);
   return true;
}

void DeteriorateItem(Critter& cr, Item& item, int deteriorationCount) // Export
{
   if(deteriorationCount<=0 || not item.IsDeteriorable() || FLAG(item.BrokenFlags,BI_ETERNAL) || FLAG(item.BrokenFlags,BI_BROKEN)) return;

   item.Deterioration+=deteriorationCount;
   if(item.Deterioration>=MAX_DETERIORATION)
   {
      item.Deterioration=MAX_DETERIORATION;
      item.BrokenCount++;

      int brokenLvl=Random(0,item.BrokenCount/(MAX_BROKENS/4));

      if(item.BrokenCount>=MAX_BROKENS || brokenLvl>=3) SETFLAG(item.BrokenFlags,BI_NOTRESC);
      else if(brokenLvl==2) SETFLAG(item.BrokenFlags,BI_HIGHBROKEN);
      else if(brokenLvl==1) SETFLAG(item.BrokenFlags,BI_NORMBROKEN);
      else SETFLAG(item.BrokenFlags,BI_LOWBROKEN);
      cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,STR_DETERIORATION_WEAPON_BROKEN);
   }

   item.Update();
}

void SetDeterioration(Item& item, int deteriorationProcent) // Export
{
   if(not item.IsDeteriorable()) return;
   UNSETFLAG(item.BrokenFlags,BI_BROKEN);
   deteriorationProcent=CLAMP(deteriorationProcent,0,100);
   item.Deterioration=MAX_DETERIORATION*deteriorationProcent/100;
   item.BrokenCount=MAX_BROKENS*deteriorationProcent/100;
   if(deteriorationProcent==100) SETFLAG(item.BrokenFlags,BI_BROKEN);
   item.Update();
}

int GetDeteriorationProcent(Item& item) // Export
{
   if(not item.IsDeteriorable()) return 0;
   if(FLAG(item.BrokenFlags,BI_BROKEN)) return 100;
   int value=item.Deterioration*100/MAX_DETERIORATION;
   return CLAMP(value,0,100);
}
From SDK. Have fun.
Logged
When you have to shoot, shoot, don't talk

Member of the Most Hated Faction
TTTLA, for Great Justice !

Ganado

  • Moderator
  • Dishonest Abe
  • Offline
Re: Repair Formula (?)
« Reply #7 on: October 04, 2011, 10:33:25 pm »

And that script might not even be what 2238 uses.
Logged
Error while opening cfg file: spawnnpc.cfg
Shit! Damn admins! Always ruining my fun! I guess I'll talk to them. WITH MY FISTS!!!! No seriously, I will write them a nice email or make a thread on the forums or something. Thanks!
Re: Repair Formula (?)
« Reply #8 on: October 05, 2011, 03:35:58 am »

Don't know the exact formula - but this is what i think.
Also some from this page http://www.fo2238.fodev.net/wiki/Deterioration

-When a weapon isn't broken, you get a -50 skill modifier.
-You also get a -skill modifier depending on its break count
(The break count is invisible - but you can determine roughly depending on its price)

-"It's a little broken." -50
-"It's fairly broken." -100
-"It's almost falling apart." -150

-Chance to repair does NOT depend on the item. Minigun has same chances as a mauser.
-Having a Tool or Super Tool Kit in active slot will add 25% or 50% to repair skill
-Chance to repair an item is capped at 95%.
-Amount you repair depends on your Repair skill, and the break count of what your repairing.
-AND THE MOST IMPORTANT ONE: Repair skill.

Hope that helps some.
Logged
Everything must change.

Wallace

  • "Not a bug. It's a feature"
  • Offline
Re: Repair Formula (?)
« Reply #9 on: October 07, 2011, 04:42:35 pm »

The thing is... i can't find any info on how many deterioration points can be fixed at a sigle time

(from my experience it's 1/6 of repair skill but it is capped at 32% - you can't repair more even if one has more than 200 skill in repair which should cause repairing more than 32%)

I want to know if the 32% cap is a feature or a BUG

PLUS how many times item can be fixed (when fixing NOT broken item)
« Last Edit: October 07, 2011, 04:49:55 pm by Wallace »
Logged

craft, Craft, CRAFT! (armors)
sometimes repair dismantle stuff
Roleplay!
...and most of all; DEATH TO NERFING!!!

Ganado

  • Moderator
  • Dishonest Abe
  • Offline
Re: Repair Formula (?)
« Reply #10 on: October 07, 2011, 05:01:15 pm »

I have a repair alt, and I don't know what you're talking about with the 32% thing. I'm pretty sure deterioration doesn't, or at least doesn't greatly, affect the chance to repair something; it has to do with its break counts.

A new weapon has 0 out of 10 break counts, meaning you can successfully repair it 9 times. 10th break count = Beyond Repair. Even a successful repair adds a break count, unless you get 40 xp from it. And weapons found in encounters already have multiple break counts on them, which is why they are always much harder to repair, and if you are trying to repair them multiple times, chances are they will go to Beyond Repair before you can get it down to 0%.
Logged
Error while opening cfg file: spawnnpc.cfg
Shit! Damn admins! Always ruining my fun! I guess I'll talk to them. WITH MY FISTS!!!! No seriously, I will write them a nice email or make a thread on the forums or something. Thanks!

Wallace

  • "Not a bug. It's a feature"
  • Offline
Re: Repair Formula (?)
« Reply #11 on: October 07, 2011, 05:06:13 pm »

Forget about the break counts for a moment

For example let's have an armor (no break counts) which has 75% deterioration

I i'd repair it with my char (250 repair skill) it would only repair 32% so after using the repair skill that armor would have 43% deterio left and info "it has seen a few repairs"

For that kind of using repair skill you get 20 xp
« Last Edit: October 07, 2011, 05:07:48 pm by Wallace »
Logged

craft, Craft, CRAFT! (armors)
sometimes repair dismantle stuff
Roleplay!
...and most of all; DEATH TO NERFING!!!

Ganado

  • Moderator
  • Dishonest Abe
  • Offline
Re: Repair Formula (?)
« Reply #12 on: October 07, 2011, 05:34:23 pm »

Oh, I thought my meant that once it got to 32% deter, it wouldn't go more than that. 32% per each repair doesn't sound wrong.
Logged
Error while opening cfg file: spawnnpc.cfg
Shit! Damn admins! Always ruining my fun! I guess I'll talk to them. WITH MY FISTS!!!! No seriously, I will write them a nice email or make a thread on the forums or something. Thanks!

Wallace

  • "Not a bug. It's a feature"
  • Offline
Re: Repair Formula (?)
« Reply #13 on: October 07, 2011, 05:39:39 pm »

Well the amount doesn't sound wrong...

But thet 32% is kinda weird number...

Why not 25, 33 or 50?

That's why it bothers me if it is a feature or bug...
Logged

craft, Craft, CRAFT! (armors)
sometimes repair dismantle stuff
Roleplay!
...and most of all; DEATH TO NERFING!!!

Johnnybravo

  • Hey there!
  • Offline
Re: Repair Formula (?)
« Reply #14 on: October 07, 2011, 06:46:19 pm »

Quote
10th break count = Beyond Repair

I remember item with just 8 breaks being beyond repair :/.
Logged
"What is this, I don't even"
"This is your forum."
Pages: [1] 2
 

Page created in 0.068 seconds with 21 queries.