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!

Lucid Nagual's << Advanced Archery >>

Greystar

Wanderer
It hadn't occured to me untill I tried to practice my archery, otherwise I woulda probably found it sooner, but I was also messing with my DynDNS updater script and a couple other package mods of other peoples so wasn't entirely paying attention to actually playing on my Shard :). No Ones perfect.
 

Greystar

Wanderer
Lucid Nagual said:
Updated to v[2].0.2d!

Ack, whats in 2.0.2d?

I see BaseRunicTools has an edit for bows, but what else, or should i just go through my normal routine and winmerge and look for diffrences.
 

Warloxx

Sorceror
First off I love this script addon, but I was tring to use the Archery Butte and this problem arouse. If i doubleclick on the butte with arrows/bolts in my pack it works great, but if I put the arrows/bolts in the Ultimatequiver or the ElvenQuiver it tells me "You do not have any arrows/bolts with which to practice." Now if I take the quivers off and put them back on it seems to work ok.
 
Warloxx

First off I love this script addon, but I was tring to use the Archery Butte and this problem arouse. If i doubleclick on the butte with arrows/bolts in my pack it works great, but if I put the arrows/bolts in the Ultimatequiver or the ElvenQuiver it tells me "You do not have any arrows/bolts with which to practice." Now if I take the quivers off and put them back on it seems to work ok.
Yeah I know. I'm working on that :)
 

frank

Wanderer
custom bows

on each custom bow do you have to rewrite it to use these custom arrows or are they supoose to work if referred back to bow such as
public class BowOfMight : CompositeBow

it also has
public override Type AmmoType{ get{ return typeof( Arrow ); } }
public override Item Ammo{ get{ return new Arrow(); } }

would removing the override fix the problem so it can take the effects of the compositebow
 

Alari

Wanderer
Looks like a cool system.

Not sure if this has been posted or not, but this is what the 'version' part of serialization/deserialization is for:

Code:
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int) 1); // version
 
            writer.WriteEncodedInt((int)m_ArrowType);
        }
 
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
 
switch ( version )
{
case 1:
            m_ArrowType = (ArrowType)reader.ReadEncodedInt();
 break;

case 0:
m_ArrowType = whatever the default is;
break;
}

            if (Weight == 7.0)
                Weight = 6.0;
        }

With the updated version number, and the "switch version", the code will only try to read the ArrowType if the 'version' of that object is 1. Thus you don't have to worry about commenting out a certain part of the deserialize until the save has been updated.
 
Alari

With the updated version number, and the "switch version", the code will only try to read the ArrowType if the 'version' of that object is 1. Thus you don't have to worry about commenting out a certain part of the deserialize until the save has been updated.
I uninstalled it. Then reinstalled it with a new version number and it still asked me to delete them. I didn't have the time to re-test it. So I posted it this way. I figured it would be a good lesson on serialization and deserilialization. When I update next time I may have the time to re-test it and take care of the issue. Don't ask me why it didn't work, cause I don't know why...I'm still scratching my head over it lol.

However, I do like adding edits without changing the version number (like the PlayerMobile for example) it is hard enough upgrading to a new RunUO :( My PlayerMobile would be at version number 50 by now lol.

But thanks for the good comment and I will try and get the issue fixed.
 
frank

on each custom bow do you have to rewrite it to use these custom arrows or are they supoose to work if referred back to bow such as
public class BowOfMight : CompositeBow

it also has
public override Type AmmoType{ get{ return typeof( Arrow ); } }
public override Item Ammo{ get{ return new Arrow(); } }

would removing the override fix the problem so it can take the effects of the compositebow
Yes Frank you are correct. It inherits the Composite Bow methods. So no adjusting would need to be done to the subclasses of those bows.

Edit: BTW I am working with a friend to make a new upgrade for Advanced Archery. It will put full functionallity into the Elven Bow Stringer. There will be bow stringers for "recurved" and "long" bows. There will also be a pounds per pull and possibly string quality added to this system. There will be a utility added that will calculate the odds of a string breaking and have a special critical hit check. If anyone has any ideas for this new system please post your ideas and see what we can come up with.
 
Lord_Shaka

Hi,


Is there a way to set up, so the ARROWS / BOWS desapear after someone shoot them??

Thanks
You mean when the arrow hits the ground? Cause they seem to delete after use for me. If you are talking about arrows dropping to the ground all I can tell you is that is how the distro works and I made the new arrows to work the same way.
 

dracana

Sorceror
Lucid Nagual said:
Yes Frank you are correct. It inherits the Composite Bow methods. So no adjusting would need to be done to the subclasses of those bows.

Edit: BTW I am working with a friend to make a new upgrade for Advanced Archery. It will put full functionallity into the Elven Bow Stringer. There will be bow stringers for "recurved" and "long" bows. There will also be a pounds per pull and possibly string quality added to this system. There will be a utility added that will calculate the odds of a string breaking and have a special critical hit check. If anyone has any ideas for this new system please post your ideas and see what we can come up with.

Hey Lucid,

I made some modifications to your quiver to make it easier to add new quivers and to add Lower Ammo Cost to quivers. I basically moved most functionality from the UltimateQuiver and ElvenQuiver into BaseQuiver.cs. In BaseQuiver I added new functionality for LowerAmmoCost. My only problem in doing this was that it messed up the ser/deser in the original quivers, so I had to delete them. For that reason, not sure if you are interested in adding this in, but thought it would be a great addition to your already great system :)

If you are interested, I will pass my changes on to you.

Thanks!
 
dracana

Quote:
Originally Posted by Lucid Nagual
Yes Frank you are correct. It inherits the Composite Bow methods. So no adjusting would need to be done to the subclasses of those bows.

Edit: BTW I am working with a friend to make a new upgrade for Advanced Archery. It will put full functionallity into the Elven Bow Stringer. There will be bow stringers for "recurved" and "long" bows. There will also be a pounds per pull and possibly string quality added to this system. There will be a utility added that will calculate the odds of a string breaking and have a special critical hit check. If anyone has any ideas for this new system please post your ideas and see what we can come up with.



Hey Lucid,

I made some modifications to your quiver to make it easier to add new quivers and to add Lower Ammo Cost to quivers. I basically moved most functionality from the UltimateQuiver and ElvenQuiver into BaseQuiver.cs. In BaseQuiver I added new functionality for LowerAmmoCost. My only problem in doing this was that it messed up the ser/deser in the original quivers, so I had to delete them. For that reason, not sure if you are interested in adding this in, but thought it would be a great addition to your already great system :)

If you are interested, I will pass my changes on to you.

Thanks!
Yeah the BaseQuiver is an excellent idea. When I first made the ultimate quiver I didn't think I was gonna do the elven quiver too. I ended up doing that one at the last minute. I have very little time to script now-a-dayz, so I really appreciate all contributions to make these systems better. I will PM you with my email address. THX :)
 
just a quick question?

looking at the scripts:

Code:
						AOS.Damage(defender, attacker, Utility.RandomMinMax(10, 50), 100, 0, 0, 0, 0); break;

all of the arrows do the same type of dammage (the random varies) but the 100% phy spot does not move

shouldn't that change to (10, 50), 0, 100, 0, 0, 0); for fire
(10, 50), 0, 0, 100, 0, 0); for cold, etc?

none of them change
 

Valrot

Wanderer
I was wondering how i would go about makeing it so you have to have certain skill levels to use the new arrows? i just instaled the advanced archery script about 2 days ago and have looked thru the scripts, and was not sure wehre to place the skill checks.

example: normal arrows required archery skill would be 0.0 - 120.0
fire arrows required archery skills would be 20.0-120.0 and so on.
 
Lord_Greywolf

just a quick question?

looking at the scripts:


Code:
AOS.Damage(defender, attacker, Utility.RandomMinMax(10, 50), 100, 0, 0, 0, 0); break;​


all of the arrows do the same type of dammage (the random varies) but the 100% phy spot does not move

shouldn't that change to (10, 50), 0, 100, 0, 0, 0); for fire
(10, 50), 0, 0, 100, 0, 0); for cold, etc?

none of them change
Oh nice. thanks for pointing that out. I will update it later with the Tinker fix.
---------------------------------------------------------
I was wondering how i would go about makeing it so you have to have certain skill levels to use the new arrows? i just instaled the advanced archery script about 2 days ago and have looked thru the scripts, and was not sure wehre to place the skill checks.

example: normal arrows required archery skill would be 0.0 - 120.0
fire arrows required archery skills would be 20.0-120.0 and so on.
Did you want it the same way for the dip tubs too?
 
that would take a little doing - in the bow.cs (and the rest of them) find the lines like this (after the on doubleclick)

Code:
					else if (item.GetType() == typeof(ExplosiveArrow) )
						it_Bow.ArrowSelection = ArrowType.Explosive;

and change it to:

Code:
					else if (item.GetType() == typeof(ExplosiveArrow) )
						{
						if (from.Skills.Archery >= 80 && from.Skills.Poisoning >= 80) 
							{
							it_Bow.ArrowSelection = ArrowType.Explosive;
							}
						else
							{
							from.SendMessage("you do not have the skill to use that type of arrow");
							it_Bow.ArrowSelection = ArrowType.Normal;
							{
						}

you would have to do that for each arrow type and or bolt type in each weapon

there is no need for the 120 upper limit - because they should be able to use it if it is even higher (jewely & such bonuses)

and to set a 2nd required skill:

Code:
if (from.Skills.Archery >= 80 && from.Skills.Poisoning >= 80)

I might be a litle off on the layout of how to point to the skills section by names - but that is close to get you started


edited afterwords

you're welcome on the damage thing
and we both posted almost at the same time - just your 1st lol
 
Top