A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »Alternative weapon firerate tutorial

Author Topic: Alternative weapon firerate tutorial (2 messages, Page 1 of 1)
Moderators: Dennis

A Juicy Frank
Joined: Oct 28, 2013


Posted: Nov 7, 2014 12:24 AM    Msg. 1 of 2       
Here's a pic. Gif's supposed to be 15 seconds long with the first shot synchronized, showing 20 rounds being fired. Sorry about size, but wanted filesize to be reasonable. In-game speed is at 1/3 time, although the time counter is in real time. Whoops.




Individual GIFs here:
600 RPM http://i.imgur.com/UK4Pz2v.gif Firing pattern: 1-- repeating

654 RPM http://i.imgur.com/VoWumH7.gif Firing pattern: 1-1--1--1-- repeating

720 RPM http://i.imgur.com/7OmFV8o.gif Pattern: 1-1-- repeating

799 RPM http://i.imgur.com/0dxoYN4.gif Pattern: 1-1-1-1-- repeating

900 RPM http://i.imgur.com/L1hbIom.gif Pattern: 1- repeating



So this works by setting up a weapon's heat system to create a tick (0.03 sec) or two delay after a single or multiple number of shots during sustained fire, producing what I'll refer to as a "firing sequence". These "sequences" differ from how the engine normally throttles a weapon's rate of fire in that the engine just goes from ROFa to ROFb over a set amount of time and stays at ROFb as long as the trigger is held. This system, however, will cause the weapon's rate of fire to cycle between the only firerates the game can naturally produce (30, 15, 10, 7.5, ...) in a pattern, creating an 'average' firerate for the overall sequence.


For example-
Cycling a weapon between 15 RPS (1- repeating) and 10 RPS (1-- repeating) produces a firing sequence averaging at 12 RPS (1-1-- repeating). In order to determine the average firerate of a sequence, we divide 30 by how many total ticks are in the sequence (Shots + breaks). Multiply this value by the number of shots in the sequence and we get the RPS (Multiply again by 60 to get the RPM).


Now, this system of course can't do anything about the inability to 100% evenly disperse the shots throughout the firing sequence, given the engine's 30 tick per second limit. Check out this diagram using the 12 RPS sequence example from above in both 30 tick/sec and 60 tick/sec situations. Red filled slots represent ticks where a shot is fired.



In the 30 tick/sec section the second shot in the sequence is being fired slightly faster than it would be under better and more fair conditions. Despite this 12 RPS example being rather close to optimal performance in game, 12 RPS is actually considered the median between 10 RPS and 15 RPS. Keep in mind that other firerates will have their shots become increasingly offset the further they move from a natural firerate (30, 15, 10, 7.5, ...) or a median firerate (20, 12, 8.57, 6.67, ...)






Now, how do?


Start by setting up the weapon's 'heat' section like this:



Heat recovery threshold = 0.0089
Overheated threshold = 0.009
...
Heat loss per second = 0.27 (0.009 per tick)


I chose to work with 0.009 since 9 is a great dividend for this engine; It can be divided reasonably by a greater portion of numbers than 1 can (1 thru 6, 8 and 9).




Next, set the weapon's default rounds per second in the 'firing' section to the GREATEST natural firerate that will be used in the sequence. For firerates between 15 (900 RPM) and 10 (600 RPM), use 15. For those between 10 (600 RPM) and 7.5 (450 RPM), use 10, etc. I'll be creating a weapon with a fire rate of 12 (720 RPM), so I'll set this to 15.



The default assault rifle has its RPS acceleration/deceleration times set to 1 and 0.1 for whatever reason. Doesn't do anything in-game, but either way, you'd want to keep your weapon's default rounds per second CONSTANT here (15 to 15).




Finally, we'll set our heat generated per round value under the 'misc' section at the bottom of the .weapon tag. We'll begin with finding our base heat:


For weapons with ROF between 30 (1800 RPM) and 15 (900 RPM), start with 0.009.

15 (900 RPM) and 10 (600 RPM), start with 0.018.

10 (600 RPM) and 7.5 (450 RPM), start with 0.027.

7.5 (450 RPM) and 6 (360 RPM), start with 0.036.

etc...




Since my firerate will be 12 (720 RPM), I will start with base heat 0.018.



The base heat value PERFECTLY coincides with the weapon's default RPS value above and the rate at which its heat is lost. This means the weapon's firing will act perfectly natural, without any breaks in its sequence.




Now that we have our base heat, we need to decide what value to add to it so that we can create a different firing sequence.

Default 15 RPS operates as being a repeating 1- ('shot, break') pattern, and default 10 RPS operates as a repeating 1-- ('shot, break, break').

12 RPS has a repeating 1-1-- ('shot, break, shot, break, break') pattern, with the last - ('break') in the sequence being the added 0.03 second delay. So basically, this pattern is made from two natural 1-'s with an added break at the end. The last break is be added by having the weapon gain an extra 0.009 heat OVER THE COURSE of the natural 1-1- sequence, but NOT all at once. The only time heat is added to the weapon is when a round is fired, and note there are two shots in our 1-1-- firing sequence. This means that both of these shots combined need to add an additional 0.009 heat to our base heat of 0.018. In other words, each shot individually must add 0.0045 (0.009 / 2 shots) heat per shot to the base 0.018. 0.018 + 0.0045 = 0.0225 heat per shot total. Stick that in there.




Congrats, you now got a 12 RPS (720 RPM) assault rifle.


So yeah. that's it. Heat generated per round = base heat + 0.009 / # of shots before the break. A sequence of 1-1-1-1-- (13.33 RPS, 799.80 RPM) has 4 shots before the added break, so the heat per round value would be 0.02025 = 0.018 + 0.009 / 4 shots. REMEMBER YOUR ORDER OF OPERATIONS. Firing sequences that add more than one break such as 654 RPM displayed above 1-1--1--1-- DO work, but requires a seperate formula. In this, one will need to multiply 0.009 by how many breaks are being added to the sequence (3 in this case), and THEN divide this value by how many shots are in the sequence (4 shots in this case). This becomes 0.00675 = 0.009 * 3 breaks / 4 shots. Add this value to the base heat of 0.018 and you get a final heat per round value of 0.02475 = 0.018 + 0.00675.




Swear to god. This would be so much easier if the 'analog rate of fire' flag did this automatically. Will make edits if sections aren't as clear or legible as they would seem here in notepad. May even update with more premade firerate values later.





Edit 1: redid gifs into a single file as to preserve first shot sync and preserve screen size. Kept previous gifs as references as well. Re-worded bits of tut, removing redundant information and keeping better consistency with text effects regarding relative information, important terms and values, and KEY INFORMATION.




As promised, here's some new firerate values-

Heat recovery threshold = 0.0089
Overheated threshold = 0.009
...
Heat loss per second = 0.27
^Use this for all below, except where marked *



10 RPS (600 RPM) < between <15 RPS (900 RPM)
Default rounds per second = 15 to 15



*14 RPS (840 RPM) 1-1-1-1-1-1-1--
Heat recovery threshold = 0.0069
Overheated threshold = 0.007
...
Heat loss per second = 0.21

Heat generated per round = 0.015



13.85 RPS (831 RPM) 1-1-1-1-1-1--
Heat generated per round = 0.0195


13.64 RPS (818 RPM) 1-1-1-1-1--
Heat generated per round = 0.0198



13.33 RPS (799.80 RPM) 1-1-1-1--
Heat generated per round = 0.02025


12.86 RPS (771 RPM) 1-1-1--
Heat generated per round = 0.021


12 RPS (720 RPM) 1-1--
Heat generated per round = 0.0225


11.25 RPS (675 RPM) 1-1--1--
Heat generated per round = 0.024


10.9 RPS (654 RPM) 1-1--1--1--
Heat generated per round = 0.02475


10.71 RPS (643 RPM) 1-1--1--1--1--
Heat generated per round = 0.0252




7.5 RPS (450 RPM) < between <10 RPS (600 RPM)
Default rounds per second = 10 to 10



9.23 RPS (554 RPM) 1--1--1--1---
Heat generated per round = 0.02925


9 RPS (554 RPM) 1--1--1---
Heat generated per round = 0.03


8.57 RPS (514 RPM) 1--1---
Heat generated per round = 0.0315



That's all folks.
Edited by A Juicy Frank on Nov 7, 2014 at 01:31 PM


Super Flanker
Joined: Oct 5, 2012

The length of your life depends on my aim.


Posted: Nov 7, 2014 10:08 AM    Msg. 2 of 2       
Thread saved, post this in the tut section someone.

ty btw.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 12:23 PM 266 ms.
A Halo Maps Website