UOGamers 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!

  • To obtain new Razor updates, please reinstall Razor from our new website.

Greater Dragon's stamina/dex gaining

Frasier

Sorceror
I wonder if there is something wrong with dex gaining with GD. I've been 10+ hours in Gauntlet and got 2 points gaining.

Now I've been trying this:
weaken spam them for a few seconds every 5 minutes.

After 3 hours, no change in dex.

Atm my GD looks like this:

kitten1.jpgkitten3.jpg
 

Attachments

  • kitten2.jpg
    kitten2.jpg
    14.6 KB · Views: 8

Kiluad

Sorceror
they do gain dex, it's stam they don't seem to gain at all, at least mine doesn't. GDs are hard to train, they take forever. you will gain dex.

Looks like theres a few skills that could probably be trained more, resist is likely higher than 105.
 
Code:
SetStam( 120, 135 );
Its this line of code with greater dragons that stop stam from going up. On demise if dex/stam, str/hp, and int/mana are set separately the stam, hp and mana wont raise when the counter part goes up. Which is the issue.

Here is another example of the bug.
Code:
                        Name = "a hell hound";
                        Body = 98;
                        BaseSoundID = 229;
 
                        SetStr( 102, 150 );
                        SetDex( 81, 105 );
                        SetInt( 36, 60 );
 
                        SetHits( 66, 125 );

on OSI if you get a fresh tame hell hound with 102str and 125hp after being fully trained it becomes 125str and 148 hp on demise it would remain 125hp with 125 str.
 

Kiluad

Sorceror
It shouldn't be those lines prohunter, those lines are just setting the random spawning stats. hits can spawn differently on OSI, the training is 1/1 though.

I'm not sure if it's a custom Demise issue put there because someone didn't like greater dragons, or what. Most creatures, Cu sidhe's for example raise with a 1/1 rate dex/stam.

In the stat gain file, im almost certain that it has nothing about certain exceptions for greater dragons or other creatures, the stat gain is pretty straight forward.

There's definitely something going on with at least greater dragons, possibly other creatures, but cu's for example, work just fine. (kinda, cu's gain skills and stats too easy)


On a side note, the stat gain system as a whole needs to be reworked on runuo, it would be easy to do if it didn't need to be backwards compatible, but since runuo is backwards compatible, we're as of yet stuck with the pre aos(i think it is) stat gain system without the 15 minute delay.
 
Since stam is set differently from Dex on demise they dont gain 1/1. The reason cus train correctly is because the stam is based off of the dex if a stam value isn't defined.

Code:
                        SetStr( 1200, 1225 );
                        SetDex( 150, 170 );
                        SetInt( 250, 285 );
 
                        SetHits( 1010, 1275 );
 
                        SetDamage( 21, 28 );
 

Kiluad

Sorceror
they aren't set 1/1 on osi either though. but they still gain 1/1 there, and should here.

My GD who has 80 something dex right now, it had lower dex than stam when it spawned, shouldn't it have started gaining stam with dex when they were both the same? if what you're saying is true.
 
Yes they should and thats what i said. The bug is that they dont on demise. Every time the tamable gains a stat point the hp,stam, or mana should also go up even if they are set at different values.

The quick fix would be to just take that stam line out. It would fix the greater dragons but the underlying issue would still remain
 

Kiluad

Sorceror
Found it. It's because of MaxSeed. which if set to -1 uses Dex as a guide to setting stam. (hits, mana.)


Here's where stats gain, the issue is that stam on certain cretures is defined by a seporate variable, which is held in the respective stat slot, when created. like you said, stam is set, but it's set as StamMaxSeed, as opposed to when it's not set, StamMaxSeed is set to -1 and thus the logic uses Dex as a reference to get stam. When stams reference isn't dex, the Seed variable needs special attention.
Code:
public static void IncreaseStat( Mobile from, Stat stat, bool atrophy )
        {
            atrophy = atrophy || (from.RawStatTotal >= from.StatCap);

            switch ( stat )
            {
                case Stat.Str:
                {
                    if ( atrophy )
                    {
                        if ( CanLower( from, Stat.Dex ) && (from.RawDex < from.RawInt || !CanLower( from, Stat.Int )) )
                            --from.RawDex;
                        else if ( CanLower( from, Stat.Int ) )
                            --from.RawInt;
                    }

                    if ( CanRaise( from, Stat.Str ) )
                        ++from.RawStr;

                    break;
                }
                case Stat.Dex:
                {
                    if ( atrophy )
                    {
                        if ( CanLower( from, Stat.Str ) && (from.RawStr < from.RawInt || !CanLower( from, Stat.Int )) )
                            --from.RawStr;
                        else if ( CanLower( from, Stat.Int ) )
                            --from.RawInt;
                    }

                    if ( CanRaise( from, Stat.Dex ) )
                        ++from.RawDex;

                    break;
                }
                case Stat.Int:
                {
                    if ( atrophy )
                    {
                        if ( CanLower( from, Stat.Str ) && (from.RawStr < from.RawDex || !CanLower( from, Stat.Dex )) )
                            --from.RawStr;
                        else if ( CanLower( from, Stat.Dex ) )
                            --from.RawDex;
                    }

                    if ( CanRaise( from, Stat.Int ) )
                        ++from.RawInt;

                    break;
                }
            }
        }

So i added a line when stats are gained, to add to the seed variable, if the mobile uses a seed that is to define the respective stat.

Code:
public static void IncreaseStat( Mobile from, Stat stat, bool atrophy )
        {
            atrophy = atrophy || (from.RawStatTotal >= from.StatCap);
 
            switch ( stat )
            {
                case Stat.Str:
                {
                    if ( atrophy )
                    {
                        if ( CanLower( from, Stat.Dex ) && (from.RawDex < from.RawInt || !CanLower( from, Stat.Int )) )
                            --from.RawDex;
                        else if ( CanLower( from, Stat.Int ) )
                            --from.RawInt;
                    }
 
                    if ( CanRaise( from, Stat.Str ) )
                        ++from.RawStr;
                   
                    if (from is BaseCreature && ((BaseCreature)from).Controlled && ((BaseCreature)from).HitsMaxSeed > 0)
                                    ++((BaseCreature)from).HitsMaxSeed;
 
                    break;
                }
                case Stat.Dex:
                {
                    if ( atrophy )
                    {
                        if ( CanLower( from, Stat.Str ) && (from.RawStr < from.RawInt || !CanLower( from, Stat.Int )) )
                            --from.RawStr;
                        else if ( CanLower( from, Stat.Int ) )
                            --from.RawInt;
                    }
 
                    if ( CanRaise( from, Stat.Dex ) )
                        ++from.RawDex;
 
                    if ( from is BaseCreature && ((BaseCreature)from).Controlled && ((BaseCreature)from).StamMaxSeed > 0 )
                                    ++((BaseCreature)from).StamMaxSeed;
 
                    break;
                }
                case Stat.Int:
                {
                    if ( atrophy )
                    {
                        if ( CanLower( from, Stat.Str ) && (from.RawStr < from.RawDex || !CanLower( from, Stat.Dex )) )
                            --from.RawStr;
                        else if ( CanLower( from, Stat.Dex ) )
                            --from.RawDex;
                    }
 
                    if ( CanRaise( from, Stat.Int ) )
                        ++from.RawInt;
 
                    if ( from is BaseCreature && ((BaseCreature)from).Controlled && ((BaseCreature)from).ManaMaxSeed > 0 )
                                    ++((BaseCreature)from).ManaMaxSeed;
 
                    break;
                }
            }
        }

Worked perfect on my server, it is not backwards compatible though, as in, if you GD or whatever has 125 dex, it shouldn't gain anymore stam.
 

Attachments

  • SkillCheck.rar
    2.7 KB · Views: 6

Frasier

Sorceror
Ok, I'm too old for any code stuff. But you two seem to be wizards with it :)
So, the only way out of this problem is to get code fixed?
 

Kiluad

Sorceror
unless you can talk Eos into applying that patch, and/or stop training your dragon until it or something like it is added, then, there's nothing you can do.

There's nothing currently telling StamMaxSeed to gain. Or stam on certain creatures like the GD. aside from when they're created, as far as i saw anyway.
Just wait till it's fixed, and all will be good.
 

Eos

Demise Administrator
Staff member
Stat gain for pets works the same way as stat gain for players, a skill must be trained to gain stats. This means that a skill must be used in some way that gives it a chance of failure. Weaken does a magic resist check for 0-120, so this should work fine for training dex even at 105 magic resist. Note that there is a 5 minute delay between stat gains for pets (per stat).

weaken spam them for a few seconds every 5 minutes.
This is good advice. Ideally you would cast until the dex gain is achieved (which may take a while).

Their stamina is indeed incorrect, it should be exactly the same as their dex after some OSI verification (which makes UOGuide and Stratics both wrong). This will be fixed (also retroactively) soon, so that stamina will become trainable to 125.
 
Top