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!

[RunUO 2.0 RC1] Lokai's Custom Race-Class System

Lokai

Knight
Lokai's Custom Race-Class System

Lokai's Custom Race-Class System

---------------------------------------------------------------------------------------------------------------------
CHANGE LOG / NOTES

8/5/2006
Uploaded the zip again, some people are still getting crashes when typing [newstats, and I don't know why. I have not been able to duplicate it.

7/25/2006
Just put up a new version of the system. Please overwrite existing files with these to get the latest changes. Here is what this release changed:
  • Corrected Skills which were all causing 6-hour delay in ability to use any other skill, hehe.
  • Added several overrides to the NewMobile to get it started toward resembling an independence from the PlayerMobile. These include changes to how Weight, Damage, Resistances, and MaxFollowers are calculated.
7/24/2006
In case anyone gets this and has never played D&D or a similar Role-Playing system, I wanted to explain a bit about why the Stats are set the way they are.

Stats are designed to go roughly from 3-18 ( or 3d6.)
So, a STR of 18 is like saying GM Strength. And 22 would be like saying Legendary Strength.
This is a description of what each Stat should be used for when you are scripting effects of having high stats:

Strength - Physical Damage, Hits, Physical Resistances, Weight Capacity, etc.
Dexterity - Manual tasks, like Lockpicking; Chance to hit; Swing speed; Cast speed, Cast recovery.
Intelligence - Spell Ability, Mental Resistances, Identification tasks, Knowledge tasks, Searching tasks.
Constitution - Endurance, Max Hits, Hit Point bonuses, Fatigue reduction, Toughness.
Charisma - Max followers increased, Decreased cost to hire, Increased payment for escorting, Taming bonus, Less chance of angering, greater Loyalty (pets, etc.)
Wisdom - Prayer spell bonuses (Druid, Cleric), Chivalry (Knight, Paladin) bonuses, lower Tithe amounts.


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

I have had this and a few other Race-Class systems for a while, and have been playing around with them, but wanted to release this while the 2.0 servers are mostly still in Beta.

What is this?

The Custom Race-Class System is just that, a System.
Specifically, it is a System for having Races, Classes, new Skills, new Stats, Levels, and Experience Points.

There are 12 Classes defined, each with 5 new Skills of their own. There are 7 races, each with its own set of Stat bonuses, etc.

This is what is known as EXTREME BETA stage. It compiles, but by itself will do absolutely nothing.

With a few stock-script modifications, you can test out the new player type 'NewMobile' and see what the system is like. More about that later.

What is this NOT?

This is not complete.
The skills are not written. (I have several templates ready to add code to them, and got started on the 'Hypnotism' skill.)
Nothing special will 'happen' when players walk around and do things.

So how do I test this out?

OK, you will need to make a few modifications to some stock scripts to make this work.
I decided not to rewrite the PlayerMobile for this. Instead I created a derived class, 'NewMobile', so thankfully you do not have to modify that.
Instead, you need to tell the game that you want to play with a NewMobile player instead of a PlayerMobile player.
You do that in CharacterCreation.cs.

Simplest way is to change the 'CreateMobile( Account a )' routine by changing this line:

PHP:
return (a[i] = new PlayerMobile());

to this:

PHP:
return (a[i] = new NewMobile());


Next, you will want to let players get Experience.
You can do that by adding one line to any script that gives out things like Karma, Tokens, etc.
For example, in BaseCreature.cs, after:

PHP:
Titles.AwardKarma( ds.m_Mobile, totalKarma, true );

you would add the following line:

PHP:
Server.Custom.GiveExperience.toMobile( ds.m_Mobile, this );

When you create your character, you need to have a Race Stone and a Class Stone where you can use them.
You Double-Click the stone to select your Race and Class.
They should also be accessible to the players during the game, since the Class Stone allows players to switch classes or advance levels if they have enough experience.

Next, go Kill things or whatever, and use the [NewStats command to see your progress.
 

Attachments

  • Custom Race-Class System.zip
    46.1 KB · Views: 58,511

steeldarkness

Sorceror
Ok so there were a few errors. But I have them fixed.

If you have Lokai's Advanced Player Gate.

change:

Code:
namespace Server.Custom

to:

Code:
namespace Server.Customs

Also you might receive an error saying that the line you add in charri creation can't find the namspace new mobile.

add to the top of newmobile.cs:

Code:
using Server.Custom;

Ok thats it for now :D

Steel
 

Tru

Knight
Also remember that any character you created before you added the system will not have the new props as they wont be a NewMobile but they would still be a PlayerMobile.

Which can cause crashes if you actually goto refrence those new props and the PlayerMobile doesn't have them.
 

Lokai

Knight
Tru said:
Also remember that any character you created before you added the system will not have the new props as they wont be a NewMobile but they would still be a PlayerMobile.

Which can cause crashes if you actually goto refrence those new props and the PlayerMobile doesn't have them.

I think I accounted for that in my scripts, for the most part. For example, if you try to bring up the 'NewSkills' I think it tells you if you are not a NewMobile. Also, when you kill a monster and call the GiveExperience.toMobile routine, if there were no NewMobile players that helped with the kill, then it just doesn't give out any experience.
 

Tru

Knight
Lokai said:
I think I accounted for that in my scripts, for the most part. For example, if you try to bring up the 'NewSkills' I think it tells you if you are not a NewMobile. Also, when you kill a monster and call the GiveExperience.toMobile routine, if there were no NewMobile players that helped with the kill, then it just doesn't give out any experience.
Right but you don't know how other people will use it and they should have all relevant info.

I'm not knocking you in any way just making people aware. I'm looking for a way to add new skills for my Sub Races (for which I use a subclassed PlayerMobile....from way back in the early days of RunUO).
 

Lokai

Knight
Tru said:
Right but you don't know how other people will use it and they should have all relevant info.

I'm not knocking you in any way just making people aware. I'm looking for a way to add new skills for my Sub Races (for which I use a subclassed PlayerMobile....from way back in the early days of RunUO).

Thanks for the input. It is welcome.
 

steeldarkness

Sorceror
Code:
World: Loading...Unable to load Mist's saved Skills.
Unable to load Mist's saved Skills.
Unable to load Mune's saved Skills.
Unable to load Nahla's saved Skills.

Hey lokai is this normal?

Steel
 

Lokai

Knight
steeldarkness said:
Code:
World: Loading...Unable to load Mist's saved Skills.
Unable to load Mist's saved Skills.
Unable to load Mune's saved Skills.
Unable to load Nahla's saved Skills.

Hey lokai is this normal?

Steel

Sort of...

When the NewMobile is Deserializing, it creates a new LevelEntry, using itself as a parameter. Since all the variables have not been loaded yet, it is not able to construct the LevelEntry completely.

This is not a significant problem, however, since right after that, I read in the Names and Values of the skills that it just choked on previously. This redundancy allows the player to (hopefully) have the same skills and such that it had prior to the restart.
 

clevin

Wanderer
sweet i always wanted one of these but i am still ... very new to scripting but if i get any errors i'll be the first to bug ya :\
 

BrandonTB

Wanderer
Not Gaining

Hey, I have my experience higher than my experience required. They both total up to 3000 instead of the required staying the same. So now what? It doesn't say level up or anything. Here's an example:
Experience: 0 / 3000
*Kill a zombie*

Now; Experience: 4 / 2996

What do I do about this?
 

Lokai

Knight
BrandonTB said:
Hey, I have my experience higher than my experience required. They both total up to 3000 instead of the required staying the same. So now what? It doesn't say level up or anything. Here's an example:

Quote:
Experience: 0 / 3000
*Kill a zombie*

Now; Experience: 4 / 2996

What do I do about this?

You have 4 experience, you need 2996 to level. Sounds like its working fine.
 

BrandonTB

Wanderer
Ah ha.

Ah, I get it now. It's just a little different than what I am used to. Thanks for the help to see my error. I just don't like how you have to double click the Class Stone again to level up. But good work.
 

Lokai

Knight
BrandonTB said:
Ah, I get it now. It's just a little different than what I am used to. Thanks for the help to see my error. I just don't like how you have to double click the Class Stone again to level up. But good work.

Remember, this is a "System", so you are free to do whatever you want with it. I agree, needing to use the Class Stone could be difficult. I don't see why one couldn't make a command like [LevelUp, or add a button to the Gump when you have the required Experience that lets you level up.
 

steeldarkness

Sorceror
Lokai I am loving the system it is alot what I have been looking for and hope you finish it soon. Also just a suggestion maybe add werewolves, vampires, angel and demons as races. *wink*

Gotta run

Steel
 

Blackfire

Wanderer
Code:
RunUO - [[url]www.runuo.com][/url] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 4 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
 + Misc/CharacterCreation.cs:
    CS0246: Line 613: The type or namespace name 'NewMobile' could not be found
(are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

Did I do something wrong? As far as I can tell its not spelt wrong or anything?

Here is code: CharacterCreation.cs

Code:
private static Mobile CreateMobile( Account a )
		{
			if ( a.Count >= a.Limit )
				return null;

			for ( int i = 0; i < a.Length; ++i )
			{
				if ( a[i] == null )
					return (a[i] = new NewMobile());
			}

			return null;
		}

Thanks alot for the help and scripts!
 

Lokai

Knight
Just posted new release:
  • Corrected Skills which were all causing 6-hour delay in ability to use any other skill, hehe.
  • Added several overrides to the NewMobile to get it started toward resembling an independence from the PlayerMobile. These include changes to how Weight, Damage, Resistances, and MaxFollowers are calculated.
 

Lokai

Knight
Some people are still getting crashes when typing [newstats.

I have not yet been able to duplicate it. Not with an existing PlayerMobile, not with a brand new NewMobile that has just appeared in the world, and not with one that has been around after 2 or 3 saves and restarts.

Nevertheless, just in case, I have uploaded the system again fresh. Please let me know both successes and failures.

Anyone made any changes to this system? I know it needs a lot of work!
 
Top