Marcel

Member
Hello Everyone!

anyone have an idea how i can make the Craftings skills beeing ignored by the Skillcap?...

Thanks for your Help!
 
The obeycap I believe is for if you find a sword with +15 anatomy it won't give the bonus over your skill cap(IE if you are 120 out of 120 it will not push it to 135). I do not believe, in this example, that it applies to the actual skill its self.
 
I think he means that he does not want the crafting skills to count towards the total skillcap
 
Hello Everyone! Trying to make this more clear:)

i want the Crafting Skills (blacksmith, Tailoring etc.) to have no effect to the Skilllimit so ppl should still need to Skill it as normal and it stops at 100 like normal + PS to 120! Every Character should be able to do Crafting on my Shard means it should have no effect to my Skilllimit which i set to 1000 Points.

i think i would need to get the Crafting Skills to not raise the Total Skillpoints https://i.imgur.com/M77ciq3.png
 
I just made the totalskillcap higher. I dont think there is another way unless you want to create a second counter separate from other skills.
 
i had that in mind but then Players could use the Skilllimit other ways like having 2 weapon skills or whatever....
 
i had that in mind but then Players could use the Skilllimit other ways like having 2 weapon skills or whatever....
No one could use 2 weapons at same time but you need arms lore and things like that if you want a good crafter. I placed no total skill cap on mine but there is always other way to get around things you want them to be able to do or not.
They could just create a new character also to get their crafter on 1.
 
I think his intent is to have a 700 skill cap so you could only, example, have 100 swords, tactics, anatomy, parry, heal, resist, and say hiding. Then you could also train all the crafting skills since the skill cap would be ignored. This would keep the balance of the classes while also allowing you to craft ect. (pre aos)
 
yep your right! friend of mine send me a way to do this i will test it and Post it here if anyone else needs it.
 
I would be interested in seeing a snippet of the code. I have thought about this a few times and do not see how it would hurt. Especially in a post AOS shard where Lumberjacking does not give a bonus. Why not allow your main to build up crafting skills when bored, to collect BODs or repair items.
 
ill post it here after testing gimme a hour about
[doublepost=1513198583][/doublepost]Thanks to my friend :) not sure if i am allowed to name him here so i don't name him here:)

so go to Skills.cs (Server/Skills.cs)

look for:
Code:
public int BaseFixedPoint

Replace:
Code:
m_Owner.Total = (m_Owner.Total - m_Base) + sv;

with:
Code:
if (!Skills.NonTotalInfluencingSkills.Contains(SkillName))
    m_Owner.Total = (m_Owner.Total - m_Base) + sv;

Look for:
Code:
public class Skills : IEnumerable<Skill>
    {
add this:
Code:
            //Ignore Skillcap
       
        public static HashSet<SkillName> NonTotalInfluencingSkills = new HashSet<SkillName>()
        {
            SkillName.Alchemy, SkillName.ArmsLore, SkillName.Blacksmith, SkillName.Fletching, SkillName.Carpentry,
            SkillName.Cartography, SkillName.Cooking, SkillName.Fishing, SkillName.Inscribe, SkillName.Tailoring,
            SkillName.Tinkering, SkillName.Lumberjacking, SkillName.Mining
        };

Look for:
Code:
        public Skills(Mobile owner, GenericReader reader)

and there you Replace:
Code:
m_Total += sk.BaseFixedPoint;

with:
Code:
if(!NonTotalInfluencingSkills.Contains(sk.SkillName))
    m_Total += sk.BaseFixedPoint;

Then look for File SkillCheck.cs (Misc/SkillCheck.cs)

look for:
Code:
public static bool CheckSkill(Mobile from, Skill skill, object amObj, double chance)

Replace:
Code:
double gc = (double)(from.Skills.Cap - from.Skills.Total) / from.Skills.Cap;

with:
Code:
double gc = (double)(from.Skills.Cap + (Skills.NonTotalInfluencingSkills.Contains(skill.SkillName) ? 1 : 0) - from.Skills.Total) / from.Skills.Cap;

Then Look for:
Code:
funktion public static void Gain(Mobile from, Skill skill)

Replace:
Code:
                if (!from.Player || (skills.Total + toGain) <= skills.Cap)
                {
                    skill.BaseFixedPoint += toGain;
                }

with:
Code:
                if (!from.Player || (skills.Total + toGain) <= skills.Cap || Skills.NonTotalInfluencingSkills.Contains(skill.SkillName))
                {
                    skill.BaseFixedPoint += toGain;
                }

then your Done and again big thanks to my Friend who gave me this Code!

Yours Sincerly
MarcelMan
 
ill post it here after testing gimme a hour about
[doublepost=1513198583][/doublepost]Thanks to my friend :) not sure if i am allowed to name him here so i don't name him here:)

so go to Skills.cs (Server/Skills.cs)

look for:
Code:
public int BaseFixedPoint

Replace:
Code:
m_Owner.Total = (m_Owner.Total - m_Base) + sv;

with:
Code:
if (!Skills.NonTotalInfluencingSkills.Contains(SkillName))
    m_Owner.Total = (m_Owner.Total - m_Base) + sv;

Look for:
Code:
public class Skills : IEnumerable<Skill>
    {
add this:
Code:
            //Ignore Skillcap
     
        public static HashSet<SkillName> NonTotalInfluencingSkills = new HashSet<SkillName>()
        {
            SkillName.Alchemy, SkillName.ArmsLore, SkillName.Blacksmith, SkillName.Fletching, SkillName.Carpentry,
            SkillName.Cartography, SkillName.Cooking, SkillName.Fishing, SkillName.Inscribe, SkillName.Tailoring,
            SkillName.Tinkering, SkillName.Lumberjacking, SkillName.Mining
        };

Look for:
Code:
        public Skills(Mobile owner, GenericReader reader)

and there you Replace:
Code:
m_Total += sk.BaseFixedPoint;

with:
Code:
if(!NonTotalInfluencingSkills.Contains(sk.SkillName))
    m_Total += sk.BaseFixedPoint;

Then look for File SkillCheck.cs (Misc/SkillCheck.cs)

look for:
Code:
public static bool CheckSkill(Mobile from, Skill skill, object amObj, double chance)

Replace:
Code:
double gc = (double)(from.Skills.Cap - from.Skills.Total) / from.Skills.Cap;

with:
Code:
double gc = (double)(from.Skills.Cap + (Skills.NonTotalInfluencingSkills.Contains(skill.SkillName) ? 1 : 0) - from.Skills.Total) / from.Skills.Cap;

Then Look for:
Code:
funktion public static void Gain(Mobile from, Skill skill)

Replace:
Code:
                if (!from.Player || (skills.Total + toGain) <= skills.Cap)
                {
                    skill.BaseFixedPoint += toGain;
                }

with:
Code:
                if (!from.Player || (skills.Total + toGain) <= skills.Cap || Skills.NonTotalInfluencingSkills.Contains(skill.SkillName))
                {
                    skill.BaseFixedPoint += toGain;
                }

then your Done and again big thanks to my Friend who gave me this Code!

Yours Sincerly
MarcelMan
Got this error.
Screenshot_22.jpg

Any help would be amazing! This is a great idea.
 
Last edited:
ill post it here after testing gimme a hour about
[doublepost=1513198583][/doublepost]Thanks to my friend :) not sure if i am allowed to name him here so i don't name him here:)

so go to Skills.cs (Server/Skills.cs)

look for:
Code:
public int BaseFixedPoint

Replace:
Code:
m_Owner.Total = (m_Owner.Total - m_Base) + sv;

with:
Code:
if (!Skills.NonTotalInfluencingSkills.Contains(SkillName))
    m_Owner.Total = (m_Owner.Total - m_Base) + sv;

Look for:
Code:
public class Skills : IEnumerable<Skill>
    {
add this:
Code:
            //Ignore Skillcap
      
        public static HashSet<SkillName> NonTotalInfluencingSkills = new HashSet<SkillName>()
        {
            SkillName.Alchemy, SkillName.ArmsLore, SkillName.Blacksmith, SkillName.Fletching, SkillName.Carpentry,
            SkillName.Cartography, SkillName.Cooking, SkillName.Fishing, SkillName.Inscribe, SkillName.Tailoring,
            SkillName.Tinkering, SkillName.Lumberjacking, SkillName.Mining
        };

Look for:
Code:
        public Skills(Mobile owner, GenericReader reader)

and there you Replace:
Code:
m_Total += sk.BaseFixedPoint;

with:
Code:
if(!NonTotalInfluencingSkills.Contains(sk.SkillName))
    m_Total += sk.BaseFixedPoint;

Then look for File SkillCheck.cs (Misc/SkillCheck.cs)

look for:
Code:
public static bool CheckSkill(Mobile from, Skill skill, object amObj, double chance)

Replace:
Code:
double gc = (double)(from.Skills.Cap - from.Skills.Total) / from.Skills.Cap;

with:
Code:
double gc = (double)(from.Skills.Cap + (Skills.NonTotalInfluencingSkills.Contains(skill.SkillName) ? 1 : 0) - from.Skills.Total) / from.Skills.Cap;

Then Look for:
Code:
funktion public static void Gain(Mobile from, Skill skill)

Replace:
Code:
                if (!from.Player || (skills.Total + toGain) <= skills.Cap)
                {
                    skill.BaseFixedPoint += toGain;
                }

with:
Code:
                if (!from.Player || (skills.Total + toGain) <= skills.Cap || Skills.NonTotalInfluencingSkills.Contains(skill.SkillName))
                {
                    skill.BaseFixedPoint += toGain;
                }

then your Done and again big thanks to my Friend who gave me this Code!

Yours Sincerly
MarcelMan

You missed the part where you defined NonTotalInfluencingSkills.Contains(skill.SkillName) so that would be needed to make this work. If you could provide the rest of the missing code this would be helpful.
 
anyone ever get this working?
It works fine if you follow those steps posted. There are a few differences in the code from when this was posted but it otherwise works.

Now what I did notice - It still counts the skill point totals in the skill client skill gump. Is anyone aware of a way to get it to not display here or is this client side?

IE - If I have 600 skill points in craft skills and 206.6 in combat skills I would like it to only show the 206.6
showthis.png
 
I actually got it working last night. There were bunch of other changes that needed to be made to allow you to gain non-exempt skills when you're at the 720 skill cap, but it IS working. I'd like to change the "Show Real" to show exempt vs non-exempt totals, but haven't finished that yet.
 
1672169912053.png
as you can see the total isnt send, that is client side.
What you can do, is maybe alter that packet to not send the crafting skills, and have a new gump for the crafting skills itself.

Or you could see if you can achieve a version you like by either sending 0 for the BaseFixedPoint for Crafting skills or that you do so vor uv (the actual value without the racialbuff)
 
Thanks for that info! Like I said, it's working properly now, but if the Total is client side, that's fine. I don't necessarily want to alter the stream being sent, so I'm fine with it as is. I'll post my changes/fixes based on the latest version of ServUO since the guide above is a little outdated. Just will take me a little time to put it all together :)
 
Packet.pngSHow.png

Thanks, @PyrO - not perfect but by editing the packet I can make it so that by default it all shows but then when they click on Show Real it removes and hides trade skills. Not perfect but I can't see another way around the normal classic client adding up the values it finds.


Cleaned the code up a bit more from the screenshot.
C#:
public sealed class SkillUpdate : Packet
    {
        public SkillUpdate(Skills skills)
            : base(0x3A)
        {
            EnsureCapacity(6 + (skills.Length * 9));

            m_Stream.Write((byte)0x02); // type: absolute, capped

            for (int i = 0; i < skills.Length; ++i)
            {
                Skill s = skills[i];

                double v = s.NonRacialValue;
                int uv = (int)(v * 10);

                if (uv < 0)
                {
                    uv = 0;
                }
                else if (uv >= 0x10000)
                {
                    uv = 0xFFFF;
                }

                m_Stream.Write((ushort)(s.Info.SkillID + 1));
                m_Stream.Write((ushort)uv);

                if (!Skills.NonTotalInfluencingSkills.Contains(skills[i].SkillName))
                {
                    m_Stream.Write((ushort)s.BaseFixedPoint);
                }
                else
                {
                    m_Stream.Write((ushort)0);
                }

                m_Stream.Write((byte)s.Lock);
                m_Stream.Write((ushort)s.CapFixedPoint);
            }

            m_Stream.Write((short)0); // terminate
        }
    }

This is the only change from source code:
C#:
                if (!Skills.NonTotalInfluencingSkills.Contains(skills[i].SkillName))
                {
                    m_Stream.Write((ushort)s.BaseFixedPoint);
                }
                else
                {
                    m_Stream.Write((ushort)0);
                }
 
I added the NonTotalInfluencingSkills list to the Skills class as specified (see screenshow below), but I get an error when using it in the SkillCheck.cs class (see second screenshot below). I tried adding "using Server.Skills" and similar, but wasn't successful. I'm sure I'm missing something obvious (I'm originally a Java programmer, not a C# one).

1674882879775.png
1674882969240.png
Also, I'm working through some strange issues with soul stones as well. I doesn't want to let you soulstone a skill back on unless you have enough room without considering the NonTotalInfluencing skills, so my guess is there's a different check somewhere that soulstones are using? Trying to dig through it now unless someone else has an idea.
 
Last edited:
C#:
def check_inventory_space(player_inventory, skill_size):
    non_total_influencing_skills = ["skill1", "skill2", "skill3"]
    total_inventory_space = player_inventory.capacity
    used_inventory_space = 0
    for item in player_inventory.items:
        if item.name not in non_total_influencing_skills:
            used_inventory_space += item.size
    if (used_inventory_space + skill_size) > total_inventory_space:
        return False
    return True

def soulstone_skill(player, skill):
    if check_inventory_space(player.inventory, skill.size):
        player.inventory.add(skill)
        player.remove_skill(skill)
        print("Skill soulstoned successfully.")
    else:
        print("Not enough inventory space to soulstone that skill.")
 
I actually got it working last night. There were bunch of other changes that needed to be made to allow you to gain non-exempt skills when you're at the 720 skill cap, but it IS working. I'd like to change the "Show Real" to show exempt vs non-exempt totals, but haven't finished that yet.

I am at the stage where non-influential skills will gain above the cap, but other skills will not when at the 720 cap. Do you mind sharing the additional changes necessary to make it work properly?
 
I went through a bunch of iterations (fixing issues one by one) but I'll try and put it all together into a single post in the next day or two.

To give you an idea of all the files required to make it work properly: (I may have moved a few files around, so I apologize if they don't line up perfectly with what you may have)
Scripts\Items\Artifacts\Consumables\InfusedAlchemistsGem.cs
Scripts\Items\Consumables\ScrollOfTranscendence.cs
Scripts\Items\Consumables\SoulStone.cs
Scripts\Mobiles\Normal\BaseCreature.cs
Server\Skill.cs
Server\Skills.cs
Server\SkillInfo.cs

If you want "Show Real" to work "properly", then you'll also need to edit:
Server\Network\Packets.cs

I believe that's all the files that require some amount of editing. It's definitely not a "simple" fix
 
Last edited:
I went through a bunch of iterations (fixing issues one by one) but I'll try and put it all together into a single post in the next day or two.

To give you an idea of all the files required to make it work properly: (I may have moved a few files around, so I apologize if they don't line up perfectly with what you may have)
Scripts\Items\Artifacts\Consumables\InfusedAlchemistsGem.cs
Scripts\Items\Consumables\ScrollOfTranscendence.cs
Scripts\Items\Consumables\SoulStone.cs
Scripts\Mobiles\Normal\BaseCreature.cs
Server\Skill.cs
Server\Skills.cs
Server\SkillInfo.cs

If you want "Show Real" to work "properly", then you'll also need to edit:
Server\Network\Packets.cs

I believe that's all the files that require some amount of editing. It's definitely not a "simple" fix
Thanks! I appreciate this!
 
I never managed to figure this out unfortunatey. If someone is willing to share their code, it would be much appreciated.
 
Still trying to find a solution. Following the above code snippets, it is possible to get some of the way.

Trying a last time before giving up - are anyone able to share a working solution? @UOBetty @UOMaddog
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back