Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 XML Customization » How can I create new ammo ?
| How can I create new ammo ?[message #361847]
|
Sun, 15 November 2020 06:20
|
|
| Kitty |
  |
Messages:505
Registered:October 2017 Location: Germany |
|
|
Is there any up-to-date guide on how to create new ammo?
What I'm looking for:
- Ammotypes.xml has a bunch of flags, where I'm not sure if they even exist anymore. E.g., some stuff has flags for poison (poison percentage, etc), but the poison-system doesn't exist anymore (replaced by disease?)
- how can I connect an ammotype with animation in Tilecache ? I'm thinking of something like the flamethrower or incenary-shotgun-ammo in UC ? Where can this be defined ?
- how are items.xml, ammotypes.xml, ammostrings.xml are connected to each other ? Like, ui-index in this is refering to xyz in that.
I guess, it's somehow simular to how explosives are defined, but so far I fail to see the interactions for ammo. So, any advice or hint would be great.
How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN
I need more details. (Didi Hallervorden) Report message to a moderator
|
|
|
|
|
| Re: How can I create new ammo ?[message #361849 is a reply to message #361847]
|
Sun, 15 November 2020 09:46 
|
|
| Deleted. |
 |
Messages:2634
Registered:December 2012 Location: Russian Federation |
|
|
Kitty wrote on Sun, 15 November 2020 09:20- Ammotypes.xml has a bunch of flags, where I'm not sure if they even exist anymore. E.g., some stuff has flags for poison (poison percentage, etc), but the poison-system doesn't exist anymore (replaced by disease?)
From Weapons.h
// -------- added by Flugente: various ammo flags --------
// flags used for various ammo properties (easier than adding 32 differently named variables). DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
#define AMMO_CRYO 0x00000001 //1 // this ammo shock-freezes target
#define AMMO_BLIND 0x00000002 //2 // this ammo will blind if it hits the head
#define AMMO_ANTIMATERIEL 0x00000004 //4 // this ammo is anti-materiel, bullets can destroy structures
Quote:- how can I connect an ammotype with animation in Tilecache ? I'm thinking of something like the flamethrower or incenary-shotgun-ammo in UC ? Where can this be defined ?
You cannot, it's hardcoded.
From bullets.cpp:
if ( pBullet->usFlags & ( BULLET_FLAG_MISSILE | BULLET_FLAG_TANK_CANNON ) )
{
strcpy( AniParams.zCachedFile, "TILECACHE\\MSLE_SMK.STI" );
}
else if ( pBullet->usFlags & ( BULLET_FLAG_SMALL_MISSILE ) )
{
strcpy( AniParams.zCachedFile, "TILECACHE\\MSLE_SMA.STI" );
}
else if ( pBullet->usFlags & ( BULLET_FLAG_CREATURE_SPIT ) )
{
strcpy( AniParams.zCachedFile, "TILECACHE\\MSLE_SPT.STI" );
}
else if ( pBullet->usFlags & ( BULLET_FLAG_FLAME ) )
{
strcpy( AniParams.zCachedFile, "TILECACHE\\FLMTHR2.STI" );
AniParams.sDelay = (INT16)( 100 );
}
Where flags defined depending on weapon and ammo:
// Check if we have spit as a weapon!
if ( Weapon[ usHandItem ].ubWeaponClass == MONSTERCLASS )
{
usBulletFlags |= BULLET_FLAG_CREATURE_SPIT;
}
else if ( Item[ usHandItem ].usItemClass == IC_THROWING_KNIFE )
{
usBulletFlags |= BULLET_FLAG_KNIFE;
}
else if ( Item[usHandItem].rocketlauncher )
{
usBulletFlags |= BULLET_FLAG_MISSILE;
}
else if ( Item[usHandItem].cannon )
{
usBulletFlags |= BULLET_FLAG_TANK_CANNON;
}
else if ( Item[usHandItem].rocketrifle )
{
usBulletFlags |= BULLET_FLAG_SMALL_MISSILE;
}
else if ( usHandItem == FLAMETHROWER )
{
usBulletFlags |= BULLET_FLAG_FLAME;
ubSpreadIndex = 2;
}
Flame animation is hardcoded to item 63, this was fixed in VR and +AI to use flame ammo instead, but not in the unstable.
//else if ( usHandItem == FLAMETHROWER )
// sevenfm: check for flame caliber instead
else if ( Weapon[Item[usHandItem].ubClassIndex].ubCalibre == AMMOFLAME )
And tracer ammo has light.
Quote:- how are items.xml, ammotypes.xml, ammostrings.xml are connected to each other ? Like, ui-index in this is refering to xyz in that.
As far as I remember, magazines in Items.xml are connected to Magazines.xml using <ubClassIndex> which defines <ubCalibre> (AmmoStrings.xml) and <ubAmmoType> (AmmoTypes.xml).
<ubMagType> defines mag type - magazine, bullet, box or crate:
AMMO_MAGAZINE = 0,
AMMO_BULLET,
AMMO_BOX,
AMMO_CRATE
Left this community.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Jun 12 02:42:54 GMT+3 2026
Total time taken to generate the page: 0.00631 seconds
|