PDA

View Full Version : Can anyone help me make a mod like this...



McVittees
04-16-2004, 04:53 AM
Is it possible (and could anyone tell me how if it is), to make a single player mod where you lose any unshot ammo in a magazine when you reload? I don't like the 'topping' off habit I've aquired through most FPSs. http://ubbxforums.ubi.com/infopop/emoticons/icon_razz.gif It would add another tactical stress - do I need a fresh mag or not? Shall I risk entering this room with only 10 rounds remaining? While I'm asking, could the rounds remaining be hidden and just magazines left dispalyed?

PS I know I could just fire off unspent rounds but it's not quite the same thing. http://ubbxforums.ubi.com/infopop/emoticons/icon_biggrin.gif

"Great minds think alike; idiots seldom differ."

McVittees
04-16-2004, 04:53 AM
Is it possible (and could anyone tell me how if it is), to make a single player mod where you lose any unshot ammo in a magazine when you reload? I don't like the 'topping' off habit I've aquired through most FPSs. http://ubbxforums.ubi.com/infopop/emoticons/icon_razz.gif It would add another tactical stress - do I need a fresh mag or not? Shall I risk entering this room with only 10 rounds remaining? While I'm asking, could the rounds remaining be hidden and just magazines left dispalyed?

PS I know I could just fire off unspent rounds but it's not quite the same thing. http://ubbxforums.ubi.com/infopop/emoticons/icon_biggrin.gif

"Great minds think alike; idiots seldom differ."

Lo.TekK
04-16-2004, 06:19 AM
This could probably be done through some scripting work (divide remaining ammo by the number of rounds per magazine). Losing remaining ammo could be done, but in a game like Far Cry, where there's plenty of downtime, I'd prefer to think that Jack consolidates his ammo during opportune downtimes. I know my training never taught me to throw away a partially used magazine. http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

McVittees
04-16-2004, 09:47 AM
Arrrggg! Scripting! I'll never be able to get my head around that stuff...maybe some genius round here can knock some up for me? http://ubbxforums.ubi.com/infopop/emoticons/icon_biggrin.gif Hmmm, down time, I've only got as far as level 5 or 6 and Jack and I haven't had a breather yet!

(Sorry can't resist saying it but this game rocks!)

"Great minds think alike; idiots seldom differ."

Sceprax
04-16-2004, 10:32 AM
Well, I probably could. Too bad for you I don't like that kind of system.

It's like Mafia, you get a thompson, it only has 36 bullets, so I press reload. Remembering too late that I'll loose all ammo in the drum, it falls on the street and you can't pick it up anymore.

Besides, what a waste of bullets. You'll need them.

-------------------------------------------------------
http://www.home.zonnet.nl/Timothee/mods/AissoMod_v2.zip

GordieFreeman
04-16-2004, 11:11 AM
That's just like in Battlefield 1942/Vietnam. Pisses me off.

GazzaBinks
04-16-2004, 11:21 AM
I hate that aswell ....


Noooooobody do it for him ...... lol

mr.amphibian
04-16-2004, 05:28 PM
wouldnt it make sense to do a quick reload/slow reload mod..

slow= you think you're safe do a long reload and save ammo...
fast= ur runnin bettween frefights= chuck out ur mag and go for a fresh one... with a different amount of time (long reload taking ALOT longer)

all ya needa do is decide which key to press

_____________________________
if it looks like i am free it is becuse i am running

max... dearest of all my friends!

McVittees
04-17-2004, 03:12 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Sceprax:
Well, I probably could. Too bad for you I don't like that kind of system.
<HR></BLOCKQUOTE>

Yeah, that sure is a shame...don't suppose you could point me in the direction though?

http://ubbxforums.ubi.com/images/smiley/11.gif

"Great minds think alike; idiots seldom differ."

McVittees
04-17-2004, 03:13 AM
<BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by mr.amphibian:
wouldnt it make sense to do a quick reload/slow reload mod..

slow= you think you're safe do a long reload and save ammo...
fast= ur runnin bettween frefights= chuck out ur mag and go for a fresh one... with a different amount of time (long reload taking ALOT longer)

all ya needa do is decide which key to press

_____________________________
if it looks like i am free it is becuse i am running

max... dearest of all my friends!<HR></BLOCKQUOTE>

Good idea! http://ubbxforums.ubi.com/images/smiley/16x16_smiley-happy.gif

"Great minds think alike; idiots seldom differ."

Teq1
04-17-2004, 05:47 AM
Ok something like this might do it:

Make a mod that includes the file \Scripts\Default\Entities\Weapons\BasicWeapon.lua and add a single line

stats.ammo_in_clip = 0;

just after the second if-statement in the fuction BasicWeapon.Server:Reload seem to do the trick. This dumps the remaining ammo in the clip.

The first lines in the function will now look like this:

function BasicWeapon.Server:Reload(shooter)
local stats = shooter.cnt;
if (not stats.reloading) then
local w = stats.weapon;
if (w and stats.ammo_in_clip &lt; shooter.fireparams.bullets_per_clip and stats.ammo &gt; 0) then
stats.ammo_in_clip = 0;
...

It behaves ok when I test it in MP, but I have no clue if it works in SP or with AI's etc. There are several more reload functions I don't understand yet (e.g. Client:Reload). But this might get you something to start with...

And to you that hate this kind of reloading, sorry heh http://ubbxforums.ubi.com/infopop/emoticons/icon_wink.gif

Edit: it seems to work in SP mode as well, and sorry about the idiot indentation of the code http://ubbxforums.ubi.com/infopop/emoticons/icon_smile.gif

McVittees
04-18-2004, 08:12 AM
Thank you very much Teq1 I will try it out! http://ubbxforums.ubi.com/images/smiley/11.gif

"Great minds think alike; idiots seldom differ."

Teq1
04-18-2004, 10:28 AM
Anytime, happy to know if it works or if you find more stuff to do...