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:
to this:
Around line 1065 in public Skills( Mobile owner, GenericReader reader ) change this:
to this:
and last but not least around line 1009 in public void Serialize( GenericWriter writer ) change this:
to this:
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
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