• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Adding more ammotypes, is it possible?

kevin1

New Member
Joined
Feb 3, 2009
Messages
123
Reaction score
0
How would you add more ammotypes, at the moment there is bolts and arrows but say I wanted to add a third one like slingshot that uses the ammo "Slingshot rocks".. how would I do it?

I don't think I can just use xml I think it would have to be done with source <_< or does it? How hard would it be to do?
 
First Open Items.XML and copy this

Code:
<attribute key="slotType" value="ammo"/>
		<attribute key="attack" value="25"/>
		<attribute key="hitChance" value="90"/>
		<attribute key="weaponType" value="ammunition"/>
		<attribute key="ammoType" value="bolt"/>
		<attribute key="shootType" value="bolt"/>
		<attribute key="ammoAction" value="removecount"/>

Then Go To Item 1294 and replace the text below with the text above.

Code:
<attribute key="attack" value="5"/>
		<attribute key="weaponType" value="distance"/>
		<attribute key="shootType" value="smallstone"/>
		<attribute key="range" value="5"/>
		<attribute key="breakChance" value="7"/>
		<attribute key="ammoAction" value="moveback"/>

and then go to item ID 5907 and put this under the text

Code:
<attribute key="weaponType" value="distance"/>
		<attribute key="ammoType" value="bolt"/>
		<attribute key="range" value="3"/>
		<attribute key="hitChance" value="8"/>
		<attribute key="attack" value="15"/>

Then reset your server and try it out.

If this did not work, then post the error, Rep++ me if it did =O
 
First Open Items.XML and copy this

Code:
<attribute key="slotType" value="ammo"/>
		<attribute key="attack" value="25"/>
		<attribute key="hitChance" value="90"/>
		<attribute key="weaponType" value="ammunition"/>
		<attribute key="ammoType" value="bolt"/>
		<attribute key="shootType" value="bolt"/>
		<attribute key="ammoAction" value="removecount"/>

Then Go To Item 1294 and replace the text below with the text above.

Code:
<attribute key="attack" value="5"/>
		<attribute key="weaponType" value="distance"/>
		<attribute key="shootType" value="smallstone"/>
		<attribute key="range" value="5"/>
		<attribute key="breakChance" value="7"/>
		<attribute key="ammoAction" value="moveback"/>

and then go to item ID 5907 and put this under the text

Code:
<attribute key="weaponType" value="distance"/>
		<attribute key="ammoType" value="bolt"/>
		<attribute key="range" value="3"/>
		<attribute key="hitChance" value="8"/>
		<attribute key="attack" value="15"/>

Then reset your server and try it out.

If this did not work, then post the error, Rep++ me if it did =O
Well, I got the error:

Warning: [Items::loadFromXml] Unknwon slotType ammo

However, it still worked to use slingshot and shoot stones with it but that is not what I want.. you can also shoot bolts with the slingshot and I want a NEW ammotype :p If you understand what I mean... So you can ONLY shoot stones with ONLY Slingshot.. :p
 
Code:
	<item id="1294" article="a" name="small stone" plural="small stones">
		<attribute key="weight" value="360"/>
		<attribute key="attack" value="5"/>
		<attribute key="hitChance" value="80"/>
		<attribute key="weaponType" value="ammunition"/>
		<attribute key="ammoType" value="smallstone"/>
		<attribute key="shootType" value="smallstone"/>
		<attribute key="ammoAction" value="removecount"/>
	</item>
&
	<item id="5907" article="a" name="slingshot">
		<attribute key="weight" value="1200"/>
		<attribute key="weaponType" value="distance"/>
		<attribute key="slotType" value="two-handed"/>
		<attribute key="ammoType" value="smallstone"/>
		<attribute key="range" value="5"/>
		<attribute key="hitChance" value="5"/>
		<attribute key="attack" value="2"/>
	</item>
 
Code:
	<item id="1294" article="a" name="small stone" plural="small stones">
		<attribute key="weight" value="360"/>
		<attribute key="attack" value="5"/>
		<attribute key="hitChance" value="80"/>
		<attribute key="weaponType" value="ammunition"/>
		<attribute key="ammoType" value="smallstone"/>
		<attribute key="shootType" value="smallstone"/>
		<attribute key="ammoAction" value="removecount"/>
	</item>
&
	<item id="5907" article="a" name="slingshot">
		<attribute key="weight" value="1200"/>
		<attribute key="weaponType" value="distance"/>
		<attribute key="slotType" value="two-handed"/>
		<attribute key="ammoType" value="smallstone"/>
		<attribute key="range" value="5"/>
		<attribute key="hitChance" value="5"/>
		<attribute key="attack" value="2"/>
	</item>
Absolutely awesome!!! Just to confirm, any new item I make, I just add the ammotype to what I want it to be, so I could make any number of different distance weapons with different ammunitions to create like 10 different weapon types, and each weapon type can have any number of ammunition, so I could have, 5 different types of bolts that only owrk with crossbow, 5 different types of arrows that only works with bow, 5 different types of stones that only works with slingshot, 5 different types of xxx that only works with xx etc.?

Thank you so much for this, I thought it would be a lot harder!
 
Absolutely awesome!!! Just to confirm, any new item I make, I just add the ammotype to what I want it to be, so I could make any number of different distance weapons with different ammunitions to create like 10 different weapon types, and each weapon type can have any number of ammunition, so I could have, 5 different types of bolts that only owrk with crossbow, 5 different types of arrows that only works with bow, 5 different types of stones that only works with slingshot, 5 different types of xxx that only works with xx etc.?

Thank you so much for this, I thought it would be a lot harder!
Yes, you don't have to edit source.
 
Back
Top