fodev.net
15.08.2009 - 23.06.2013
"Wasteland is harsh"
Home Forum Help Login Register
  • June 26, 2024, 11:09:15 am
  • Welcome, Guest
Please login or register.

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

Author Topic: Repair  (Read 793 times)

Repair
« on: January 12, 2012, 11:07:27 am »

At TNF we trying to create more hardcore and realistic environment for players, so game would be more like "Mad Max", rare decent firearms and ammo.

I thought that original repair system was too simple and casual for us, so i made some changes till we rework craft/materials more seriously:

1) weapons and armor require some tools and materials for repair, depending on quality and complexness of item (zip gun repaired by any junk with bare hands and plasma gun require expensive and rare plasma transformers and supertoolset).
2) items get bonus or penalty to repair check depending on complexness of item (zip gun +50 repair, power armor -70), so pretty much everyone could repair his low-tech equipment, but for complex stuff you should look for decent tech guy.

chunk of code
Code: [Select]
// repair by ErlKing
int type=item.GetProtoId();

switch(type)

{
case PID_SANDROBE: repair+=25;
case PID_LEATHER_JACKET: repair+=25;
if(_CritCountItem(cr,PID_POCKET_LINT)>1) cr.DeleteItem(PID_POCKET_LINT,2);
else if(_CritCountItem(cr,PID_GECKO_PELT)>0) cr.DeleteItem(PID_GECKO_PELT,1);
else if(_CritCountItem(cr,PID_GOLDEN_GECKO_PELT)>0) cr.DeleteItem(PID_GOLDEN_GECKO_PELT,1);
else if(_CritCountItem(cr,PID_BRAHMIN_SKIN)>0) cr.DeleteItem(PID_BRAHMIN_SKIN,1);
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155080); return true;}
break;
case PID_LEATHER_ARMOR: repair+=20;
case PID_CURED_LEATHER_ARMOR: repair+=20;
if(_CritCountItem(cr,PID_GECKO_PELT)>1) cr.DeleteItem(PID_GECKO_PELT,2);
else if(_CritCountItem(cr,PID_BRAHMIN_SKIN)>0) cr.DeleteItem(PID_BRAHMIN_SKIN,1);
else if(_CritCountItem(cr,PID_HARD_HIDE)>0) cr.DeleteItem(PID_HARD_HIDE,1);
else if(_CritCountItem(cr,PID_GOLDEN_GECKO_PELT)>0) cr.DeleteItem(PID_GOLDEN_GECKO_PELT,1);
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155090); return true;}
break;
case PID_LEATHER_ARMOR_MK_II: repair+=15;
if(_CritCountItem(cr,PID_GOLDEN_GECKO_PELT)>0) cr.DeleteItem(PID_GOLDEN_GECKO_PELT,1);
else if(_CritCountItem(cr,PID_HARD_HIDE)>0) cr.DeleteItem(PID_HARD_HIDE,1);
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155090); return true;}
break;
case PID_CURED_LEATHER_ARMOR_MK_II:
case PID_METAL_ARMOR:
if(_CritCountItem(cr,PID_SLEDGEHAMMER)>0)
{
if(_CritCountItem(cr,PID_METAL_TRASH)>2) cr.DeleteItem(PID_METAL_TRASH,3);
else if(_CritCountItem(cr,PID_HLAM_MEH)>1) cr.DeleteItem(PID_HLAM_MEH,2);
else if(_CritCountItem(cr,PID_HLAM2_MEH)>1) cr.DeleteItem(PID_HLAM2_MEH,2);
else if(_CritCountItem(cr,PID_METAL_LIST_MEH)>0) cr.DeleteItem(PID_METAL_LIST_MEH,1);
else if(_CritCountItem(cr,PID_IRON_PLATE)>0) cr.DeleteItem(PID_IRON_PLATE,1);
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155100); return true;}
}
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155110); return true;}
break;
case PID_METAL_ARMOR_MK_II: repair-=25;
if(_CritCountItem(cr,PID_DRILL)>0)
{
if(_CritCountItem(cr,PID_METAL_LIST_MEH)>1) cr.DeleteItem(PID_METAL_LIST_MEH,2);
else if(_CritCountItem(cr,PID_IRON_PLATE)>0) cr.DeleteItem(PID_IRON_PLATE,1);
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155130); return true;}
}
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155120); return true;}
break;
// weapon middle-tech
case PID_COMBAT_SHOTGUN: repair-=15;
case PID_SCOPED_HUNTING_RIFLE: repair-=5;
case PID_REMINGTON:
case PID_10MM_SMG:
case PID_TOMMY_GUN:
case PID_GREASE_GUN: repair-=10;
case PID_HUNTING_RIFLE:
case PID_14MM_PISTOL:
case PID_ANACONDA: repair-=15;
case PID_DESERT_EAGLE:
case PID_DESERT_EAGLE_EXT_MAG:
case PID_44_MAGNUM_REVOLVER:
case PID_44_MAGNUM_SPEEDLOADER: repair-=5;

if(_CritCountItem(cr,PID_DRILL)>0)
{
if(_CritCountItem(cr,PID_METAL_TRASH)>3) cr.DeleteItem(PID_METAL_TRASH,4);
else if(_CritCountItem(cr,PID_IRON_DETALS)>0) cr.DeleteItem(PID_IRON_DETALS,1);
else if(_CritCountItem(cr,PID_PERED_MEH)>0) cr.DeleteItem(PID_PERED_MEH,1);
else if(_CritCountItem(cr,PID_DETAL_MEH)>0) cr.DeleteItem(PID_DETAL_MEH,1);
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155220); return true;}
}
else {cr.SayMsg(SAY_NETMSG,TEXTMSG_GAME,155160); return true;}
break;

For each item or group of items there are set of materials and most cheap used for repair, if there are none at all you get message about materials or tools you need. As you see for now this script pretty simple and lack of choise for player - you cant chose material to repair with, if you want to use more expensive ones.

I dont mind some feedback, not about this suggestion being good or bad (i already know exactly how it worked out in game), but some ideas and solutions to improvement or organizing (like adding menu for optional materials using and adding bonuses/penalty/restrictions for different material choice or such).
Logged

avv

  • Offline
Re: Repair
« Reply #1 on: January 12, 2012, 12:13:08 pm »

So basically: low tier can be fixed by anyone but for higher tier you need repair alt.

It would help new players but they will eventually make the repairer alt anyway. In addition to fix a plasma you need another plasma so that counts as expensive mats. The suggestion was well presented and all but it wouldn't bring anything better to the game since the old conditions would still count.
Logged
Based on evidence collected from various sources by trustworthy attendees it is undisputed veritability that the land ravaged by atomic warfare which caused extreme change of the ecosystem and environmental hazards can be considered unpleasant, rugged and unforgiving.

Nexxos

  • Moderator
  • o_O
  • O_o
  • Offline
Re: Repair
« Reply #2 on: January 13, 2012, 05:17:34 am »

It would be nice if there this kind of a thing would be an alternative to fix-items-with-same-items repair system. It technically could lessen the amount of crafter alts needed, if someone could be able to repair an item with the same item AND materials, so there would be no reason for him to make xyz-crafter for making a replacement weapon for the original one, and then using the original one to repair the newly-crafted one after it gets enough deterioration.
Logged
“And we passed through the cavern of rats.

And we passed through the path of streaming flamethrowers.

And we passed through the faction of the blind.

And we passed through the slough of swarm.

And we passed through the vale of tears.

And we came, finally, to the ice caverns.

runboy93

  • 'Insanity'
    • MyAnimelist Profile
  • Offline
Re: Repair
« Reply #3 on: January 13, 2012, 08:38:28 am »

Repairing need always repair alt :/
But still you used time to write suggestion and it looks fine :)
Re: Repair
« Reply #4 on: January 19, 2012, 06:22:13 pm »

Second the idea of using material to repair, just seems logical.
Logged

Wallace

  • "Not a bug. It's a feature"
  • Offline
Re: Repair
« Reply #5 on: January 19, 2012, 10:04:42 pm »

I can't find the threads where something like that was suggested... anyway i do hope something like it will be implemented sooner than soon

Fixing an item ONLY with another of the same type is pretty unbalanced
Logged

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

Page created in 0.163 seconds with 21 queries.