Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: anti-materiel ammo
New feature: anti-materiel ammo[message #331296] Sat, 15 March 2014 20:27 Go to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
New feature: anti-materiel ammo

What is the point of having anti-materiel rifles if they don't damage, well, stuff? :rifle: Fixed that. There is now a new property in AmmoTypes.xml:
#define AMMO_ANTIMATERIEL		0x00000004	//4			// this ammo is anti-materiel, bullets can destroy structures
set in the xml as 4. I switched the .50 BMG and 12.7x108mm ammo to this new type, as all guns using them are big-ass anti-materiel rifles.

http://www.youtube.com/watch?v=JQOolj1p558&feature=youtu.be[/video]
If a gun fires ammo with this tag, it can destroy structures on the map. How much damage is done depends on the weapon's impact. Certain structures cannot be damaged by this, like specially reinforced walls etc.

It would be cool to have states between 'wall exists' and 'wall is atomized'. I do realize that 3 shots don't vaporize a wall, but that's the 'engine' we're stuck with. It also does not take that many shots to bring down a wall (if your gun can damage it in the first place), as structure hit points are... small.

Nevertheless, some people might now find other uses for those ridiculous rifles apart from weightlifting.

This was added to the trunk in r7069 and GameDir r1984.

Report message to a moderator

Captain

Re: New feature: anti-materiel ammo[message #331298] Sat, 15 March 2014 20:40 Go to previous messageGo to next message
Marcell is currently offline Marcell

 
Messages:12
Registered:March 2014
Location: Poland
That's just awesome man, finally some use for those monsters...haven't found them yet on my current playthrough but on the regular 1.13 there were useless anyway, as the damage was only like 60 I think? making two 7.62x51 rounds more powerful than one .50 BMG..

I don't know if you take suggestions or not, but if you do I'd consider taking a look at opti-wand or fiber cable camera thingies, basically an option for stealth players to peek around corners, under doors, and above window frames without exposing their bodies...though if it's worth scripting and how useful it'd be remains to be seen..

Report message to a moderator

Private
Re: New feature: anti-materiel ammo[message #331302] Sat, 15 March 2014 21:39 Go to previous messageGo to next message
Maalstroom is currently offline Maalstroom

 
Messages:340
Registered:December 2008
Location: en route to San Hermanos
Awesome man, but can you also destroy tanks with this type of ammo?

Report message to a moderator

Master Sergeant
Re: New feature: anti-materiel ammo[message #331304] Sat, 15 March 2014 21:45 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Nope. As far as the code goes, tanks are soldiers Wink

It would also be unnecessary - there is already a tag that does just that.

Report message to a moderator

Captain

Re: New feature: anti-materiel ammo[message #331392] Wed, 19 March 2014 16:13 Go to previous messageGo to next message
Zarax

 
Messages:54
Registered:February 2007
Location: Italy
Maalstroom
Awesome man, but can you also destroy tanks with this type of ammo?


You'll need something bigger to do proper damage to a tank...

Report message to a moderator

Corporal
Re: New feature: anti-materiel ammo[message #331416] Thu, 20 March 2014 12:42 Go to previous messageGo to next message
smeagol is currently offline smeagol

 
Messages:2705
Registered:June 2008
Location: Bremen, Germany
Okay, works so far... but the kind of structures you can destroy and can't seems a bit random.

So far I managed to bring down wooden walls and most furniture. Wooden walls with windows seem to be immune, as well as doors (Trees as well, haven't tested light vegetation).

Report message to a moderator

Lieutenant

Re: New feature: anti-materiel ammo[message #331419] Thu, 20 March 2014 13:49 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
The hit functions are odd. More often than not, what seems to be a solid hit doesn't register as one (the function for 'structure hit' simply isn't called, because the bullet apparently hits the ground). During testing, I often targetted a position way behind target, otherwise the bullet dropped too early. This is not a problem of this feature per se - I only alter the behaviour once a bullet hits a structure, but cannot do anything if the never says 'you hit that'.

Report message to a moderator

Captain

Re: New feature: anti-materiel ammo[message #331514] Thu, 27 March 2014 01:31 Go to previous messageGo to next message
Jakub is currently offline Jakub

 
Messages:40
Registered:January 2014
So Next step will M2 1919 Browning sentry guns or KPV 14.5 HMG , Kord ?

Report message to a moderator

Corporal
Re: New feature: anti-materiel ammo[message #338700 is a reply to message #331296] Sat, 03 January 2015 17:28 Go to previous messageGo to next message
smiley is currently offline smiley
Messages:4
Registered:October 2010
Location: Lviv, Ukraine
That is very impressive, but where should I look for that line to change it? (I'm a noob here)

Report message to a moderator

Civilian
Re: New feature: anti-materiel ammo[message #338706 is a reply to message #338700] Sat, 03 January 2015 19:49 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
I assume you want to make an ammotype have this ability? In that case, open Data-1.13/TableData/Items/AmmoTypes.xml, and add the tag <ammoflag>4</ammoflag> to the ammotype in question.

Note that this merely allows a bullet to damage structures, but is has to deal sufficient damage in itself. An anti-material .38 won't damage much happy

Report message to a moderator

Captain

Re: New feature: anti-materiel ammo[message #338719 is a reply to message #338706] Sun, 04 January 2015 08:47 Go to previous messageGo to next message
smiley is currently offline smiley
Messages:4
Registered:October 2010
Location: Lviv, Ukraine
Thank you! Yes, I was asking just for that.
And what about making that ammo type not destroy stuff, but penetrate/ignore it with the minimal loss of accuracy and damage?

Report message to a moderator

Civilian
Re: New feature: anti-materiel ammo[message #350077 is a reply to message #338719] Thu, 15 June 2017 13:06 Go to previous messageGo to next message
88vs1984 is currently offline 88vs1984

 
Messages:15
Registered:August 2015
Location: Belarus
I assigned <ammoflag>4</ammoflag> to a bullet type, but the feature doesn,t work. I assigned this type to 12.7x108. Build 1.13 7609. What is wrong?

<AMMOTYPE>
<uiIndex>3</uiIndex>
<name>SAP Antimat</name>
<fontColour>163</fontColour>
<grayed>8</grayed>
<offNormal>5</offNormal>
<onNormal>7</onNormal>
<structureImpactReductionMultiplier>1</structureImpactReductionMultiplier>
<structureImpactReductionDivisor>2</structureImpactReductionDivisor>
<armourImpactReductionMultiplier>1</armourImpactReductionMultiplier>
<armourImpactReductionDivisor>3</armourImpactReductionDivisor>
<beforeArmourDamageMultiplier>1</beforeArmourDamageMultiplier>
<beforeArmourDamageDivisor>1</beforeArmourDamageDivisor>
<afterArmourDamageMultiplier>1</afterArmourDamageMultiplier>
<afterArmourDamageDivisor>1</afterArmourDamageDivisor>
<zeroMinimumDamage>0</zeroMinimumDamage>
<canGoThrough>1</canGoThrough>
<standardIssue>1</standardIssue>
<numberOfBullets>1</numberOfBullets>
<multipleBulletDamageMultiplier>1</multipleBulletDamageMultiplier>
<multipleBulletDamageDivisor>1</multipleBulletDamageDivisor>
<highExplosive>0</highExplosive>
<explosionSize>0</explosionSize>
<antiTank>0</antiTank>
<dart>0</dart>
<knife>0</knife>
<monsterSpit>0</monsterSpit>
<acidic>0</acidic>
<ignoreArmour>0</ignoreArmour>
<lockBustingPower>0</lockBustingPower>
<tracerEffect>0</tracerEffect>
<spreadPattern />
<temperatureModificator>0.3</temperatureModificator>
<PoisonPercentage>0</PoisonPercentage>
<dirtModificator>0.2</dirtModificator>
<ammoflag>4</ammoflag>
</AMMOTYPE>

Report message to a moderator

Private
Re: New feature: anti-materiel ammo[message #350080 is a reply to message #350077] Thu, 15 June 2017 18:08 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
There is no anti-material flag in build 7609. 4 was unused.

edit: Here is an excerpt from the code:
Toggle Spoiler

[Updated on: Thu, 15 June 2017 18:15]




Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: anti-materiel ammo[message #350082 is a reply to message #350080] Thu, 15 June 2017 20:03 Go to previous message
88vs1984 is currently offline 88vs1984

 
Messages:15
Registered:August 2015
Location: Belarus
2 silversurfer:
Tnank You, Bro!

Report message to a moderator

Private
Previous Topic: New feature: non-profile merchants
Next Topic: New feature: dynamic (flash-)lighting
Goto Forum:
  


Current Time: Tue Dec 03 02:07:30 GMT+2 2024

Total time taken to generate the page: 0.01900 seconds