Jump to content

Fire Control - "proper" Chain Fire For Mwo / Tag Toggle / Jump Jet Spam [Fc 3.0.7 - 30Th Jan 2017]


542 replies to this topic

#501 billyyank

    Member

  • PipPipPip
  • Philanthropist
  • Philanthropist
  • 53 posts

Posted 21 May 2017 - 11:26 AM

View PostMakenzie71, on 21 May 2017 - 09:26 AM, said:

Did you unbind it in the game?

Do you have the "send key up on fire" box ticked?

That was the problem. I did not check the send key up on fire box, but, in the game, weapon group 3 was bound to something else. Why that is I don't know, but I fixed it and it works fine now. Thanks.

#502 DeeHawk

    Member

  • PipPipPipPipPip
  • The Flame
  • 136 posts

Posted 22 May 2017 - 02:25 AM

View PostMakenzie71, on 21 May 2017 - 10:37 AM, said:


Well, in the real world, doing the math on paper, it should equate the same. In game, it doesn't. I've never sorted out whether it was a quirk of the gun or if there's just some kind of math I don't know about at play. I was answering what works best in the game.


View PostDeeHawk, on 20 May 2017 - 03:52 AM, said:

The auto fire mode should be used with caution. Shot 2-6 will be delivered later than if you fire an alpha, causing a delay in initial damage.This makes it is extremely uneffective in peeking battles and general long range, and you spread the damage a lot more compared to alpha striking.


This should explains at least some of it

#503 RedFireFox

    Rookie

  • 3 posts

Posted 01 June 2017 - 12:04 PM

Looking for some help here. I've seen a few other users with the same issue, but could not find a solution.

Fire Control is working great for me, but when I release the left mouse button (primary fire button for me), it cycles up one weapon group (highlighted line of the weapon UI in bottom right moves up). Sometimes windows beeps at me like I've clicked too many buttons as well.

If I hold Shift key and fire, it does not cycle up weapon groups. I've tried playing with "send key up", "wild mode", and "pass thru" options checked or unchecked, doesn't seem to make a difference.

I do have LMB bound to fire current weapon in game, and LMB is also bound to the "fire binding" in Fire Control. I've tried changing that around as well, and unbinding LMB from fire selected group in game settings. My sequence of fire in fire control is 4,5,6 (3 uac 5) which are set to the usual weapon grouping bindings in game, nothing special there.

My mech has no weapons bound to group 1, which 99% of the time is the selected group. If I run out of ammo or something, I mouse wheel down (a different binding) to change groups (to say group 3 - my backup lasers) and then my lasers or whatever become the weapons fired on LMB click. Group 2 I have all of my UACs, which is bound to RMB, for double tapping if desired. It's a really slick setup I think, but the dang weapon group change beep and visual distraction is driving me nuts!

What am I doing wrong here? I tried messing with the ahk script for firecontrol.exe, but it appears the script in the zip isn't actually being run. I tried finding one in temp somewhere that the exe would be unpacking, but no luck. Any help is appreciated, thanks!

-RedFireFox

#504 Thistles

    Member

  • Pip
  • Big Brother
  • 12 posts

Posted 07 June 2017 - 11:31 PM

I am having the same issue as Willothious : In that I can get the FC macros to work ok, but I just cant get the program to recognise any of my mouse buttons as a bind option despite being able to change tabs, click drop downs etc with them.

Is there anything I can do that will get it to recognise them, possibly a way to enter text for bind i.e. Mouse 1, Mouse thumb 2 etc ? as left and right mouse clicks are primarily what I use for fire controls.

Update: have now removed, re-installed 3.0.7 and restarted everything and it all works ok know thx.

Edited by Gorze, 08 June 2017 - 12:43 AM.


#505 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 01 July 2017 - 04:45 AM

View PostArmageddonKnight, on 21 May 2017 - 10:15 AM, said:

Interms of 'real world' game play ..yes it spreads DPS, but for pure testing purposes, firing ac2's 1 after the other in rapid succession should give the exact same dps as firing them all at once.

Not necessarily true.
If you hold the fire button for x seconds, then you will likely fire more shots in alpha mode.
It all depends on your "fire window".
assuming the value y is: <Cooldown rate of weapons> * <Number of weapons>, or any multiple of it

if x < y, alpha would be better. When x > y, then you would fire more in chain.

Regarding people's timing issues, the timer used in FC is not that accurate. It uses the system timer, which has a granularity of between ~10 and ~15ms.
I now have a more accurate system for timing, but it uses a C# DLL to get accurate timers. I have not yet done much testing with this new code, so I am thinking you guys might be good guinea-pigs.
I just had a quick look at the FC code, and it should not be too hard to replace the old timer with my new MicroTimer - I may well sit down at some point this weekend and try and make a proof of concept for you to see what difference it makes.

#506 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 01 July 2017 - 08:22 AM

I tried to add MicroTimer to FC, but for some reason I could not get it to work.
FC is one of my very early scripts and it shows - it is quite the tangled mess (As well as the ADHD engine it uses).

I since wrote a new engine called UCR, and had always intended to implement FC as a plugin for that, but never got around to it.
I am now moving from UCR to yet another engine, where I am off-loading a lot of the stuff to C# code which is either difficult to implement in AHK, or CPU intensive.

So recently I wrote a "UCR Lite" which is basically the same idea as ADHD that powers FC, but done a lot better.
It's called AppFactory, and it uses Autohotkey_H (Which is what all my AHK code since FC days has used - it's identical to regular AHK, with some extra commands)

So I wrote a quick implementation of the core feature of FC, but using AppFactory.
All it does is send the fire sequence at the specified rate.
There is a "Key Delay" setting - I suspect this can maybe go lower than 50ms, but unless you are trying to send at those kind of rates, I doubt it will make a difference.

I just need people to tell me how well it works - I am suspecting that you will now have finer control over your timings and things should just generally work better.

For those of you who were having problems binding LMB etc, then this *may* help you as the binding code is different.

https://github.com/e...ire-Control.zip

For reference - here is the script:

#SingleInstance force
#NoEnv
;~ OutputDebug DBGVIEWCLEAR
#Include ..\AppFactory\Source\AppFactory.ahk
#include CLR.ahk
 
Version := "4.0.2"
 
; Load MicroTimer Lib
dllname := "MicroTimer.dll"
if (!FileExist(dllname)){
    MsgBox % dllname " Not found"
    ExitApp
}
asm := CLR_LoadLibrary(dllname)
; Use CLR to instantiate a class from within the DLL
MicroTimer := asm.CreateInstance("MicroTimer")
 
Factory := new AppFactory()
w1 := 90, w2 := 200
Gui, Add, Text, % "xm y+10 w" w1, Fire Button
Factory.AddInputButton("HK1", "x+5 yp-3 w" w2, Func("InputEvent"))
Gui, Add, Text, % "xm y+10 w" w1, Fire Sequence
Factory.AddControl("FireSequence", "Edit", "x+5 yp-3 w" w2, "1,2,3,4", Func("SeqChanged"))
Gui, Add, Text, % "xm y+10 w" w1, Fire Rate
Factory.AddControl("FireRate", "Edit", "x+5 yp-3 w200", "500", Func("RateChanged"))
Gui, Add, Text, % "xm y+10 w" w1, Key Press Duration
Factory.AddControl("KeyDelay", "Edit", "x+5 yp-3 w200", "50", Func("KeyDelayChanged"))
 
SequencePos := 1
 
Gui, Show, , % "Fire Control v" Version
return
 
GuiClose:
    ExitApp
 
InputEvent(state){
    Global Factory, MicroTimer, FireRate
    static FireTimer := 0
    if (state){
        if (FireTimer != 0)
            return
        FireTimer := MicroTimer.Create(Func("DoFire"), FireRate)
        res := FireTimer.SetState(1)
        ;~ OutputDebug % "AHK| Timer Started, result: " res
    } else {
        res := FireTimer.SetState(0)
        FireTimer := 0
        ;~ OutputDebug % "AHK| Timer Stopped, result: " res
    }
}
 
SeqChanged(state){
    global Factory, FireSequence
    FireSequence := StrSplit(state, ",", A_Space)
}
 
KeyDelayChanged(state){
    SetKeyDelay, 0, % state
}
 
RateChanged(state){
    global FireRate
    FireRate := state
}
 
DoFire(){
    global FireSequence, SequencePos
    Send % "{Blind}{" FireSequence[SequencePos] "}"
    ;~ OutputDebug % "AHK| Fired - Sent key : " FireSequence[SequencePos] " (seq = " SequencePos " / " FireSequence.Length() ")"
    SequencePos++
    if (SequencePos > FireSequence.Length())
        SequencePos := 1
}


#507 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 01 July 2017 - 08:30 AM

Note with this new version that it is NOT COMPILED like the old FC was.
FireControl.exe in the zip is actually the AHK_H exe, renamed.
So you are completely free to tinker around with what is in FireControl.ahk if you want to make tweaks.
If you only have regular AHK installed, you can copy FireControl.exe to your AHK folder and rename it AutoHotkey.exe
Then you would be able to double-click FireControl.ahk or use a debugger such as Scite4AutoHotkey.

Edited by evilC, 01 July 2017 - 08:31 AM.


#508 Ovion

    Member

  • PipPipPipPipPipPipPipPipPip
  • The Vicious
  • The Vicious
  • 3,182 posts

Posted 05 July 2017 - 09:36 AM

View PostLeonidas the First, on 05 July 2017 - 08:19 AM, said:

I know there is no prefect way to avoid UAC jams, all I am trying to do I calculate a steady stream and I cannot seen to figure it out and I am not sure if my calculation is off based on how the client calculates cool down.

I am piloting a SDH-2C (in PTS) with 3 UAC 2's. The chassis has a 15% Ballistic Cool Down and there is another 6% from the skill tree.

My calculation for Chain Fire is as follows:

Base Weapon Cool Down (720 ms) * Cumulative Bonus (.79) / UAC Double Shot (2) / Number of Weapon Groups (3)

Am I better off using 6 groups or do I have to modify my calculation?
Problem is, it doesn't follow a good curve, it doesn't hit averages - a single UAC can jam on a single shot.

The best you can do is Cooldown time (inc bonuses) / number of weapons for single shots
Cooldown (inc bonuses) / number of weapons x2 for double tap.

Have 2-5 sets of weapon groups, with every one with all 3 weapons, and on chain fire that way it'll pick up whichever is available when it fires.

#509 Leonidas the First

    Member

  • PipPip
  • Bad Company
  • Bad Company
  • 43 posts

Posted 05 July 2017 - 02:36 PM

I deleted a post about having problems dialing a number for chain firing AC/2's and UAC/2's because I found at least part of the problem. I will explain for the community and evilC might want to add the information to the documentation.

I do not have a gaming PC so I have always played on LOW video settings. I jumped on the test sever, which I have never used before, so I could check out some of the Civil War stuff in the Testing Grounds, when I did all of my setting were default, and boy did I see the graphics difference! After hours of tinkering with the UAC's I realized that the extra from the increased graphics setting caused latency and even inconsistency with my FC results. Once I set all the graphics back to normal I was back to getting consistent FC results.

Just to verify my results I tested this with the WHM-BW becasue it comes with no Ballistic Cool Down modifiers and I had not yet allocated my Skill Points on that chassis so I made sure it had no nodes checked in the Firepower Tree.

System Upgrades

So, if anyone changes their video setting or upgrades their system they should test their FC profiles. If the change effects your FPS in any way then it will likely alter your system latency and just a couple milliseconds difference can blow up a finely tuned Fire Rate.

Testing Fire Rates

The easiest way I have found is to test with a single AC/2. AC/2's cannot chain fire correctly without FC so they cannot accidentally work. and If your fire cycle is too short your second shot will lag and if the cycle is too long you will skip shots.

Multiple Weapon Groups

As an example of this if I set up an AC/2 on Weapon Group 1 and set my Fire Sequence to 1, I have to drop my Fire Rate by about 1% compared to setting up the same weapon on Weapon Group 1 and 2 and setting my Fire Sequence to 1,2. In the same vein the more Weapon Groups you cycle through, the time have to remove from the Fire Rate.

Modifier Calculation
I can verify that the MWO client adds all modifiers and then multiplies instead of applying the modifiers individually. The actual Fire Rate the worked for the WHM-BW using two weapon groups for a single AC/2 was 737 as opposed to the assumed 720 for an unmodified AC/2 cool down, which is a difference of 1.02361. The same set up for the SHD-2H had an actual Fire Rate of 595 as opposed to to an expected 575.28 or for a 1.034 difference. The ratio of these two differences was within a couple 1/100ths of the ratio of the actual Fire Rates which was much closer when compared to sequential calculations.

Edited by Leonidas the First, 05 July 2017 - 04:07 PM.


#510 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 July 2017 - 03:43 AM

Nice post Leonidas

I would guess that the old FC code will be way more susceptible to timing variations that the new POC code I posted last week.
Has anyone tried it out? Can they confirm?

#511 DeeHawk

    Member

  • PipPipPipPipPip
  • The Flame
  • 136 posts

Posted 06 July 2017 - 03:54 AM

Good find. I did notice that system lag affects performance of the app.

Specifically, I couldn't use the same FC settings for my favourite mech on a different PC.

View PostevilC, on 06 July 2017 - 03:43 AM, said:

Nice post Leonidas

I would guess that the old FC code will be way more susceptible to timing variations that the new POC code I posted last week.
Has anyone tried it out? Can they confirm?

I wanna try it! But since you didn't compile it, I have to download AutoHotKey right? I haven't used it before, but I'm a quick learner :)

#512 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 July 2017 - 03:58 AM

It is compiled. The zip contains everything that you need.

Clarification:
The C# code is compiled (ie there is a .dll file)
The AHK code is NOT compiled, however I included an AHK executable named the same as the AHK script, so all you do to run this code is double-click the EXE file.

[Edit] OK, so I just downloaded the zip on my work PC and it is missing a file.
Will rectify now.

Edited by evilC, 06 July 2017 - 04:00 AM.


#513 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 July 2017 - 04:17 AM

OK, apologies for the bad zip, I will have to fix it properly when I get home, but for now, please use this zip to test:

http://evilc.com/fil...ire-Control.zip

Just extract, then double-click FireControl.exe
An AHK install is not required.

Edited by evilC, 06 July 2017 - 04:18 AM.


#514 DeeHawk

    Member

  • PipPipPipPipPip
  • The Flame
  • 136 posts

Posted 06 July 2017 - 04:19 AM

View PostevilC, on 06 July 2017 - 04:17 AM, said:

OK, apologies for the bad zip, I will have to fix it properly when I get home, but for now, please use this zip to test:

http://evilc.com/fil...ire-Control.zip

Just extract, then double-click FireControl.exe
An AHK install is not required.

Haha, no wonder I couldn't get it to work xD
I will try it in a few hours when I get home, and report back! Thanks for your time and work Evil!

#515 DeeHawk

    Member

  • PipPipPipPipPip
  • The Flame
  • 136 posts

Posted 06 July 2017 - 06:53 AM

I just tried the new zip. The app opens now, and it can be configured. I can get it to fire the sequence in notepad, but not in MWO client, it simply fires the designated firegroup (Firegroup 2, I use RMB). The key is bound to Firegroup 2 in MWO as well.
The old app could handle that.

Guidance needed :)

#516 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 06 July 2017 - 08:56 AM

Sorry, a little confused.
So your physical fire button is RMB?

In-game, RMB is not mapped to anything?
What is your sequence?

What I *think* may be happening is that the "Key Delay" option in the new app is not being enforced with the default setting.
It starts at 50 - try deleting the 0 (Leaving "5") and then add the 0 back to re-set it to 50.

This should then cause the app to properly hold the key down for 50ms, which should mean it is recognized by MWO.

I have re-uploaded the zip to http://evilc.com/fil...ire-Control.zip with this change

Edited by evilC, 06 July 2017 - 08:58 AM.


#517 DeeHawk

    Member

  • PipPipPipPipPip
  • The Flame
  • 136 posts

Posted 06 July 2017 - 10:13 AM

Wow.. I'm just.. wow!

I got it to work with the new zip. I didn't test the trick with the old one, but followed your direction.
Sorry my last post was a little vague, I'll specify further:

I've equipped 6x AC2 to my KGC-000
All cooldown nodes are selected for 12% along with the 5% ballistic cooldown on the variant for a total of 17% reduced cooldown.
Normal cycle time is 0.72s. Subtract 17% and we're at 0.60s. Divide by 6 and were at 100ms

In the old more FC I could use a value of 94, and get a somewhat decent stream (It really was fine, I am being overly critical for the sake of clarity). No matter what value, you'd notice tiny differences in fire rate. And not because the weapons couldn't follow up, I've experimented a lot!

In the new microtimer FC, I can get it down to 64ms (!!!) Maybe the timing amounts isn't calculated the same way, but I'm very sure it shoots faster. Off course it doesn't override the cooldown time in the game, that would be impossible, but the old timer must've had issues with fast inputs.

I'm blown away at the difference. Good job, can't wait to try it in a match.

I noticed you left out the reset function for the fire sequence line as well as the option to "Send up key". These were pretty useful, especially the up key, as it overrides the mapped button in MWO.

Example:
RMB is set to Firegroup 2 in MWO (as per default)
I make a fire sequence 1,2,3,4,5,6 an assign RMB as the button in FC
When I press RMB, it fires group 2 first and then starts the fire sequence from 1, skips 2 (still on CD), 3, 4, 5, 6, 1, etc.
It sounds weird, and it's impractical to have to remap your buttons when you switch mechs.

Would it be too much trouble to put that function back in?

Again, your work is much appreciated!

Edited by DeeHawk, 06 July 2017 - 11:46 AM.


#518 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 07 July 2017 - 07:13 AM

Anything that was possible with the old system is still possible with the new system, this was purely a fact-finding exercise to see whether it was worth re-implementing the whole thing using the new timing method, which it sounds like it is.
I have not played MWO in quite some time, but I certainly remember when I did play and used FC that it would somewhat "gallop", so when I recently implemented MicroTimer in C#, I thought it had to be worth seeing what difference it made in MWO.
I am thinking that for the new implementation, I do not need anything MWO-specific in there. Arm lock toggle is now pointless IIRC as they have a hotkey for that now?
JJ spam is just another timed function.

I am trying to remember exactly why "Key up on fire" was required. I am not sure it matches exactly with your use-case:

Quote

RMB is set to Firegroup 2 in MWO (as per default)
I make a fire sequence 1,2,3,4,5,6 an assign RMB as the button in FC
When I press RMB, it fires group 2 first and then starts the fire sequence from 1, skips 2 (still on CD), 3, 4, 5, 6, 1,

But would that then not mean a gap in the stream of fire?
Hit RMB, group 2 fires immediately
Script then fires 1 (Straight away!)
When script then tries to fire 2, it is on CD, so you get a gap here?

So surely you would get 2 shots straight away, followed by a gap of 1, then it would be as normal?

Edited by evilC, 07 July 2017 - 07:14 AM.


#519 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 07 July 2017 - 07:25 AM

Just to add that I am not sure how much time I am going to have free to pursue this in the short-term, probably not enough to implement properly packaged solutions ready for mass consumption by end-users.
If, however, you are comfortable with bodging some stuff for your own experiments, I would be happy to lend some assistance.
You can find me in my Discord channel: https://discord.gg/MmnhQYQ

#520 Makenzie71

    Member

  • PipPipPipPipPipPipPip
  • Big Daddy
  • Big Daddy
  • 938 posts
  • Location"I don't like your loadout...you must have no idea what you're doing." ~This forum

Posted 13 September 2017 - 04:54 PM

Every time I try to launch. I've try re-downloading it, I've tried deleting my cfg fire. I'm not sure what else to try.

Posted Image





4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users