Loring and following speeds

We try to put in new spawn areas, quests, events, items and scripts. This is where you submit your wish.
Locked
User avatar
Allen
Expert Scribe
Posts: 34
Joined: Sun Dec 06, 2009 2:42 am

Loring and following speeds

Post by Allen »

First off, I apologize if this was buried somewhere in the depths of the abyss of these posts that didn't catch my eye.

--------------------------------------------------------
Someone had mentioned the idea of posting the barding difficulty on the loring check of an animal/monster. I think simply put, the idea is rather handy. As far as scripting it would go, I wouldn't know where to begin to suggest on how to implement that into the current listing given when successfully loring a creature. I'm sure with a lil digging in the RunUO forums I (or someone else), would be able to come up with the proper way to do this. Seen it on a couple other shards in the distant past.
--------------------------------------------------------

All apologies again if I should be breaking this into two different posts, this just seems more efficient to offer both suggestions in one post.

--------------------------------------------------------
Pets following speed.
I remember long long ago (roughly a year or so) this was suggested, and I haven't found the post since. There is a way to change the follower's following speed to run as fast as the user/player itself does. I remember the reply was being that you would need to change dex speeds on the animals and such. Which isn't the case. I had played a really small shard that had the speed of the followers to move as fast as one could run from one side of the map to the other. With the dex remaining the same and not affecting the pet's ability to fight or diminish their ability to fight.

As it seems now, nobles are close to touching this idea. When running full speed, they tend to catch up faster than any other pet/followers do. The idea I don't think would hinder too much on the game play as far as much as it would help enhance the satisfaction of the pets. Some pets seem to be needlessly slow while following.

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

Throwing the ideas out there, to hopefully get some positive feedback or constructive criticism as to why we could all benefit or not benefit from the above mentioned ideas. Thanks for reading the suggestions and please feel free to offer some feedback to whomever decides to like or dislike the ideas. Thanks in advance.
User avatar
Allen
Expert Scribe
Posts: 34
Joined: Sun Dec 06, 2009 2:42 am

Re: Loring and following speeds

Post by Allen »

After reviewing the thread again, I realize now that it's a closed discussion on feature requests and all...

with any luck, I'll throw this out there since evidently not many folks are stating their opinions of the following speed or loring ideas. I noticed +Colibri stated he's the only coder, so ventured into the BaseAI.cs which would allow to change the following speeds of pets to run if the player is running, or walk if the player is walking.

Everything that was altered in the BaseAI.cs file will be marked with
/*Change Speed*/ Ctrl + f , of course would allow faster finding of the changes in the below stated script. I know the requests are closed from stated on the top of these threads. Just crossing my fingers is all. :) .

I'll just post the exact changes within the script since posts can't allow over 60000 characters on here. These simple changes would allow followers to walk/run as fast as the player is doing so, without altering their fighting abilities.

Code: Select all


/*Change Speed*/
					bool mOnHorse = ( m_Mobile.ControlMaster.Mount != null );
					Direction mDirection = m_Mobile.ControlMaster.Direction;
					bool mRunning = ((mDirection & Direction.Running) != 0);
					bool WMR;
					if( mOnHorse )
					{
						m_Mobile.CurrentSpeed = (mRunning ? .1 : .15);
						WMR = WalkMobileRange( m_Mobile.ControlMaster, 2, true, 0, 1 );
					}
					else
					{
						m_Mobile.CurrentSpeed = (mRunning ? .2 : .25);
						WMR = WalkMobileRange( m_Mobile.ControlMaster, 2, mRunning, 0, 1 );
					}

					if ( WMR )
/*Change Speed*/	{
						if( m_Mobile.Combatant != null && !m_Mobile.Combatant.Deleted && m_Mobile.Combatant.Alive && !m_Mobile.Combatant.IsDeadBondedPet )
						{
							m_Mobile.Warmode = true;
							m_Mobile.Direction = m_Mobile.GetDirectionTo( m_Mobile.Combatant );
						}
						else
						{
							m_Mobile.Warmode = false;
						}
					}
				}
			}

			return true;
		}


/*Change Speed*/
                    bool mOnHorse = (m_Mobile.ControlTarget.Mount != null);
                    Direction mDirection = m_Mobile.ControlTarget.Direction;
                    bool mRunning = ((mDirection & Direction.Running) != 0);
                    bool WMR;
                    if (mOnHorse)
                    {
                        m_Mobile.CurrentSpeed = (mRunning ? .1 : .15);
                        WMR = WalkMobileRange(m_Mobile.ControlTarget, 2, true, 0, 3);
                    }
                    else
                    {
                        m_Mobile.CurrentSpeed = (mRunning ? .2 : .25);
                        WMR = WalkMobileRange(m_Mobile.ControlTarget, 2, mRunning, 0, 3);
                    }

                    if (WMR)
/*Change Speed*/    {
						if( m_Mobile.Combatant != null && !m_Mobile.Combatant.Deleted && m_Mobile.Combatant.Alive && !m_Mobile.Combatant.IsDeadBondedPet )
						{
							m_Mobile.Warmode = true;
							m_Mobile.Direction = m_Mobile.GetDirectionTo( m_Mobile.Combatant );
						}
						else
						{
							m_Mobile.Warmode = false;
						}
					}
				}
			}
			else
			{
				m_Mobile.DebugSay( "I have nobody to follow" );
				m_Mobile.ControlTarget = null;
				m_Mobile.ControlOrder = OrderType.None;
			}

			return true;
		}


/*Change Speed*/
                bool mOnHorse = (m_Mobile.ControlMaster.Mount != null);
                Direction mDirection = m_Mobile.ControlMaster.Direction;
                bool mRunning = ((mDirection & Direction.Running) != 0);
                if (mOnHorse)
                {
                    m_Mobile.CurrentSpeed = (mRunning ? .1 : .15);
                    WalkMobileRange(m_Mobile.ControlMaster, 2, true, 0, 1);
                }
                else
                {
                    m_Mobile.CurrentSpeed = (mRunning ? .2 : .25);
                    WalkMobileRange(m_Mobile.ControlMaster, 2, mRunning, 0, 1);
                }
/*Change Speed*/
            }

			return true;
		}

		public virtual bool DoOrderAttack()
		{
			if( m_Mobile.IsDeadPet )
				return true;

			if( m_Mobile.ControlTarget == null || m_Mobile.ControlTarget.Deleted || m_Mobile.ControlTarget.Map != m_Mobile.Map || !m_Mobile.ControlTarget.Alive || m_Mobile.ControlTarget.IsDeadBondedPet )
			{
				m_Mobile.DebugSay( "I think he might be dead. He's not anywhere around here at least. That's cool. I'm glad he's dead." );

				m_Mobile.ControlTarget = null;
				m_Mobile.ControlOrder = OrderType.None;

				if( m_Mobile.FightMode == FightMode.Closest || m_Mobile.FightMode == FightMode.Aggressor )
				{
					Mobile newCombatant = null;
					double newScore = 0.0;

					List<AggressorInfo> list = m_Mobile.Aggressors;

					for( int i = 0; i < list.Count; ++i )
					{
						Mobile aggr = list[i].Attacker;

						if( aggr.Map != m_Mobile.Map || !aggr.InRange( m_Mobile.Location, m_Mobile.RangePerception ) || !m_Mobile.CanSee( aggr ) )
							continue;

						if( aggr.IsDeadBondedPet || !aggr.Alive )
							continue;

						double aggrScore = m_Mobile.GetValueFrom( aggr, FightMode.Closest, false );

						if( (newCombatant == null || aggrScore > newScore) && m_Mobile.InLOS( aggr ) )
						{
							newCombatant = aggr;
							newScore = aggrScore;
						}
					}

					if( newCombatant != null )
					{
						m_Mobile.ControlTarget = newCombatant;
						m_Mobile.ControlOrder = OrderType.Attack;
						m_Mobile.Combatant = newCombatant;
						m_Mobile.DebugSay( "But -that- is not dead. Here we go again..." );
						Think();
					}
				}
			}
			else
			{
				m_Mobile.DebugSay( "Attacking target..." );
				Think();
			}

			return true;
                        }
*** Can't seem to attach the BaseAI.cs as a .txt or .cs file, for easier copy n pasting on the testing n all. If it even were to make it past the wishful thinking stages n all.
Locked