Difference between revisions of "Creating Custom Ammos"

From Obsidian Conflict Wiki
Jump to: navigation, search
(Setting up your map with Custom Ammo)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Languages}}
 
{{wip}}
 
{{wip}}
[[Category:MapTuts]]
+
__TOC__
 +
 
 +
==Overview==
 +
 
 +
In Obsidian Conflict, you can define your own custom ammo for your custom weapons. Used with the item_custom entity, it will allow you even create your own types of ammo, with their own model and amount of ammo.
 +
 
  
In your map modify script
+
== Setting up your map with Custom Ammo ==
  
 +
For use a custom ammo of a custom weapon in your map, you must put the following code in your map modify script (''mapname''_modify). This is an example:
  
"CustomAmmo"
+
<pre>
 +
map
 +
{
 +
CustomAmmo
 
{
 
{
"ak47"
+
"ak47" //Name of your ammo
 
{
 
{
"dmgtype" "1" // CRUSH = 0, BULLET = 1, SLASH = 2, BURN = 3, VEHICLE = 4, FALL = 5, BLAST = 6, CLUB = 7, SHOCK = 8, SONIC = 9, ENERGYBEAM = 10
+
"dmgtype" "1"
"tracer" "4" // NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4
+
"tracer" "4"
"plrdmg" "10"
+
"plrdmg" "10" //Damage done by players using this ammo.
"npcdmg" "10"
+
"npcdmg" "10" //Damage done by NPCs using this ammo.
 
"maxcarry" "10"
 
"maxcarry" "10"
"grains" "200" // 1 grain = 64.79891 milligrams
+
"grains" "200" // 1 grain = 64.79891 milligrams
 
"ftpersec" "1225"
 
"ftpersec" "1225"
 
}
 
}
 
}
 
}
 +
}
 +
</pre>
  
Change up your settings. Ingame you can give your ammo with item_custom and
+
'''dmgtype''' Type of damage done:
assign it to your scripted weapons.
+
 
 +
CRUSH = 0, BULLET = 1, SLASH = 2, BURN = 3, VEHICLE = 4, FALL = 5, BLAST = 6, CLUB = 7, SHOCK = 8, SONIC = 9, ENERGYBEAM = 10
 +
 
 +
 
 +
'''tracer''' Type of tracer done for the ammo when fired:
 +
 
 +
NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4
 +
 
 +
'''Note:''' The Rail and Beam tracers aren´t setup correctly in code and as such tend to fail.
 +
 
 +
 
 +
'''plrdmg''' Damage done by players when using this ammo.
 +
 
 +
'''npcdmg''' Damage done by NPCs when using this ammo.
 +
 
 +
'''maxcarry''' The maximum amount of this ammo that you can carry.
 +
 
 +
'''grains''' Weight of the ammo. '''ToDo:''' ''This has any effect?''
 +
 
 +
'''ftpersec''' '''ToDo:''' ''Speed of the ammo when fired?''
 +
 
 +
== Setting up a custom ammo item in Hammer ==
 +
 
 +
Use the [http://wiki.obsidianconflict.net/?title=Item_custom item_custom] entity for place inside your map the ammo. You can set the model and the amount of ammo that it will contain.
 +
 
 +
== Scripted Weapons using Custom Ammo ==
 +
 
 +
Take a look on the page of how to make [http://wiki.obsidianconflict.net/?title=Scripted_Weapons Scripted Weapons].
 +
 
 +
[[Category:MapTuts]]

Latest revision as of 11:53, 1 March 2013

Language: [[::Creating Custom Ammos|English]]
WIP.png This page is still a Work In Progress

Overview

In Obsidian Conflict, you can define your own custom ammo for your custom weapons. Used with the item_custom entity, it will allow you even create your own types of ammo, with their own model and amount of ammo.


Setting up your map with Custom Ammo

For use a custom ammo of a custom weapon in your map, you must put the following code in your map modify script (mapname_modify). This is an example:

map
{
	CustomAmmo
	{
		"ak47" //Name of your ammo
		{
			"dmgtype"		"1"
			"tracer"		"4"
			"plrdmg"		"10"	//Damage done by players using this ammo.
			"npcdmg"		"10"	//Damage done by NPCs using this ammo.
			"maxcarry"		"10"
			"grains"		"200"	// 1 grain = 64.79891 milligrams
			"ftpersec"		"1225"
		}
	}
}

dmgtype Type of damage done:

CRUSH = 0, BULLET = 1, SLASH = 2, BURN = 3, VEHICLE = 4, FALL = 5, BLAST = 6, CLUB = 7, SHOCK = 8, SONIC = 9, ENERGYBEAM = 10


tracer Type of tracer done for the ammo when fired:

NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4

Note: The Rail and Beam tracers aren´t setup correctly in code and as such tend to fail.


plrdmg Damage done by players when using this ammo.

npcdmg Damage done by NPCs when using this ammo.

maxcarry The maximum amount of this ammo that you can carry.

grains Weight of the ammo. ToDo: This has any effect?

ftpersec ToDo: Speed of the ammo when fired?

Setting up a custom ammo item in Hammer

Use the item_custom entity for place inside your map the ammo. You can set the model and the amount of ammo that it will contain.

Scripted Weapons using Custom Ammo

Take a look on the page of how to make Scripted Weapons.