Magic studded leather repairable?!?

For ideas on how to make Second Age a better shard. Can it get any better? Maybe.
Forum rules
Posts in this forum are expected to be constructive, realistic and civil. Inflamatory or off topic posts will be removed.
Post Reply
Sarrano
Posts: 88
Joined: Fri Oct 16, 2009 11:02 am

Magic studded leather repairable?!?

Post by Sarrano »

I didn't have a smith in era so I have no first hand knowledge on this. I always assumed it was unrepairable. But then I stumbled across a few things.

I was checking out the stratics site on armor and noticed that it doesn't list studded armor as unrepairable. LINK HERE

At first I thought this was just something they missed. But I did a search and a few things came up. First thing I found was in April of 1999. LINK HERE

The last post there , the person sounds like they were able to repair some studded pieces but not all.

Then this post in 2000 seems to confirm that last one as still working after our cutoff date.
LINK HERE

So it sounds like upper end magic studded should be repairable by a blacksmith, but not regular or gm for sure. Odd

User avatar
fooka03
UOSA Subscriber!
UOSA Subscriber!
Posts: 633
Joined: Sun Dec 28, 2008 2:51 am

Re: Magic studded leather repairable?!?

Post by fooka03 »

+1, I do remember studded armor being repairable, but there was some weirdness in what could be repaired and what couldn't be. I wonder if the repair code was somehow related to AR ratings rather than material types in that if the max possible AR was above a certain threshold the item could be repaired.

The last part is purely conjecture, no idea how this actually worked just believe I remember that there were certain pieces of studded armor that were repairable.
[$$$] Syndicate of Successful Salesmen
Cash, The Drunken Smith
GM Miner, Tinker, Smith, Carpenter, Tailor

Anomander Rake
Posts: 27
Joined: Sat Nov 24, 2012 4:04 pm

Re: Magic studded leather repairable?!?

Post by Anomander Rake »

I remember it being repairable at some point, but I can't remember when.
Image

Sarrano
Posts: 88
Joined: Fri Oct 16, 2009 11:02 am

Re: Magic studded leather repairable?!?

Post by Sarrano »

Any more info on this? Is it possible to repair high end studded in the demo?

Sarrano
Posts: 88
Joined: Fri Oct 16, 2009 11:02 am

Re: Magic studded leather repairable?!?

Post by Sarrano »

I was looking through some of my old posts and came across this. Just wondering if anyone had the chance to check this out in the demo, for the sake of era accuracy and all :P

Kaivan
UOSA Donor!!
UOSA Donor!!
Posts: 2923
Joined: Wed Aug 13, 2008 11:07 pm

Re: Magic studded leather repairable?!?

Post by Kaivan »

I've checked the demo script for blacksmithy, and the demo employs a very simple set of checks to determine whether something should or shouldn't be repaired. This is the part of script that is relevant for repairing an item:

Code: Select all

#on targetobj(object user, object usedon)
{
  cleanup();
  if(Q4BL(user, "The blacksmith skill", 0x00))
  {
    return(0x00);
  }
  if(!Q4ZM(user))
  {
    return(0x00);
  }
  if(isWeapon(usedon) && hasResource(usedon, resourceTypeToId("metal")))
  {
    if(isInContainer(usedon))
    {
      object container = getTopmostContainer(usedon);
      if(isMobile(container))
      {
        if(container != user)
        {
          systemMessage(user, "You can't work on that item.");
          return(0x00);
        }
      }
    }
    integer Q4G6 = getWeaponCurHP(usedon);
    integer Q56H = getWeaponMaxHP(usedon);
    if((Q56H == 0x00) || (Q4G6 >= Q56H))
    {
      systemMessage(user, "That is already in full repair.");
      return(0x00);
    }
    integer Q5MK = (Q56H - Q4G6) * 0x04E2 / Q56H - 0xFA;
    integer Q4Q1;
    integer success = testAndLearnSkill(user, 0x07, Q5MK, 0x32);
    Q56H --;
    Q4G6 --;
    if(Q4G6 < 0x01)
    {
      systemMessage(user, "You destroyed the item.");
      deleteObject(usedon);
    }
    else
    {
      if(success > 0x00)
      {
        Q4G6 = Q56H;
        systemMessage(user, "You repair the item.");
      }
      Q4Q1 = setWeaponMaxHP(usedon, Q56H);
      Q4Q1 = setWeaponCurHP(usedon, Q4G6);
    }
One small note about this code: In the demo all weapons and armor are classified in weapon files using the same templating format. This means that all armor pieces are treated as weapons, which is why the isWeapon function works the way it does. The code will work just fine on armor as well as weapons.

Now, with that out of the way, the hasResource function call is the important one here. This function checks to see if a given item has a specific type of resource that is present with the item, and this particular function is based off of the overall resource system in UO, where resources spawn in chunks on the map based on the type of map tile shown (e.g. any trees within a specific chunk will spawn wood, and any water tiles within a chunk will spawn fish). These resources are then transferred from the chunk to the raw resources as they're harvested, and these raw resources transfer the resource type & amount to the finished product when it's crafted. In this way, an item carries some sort of "resource" of a particular type as part of it's makeup. So when the game checks to see if a particular item actually carries a particular resource, it is checking to see if the item itself has gotten the resources from some other location.

Given the above information, we don't know exactly why some higher level pieces of studded leather are repairiable, but there are some possible explanations. It may be possible that starting with the meditation patch in 1999, newly spawning magical items of a certain strength or higher were simply given a component of metal as part of gaining those magical properties. This would explain why higher strength magical studded armor would sometimes tell you that you had too much armor on to meditate as reported from stratics during the era. This would have also made the armor repairable, but would have yielded no metal as part of the unraveling process, which took place via tailoring (and would likely have checked for leather as the resource to return). Another explanation is simply that armor with a base AR rating of a certain amount or higher would have been eligible for repair, but this does ignore the fact that the available information indicates that no leather was repairable, although some sweet spot number may have existed to write the code with. Either way, these are just hypotheses on how it worked, and unfortunately, we don't really have any concrete information for why it was possible to repair higher level studded armor, as opposed to all other types.
UOSA Historian and former staff member: August 11, 2008 - June 19, 2016

Useful links for researching T2A Mechanics

Stratics - UO Latest Updates - Newsgroup 1 - Noctalis - UO98.org

Sarrano
Posts: 88
Joined: Fri Oct 16, 2009 11:02 am

Re: Magic studded leather repairable?!?

Post by Sarrano »

Interesting. Thanks for looking into this.

Post Reply