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!

SkillsTotal Mod

Thorash

Wanderer
SkillsTotal Mod

Hope this is the right category and my code doesn't do anything it isn't supposed to ;)

The intention of this small mod is that skills above 120 count only as 100 in the skillsTotal so that players can have 7 skills at 120 with a skillcap of 700 without them being able to raise i.e. 8 skills to 100 (and another one to 40). Some skill-combinations get kind of uber if you set the skillcap too high.

You have to modify the source of skills.cs like this:

around line 280 in public int BaseFixedPoint change this:
Code:
if ( m_Base != sv )
{
m_Owner.Total = (m_Owner.Total - m_Base) + sv;
[...]

to this:

Code:
if ( m_Base != sv )
{
	ushort tempsv = sv;
	if (tempsv > 1000) tempsv = 1000;
	ushort tempbase = m_Base;
	if (tempbase > 1000) tempbase = 1000;
	
	m_Owner.Total = (m_Owner.Total - tempbase) + tempsv;
	//m_Owner.Total = (m_Owner.Total - m_Base) + sv;
[...]

Around line 1065 in public Skills( Mobile owner, GenericReader reader ) change this:
Code:
m_Total += sk.BaseFixedPoint;

to this:
Code:
m_Total += (sk.BaseFixedPoint > 1000 ? 1000 : sk.BaseFixedPoint);

and last but not least around line 1009 in public void Serialize( GenericWriter writer ) change this:
Code:
m_Total += sk.BaseFixedPoint;

to this:
Code:
m_Total += (sk.BaseFixedPoint > 1000 ? 1000 : sk.BaseFixedPoint);


I really hope I didn't do crap. It seems to work fine, but it is only tested a bit so I can't give you any warranty ;)
If you see any big mistakes, things missing, dirty programming etc. please leave a comment :)
Also if you know a way to make these changes without "hacking the core" let me know, I don't like modifying the core that much ;)

Greetings

Thorash/WehTeheFf
 
i do not know the long term percussions on this

1) skill gains above 100 (skill check)
2) otherthing that are looking for skills vs actual skill - might just report 100 then instead of actual skill (spell & weapon system for starters
3) aos.cs file - lots of calls in there
4) probably lots of others, but just waking up - can't think of off hand

it could be hard to see if it is working or not correctly, because besides crafting, you can not see actual % chance for many things
 

Thorash

Wanderer
Well I tried to modify the Total only, not the Base itself (BaseFixedPoint only changed in set method and only things concerning Total there), so I _hope_ there is no such bad side effect.
I'll try to look for any bugs related to this one on my server and report them here immediately ;)
 
Top