Old 05-08-2014   #1
BokolizZ
Registered User
Newbie Member
 
Join Date: May 2014
Posts: 2
BokolizZ is an unknown quantity at this point
Semi-auto assault rifle

Hello, I am trying to create a semi-automatic assault rifle, or at least mod the m4 carbine in order to make it fire in semi-auto mode! By semi automatic I mean that holding the mouse button down will cause the weapon to fire just one bullet. Much like a pistol, only that if I can press the mouse button fast enough it will fire as if I was firing on full auto.
So in order to do it(mod the m4 carbine) I have tried editing with various stuff inside weaponinfo.xml, but unfortunately I have had no luck yet. Therefore I am here to ask for any advice from someone who might have more experience regarding the matter.

If anyone has any ideas they would be much appreciated!!
BokolizZ is offline   Reply With Quote
Old 05-08-2014   #2
Killerfist
Registered User
Addicted Member
 
Killerfist's Avatar
 
Join Date: May 2011
Location: Netherlands
Posts: 1,607
Killerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to beholdKillerfist is a splendid one to behold
What you could do is change the anim group (or whatever it's called) to that of the (psg) sniper rifle so that it'll use those animations and fire one bullet at a time. It's pretty likely that it'll cause some issues with handposition amongst others, but it's worth a shot I suppose.

Other option would be to change the magazine size to 1 bullet, but I think that'll mean he reloads every time after 1 bullet so that isn't ideal either.

I think those are your only two options

Last edited by Killerfist; 05-09-2014 at 02:53 AM..
Killerfist is offline   Reply With Quote
Old 05-09-2014   #3
BokolizZ
Registered User
Newbie Member
 
Join Date: May 2014
Posts: 2
BokolizZ is an unknown quantity at this point
Hi! I first tried the weapon group but the problem is that with the psg anim group it is reloading after each shot, so, I tried other anim groups as well but the main problem is that if you hold down LMB it will continue to shoot even though practically being in 'semi auto'. As for the magazine size I was at first ambitious that I would be able to reduce the reload time so that it is equal to the gun's rate of fire, but it then hit me that if you keep holding down LMB after you've emptied the mag it will automatically reload and fire.
Either way I kinda lost my hard-on for a semi auto weapon so i don't feel that disappointed

It would however be interesting if there was a way to edit/add a custom weapon anim group to the game, but I am afraid that it is hardcoded..

Thank you for the answer!
BokolizZ is offline   Reply With Quote
Old 05-11-2016   #4
Naruto 607
The new Police Generation
Amateur Member
 
Naruto 607's Avatar
 
Join Date: Jul 2012
Location: Cileunyi, Bandung Regency, West Java, Indonesia
Posts: 109
Naruto 607 is an unknown quantity at this point
Quote:
Originally Posted by BokolizZ View Post
Hi! I first tried the weapon group but the problem is that with the psg anim group it is reloading after each shot, so, I tried other anim groups as well but the main problem is that if you hold down LMB it will continue to shoot even though practically being in 'semi auto'. As for the magazine size I was at first ambitious that I would be able to reduce the reload time so that it is equal to the gun's rate of fire, but it then hit me that if you keep holding down LMB after you've emptied the mag it will automatically reload and fire.
Either way I kinda lost my hard-on for a semi auto weapon so i don't feel that disappointed

It would however be interesting if there was a way to edit/add a custom weapon anim group to the game, but I am afraid that it is hardcoded..

Thank you for the answer!
Well, maybe I can help.

I did a long time to mod such weapon data in the game, and I think it's super easy to do for me.

Basically, the M4 can be configured to have 3 fire modes:
  1. Safe
  2. Single
  3. Full

And so, you requested a Single Fire Mode. I have prepared the WeaponInfo string for M4 in less than a minute, all has been set to realistic defaults.

The first up is to open your WeaponInfo.xml, particularly destined for GTA IV or EFLC Core (not EFLC TLAD or TBoGT), find the M4 string, block until "</weapon>" and replace it with the one I provided here:
Code:
	<weapon type="M4">
		<data slot="RIFLE" firetype="INSTANT_HIT" damagetype="BULLET" group="RIFLE_ASSAULT" targetrange="100.5" weaponrange="500" clipsize="30" ammomax="330" timebetweenshots="66">
			<damage base="100" networkplayermod="2.5" networkpedmod="1.25"/>
			<physics force="43.75"/>
			<reload time="2066" fasttime="1166" crouchtime="2066"/>

			<aiming accuracy="0.65">
				<offset x="0.14" y="1.0" z="0.55"/>
				<crouchedoffset x="0.08" y="1.0" z="0.12"/>
				<reticule standing="0.6" ducked="0.5" scale="0.3"/>
			</aiming>

			<pickup regentime="480000" ammoonstreet="60"/>

			<controller>
				<rumble duration="140" intensity="0.4"/>
			</controller>

			<flags>
				<flag>GUN</flag>
				<flag>CAN_AIM</flag>
				<flag>2HANDED</flag>
				<flag>ANIM_RELOAD</flag>
				<flag>CAN_FREE_AIM</flag>
				<flag>ANIM_CROUCH_FIRE</flag>
			</flags>
		</data>

		<assets model="w_m4">
			<anim group="gun@rifle">
				<rates firerate="2.58" blindfirerate="2.58"/>
			</anim>
			<effects>
				<muzzle fx="muz_machine"/>
				<shell fx="weap_ejected_rifle"/>
			</effects>
		</assets>
	</weapon>
If you do not want to change the whole string contained, just change the anim group from gun@ak47 to gun@rifle. Save the changes and close.

Now open your default.ide and replace w_m4 line with this one:

Code:
w_m4, 			w_m4, 			gun@rifle, 		1, 	50, 	0
It will change the animation usage for M4 assault rifle so that it will avoid game crash when aiming it. Save the changes and close.

When you fire up GTA IV or EFLC, you will see the effect almost immediately when using M4 assault rifle. Or, try it at wanted level, and see if the NOoSE guys or FIBs use the M4 AR.

Hope this helps.
Naruto 607 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:42 PM.