How to modify the firerate of marine weapons

MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
Hi there,
I tried to change the marine rifle firerate but there is no real reference in the lua code (strangely altering alien firerate is no big deal)
Can anybody of you help me out here?
Also how do I change the reload speed?

Comments

  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    All of those kinds of details are handled via the Animation Graph. Be warned though, getting too wild with the animation timings can cause some weird bugs to appear.

    Open up any of the animated models in the Viewer, and click the menu Window -> Animation Graph. Hit the Open button and select the model's matching animation graph file. I don't know all the details off the top of my head, but the length and blend times of the animations are specified in there. Oh yeah, use the middle mouse button to pan around the graph view.
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    Ok so I m in the Viewer, opened up: "rifle_view.model" (<-- is this the right one?) then opened animation graph, there I saw the entries: "fire" and "reload" but when i doubleclicked it and the menue appears, there was no changble values, also i saw the "animation blend time" but again there was only a list of preconfigured animations i was able to chose...
    Did I miss something here?
  • Evil_IceEvil_Ice Join Date: 2004-07-09 Member: 29827Members, Squad Five Blue
    This is actually mostly controlled by the animation compilation... the actual firing mechanisms are controlled by frame-tags that are labelled on the model animation time-line itself, and then upon compilation they are used to call events on the server when the animations play on the weapons... it's really not a safe system at all, but it saves some processing time. It also, as you have noticed, greatly increases the difficulty of modifying just about ANYTHING related to these frame-tags, including melee, firing, reloading, etc. The only thing you can do is try to scale the animation times in the animation_graph to make them play faster, but be warned (again), the Rifle in particular has a 3 frame fire animation, and the length/duration of the animation actually controls the fire-rate of the weapon. It's pretty ridiculous really... to find the bit of animation_graph that controls this, it's actually in the second LAYER of the animation graph by itself, done this way I imagine to give the animation some "snap" priority, so that most animations will transition and interpolate between each other (this is actually what that "blend" time is doing on the animation graph). There are also TWO firing animations to mind, because one controls the "sway" of the arms while firing full auto to help provide some randomization to the position of the weapon instead of looping the same 3 frames for all firing... this animation is blended and does NOT have any affect on the actual fire rate, only the "fire" animation sequence (3 frames long) located on the second layer of the animation graph does...

    good luck on this...
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    Thank you for your info...
    But again I m unable to set any of those animation parameters in the Viewer.... where do I change the "Fire 1", "Fire 2", Fire 3" animation lenght?
    When I m in the animation graph, on the right side there are some things I can change but not related to the actual thing I selected (animation)
  • Evil_IceEvil_Ice Join Date: 2004-07-09 Member: 29827Members, Squad Five Blue
    You can't change most of this in the viewer, which is why I stated that it is controlled in the actual animation compilation process... inside the model_compile file you can scale animation speeds using the "speed" parameter, and even earlier than that, you can literally change the animation lengths in the model itself in max 2009. Obviously your best bet here is to work with the recompiler, but if all you are doing is trying to speed up firing speed of a default model it could be a waste to recompile the whole thing. I believe you can also scale speeds somewhere in the scripts when the animation is executed, but make sure you do it to the right animation. I think Combat Mod and/or Xenoswarm actually did do some animation_graph animation scaling, however, so that's a good spot to check.
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    yeah thats what I m doing right now... ns2combat has its own "rifle_view.animation_graph" so I think they changed it there... will investigate this.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    If you want to change the speed of weapon firing, lok at cat pack boost code. Cat pack causes you to fire faster, reload faster etc. Just copy the cat pack code, change the variable names and bob is your uncle.
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    Awesome tip Soul_Rider, will try it soon.... btw only this and another feature is left until the Last Resistance-Mod can be go wild :^ D
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    Hmm unfortunately only reload and movementspeed gets affected by that, but I can use that too...
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    really? firing speed used to be affected, at least I thought it did... :P
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    edit the animation speed in layer 1 (in the viewer), that should work
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    edited November 2013
    So I open up the VIewer --> load the rifle_view.model--> then go animation--> there I see:
    Animations:
    - Base
    - Overlay 1
    - Overlay 2
    - Overlay 3

    So I select the "Base" animation so "Fire" then I set the Overlay 1 also to "Fire" and now I tried to modify the "Pose Paramters" (on the right side) but nothing happens, how do I do it? sorry if this sounds extremely nooby to you ^^


    Edit:
    propably you mean "Layer 1" in the animation graph menue right? If so, when I select Layer 1 everything is blank.. how do I do it? Create a "Fire" node and then ?
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    hold middle mouse button, then you can drag the screen around. the nodes are initially not visible because they are offset a bit
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited November 2013
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    edited November 2013
    Ok the thing was that in the "Animation Node" window wasnt scaled properly so the animation blend time etc was hidden....
    anyways I switched to Layer 1 there I saw the "activity == primary" node with "fire" animation in it, I changed the Blendtimes/labels/Speed, saved it but when I switch back to preview the animation it was all the same speed.. nothing changed.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    you need to update the speed parameter to change the speed. there is also a bug with localization in the graph editor, make sure you use either a comma or dot depending on your OS settings (this bug only applies for the speed param)
  • MetaMindMetaMind Join Date: 2012-12-06 Member: 174358Members, Reinforced - Gold
    Thx for replying...
    The dot and comma thing was a good tip, now its saving properly...
    anyways it still doesnt seem to work... I tested all "activity==primary" nodes in both: "Base Animation" - and "Layer 1" and changed the "Speed" then I clicked on "Save" also I tried to change the "Pose Parameters" on main animation window but still nothing seem to affect it... really strange
Sign In or Register to comment.