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

new type bullets

utk

New Member
Joined
Oct 13, 2011
Messages
27
Reaction score
0
Hi, for some time I make OTS but came across the problem. How to create a new type of "bullets"? Which will work for only one weapon? For example, I create new shots that can be fired only by a new type of weapon (distance).
 
use this attributes i have in red to make it used by crossbow.

Code:
	<item id="2543" article="a" name="bolt" plural="bolts">
		<attribute key="weight" value="80"/>
		<attribute key="attack" value="30"/>
        <attribute key="hitChance" value="80"/>
		[COLOR="#FF0000"]<attribute key="weaponType" value="ammunition"/>[/COLOR]
		[COLOR="#FF0000"]<attribute key="ammoType" value="bolt"/>[/COLOR]
		<attribute key="shootType" value="bolt"/>
	</item>
 
I edited bananas, change name to bullet here is code;
Code:
<item id="2676" article="a" name="bullet" plural="bullets">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ammo" />
		<attribute key="attack" value="100" />
		<attribute key="maxHitChance" value="90" />
		<attribute key="weaponType" value="ammunition" />
		[COLOR="#FF0000"]<attribute key="ammoType" value="bullet" />
		<attribute key="shootType" value="bullet" />[/COLOR]
		<attribute key="ammoAction" value="removecount" />
	</item>
And new weapon;
Code:
<item id="2385" article="a" name="newcrossbow">
		<attribute key="weight" value="4000" />
		<attribute key="weaponType" value="distance" />
		<attribute key="slotType" value="two-handed" />
		[COLOR="#FF0000"]<attribute key="ammoType" value="bullet" />[/COLOR]
		<attribute key="range" value="5" />
 </item>

When I turn on serwer, show this error:
Code:
[Warning - Items::loadFromXml] Unknown ammoType bullet
[Warning - Items::loadFromXml] Unknown weaponType  
[Warning - Items::loadFromXml] Unknown ammoType bullet
[Warning - Items::loadFromXml] Unknown shootType bullet
[Warning - Items::loadFromXml] Unknown ammoType

The new crossbow supposedly works, but bananas do not lose when I shoot. When the missile is flying is graphics spear. How to change it?
 
Last edited:
const.h ~ enum Ammo_t

my last is
[CPP]AMMO_SNOWBALL = 7[/CPP]
edit that to:
[CPP]
AMMO_SNOWBALL = 7,
AMMO_BULLET = 8
[/CPP]

~ enum Ammo_t

Last
[CPP]
AMMO_SNOWBALL = 7
[/CPP]
Edit To
[CPP]
AMMO_SNOWBALL = 7,
AMMO_BULLET = 8
[/CPP]

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

tools.cpp ~ ShootTypeNames shootTypeNames[]
Last one:
[CPP]
{"cake", SHOOT_EFFECT_CAKE}
[/CPP]
Edit to
[CPP]
{"cake", SHOOT_EFFECT_CAKE}
{"bullet", SHOOT_EFFECT_CAKE}
[/CPP]
---------
~ AmmoTypeNames ammoTypeNames[]

Last
[CPP]
{"etherealspear", AMMO_SPEAR}
[/CPP]
Edit To
[CPP]
{"etherealspear", AMMO_SPEAR},
{"bullet", AMMO_BULLET}
[/CPP]



Edit SHOOT_EFFECT_CAKE to whatever effect you want to. (This is TFS 0.3.6pl1 but i guess most are kinda the same)
 
Thanks a lot. But I never had contact with the C++ and do not know how I can get access to these files?
 
Back
Top