1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed NPC Problem

Discussion in 'Archived Bug Reports' started by jeff, Mar 4, 2014.

  1. jeff
    Offline

    jeff New Member

    Joined:
    Feb 3, 2014
    Messages:
    12
    Likes Received:
    1
    Recently (Feb 21) I changed my shard from RUNUO to ServUo. After doing so NPC's get a random name instead of the defined name. If they have a non-human body they end up with a human one.

    Custom NPCs I made exhibit this and the file for the NPC was not altered at all. This issue is not limited to NPCs I created when on RunUO. It also affects Quest NPCs that are part of the ServUo Distro. for instance Grizelda the hag is never named Grizelda and Zeefzorpul her imp friend is neither named Zeefzorpul nor an imp.

    I can upload the files if need be but they are unaltered from the ServUo Repro link above (they have the 10/28/2013 timestamp) . I believe I am overlooking some little thing. I doubt this issue is unique to me but I was unable to find any posts about it.

    If someone can steer me to the correct direction or an existing post that would be wonderful.

    As I said I am willing to upload any file that is need. I suspect it is related to BaseVendor.cs but really that is just guess.

    Thanks for any help
     
    • Agree Agree x 1
  2. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    It does seem to be off the BaseVendor.cs
    Code (C#):
    1.  
    2.             if (Female = GetGender())
    3.             {
    4.                 Body = 0x191;
    5.                 Name = NameList.RandomName("female");
    6.             }
    7.             else
    8.             {
    9.                 Body = 0x190;
    10.                 Name = NameList.RandomName("male");
    11.             }
    12.         }
     
  3. jeff
    Offline

    jeff New Member

    Joined:
    Feb 3, 2014
    Messages:
    12
    Likes Received:
    1
    I guess my real question is why the specific NPC script's InitBody does not take precedence over the InitBody in the BaseVendor.cs? Looking at the scripts it is clearly the intention that the NPC Script's InitBody should be the one in effect.
     
  4. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    The problem is in BaseVendor but it's not because of the InitBody method. That method does in fact get overridden properly. The problem is with the CheckMorph method. I did a fix for this for the MondainQuester.cs back when we were ForkUO because of the body morphing. You just have to override that method and leave it blank. You can override it within each NPC's class or if it should be for all 'Questers' then you can override it in BaseQuester and it will fix them all.
    Code (C#):
    1. public override void CheckMorph()
    2. {
    3.     // Don't morph me!
    4. }
     
  5. jeff
    Offline

    jeff New Member

    Joined:
    Feb 3, 2014
    Messages:
    12
    Likes Received:
    1
    Thanks!!! that did it!!!.

    For my purposes this is resolved. However this is occurs with unmodified files from the Repo. What is the process or mechanism for getting the BaseQuester.cs updated there?
     
  6. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    I'll move this thread to Bug Reports and one of us Devs will take care of it :).
     
  7. Toriad
    Offline

    Toriad Shard Owner

    Joined:
    Mar 4, 2013
    Messages:
    86
    Likes Received:
    35
    1 2 3 Not it! I kid, I got it.
     
  8. Toriad
    Offline

    Toriad Shard Owner

    Joined:
    Mar 4, 2013
    Messages:
    86
    Likes Received:
    35
    Thanks for the fix kalamus.
     
Similar Threads: NPC Problem
Forum Title Date
Archived Bug Reports NPC "andric" trains improper skill Aug 7, 2017
ServUO Discussion Activation of NPC / Mobile spawners if staff member is hidden Aug 5, 2017
Archived Bug Reports Siege Mode - NPC gold in backpack bug Aug 3, 2017
Archived Bug Reports Changes to way NPCs clothing is applied is rendering a lot of them naked... Jun 18, 2017
Archived Bug Reports Instant restock on NPC vendors Jun 13, 2017
Archived Bug Reports Npc Vendors and prices May 24, 2017
Script Support Pirates npc and Servuo May 16, 2017