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

Fixed Gender NPC Bug

Discussion in 'Archived Bug Reports' started by Ziru, Oct 31, 2013.

  1. Ziru
    Offline

    Ziru New Member

    Joined:
    Oct 26, 2013
    Messages:
    17
    Likes Received:
    1
    Male npc have female body...
    Female npc have male body...


    This also occurs with nerun's distro.

    GenderBug.png Untitled.jpg

    i think that its not "gender" its bodyvalue.

    ------------------------------------------------------
    some males got bodyvalue 401 (female body)
    that have male cloth/armor
    that have female names.

    that must have bodyvalue 400 (male body)

    ------------------------------------------------------
    some females got bodyvalue 400 (male body)
    that have female cloth/armor
    that have male names.

    that must have bodyvalue 401 (female body)

    ------------------------------------------------------

    how this can be fixed?
    Thanks.
     
    #1 Ziru, Oct 31, 2013
    Last edited: Nov 28, 2013
  2. Ziru
    Offline

    Ziru New Member

    Joined:
    Oct 26, 2013
    Messages:
    17
    Likes Received:
    1
    Anna... why so manly?
    (welcome to the new transgender UO)
    Untitled.jpg
     
  3. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,102
    Likes Received:
    117
    Fixed.

    Overwrite or Merge (if you have edited BaseVendor). You will need to respawn all vendors.

    Please test and report back if resolved.

    Use the one below please.
     
    #3 Ravenwolfe, Nov 1, 2013
    Last edited: Nov 27, 2013
    • Two Thumbs Up Two Thumbs Up x 1
  4. Ziru
    Offline

    Ziru New Member

    Joined:
    Oct 26, 2013
    Messages:
    17
    Likes Received:
    1
    Worked perfectlly
     
  5. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,102
    Likes Received:
    117
    Cool, of course some men like hairy women....
     
    • Optimistic Optimistic x 1
  6. Hammerhand
    Offline

    Hammerhand Active Member

    Joined:
    Mar 26, 2013
    Messages:
    759
    Likes Received:
    73
    Found a boo-boo in the fix... Line 44
    public override bool CanTeach { get { return false; } }
    Needs to be true or else the vendors cant teach the players anything.
     
    • Informative Informative x 1
  7. Ziru
    Offline

    Ziru New Member

    Joined:
    Oct 26, 2013
    Messages:
    17
    Likes Received:
    1
    this may be a intentional newbie-shield :p :p :p
     
  8. Hammerhand
    Offline

    Hammerhand Active Member

    Joined:
    Mar 26, 2013
    Messages:
    759
    Likes Received:
    73
    Another boo-boo... line 51
    public virtual bool IsActiveBuyer { get { return false; } } // response to vendor SELL
    Should be
    public virtual bool IsActiveBuyer { get { return IsActiveVendor; } } // response to vendor SELL
     
    • Informative Informative x 1
  9. Macil
    Offline

    Macil Member

    Joined:
    Nov 6, 2013
    Messages:
    35
    Likes Received:
    1
    Whoever made it might have wanted a player-based economy. 'Thus disabling the option to sell (not sure why buy would be enabled though - or why training would be disabled)..
     
  10. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,102
    Likes Received:
    117
    Yes, sorry. When I posted that I forgot I had modified my basevendor to not teach or buy from players. My shard is based on Siege Perilous rules and that how it is on Siege. The vendors will sell to you but will not buy from you or train you in skills.

    Here's a distro one with the fix...
     

    Attached Files:

    #10 Ravenwolfe, Nov 27, 2013
    Last edited: Nov 27, 2013
    • Like Like x 1
  11. cmileto
    Offline

    cmileto Member

    Joined:
    Nov 18, 2013
    Messages:
    159
    Likes Received:
    5
    What I did was use the stock file but move this line:

    Utility.AssignRandomFacialHair(this, hairHue); <--- can be found directly underneath this line: Utility.AssignRandomHair(this, hairHue);



    down maybe 5 or 6 lines to where vendor sex had already been decided. My basevendor is way to intertwined with other custom scripts to swap it out. Mine now looks like so:


    Code (C#):
    1.  
    2. Utility.AssignRandomHair(this, hairHue);
    3. // line moved to correct female facial hair
    4. if (Female)
    5. {
    6. switch (Utility.Random(6))
    7. {
    8. case 0:
    9. AddItem(new ShortPants(GetRandomHue()));
    10. break;
    11. case 1:
    12. case 2:
    13. AddItem(new Kilt(GetRandomHue()));
    14. break;
    15. case 3:
    16. case 4:
    17. case 5:
    18. AddItem(new Skirt(GetRandomHue()));
    19. break;
    20. }
    21. }
    22. else
    23. {
    24. switch (Utility.Random(2))
    25. {
    26. case 0:
    27. AddItem(new LongPants(GetRandomHue()));
    28. Utility.AssignRandomFacialHair(this, hairHue);
    29. break;
    30. case 1:
    31. AddItem(new ShortPants(GetRandomHue()));
    32. Utility.AssignRandomFacialHair(this, hairHue);
    33. break;
    34. }
    35. }
    a quick respawn of my vendors and its right as rain.
     
  12. Fireball
    Offline

    Fireball Member

    Joined:
    Sep 6, 2014
    Messages:
    96
    Likes Received:
    7
    I don't want to appear rude, but I just downloaded what says it is the latest ZIP file of ServUO in order to test it and the first thing I noted was that many of the female vendors were bearded, and some of the male vendors had female hair/clothes. I search for this and I find this thread dated November 2013 and it is now September 2014. I also had two main.cs crashes which I also find in another thread with some fix suggestions. Why has the ZIP file not been updated with these changes? If I use git to download instead will I get all of these old fixes which are not in the ZIP file? Again, I really don't wish to offend anyone, especially as a software developer myself, but as someone arriving to look at this software and test it, it is instantly rather off-putting to find it doesn't work right! Can we get the ZIP file updated with all the latest debugged scripts?
     
  13. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,102
    Likes Received:
    117
    Ah yes, this fix was posted before I had access to the main repo for updates. I will get this fix in the main repo.

    Not sure about the main.cs crashes, can you be more specific on those, maybe which ones or where you found a fix? Remember that main.cs is the base of any error but the real error is usually in one of the scripts, you have to look at the top of the error report, not the bottom, they are read from the bottom up.
     
  14. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,420
    Likes Received:
    385
    Fireball please be patient :) As all of our Developer's have been very busy with work and real life issues. Ravenwolfe has stepped up to handle the bugs so that ServUO will be complete, as Ravenwolfe stated he just gained access to the main repo to fix pending bugs.
     
  15. Fireball
    Offline

    Fireball Member

    Joined:
    Sep 6, 2014
    Messages:
    96
    Likes Received:
    7
    Hi Milva and Ravenwolfe,

    Thank you both for your explanations. I was trying my best not to appear ungrateful for your hard work which you provide for FREE :)

    I am, perhaps, just a little confused with this SVN/Git type thing (of which I am a total newbie) because I thought the whole point of it was that these changes and bug-fixes automatically became available to everyone without having to make the code patches manually yourself. I guess I wasn't understanding why I wasn't getting them and I'm still not, really! :)

    I am very well aware of the pressures of real life. Got quite a few myself, so you have my sympathy! :)

    I have been setting up a UO server which has been an interesting learning process, but rather than using the system I have started with, I wanted to go for your system, ServUO, which has an active team actually working on it <grin> so I will just be patient and wait until you have something I can start building from.

    Kind regards
     
    • Two Thumbs Up Two Thumbs Up x 1
  16. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,102
    Likes Received:
    117
    People post bugs here and someone may post a fix for it. However, it doesn't go into the main repo (Github) until someone with write access can update it. I just recently got write access and the others have been missing, so Github had not been updated. When we post a commit to the repo, it will update the zip for you to download. I just sent the fix for female beards to the main repo, so if you download the zip now, it is fixed.

    However, you haven't told me the other errors you were referring to, so I can't update those until I know what you are talking about.
     
Similar Threads: Gender NPC
Forum Title Date
Script Support Gender in vendors Jul 3, 2015
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