RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RUO X] World of Warcraft Level System Utility/SDK Implimentation Guide

Azden777

Page
Thank you very much :)

I restarted again and completed so far PlayerMobile.cs and BaseCreature.cs EXACTLY the stuff that you added.
 
Not to my knowledge. If it did exist, it would most likely be in the BaseCreature.cs file. I would say read through it and see, but I'm pretty sure this system didn't go that far.
 

Azden777

Page
Ahhh okay.. that would have been neat. I am using a script that changes weapon's name colors. So monster name's seemed to make sense too. And I don't see anywhere that it describes the mob's level or anything that you are attacking.
 
Actually, if you look in the WoWLevelUtility.cs file, this exists:
Code:
/// <summary>
        /// Gets the level 'color' associated with World of Warcrafts' "Grey to Skull" scale.
        /// Obligatory He-man citation needed.
        /// </summary>
        /// <param name="playerLevel">(int) The current level of the player 'targeting' the NPC.</param>
        /// <param name="npcLevel">(int) The current level of the NPC that is being 'targeted' by the player.</param>
        /// <returns>(WowLevelColor) The level 'color' associated with World of Warcrafts' 'Grey to Skull' scale.
        /// Incidentally, the value name returned also translates into the correct hue id number for use with text.</returns>
        public static LevelColor GetLevelColor(int playerLevel, int npcLevel)
        {
            if (playerLevel + 5 <= npcLevel)
            {
                if (playerLevel + 10 <= npcLevel)
                {
                    return LevelColor.Skull;
                }
                else
                {
                    return LevelColor.Red;
                }
            }
            else
            {
                switch (npcLevel - playerLevel)
                {
                    case 4: { return LevelColor.Orange; }
                    case 3: { return LevelColor.Orange; }
                    case 2: { return LevelColor.Yellow; }
                    case 1: { return LevelColor.Yellow; }
                    case 0: { return LevelColor.Yellow; }
                    case -1: { return LevelColor.Yellow; }
                    case -2: { return LevelColor.Yellow; }
                    default:
                        if (playerLevel <= 5)
                        {
                            return LevelColor.Green;
                        }
                        else
                        {
                            if (playerLevel <= 39)
                            {
                                if (npcLevel <= (playerLevel - 5 - Math.Floor((double)(playerLevel / 10))))
                                {
                                    return LevelColor.Grey;
                                }
                                else
                                {
                                    return LevelColor.Green;
                                }
                            }
                            else
                            {
                                if (npcLevel <= (playerLevel - 1 - Math.Floor((double)(playerLevel / 5))))
                                {
                                    return LevelColor.Grey;
                                }
                                else
                                {
                                    return LevelColor.Green;
                                }
                            }
                        }
                }
            }
        }

It does state that the name colors SHOULD change, but I have not seen that happen yet. Maybe something Vorspire may be able to answer, but he hasn't looked at the code in quite some time so I would try and find a solution yourself.
 
Did you add something in just now? If so, revert to before that save. I still believe that is something to do with a serialization or deserialization. I do recall reading stuff about that type of error coming in, I just don't remember where so pop up a search for something like PlayerMobile delete.
 

Azden777

Page
I believe so too, and no I never changed anything I just forgot to test it by restarting the server.

Edit: Fixed it... You had under Deserialize:

Code:
//m_LastOnline = reader.ReadDateTime();

I just uncommented that line to:

Code:
m_LastOnline = reader.ReadDateTime();

Works fine and Dandy now. Thank you! :) On to bigger stuff now... Muahhahaha...
 

Azden777

Page
Thanks :) By the look of that script, it changes the color of Mob's levels. But it doesn't actually show there level anywhere.
 

Vorspire

Knight
The system doesn't inject color into any names, it uses the "grey to skull" scale to determine difficulty for XP reward and requirement calculations in the system.
It just so happens to return the correct hue number associated with the colors' name, which can be used for labels in gumps and such.

Here's some pictures of my old shard, you can see the different aspects of the user interface that was designed around this SDK.

RPKUI-FULL.jpgRPK_GUI.jpgRPKUI.jpgNewLevelGump.jpg
 

Azden777

Page
Ah.... hmm.. Well is there a way to add " Lv. #" on the end of there name's, and color the Lv. # Part?

Also. If there is, can you show me how? My RunUO Scripting skills are a bit rusty, if not just tell me a theory of how to do it, and I will.

Edit: Also, what is VitaNexCoreProject?
 
I really like your gumps Vorspire. Any chance you are done playing Robin Hood long enough to teach me how you hooked up those things? Would be pretty awesome to be able to step into the gump making aspect of this. I know there are some tutorials on creating gumps already, but I think it's just too far outside my current comfort level to learn from a scripted tutorial (I did download A_Li_N's Gump Tutorial). I am the type of person that has to know the reasoning behind certain things before I can grasp a concept, so really, anyone who feels they have a little bit of time to help me out with this, I'd appreciate it.
 

Azden777

Page
Yeah, I definitely like the Level/Skillbar Gump. And the levelup gump but I am going to be just placing statcaps/skillcaps per level, not stat/skill raising.

Still thinking of my concept. All I know is I have alooooooooot of mobs to add levels too =_=

But all is well :D
 

Vorspire

Knight
Ah.... hmm.. Well is there a way to add " Lv. #" on the end of there name's, and color the Lv. # Part?
Yes, override AddNameProperty in PlayerMobile, or edit it if it already exists.
Also. If there is, can you show me how? My RunUO Scripting skills are a bit rusty, if not just tell me a theory of how to do it, and I will.
Chech the tutorials forum for my tutorial on properties and serialization, it should help in this situation.
Edit: Also, what is VitaNexCoreProject?
VitaNexCore is a dynamic extension library for RunUO, targeting .NET Framework 4.0
It exposes a huge list of utilities and features including a new (Super)Gumps Framework, Automated PvP Battle System, Schedules, DataStores (Serialization), Extended PropertyLists, Packet Decompression (by Jeff) and pretty much anything you can think of plugging into it as a CoreService or CoreModule.
It's 100% drag & drop (as long as your shard is compiled with .NET 4.0) and I will always release new systems that use the VitaNex namespace, referencing this library because of the amount of reusable code it has.
The current version (BC 2.1) is actually a bit buggy, so it's worth waiting for BC 3 which has large feature completion.


----
I've attached the only 2 remaining *.gump files I have for Gump Studio for the images above, maybe you can make use of them :)
 

Attachments

  • [GUMPS].rar
    3.8 KB · Views: 23
Top