Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Overheating Weapons
New feature: Overheating Weapons[message #295171] Wed, 14 December 2011 23:53 Go to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
Overheating weapons

Hi, as I felt the feature was missing, I've implemented the feature of overheating weapons. Basically, every shot fired from a gun increases its temperature. On higher temperatures, the gun jams more frequently. Above a certain threshold, the gun also degrades much faster. The temperature is lowered every turn (turnbased)/5 seconds (realtime).

The increasing/decreasing of temperature works for all weapons in a game, both for mercs and soldiers. It also works for weapons in the sector inventory, in any sector, regardless of merc presence (so a weapon dropped by an enemy will cool down).

You can edit a gun's heat generation and its jam and damage thresholds via Weapons.XML:

...
<usOverheatingJamThreshold>4700.0</usOverheatingJamThreshold>
<usOverheatingDamageThreshold>5300.0</usOverheatingDamageThreshold>
<usOverheatingSingleShotTemperature>50.0</usOverheatingSingleShotTemperature>
...


As there is now a replacable barrel, the speed of cooldown can be set in Items.XML:

...
<barrel>0</barrel>
<usOverheatingCooldownFactor>125.0</usOverheatingCooldownFactor>	
...


Different ammunition types can modify heat generation in AmmoTypes.XML:

...
<temperatureModificator>1.03</temperatureModificator>	
...


A gun's barrel can be replaced with a new barrel if you allow it in Merge.XML (1377 is the item-number of the replacable barrel):

...
<MERGE>
<firstItemIndex>1377</firstItemIndex>
<secondItemIndex>1075</secondItemIndex>
<firstResultingItemIndex>1075</firstResultingItemIndex>
<secondResultingItemIndex>1377</secondResultingItemIndex>
<mergeType>8</mergeType>
<APCost>50</APCost>
</MERGE>
...


I've added a section to the Data-1.13/Ja2_Options.INI where one can set global values (note that now attachments can alter cooling properties):

...

[Tactical Weapon Overheating Settings]

;******************************************************************************************************************************
; In this section you can modify global settings for weapon overheating.
;******************************************************************************************************************************

; Maximum 'temperature' a gun can have
OVERHEATING_MAX_TEMPERATURE = 40000

; Should a 'thermometer' for guns and replacable barrels be displayed?
OVERHEATING_DISPLAY_THERMOMETER = TRUE

; A weapon's cooldown factor is multiplied with this, accounting for worse heat reduction due to attachments
OVERHEATING_COOLDOWN_MODIFICATOR_SILENCER         = 0.8
OVERHEATING_COOLDOWN_MODIFICATOR_BARRELEXTENDER   = 0.85
OVERHEATING_COOLDOWN_MODIFICATOR_FLASHSUPPRESSOR  = 0.97

; If a barrel is not in someone's inventory, it cools down a little bit better
OVERHEATING_COOLDOWN_MODIFICATOR_LONELYBARREL = 1.15
...


The XML-Files are needed for playing.

I have also edited the INIEditorJa2Options.xml for descriptions.

I tested this feature with a new SCI from Tai:

http://kermi.pp.fi/JA_2/v1.13_Releases/Unofficial/English/tais/Unstable/SCI_113Unstable_r4945_20120212.7z

It was built upon the currently newest source in the trunk, revision 4946.

Version 1.2, for newer version see end of post!!!!
I've built an .7z-archive that contains all the necessary files (.exe, .ini and .xml): http://www.filefactory.com/file/c50b9b7/n/Overheating_1_2.7z

For those who want to add this to their code, use this .patch file: http://www.filefactory.com/file/c3c202d/n/overheating_1_2.patch

And now: pictures for entertainment

Temperature is displayed via a thermometer on the left side of a weapon:

http://i44.tinypic.com/ouy4i9.jpg

Temperature is additionally shown in the description window, in the same colour as the thermometer:

http://i39.tinypic.com/e89951.jpg

Description of new weapon stats (update: now with new icons):

http://i41.tinypic.com/x6j1io.jpg

Description of new ammo stats:

http://i43.tinypic.com/vpxoya.jpg

A replacable barrel.

http://i39.tinypic.com/r1zm13.jpg

This feature can be turned on and off in the 'Preferences' menu:

http://i41.tinypic.com/2n6eouq.jpg

Due to code changes, there is no savegame compatibility, as I have made changes to the OBJECTTYPE class.

I would VERY much like to integrate this into some other project. I'd of course maintain it as good as I can, but a mod with this feature alone is pretty pointless.

So, if one of those omnipotent beings (mods) could grant me a svn-branch, integrating this into something else would be much easier. (And I wouldn't have to store the code somewhere else in case my computer breaks :yikes: )

So, yeah, have fun. And give me feedback, if you like.

Update on 28.2.12: As I can't seem to be able to upload anything at all on Filefactory, here is

Version 1.2.1:
.7z-archive: http://www.mediafire.com/?xoacaj8wp5rtfgs
.patch-file with code: http://www.mediafire.com/?9wheskad9qqi9f7

Changes in version 1.2.1:
- I've changed a few weapon values, no more stock values.
- The thermometer is now deep red while the temperature rises, and becomes brighter as the jam treshold is violated
- I've added caliber-specific replacable barrels for all machineguns (so, 5 different barrels)

Update on 6.3.12: No more FileFactory-stuff needed! Grab the stuff right from svn:

Source Code: https://ja2svn.dyndns.org/source/ja2/branches/Flugente/Overheating/Source

Additional stuff (necessary .xmls, .inis, .stis): https://ja2svn.dyndns.org/source/ja2/branches/Flugente/Overheating/Build

Changes in version 1.2.2:
- icons for everything overheating-specific added

[Updated on: Sun, 15 May 2016 18:16]



Re: Feature: Overheating Weapons[message #295172] Thu, 15 December 2011 00:02 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3813
Registered:July 2009
I opened this thread expecting yet another request ... must say it was a very nice surprise. Good job, that looks like a sound system.


Re: Feature: Overheating Weapons[message #295173] Thu, 15 December 2011 00:16 Go to previous messageGo to next message
Slax

 
Messages:1448
Registered:July 2006
Location: People riding polar bears...
Cool! Or hot, depending on the amount of action you're in.
:crazy:

Re: Feature: Overheating Weapons[message #295180] Thu, 15 December 2011 01:08 Go to previous messageGo to next message
Sam Hotte

 
Messages:2013
Registered:March 2009
Location: Middle of Germany
Let them barrels glow! Very Happy
Re: Feature: Overheating Weapons[message #295245] Thu, 15 December 2011 22:28 Go to previous messageGo to next message
Off_Topic

 
Messages:1038
Registered:January 2009
Cool, i've wanted this ever since i saw it in Night Ops.Is it gun specific, or are all guns subject to the same level of overheating?


Re: Feature: Overheating Weapons[message #295261] Fri, 16 December 2011 02:41 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
Thanks for your praise Smile I hope it will be useful.

@ Off Topic:???

You mean this was actually implemented before?????

What???

ARGH!
.
.
.
:yikes:
.
:roulette:
sigh.
Oh well. Never mind.

Hmm. Why wasn't that merged to 1.13 base then?


Well, no it isn't gun specific. You can fill in specific values for every gun in Weapons.xml, like in the file referred to in the first post. So for example you could raise the temperature of a single shot for heavy sniper rifles, or let some guns cool down much faster. Or lower the usOverheatingDamageThreshold, so that a gun will degrade much faster.

However, I haven't yet played a campaign with it, so i am at the moment unsure about the best values for each and every weapon. I also do not have that much knowledge about firearms, but I'm sure some people around here do Smile

Feel free to suggest ideas for weapon specifics.

I'd very much like to also these values to the UDB-Box, so one can actually see them ingame. However, all space in there seems to be already occupied. As the code there is not the easiest, I'll have to ask to Headrock about some tips for it sometime.




Re: Feature: Overheating Weapons[message #295270] Fri, 16 December 2011 05:19 Go to previous messageGo to next message
Headrock

 
Messages:1775
Registered:March 2006
Location: Jerusalem
I was hoping to implement this feature too. You beat me to it - and not by much. Saves me a lot of work though, that's always good. Smile

Quote:
I'd very much like to also these values to the UDB-Box, so one can actually see them ingame. However, all space in there seems to be already occupied. As the code there is not the easiest, I'll have to ask to Headrock about some tips for it sometime.


Oh dear. Now THAT I didn't think about. UDB is currently full, and is unlikely to become any less full anytime soon (or ever). To make room you'd need to make it larger - and there isn't really any room for that. The only thing I can think about is adding a fourth tab to it - but that may make comparing weapons even more difficult.

I don't know what to tell you.


Re: Feature: Overheating Weapons[message #295272] Fri, 16 December 2011 05:35 Go to previous messageGo to next message
Wil473

 
Messages:2859
Registered:September 2004
Location: Canada
Night Ops, was Russian mod project started a long time ago, before the source code was released if I remember correctly. In addition to overheating, they also had optional moving enemy Tanks and Humvee's.

Now since Headrock is involved here, should I be delaying AFS v3.60 RC2 HAM 5 Optimized? Overheating has been on my wish list for a while as well, and I think people are are little wary or my use of simple lack of durability to portray one of the (usually cited) weaknesses of direct impingement (AR-15) rifles - heat building up/being dumped into places where it does damage.


Re: Feature: Overheating Weapons[message #295273] Fri, 16 December 2011 05:49 Go to previous messageGo to next message
Headrock

 
Messages:1775
Registered:March 2006
Location: Jerusalem
I'm not involved, I'm just giving my opinion. I'm afraid I don't have the time to actually inspect this any closer.


Re: Feature: Overheating Weapons[message #295275] Fri, 16 December 2011 08:06 Go to previous messageGo to next message
knightofni

 
Messages:101
Registered:August 2011
Flugente

I'd very much like to also these values to the UDB-Box, so one can actually see them ingame. However, all space in there seems to be already occupied. As the code there is not the easiest, I'll have to ask to Headrock about some tips for it sometime.



Couldn't this be added to the 3rd tab (advanced) ? There's a scrolling bar, so we can put as much data as we want, can't we ?
Re: Feature: Overheating Weapons[message #295282] Fri, 16 December 2011 11:23 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
I had experimented with displaying under the 'General' tab, unfortunately there isn't enough space there, and i shy away from implementing a scrolling bar there.

But knightofni's idea is good. What I didn't like about the 'Advanced' tab at first were those icons for prone/crouching/standing, I'd rather have the ones for '0', '+/-' and '=' like in the General tab. But (idea): it should be possible just put in a new header line, I guess. Hmm. Not a bad idea. I guess I'll try it out. Good man.

BTW: how do you design these small symbols for UDB? I know they are read from .STIs, and I can actually see those with STIedit... but how do you add a symbol correctly? I tried it once, but the transparency was broken. Is there any guide or something?

Concerning integration into some other project: I'd be very happy to. However, I don't know if anyone else besides me has tested this yet.

The one thing I would really like to know is if there is any slowdown in lategame. Currently, all weapons in inventories are cooled down, this includes your mercs and any militia/enemies loaded. But also, all weapons in sectors (those that have been created - so those you can actually see in any sector) are cooled down too. This happens in HandleEndTacticalTurn - which is also called in real time (about every 5 seconds). So I basically check for every item if it is a gun ( and some other checks) and if it is, its temperature gets lowered. I don't know if this could be a problem (speedwise) in late game, when there are thousands of items (and hundreds of guns) lying around. If it is I might have to simplify that function.


But I built it so that once you disable the feature, it is completely deactivated (weapons neither gain or lose any temperature, nothing concerning temperature more gets displayed, and the jamming-code is back at 'classic' behaviour. I basically made a

if ( gGameSettings.fOptions[TOPTION_WEAPON_OVERHEATING] )
{
...
}


around all new code. In that case the only difference are to 'normal' behaviour are some new weapon stats, those 'if'-checks and a slightly longer OBJECTTYPE. So i don't think there should problem - after all, one can simply turn this off until I find a solution, should there be a problem.

I guess the very first step to integration, wether in AFS or any other mod, would be me checking this into an svn branch. Whom should I contact in this regard?


Re: Feature: Overheating Weapons[message #295283] Fri, 16 December 2011 11:38 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3813
Registered:July 2009
You should just make a .patch file from your working dir and post it. Assuming you have been working on a versioned folder (You Should!), you can just select 'create patch' from the SVN context menu.


Re: Feature: Overheating Weapons[message #295287] Fri, 16 December 2011 13:58 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
Ok. Did that. Here it is:

http://www.filefactory.com/file/c0db5c9/n/ftw1.patch

I'll make another patch once I've gotten to the UDB-Box.


Re: Feature: Overheating Weapons[message #295289] Fri, 16 December 2011 14:04 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295295] Fri, 16 December 2011 14:51 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
Hi Monade,

I had thought about replacable barrels. However, I've never made attachments before. I have no idea how that works. But I don't see why it wouldn't be possible, yes.

Problem1: Even if the heat would be displayed at the barrel, you'd still have to give some sort of indicator on the weapon itself. Otherwise the player would be scratching his head about why his 99%-status M16 is jamming all the time. Displaying something like that only in the EDB-Box won't do (it is annoying if you constantly have to open a soldier's inventory and check the weapon stats while in a firefight).

But yeah, I had thought about replacable barrels: You would change a barrel and the weapon would inherit the temperature of the new barrel.

Problem 2: In that case the attachment 'barrel' needs to have a temperaure too, and cool down too. I think in that case all attachments would have to get a new variable 'temperature' (currently only weapons have that). You cannot use the status, in case you would use that status for weapon reliability. Propably not a problem, but worth mentioning.

Problem 3: I do not think that one could change barrels in the field for all weapons. From my time in the Bundeswehr I remember that the MG3 had an easily replacable barrel (the machinegunner always had a spare one in the field). The P1's barrel could also be easily replaced. But the G36? Nah, that barrel was fixed inside the stock. You'd have to replace half the weapon. In the field of course. I guess there has to be some way for the mechanics...
So, I think only a few weapons (mostly MGs) would have replacable barrels.

I think one could solve that by adding a flag 'HasReplacableBarrel' to all weapons. By exchanging, the temperature would then 'move' to the barrel.

Quote:
Its faster to change (if you add certain barrel types and combine them with the weapon system) for a modder than alter every single weapons heat/cooldown mechanism.


Hmm. That would mean kinda 'universal' barrels, like one for all 7.62x51mm weapons, and the like. Wouldn't be realistic (but then, the universal barrel extender/silencer/Flash Suppressor isn't either). Not a bad idea. But even if I'd do that, it would take some time, as I have no clue about attachments.

Quote:
If the weapon overheats are those merc better visible/spottable at night?


No. Would that really be applicable? I mean, do firearms glow in the dark when they are fired long enough?

Quote:
Instead of a jam can you integrate a simple blowup (status decrease to 1%) of the weapon system? :>


That is already implemented. Once the temperature is above usOverheatingDamageThreshold, it degrades much faster. If you want that, but don't want it to jam more often, set usOverheatingJamThreshold to a really high value.


Re: Feature: Overheating Weapons[message #295296] Fri, 16 December 2011 15:02 Go to previous messageGo to next message
Sam Hotte

 
Messages:2013
Registered:March 2009
Location: Middle of Germany
Flugente
Quote:
If the weapon overheats are those merc better visible/spottable at night?


No. Would that really be applicable? I mean, do firearms glow in the dark when they are fired long enough?


At least a Minigun does. If this also happens when you fire the up to 200 rds MGs have in the game - dunno, but i doubt it.

I don't think that's applicable here.
Re: Feature: Overheating Weapons[message #295297] Fri, 16 December 2011 15:04 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3813
Registered:July 2009
Flugente
No. Would that really be applicable? I mean, do firearms glow in the dark when they are fired long enough?
IF the barrel is allowed to build up enough heat, it'll go through the usual colors of hot steel, beginning with a faint, dark red somewhere near 700


Re: Feature: Overheating Weapons[message #295301] Fri, 16 December 2011 15:28 Go to previous messageGo to next message
Sam Hotte

 
Messages:2013
Registered:March 2009
Location: Middle of Germany
In very darkness the adapted human eye is capable of seeing the "gray glow" of about 400
Re: Feature: Overheating Weapons[message #295302] Fri, 16 December 2011 15:36 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295303] Fri, 16 December 2011 15:37 Go to previous messageGo to next message
Headhunter

 
Messages:265
Registered:November 2009
Location: Sweden
Flugente
I had experimented with displaying under the 'General' tab, unfortunately there isn't enough space there, and i shy away from implementing a scrolling bar there.


Couldn't there just be a "Barrel Temperature: xx%" just below "Weight" with like green or blue numbers for a cool barrel and red for a hot barrel?

[Updated on: Fri, 16 December 2011 15:38] by Moderator

Re: Feature: Overheating Weapons[message #295305] Fri, 16 December 2011 16:07 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
@ Headhunter: Already implemented:

http://imageshack.us/photo/my-images/64/descriptionbox2.jpg/

I think the picture in the first post was too small to see it...

Edit: Argh, how do you post pictures correctly???

[Updated on: Fri, 16 December 2011 16:08] by Moderator



Re: Feature: Overheating Weapons[message #295306] Fri, 16 December 2011 16:09 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295307] Fri, 16 December 2011 16:34 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
Monade
Flugente
I had thought about replacable barrels. However, I've never made attachments before. I have no idea how that works. But I don't see why it wouldn't be possible, yes.

ITs not really difficult you need a barrel picture for a wrok-a-round take the "extended barrel" and add a new entry in the attachmentslot.xml as far as i know with the responsible cooridnates. Some explainations can be found in Warmsteels attachment modification.
Thanks to smeagol:
http://img148.imageshack.us/img148/3596/newgunbox.gif


Flugente
Problem1: Even if the heat would be displayed at the barrel, you'd still have to give some sort of indicator on the weapon itself. Otherwise the player would be scratching his head about why his 99%-status M16 is jamming all the time. Displaying something like that only in the EDB-Box won't do (it is annoying if you constantly have to open a soldier's inventory and check the weapon stats while in a firefight).

Hm yes sure. But otherwise if you explain how your systems work with this notification i think players wont have so much problems to figure out why the weapon refuses to work. At the point did you choose Gun Jams as a work-a-round?


At first didn't jam the guns. They would just overheat:
- they would not fire (like jammed guns)
- they could not be unjammed, you'd have to wait for them to cool down
- a red sign saying 'OVERHEATED' was displayed, similar to the current 'JAMMED'

But I changed that, because I thought that a gun not working because of excessive heat kinda was what a jam was in the first place.

Monade
Flugente
But yeah, I had thought about replacable barrels: You would change a barrel and the weapon would inherit the temperature of the new barrel.
Keep on doing it! Wink

Flugente
Problem 2: In that case the attachment 'barrel' needs to have a temperaure too, and cool down too. I think in that case all attachments would have to get a new variable 'temperature' (currently only weapons have that). You cannot use the status, in case you would use that status for weapon reliability. Propably not a problem, but worth mentioning.
I'm not a coder or have any experience in coding stuff so this question is maybe a bit retarded. Is it so hard to add an xml tag or whatever tag for a barrel attachment/item which is combined with the status bar? Further more will set when the weapon refuses to work or maybe blowup if a critique point is reached.


You can't add an xml-tag ingame. What I meant was simply that you'd have to add a variable for temperature for all attachments, so propably all items. At the moment, it is just there for weapons. It is not a problem, its just that, well, memory needed for all items gets bigger. I don't know how much of an issue that is at the moment.

Adding such a variable is easy. I just wanted to raise awareness to the memory-issue Smile

Monade
Flugente
Problem 3: I do not think that one could change barrels in the field for all weapons. From my time in the Bundeswehr I remember that the MG3 had an easily replacable barrel (the machinegunner always had a spare one in the field). The P1's barrel could also be easily replaced. But the G36? Nah, that barrel was fixed inside the stock. You'd have to replace half the weapon. In the field of course. I guess there has to be some way for the mechanics...
So, I think only a few weapons (mostly MGs) would have replacable barrels.

Even the MG3 needs some time and the barrel replacement time can simply set in the attachments.xml xxx.


I guess the APcost would just be the basic cost for changing an attachment. Differentiating that would be quite complicated, I guess.

Monade

Additional this barrel "overheating" make more sense for automatic weapons only even if single fire weapon can theoretical overheat its different to automatic weapons but thats just my opinion.


You mean additional heat for firing in automatic mode? Will have to think about that.

Monade
Flugente

Hmm. That would mean kinda 'universal' barrels, like one for all 7.62x51mm weapons, and the like. Wouldn't be realistic (but then, the universal barrel extender/silencer/Flash Suppressor isn't either). Not a bad idea. But even if I'd do that, it would take some time, as I have no clue about attachments.

Nono you can add nearly "infinite" amounts of barrels to the game (items.xml) and set them as x. And cause not each and every barrel is made from the same materal just a few are required. And those few barrel can easily set to the weapon system via the attachments.xml. You know what i mean?


I'm not sure I understand the difference. So you want to have a few, say, 10, different barrels, right? And each one of those should be applicable to every weapon? 'High-End' to 'Low-End' barrels?
I'd propose something kinda like that, but only like one barrel per caliber. That'd still be a lot of items, though...

Monade
Flugente


No. Would that really be applicable? I mean, do firearms glow in the dark when they are fired long enough?

Yes IRL it takes some time. Have a look: - On which values calculated? but for a game it would be well an additional feature or difficulty even its a bit surreal.

Flugente


That is already implemented. Once the temperature is above usOverheatingDamageThreshold, it degrades much faster. If you want that, but don't want it to jam more often, set usOverheatingJamThreshold to a really high value.

Perfect Smile

Sam_Hotte
In very darkness the adapted human eye is capable of seeing the "gray glow" of about 400


Re: Feature: Overheating Weapons[message #295308] Fri, 16 December 2011 16:54 Go to previous messageGo to next message
Sam Hotte

 
Messages:2013
Registered:March 2009
Location: Middle of Germany
Monade
Sam_Hotte
In very darkness the adapted human eye is capable of seeing the "gray glow" of about 400
Re: Feature: Overheating Weapons[message #295309] Fri, 16 December 2011 17:01 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295310] Fri, 16 December 2011 17:04 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3813
Registered:July 2009
Monade
Additional this barrel "overheating" make more sense for automatic weapons only even if single fire weapon can theoretical overheat its different to automatic weapons but thats just my opinion.
It's the same for all. The same cartridge will add the same amount of thermal energy to the barrel, no matter if it's fired in semi or full auto mode. At the same time, the barrel radiates the excess heat to the environment. The reason why heat is an issue with automatics is that it's added faster than it can be dispersed. This is perfectly modeled with his system.


Re: Feature: Overheating Weapons[message #295311] Fri, 16 December 2011 17:08 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295312] Fri, 16 December 2011 17:09 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295319] Fri, 16 December 2011 17:33 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295320] Fri, 16 December 2011 17:33 Go to previous messageGo to next message
Sam Hotte

 
Messages:2013
Registered:March 2009
Location: Middle of Germany
Monade

No it was an example concerning the possibility to get spotted at night even without corresponding sight tools.


No. Thermal shielding of siper rifles is AFAIK against IR sights - because (military, police) helis do feature that nowadays quite often. And to avoid "blurry" hot air in shooters vision.

To have light emmitting that can be seen from far away without technical aid at night you need ember at least ~500
Re: Feature: Overheating Weapons[message #295323] Fri, 16 December 2011 18:01 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
Monade
Well thinking about how does it work ingame does the merc say anything if the weapon refuses to work or is just that you cant fire as long as it is overheated? Did you used the same voices which occure when a gun jam is present?


I used the same voices. There wasn't really a difference, it was like a second jamming

Monade
Is it so much mermory instensive when you add an overheat tag to the barrel attachment for instace?


No. I just wanted to point out that we'd increase the memory needed for all items with a variable that is needed only for very specific item. Which is already done a lot, sadly enough.

Monade
The "JAMMED" notification can i be replaced with "OVERHEATED" or "HEATED"?!


You can, in fact, display whatever text you like. I opted for the small 'T' in the upper left corner, so the weapon is still visible. I don't like weapons constantly hidden behind a wall of texts and symbols. It is already full as hell, as Wolf demonstrates in the above picture Smile


Re: Feature: Overheating Weapons[message #295325] Fri, 16 December 2011 18:08 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3813
Registered:July 2009
On the issue of overheating automatically preventing firing:

No. That's the way e.g. Battlefield does it and it's annoying. In some situations you'll just have to keep firing and risk catastrophic failure. Maybe it's just one more burst that makes the difference, so you should have the choice. Basically, risk your weapon or risk your life.


Re: Feature: Overheating Weapons[message #295326] Fri, 16 December 2011 18:10 Go to previous messageGo to next message
Cell

 
Messages:618
Registered:February 2011
User deleted
Re: Feature: Overheating Weapons[message #295328] Fri, 16 December 2011 19:35 Go to previous messageGo to next message
Headhunter

 
Messages:265
Registered:November 2009
Location: Sweden
Flugente
@ Headhunter: Already implemented:

http://imageshack.us/photo/my-images/64/descriptionbox2.jpg/

I think the picture in the first post was too small to see it...

Edit: Argh, how do you post pictures correctly???


Oops, didn't see that, sorry...


DepressivesBrot
On the issue of overheating automatically preventing firing:

No. That's the way e.g. Battlefield does it and it's annoying. In some situations you'll just have to keep firing and risk catastrophic failure. Maybe it's just one more burst that makes the difference, so you should have the choice. Basically, risk your weapon or risk your life.


+2
Re: Feature: Overheating Weapons[message #295329] Fri, 16 December 2011 19:49 Go to previous messageGo to next message
Wil473

 
Messages:2859
Registered:September 2004
Location: Canada
Perhaps I'm missing something, but doesn't the extra damage and increased weapon jamming potential already cover the heat related stoppages feature being discussed? Is there really a need for a separate mechanism to stop the gun when it overheats?

EDIT: by the way, my three projects already have merger based barrel changes. I am interested in seeing how the temperature feature is handled during item transitions. Specifically there are a few different ways properties are transferred during item transitions right now for item status:

1) The folding stock system in-place with my mods, similar to the one Smeagol seems to be working on too, is based on being able to transform one item from one index to another on command. In the case of the folding stock, when the gun turns into is alternate stock form (index X to index Y transition) the built-up temperature should stay with the weapon (like damage does right now). The USE merger is the only merger that preserves an objects damage stats between item index transitions.

2) The Quick Change Barrel system on the other hand, depends on the item X to index Y transition changing the items status. The Easy merger has the resulting item(s) ending up with the average status of the two original items.

3) Finally there is the COMBINE merger which simply takes one item to "refill" the status of another.

4) EDIT2: forgot about HAM 5 item transformation, will need to eventually examine how the temperature properties of a specific object are handled with an item transformation.


Basically, what I'm saying is that once the next HAM 5 Optimized version of AFS is out, I will be in a position to experiment with this feature. Just need a complied .exe, I suppose the optimum solution would be for this feature ends up in a near-future HAM or a rev4778+ SCI...

[Updated on: Fri, 16 December 2011 20:09] by Moderator



Re: Feature: Overheating Weapons[message #295336] Fri, 16 December 2011 22:17 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
I haven't done anything concerning merges, so I'm interested in that behaviour, too.

I've just compiled version 1.1. New features :newstuff: :

  • Ammo-type specific factors can be specified in AmmoTypes.xml. They increase or lower the temperature for each shot.
  • weapons/ammo values are now integrated in UDB (see pictures in first post).

Only thing missing in UDB are new icons. As I'm a terrible artist, it would be very nice if someone could draw those icons. Volunteers?

The AmmoTypes.xml, a new .exe and a new .patch file are in my folder specified in the first post.

wil473
Basically, what I'm saying is that once the next HAM 5 Optimized version of AFS is out, I will be in a position to experiment with this feature. Just need a complied .exe, I suppose the optimum solution would be for this feature ends up in a near-future HAM or a rev4778+ SCI...


Very Happy I'm happy to help. However, I'm not here tomorrow, I'll be back on Sunday or Monday. However, if you really want to integrate the stuff, everything is inside the ftw11.patch.



Re: Feature: Overheating Weapons[message #295337] Fri, 16 December 2011 22:50 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3813
Registered:July 2009
Flugente
I haven't done anything concerning merges, so I'm interested in that behaviour, too.
Basic structure:

	####
	####
	####
	####
	#
	##
First pair of tags defines which items are merged, second pair which items you get as a result. The type of a merge defines how the two items are merged and the APCost ... does what it says.

To adapt it for this purpose, you'd have to add a new type that only swaps the temperature variables of both items. (It may or may not care for results at all ... just modifying and returning the initial items would save the modder work.)

There'd still be a need to track heat on non weapon-type items but hey, maybe it can be limited to IC_MISC. On the other hand, you'd have no issues with the temp being hidden on an attachment and you wouldn't have to deal with vital parts of a weapon missing.


Re: Feature: Overheating Weapons[message #295760] Tue, 27 December 2011 05:51 Go to previous messageGo to next message
ChonkE

 
Messages:17
Registered:January 2008
Location: Utah
Well since barrels warping/melting/overheating becomes an issue of maintenance condition, perhaps sustained firing in critical heat conditions (as combat necessities like continued breathing might dictate) could lead to a random catastrophic malfunction. Automatic decrease of weapon condition to 35%/25%/15% (random), breaking of weapon, perhaps random explosion to represent projectile lodged in a damaged barrel, uncontrolled automatic fire as ammunition cooks off, minor explosion/smoke bomb for slam fire/open chamber event. Having an open bolt cuts down on cook-off events. I dont know, looking at it now it seems kind of complicated lol
Re: Feature: Overheating Weapons[message #295801] Tue, 27 December 2011 17:13 Go to previous messageGo to next message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
@ChonkE: Currently the weapon deteriorates much faster if the temperature is above its damage threshold. Firing automatic while the temperature is 'DRAMATIC' damages the weapon A LOT.
I wouldn't know how to program random uncontrolled automatic fire, though. Weapons exploding already is implemented ingame (rpgs/mortars do that on bad condition). But I'm also planning to do that in my wh40k-stuff, for plasma weapons especially (in fact, that's the main reason I came up with this stuff).


Re: Feature: Overheating Weapons[message #295873] Thu, 29 December 2011 02:22 Go to previous messageGo to previous message
Flugente

 
Messages:3453
Registered:April 2009
Location: Germany
I have implemented replacable barrels. If defined a new merge type and a barrel item, it is now possible to exchange barrels. I had to define define a temperature value for all items, though.

Upon merging, the temperature of the gun and the barrel are exchanged. Just what it should do.

I still have to make different barrels for different calibers, won't be a problem though.

At the moment, a temperature value is stored on all items. I don't see any other way. Luckily, his value is only used when increasing temperature on firearms and on cooling down. As I only have to look for guns and items that are flagged as barrels, this shouldn't be a problem.

A problem is that the weapon overheating characteristics (I'm thinking of the jam and damage thresholds) are stored on the weapon. This doesn't leave room for any specifics between different barrel types! You can't have high-quality vs. low-quality barrels that way.

Problem 2: The only way I can display temperature on the barrels would be either temperature/OVERHEATING_MAX_TEMPERATURE (which will not tell the user much about the relation to the weapon-specific temperature thresholds) or as a number value, which I do not like so much ( I like it better when you only have an very rough estimation about temperature, like it is on the weapon).

Problem 3: This way barrels aren't really attachments. Problem is that if they were, you'd have to ensure that a weapon without a barrel attachment can't fire at all. Coding that would b possible, but I'm not sure it would be a useful feature.
Otherwise these attachments would have to be inseparable, but exchangable :gaga:

I haven't uploaded this yet, but I will do that soon (preferably someone will have clever idea concerning this problem, and answer me Wink )



Previous Topic: New feature: enemy assassins
Next Topic: New feature: apply items to/take items from other persons
Goto Forum:
  


Current Time: Sat Feb 23 17:16:43 EET 2019

Total time taken to generate the page: 0.02409 seconds