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

Opposition Tribe Dictionary S1.00

Provide easy-to-use ability to add multiple opposition enemies

  1. GriffonSpade
    Requirements:
    ServUO build no earlier than 2017/4/09
    replace/merge snippets into basecreature.cs
    This resource is a framework to provide easy-to-use ability to add multiple opposition TribeType enemies

    Note: System causes by default no deviation without adding additional opposed TribeType tuples.

    To make savages and goblins fight against each other, for example, change the Tuple Array TribeConflicts to this:

    Code (C#):
    1.  
    2.   private static readonly Tuple<TribeType, TribeType>[] TribeConflicts =
    3.   new Tuple<TribeType, TribeType>[]
    4.   {
    5.   Tuple.Create(TribeType.Terathan, TribeType.Ophidian),
    6.   Tuple.Create(TribeType.Savage, TribeType.Orc),
    7.   Tuple.Create(TribeType.Savage, TribeType.GrayGoblin),
    8.   Tuple.Create(TribeType.Savage, TribeType.GreenGoblin),
    9.   Tuple.Create(TribeType.Fey, TribeType.Undead),
    10.   Tuple.Create(TribeType.GrayGoblin, TribeType.GreenGoblin)
    11.   };
    12.  
    Installation: Basic Snippet Tutorial
    First, this cs file is NOT a loadable cs file itself, but contains snippets that must be manually edited into basecreature.cs replacing or merging with existing ones, and adding new ones (and patchnotes).

    I suggest pasting the first, non-replacement section (property virtual flags) just above IsTribeEnemy method.

    The comment tags themselves mark the beginning (//GS) and end (//GS//) of each section (either a whole method or the dictionaries section). I advise including them for future reference.

    Use Ctrl+F and paste in the method names to quickly search for the methods in basecreature.cs.

    Contains the following existing method that needs merged/replaced:
    IsTribeEnemy