Home » MODDING HQ 1.13 » v1.13 Coding Talk » Under Barrel Weapons [Implemented by Flugente]
|
|
|
|
|
|
|
|
Re: Under Barrel Weapons [Implemented by Flugente][message #317169]
|
Sun, 07 April 2013 15:28
|
|
grim |
|
Messages:344
Registered:July 2006 Location: France |
|
|
I reloaded my save shortly to test the scar-H + Masterkey on JA2 1.13 (5962 and 1631).
The masterkey is loaded with flechette ammo and shoots pellets (but in a very wide pattern).
I spawned a red shirt for testing purposes, and shot him at approximately 10 tiles. The NCTH with a x7 scope was narrower than the size of a head. The scar-H hit 9/10, while the masterkey hit 1 or 2/10. Misses were very far from the target.
I couldn't make screenshots, but will try!
EDIT: Another test session, a few screenshots to illustrate the problem:
My shooter's stats and his weapon:
The shooting range and NCTH indicator:
Two wild shots:
Precisions:
* I removed the masterkey from the scar-H and unloaded it to see the ammotype: It was as intended Flechette ammo (that i used to shoot the bad guy)
* This time, more shots hit the target, but generally, the accuracy was far from what the NCTH indicated, and far from the accuracy of the main weapon (Scar-H)
[Updated on: Sun, 07 April 2013 23:01] by Moderator Report message to a moderator
|
Master Sergeant
|
|
|
|
|
Re: Under Barrel Weapons [Implemented by Flugente][message #317185]
|
Sun, 07 April 2013 23:53
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
Okay. Whe exactly is the SCAR-H SV a sniper rifle? I get what the SV stands for, but shouldn't this be an AR? One gets a severe cth drop if one uses it and isn't a sniper...
Edit: Okay, found the error with the non-occuring explosions. I used
AmmoTypes[MercPtrs[ubOwner]->inv[MercPtrs[ubOwner]->ubAttackingHand ][0]->data.gun.ubGunAmmoType].explosionSize
instead of
AmmoTypes[(*MercPtrs[ ubOwner ]->GetUsedWeapon( &MercPtrs [ ubOwner ]->inv[MercPtrs[ubOwner]->ubAttackingHand] ))[0]->data.gun.ubGunAmmoType].explosionSize
for the explosion size. How dumb of me. Easily readable code ftw :blah: :gaga:
Committed in r5988.
Also, are you using any scope with the SCAR? I have no idea which one to pick, and it would be good if we all had the same for testing...
[Updated on: Mon, 08 April 2013 00:46] by Moderator Report message to a moderator
|
|
|
|
|
Re: Under Barrel Weapons [Implemented by Flugente][message #317188]
|
Mon, 08 April 2013 01:07
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
I'm now using a M16A3 with a 4x Battle Scope. On OCTH, the difference in CTH seems to come from the difference in accuracy and range of the gun - which is how it should be. Now to NCTH...
Edit: Weird behaviour. On NCTH (firing with Bob, standing, on a soldier 17 tiles away) the CTH for both M16A3 and the underbarrel M26 is almost the same (54% to 52%). However, the M26 seems to over- or undershoot very much. Can you acknowledge that? It seems to me the shots don't go that much to the side, but most fall short or go way behind the target.
One factor of this the -tag, which seems to have a much bigger effect than the -tag in OCTH...
[Updated on: Mon, 08 April 2013 01:51] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Under Barrel Weapons [Implemented by Flugente][message #331760]
|
Tue, 15 April 2014 16:39
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
It has been a while so I decided to check on the reloading bug (and double post), the save game from last year is usable under SCI_Unstable_Revision_7141_on_GameDir_2007 and the bug is still present: when attached, the under barrel weapon's loaded rounds cannot be modified unless fired
- manually reloading same or different ammo results in what looks like a swap out of the previously loaded ammo item, but nothing happens to the actual ammo stats in the under barrel weapon.
- oddly enough if the under barrel weapon is empty and you try to fire, it will reload properly (meaning if you want to change ammotype, you have to drop all other ammotypes for the under barrel weapon, empty the under barrel somehow, and fire so the under barrel draws from only choice you've given the game)
ie. in the save game supplied above, empty the rounds from the Masterkey and try to reload while the Masterkey is still attached, you will see that the game takes your reload ammo item, but the Masterkey remains empty. Fire the Masterkey while attached and it reloads from inventory just fine.
I'm not sure if I submitted a bugzilla for this one, but I'll do so today if I haven't.
EDIT: Got a Bugzilla number for it 663
Additionally, I think I found a own workaround, swap still working from the merc's inventory screen - the under barrel weapon has be selected but it looks like ammo is being swapped successfully when the new ammo is dropped on the base weapon.
Reloading, unloading, swapping ammotype does not actually cause a change to the actual ammo stats of the attached under barrel weapon from this screen.
...however you can reload and swap ammunition in the under barrel weapon while in this screen (as long as the base weapon is in hand and set to UB fire mode)
[Updated on: Tue, 15 April 2014 18:26] by Moderator Report message to a moderator
|
|
|
|
Re: Under Barrel Weapons [Implemented by Flugente][message #331767]
|
Tue, 15 April 2014 21:20
|
|
anv |
|
Messages:258
Registered:March 2013 |
|
|
@wil473: Fix:
Toggle SpoilerIndex: Interface Items.cpp
===================================================================
--- Interface Items.cpp (revision 7146)
+++ Interface Items.cpp (working copy)
@@ -6356,7 +6356,8 @@
Object2 = *pAttachment;
gfItemDescObjectIsAttachment = TRUE;
- InternalInitItemDescriptionBox( &Object2, gsInvDescX, gsInvDescY, 0, gpItemDescSoldier );
+ //InternalInitItemDescriptionBox( &Object2, gsInvDescX, gsInvDescY, 0, gpItemDescSoldier );
+ InternalInitItemDescriptionBox( pAttachment, gsInvDescX, gsInvDescY, 0, gpItemDescSoldier );
if ( fShopkeeperItem )
{
Static type of Object2 was blocking changing attachment data.
Report message to a moderator
|
|
|
|
Re: Under Barrel Weapons [Implemented by Flugente][message #331769]
|
Wed, 16 April 2014 05:24
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
anv@wil473: Fix:
Toggle SpoilerIndex: Interface Items.cpp
===================================================================
--- Interface Items.cpp (revision 7146)
+++ Interface Items.cpp (working copy)
@@ -6356,7 +6356,8 @@
Object2 = *pAttachment;
gfItemDescObjectIsAttachment = TRUE;
- InternalInitItemDescriptionBox( &Object2, gsInvDescX, gsInvDescY, 0, gpItemDescSoldier );
+ //InternalInitItemDescriptionBox( &Object2, gsInvDescX, gsInvDescY, 0, gpItemDescSoldier );
+ InternalInitItemDescriptionBox( pAttachment, gsInvDescX, gsInvDescY, 0, gpItemDescSoldier );
if ( fShopkeeperItem )
{
Static type of Object2 was blocking changing attachment data.
Thank you Anv... that wasn't even 6 hours. Does this fix mean that we can now finally unload attached under barrel weapons? The original bug, before it seemed to get worse, was that the attached weapon would never clear when the bullet icon was clicked to unload - leading to the exploit of a potential unlimited source of FRAG-12 and Incendiary shells (in my mods).
Cannot wait to give the next .exe a spin... time permitting.
[Updated on: Wed, 16 April 2014 05:26] by Moderator Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 09:14:02 GMT+2 2024
Total time taken to generate the page: 0.02537 seconds
|