Page 1 of 6 123 ... LastLast
Results 1 to 10 of 60

Thread: deadzone workaround? | Forums

  1. #1
    Just checking to see if anyone has figured out a workaround for the joystick deadzone.

    I mean, the deadzone is ENORMOUS!!!

    It's almost as big as my... well, it's big.


    Right now it's like I'm trying to drive a nail to hang a picture frame while using a sledge hammer.

    Technically I can get the job done, but there's no finesse available.


    Anyways, here's what I've looked at so far. Maybe someone has more insight than I do...


    ***Here's the input_filters.cfg***


    pitchvalue = { 0, 0 }
    rollvalue = { 0, 0 }

    RegisterNewFilter("filter_power", 3, "PowFilterFunc");
    RegisterNewFilter("filter_roll", 4, "RollFilterFunc");
    RegisterNewFilter("filter_pitch", 3, "PitchFilterFunc");
    RegisterNewFilter("filter_assistance", 2, "AssistanceFilterFunc");
    RegisterNewFilter("filter_changecamera", 4, "CameraFilterFunc");

    function PowFilterFunc(val, dt, pow)
    return val^pow;
    end

    function RollFilterFunc (val,dt,div,idx)
    rollvalue[idx] = val
    local maxpitch = pitchvalue[1]
    if(maxpitch < pitchvalue[2]) then
    maxpitch = pitchvalue[2]
    end
    -- local rolldeadzone = maxpitch*div ***Tried modifying this portion to 0, and saw no change in play***
    local rolldeadzone = 0
    local finalvalue = 0;
    if (val < rolldeadzone) then
    finalvalue = 0;
    else
    finalvalue = val
    end
    -- print (pitchvalue,rolldeadzone,finalvalue)
    return finalvalue;
    end

    function PitchFilterFunc (val,dt, idx)
    pitchvalue [idx] = val
    return val
    end

    function AssistanceFilterFunc(val, dt)
    local finalvalue = 0
    if (pitchvalue[1] < 0.9) and (rollvalue[1] < 0.9) and (pitchvalue[2] < 0.9) and (rollvalue[2] < 0.9)then
    finalvalue = val
    end
    return finalvalue
    end

    --kos.zag
    camera_key_sum_dt = { 0.0, 0.0 };
    camera_old_val = { 0.0, 0.0 };
    function CameraFilterFunc(val, dt, hold_dt, slot)
    local res_val = 0.0;
    --user hold key
    if (val > 0.5) then
    camera_key_sum_dt[slot] = camera_key_sum_dt[slot] + dt;
    end

    --user unhold key
    if ( (camera_old_val[slot]>0.5) and (val<0.5) and (camera_key_sum_dt[slot]<hold_dt)) then
    res_val = 1.0;
    camera_key_sum_dt[slot] = 0.0;
    end

    --the key not pressed
    if (val<0.5) then
    camera_key_sum_dt[slot] = 0.0;
    end
    --print (camera_key_sum_dt);
    camera_old_val[slot] = val;
    return res_val;
    end

    ***End File***

    My guess is that it's hard-coded and therefore no way to fix it currently.
    OS: Vista Ultimate 64-bit
    CPU: Athlon X2 6400+
    Vid: Nvidia 8800GT
    Snd: CL X-Fi Plat
    HD: 2x WD Raptor in RAID Striped
    Ram: 4Gig DDR Dual Channel
    PSU: Enermax Liberty 620W
    PPU: BFG PhysX
    JS: Saitek X52
    Reply With Quote Reply With Quote

  2. #2
    My version

    Same as I did earlier on I think. One person in the thread linked to said he felt like there was an improvement, but it's very subjective.

    The line we've nobbled is one variable used in these dampening routines.

    I'm going to try some more invasive nobbling to see what happens.

    Joe
    Reply With Quote Reply With Quote

  3. #3
    My latest one: it definitely does make a difference, but it still feels a bit wooden to me.

    I'd appreciate it if others could try it and see.

    Joe

    -------Copy from here--------
    pitchvalue = { 0, 0 }
    rollvalue = { 0, 0 }

    RegisterNewFilter("filter_power", 3, "PowFilterFunc");
    RegisterNewFilter("filter_roll", 4, "RollFilterFunc");
    RegisterNewFilter("filter_pitch", 3, "PitchFilterFunc");
    RegisterNewFilter("filter_assistance", 2, "AssistanceFilterFunc");
    RegisterNewFilter("filter_changecamera", 4, "CameraFilterFunc");

    function PowFilterFunc(val, dt, pow)
    return val^pow;
    end

    function RollFilterFunc (val,dt,div,idx)
    rollvalue[idx] = val
    finalvalue = val

    -- print (pitchvalue,rolldeadzone,finalvalue)
    return finalvalue;
    end

    function PitchFilterFunc (val,dt, idx)
    pitchvalue [idx] = val
    return val
    end

    function AssistanceFilterFunc(val, dt)
    local finalvalue = 0
    finalvalue = val
    return finalvalue
    end

    --kos.zag
    camera_key_sum_dt = { 0.0, 0.0 };
    camera_old_val = { 0.0, 0.0 };
    function CameraFilterFunc(val, dt, hold_dt, slot)
    local res_val = 0.0;
    --user hold key
    if (val > 0.5) then
    camera_key_sum_dt[slot] = camera_key_sum_dt[slot] + dt;
    end

    --user unhold key
    if ( (camera_old_val[slot]>0.5) and (val<0.5) and (camera_key_sum_dt[slot]<hold_dt)) then
    res_val = 1.0;
    camera_key_sum_dt[slot] = 0.0;
    end

    --the key not pressed
    if (val<0.5) then
    camera_key_sum_dt[slot] = 0.0;
    end
    --print (camera_key_sum_dt);
    camera_old_val[slot] = val;
    return res_val;
    end
    --------Copy up to but not including this line-------
    Reply With Quote Reply With Quote

  4. #4
    I didn't notice any difference at all. I still have an equally big deadzone
    Reply With Quote Reply With Quote

  5. #5
    Thanks for trying it. Do you have any special joystick? I just have a Trust GM-2500 cheapie stick which is crappy at the best of times.

    Joe
    Reply With Quote Reply With Quote

  6. #6
    Ok, I think I may have found what file will have an effect with the deadzone. In the Data1 data pak.

    It's an LUA scripting file that is packaged in the data file.

    Problem is, the data file is encrypted.


    LUA scripting is pretty easy, so I'm sure a number of us on here could resolve the issue. The question is would that be overstepping our bounds of correcting a technical problem with the game. Would it be considered reverse engineering?

    I hate crossing lines like this.

    Anyone know of the repercussions if one were to crack the data pak file and tweak the code?

    Let me be clear, I am not asking ANYONE to do this, just wondering if anyone knows if it's within legal bounds of the EULA.
    OS: Vista Ultimate 64-bit
    CPU: Athlon X2 6400+
    Vid: Nvidia 8800GT
    Snd: CL X-Fi Plat
    HD: 2x WD Raptor in RAID Striped
    Ram: 4Gig DDR Dual Channel
    PSU: Enermax Liberty 620W
    PPU: BFG PhysX
    JS: Saitek X52
    Reply With Quote Reply With Quote

  7. #7
    well idiot16 it would not be the 1st time or the last time someone other then ubi fix 1 of there games for them.

    like with vegas the community made the true SADs and then ubi copied them for them self. but then mess them up in which it took the community to fix there mess up.

    and if you do fix it go ahead. i think it would not matter anyways. but i am not sure of what you all are talking about anyways. i do not have a dead zone sept for them i made for my x45 via saitek software.

    controller is getting old so it tend to bank left on me by its self lol. so i had to put a dead zone on the left axis so it would not bank left on me any more.


    Reply With Quote Reply With Quote

  8. #8
    You own the product you have, so do what you want! - it's no different to putting custom headlight bulbs in a car you own.

    I am willing to help but am not familiar with LUA.

    Joe
    Reply With Quote Reply With Quote

  9. #9
    Originally posted by JoeBongo:
    You own the product you have, so do what you want! - it's no different to putting custom headlight bulbs in a car you own.

    I am willing to help but am not familiar with LUA.

    Joe
    Well, actually we don't own the product. We are according to the EULA just "borrowing" a license for said software. That's basically how it is for most software today.

    And to answer your previous question, i have a Saitek x-52 stick and a saitek cyborg X (which i prefer to use)
    Reply With Quote Reply With Quote

  10. #10
    Nah stuff that. Ubi would be more than grateful as it helps keep up their game sales.

    Let's crack on!

    Joe
    Reply With Quote Reply With Quote

Page 1 of 6 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •