Difference between revisions of "Creating Custom Ammos"

From Obsidian Conflict Wiki
Jump to: navigation, search
m
(Setting up your map with Custom Ammo)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Languages}}
 +
{{wip}}
 
__TOC__
 
__TOC__
{{wip}}
 
  
== Setting up your Mapadd script with Custom Ammos ==
+
==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 ==
  
In your map modify script
+
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:
  
 
<pre>
 
<pre>
Modify
+
map
 
{
 
{
SpawnItems
 
{
 
"custom_ak47" "1"
 
}
 
 
CustomAmmo
 
CustomAmmo
 
{
 
{
"ak47"
+
"ak47" //Name of your ammo
 
{
 
{
 
"dmgtype" "1"
 
"dmgtype" "1"
Line 29: Line 31:
 
</pre>
 
</pre>
  
*Damage Types
+
'''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
 
CRUSH = 0, BULLET = 1, SLASH = 2, BURN = 3, VEHICLE = 4, FALL = 5, BLAST = 6, CLUB = 7, SHOCK = 8, SONIC = 9, ENERGYBEAM = 10
  
*Tracer Types
+
 
 +
'''tracer''' Type of tracer done for the ammo when fired:
 +
 
 
NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4
 
NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4
Note: The Rail and Beam tracers arent setup correctly in code and as such tend to fail.
+
 
 +
'''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 ==
 
== Setting up a custom ammo item in Hammer ==
  
*Work In Progress Section
+
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.
Ingame you can give your ammo with item_custom.
 
  
 
== Scripted Weapons using Custom Ammo ==
 
== Scripted Weapons using Custom Ammo ==
  
*Work In Progress Section
+
Take a look on the page of how to make [http://wiki.obsidianconflict.net/?title=Scripted_Weapons Scripted Weapons].
  
 
[[Category:MapTuts]]
 
[[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.