FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    1. Home
    2. clyf
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 8
    • Posts 217
    • Groups 0

    clyf

    @clyf

    145
    Reputation
    29
    Profile views
    217
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    clyf Unfollow Follow

    Best posts made by clyf

    • TECH DEMO: Variable Teleport Costs

      The present package is a system for dynamically adjusting the time and energy cost of teleportation with respect to distance.

      variable_teleport.png

      1. Energy cost scales quadratically* according to teleport_dist^2.
      2. Time required scales logarithmically according to log(teleport_distance), with a minimum time equal to UnitBlueprint.TeleportDelay.
      3. The above two values are displayed in a reticle adjacent to the teleportation cursor. When multiple teleporting units are selected, the energy displayed will be equal to the sum of the individual costs of all units. The displayed time will be the individual maximum among the selected units.

      Technical implementation includes the externalization of the teleport cost function to lua/shared, allowing access by the sim and the ui, and a reticle class in controls/worldview.lua with an eye towards future applications.

      Github here, mod version in attached zip file.

      posted in Modding & Tools
      C
      clyf
    • RE: "Select nearest idle land scout"?

      Alternatively, copy and paste this into your Game.prefs file, under UserKeyActions, and play the game however you like!

      ['Select nearest idle land scout'] = {
          order = 40,
          action = 'UI_SelectByCategory +nearest +idle LAND INTELLIGENCE',
          category = 'selection'
      },
      

      More info on making new hotkeys here.

      posted in General Discussion
      C
      clyf
    • RE: WD #3 - Ridiculous Balance Ideas

      Aircraft have limited ammo and need to rearm at air staging.

      (I'd adjust costs as well but that's against the rules)

      posted in Weekly Discussions
      C
      clyf
    • RE: Increase the lift factor of all transports

      It's on my list, and very near and dear to my heart. Some very general updates:

      • I've become intimately familiar with the OnMotionEventChange functions during some recent work on the Fire Beetle, so I'm confident the front piece--reliably and tidily detecting (read as: without a forked thread) when the transport is landing/picking up/taking up--is possible.
      • The end bit (a working flight profile) has always been possible.
      • That leaves the middle bit, actually modifying the transports themselves on an individual basis.

      Just for kicks, the behavior I'm trying to emulate:
      alt text
      (Ignore the engine failure part, engine failure and descending as fast as possible have a lot in common!)

      posted in Balance Discussion
      C
      clyf
    • RE: Username rules updates

      Just out of curiosity I went a lookin:

      Call of Duty: Every six months (you get a new name change token every six months)

      Starcraft II: One free change every season (~3 months)

      Fortnite (lol): Every two weeks

      League of Legends: "You wanna see the cards you gotta pay the money" ($10)

      Warthunder: First is free, all after $2.49.

      AOE2: Connected to steam/xbox username (steam you can change as much as you want, xbox first time free/second time fee--also what masochist is playing aeo2 on the xbox)

      Rocket League: Platform name (steam/epic/etc.)

      Valorant: Free every three months, looks like LOL is going in this direction as well.

      Blizzard games: One for free, more for fee

      EVE Online: You will be who you are forever

      posted in General Discussion
      C
      clyf
    • WIDGET: Strategic Launch Text Notification

      UI minimod that shows a visual warning when an enemy launches a strategic missile, including a warning for multiple inbound missiles.

      Color and warning text can be modified in nukelaunchping.lua in the mod hooks/lua/ui/game folder.

      Find on the mod database under "Strategic Launch Text Notification".

      53b82240-7c70-4dc1-8a76-451adf381a14-image.png

      posted in Modding & Tools
      C
      clyf
    • Suggestion: Gibbed Structure Wrecks Leave Secondary Debris

      Short Form: When a structure and its wreck are destroyed in one shot ("gibbed"), create some secondary wreck fragments that add up to a percentage of the original wreck mass.

      1. Some Sort of Ethos

      I believe in nicely written software and innovative solutions that fit cleanly within existing systems. I like the idea of pushing as much decision-making bandwidth up to the macro scale as possible, but appreciate the micro dynamics that make the game interesting on a small scale. I play whatever games I can get. My rating sucks.

      2. Identify a Problem

      TML destruction of wrecks in one shot is consistently mentioned as an issue with TML balance.

      3. Showcase the Problem

      Think this one speaks for itself. I haven't put together a tech demo, but would be happy to do so if there's any interest.

      4. Find a Solution

      On simultaneous destruction of a unit and its wreck (something to do with overkillRatio--haven't worked out the details but am confident it's implemented in the lua), cast a small number of scrap metal props into the surround on a ballistic arc.

      5. Justify the Solution

      Debris flying through the air looks cool, and provides a video-game-familiar explanation for what happened to all that mass you had invested in that t2 extractor. Aside from providing a little flavor and a visual explanation to the player, the balance side is easily tunable.

      posted in Balance Discussion
      C
      clyf
    • RE: Air Movement: Klift, Kmove, Etc.

      You'll be fine. First, a little background.

      1. A Little Background

      Everything bolded is basic control theory terminology.

      Think of the controller as a little computer, within which the distance between the current location of the aircraft and the target or desired location is referred to as error. For each term (P, I, or D) in a controller--be it a proportional (P), proportional-derivative (PD), or proportional-derivative-integral (PID) controller--the error, integral of the error, or derivative of the error is multiplied by a gain constant. The sum of the product of each of those modifications is then given as the output of the controller, translating into the force we want the thrusters of the aircraft to apply[0]. In a discrete system (like we have in a video game with sim beats, instead of the real world which is effectively continuous), that thrust is applied over the time of simulation step, or time step[1] (0.1 seconds, in our case), accelerating the aircraft on the desired trajectory towards the target location.

      [0] This max force/thrust is capped at the maximum force that can be applied by the motor or thruster (think of a small electric motor--you can ask for a lot, but it will only give you as much as it will give, or light on fire, potentially). Max thrust may be a blueprint value, I don't have it in front of me. If it is, increasing maximum thrust will raise the ceiling of system performance.

      [1] This may not be completely accurate in regards to the precise internals of the sim, but it's close enough for our purposes.

      2. A Quick Calculus Refresher:

      i. The derivative of the error is the rate of change of the error. This will be negative if we're moving towards our desired location (the error is becoming smaller and smaller with each sim step--the greater the rate it's becoming smaller, the greater the force it will ask for in the opposite direction) and positive if we're moving away from it, so increasing the derivative gain constant will reduce our tendency to overshoot the target while increasing the total time, or rise time, it takes us to reach the target (or reach the target for the first time, if we're oscillating around it).

      ii. The integral of the error is the sum of all errors in each beat, from the start of the system to the present moment. If we're sitting across the room from each other not moving, the integral of the error between us will increase continuously (in a continuous system) by that amount each second, or by error*delta_t each sim beat, where delta_t is (again, in the case of FAF) 0.1 seconds. Introducing an integral term into the controller (which, as long as the aircraft has not reached its target, will ask for continuously more force from the motor or thruster) will compensate for steady-state error, or error introduced by steady state forces like gravity (in the case of an aircraft trying to maintain a given altitude). We're in a made up video game world, so we generally don't have to worry about steady state error. For this reason an integral term is not included in the controller in question (no "KLiftIntegral"), and we'll pay it no further heed.

      3. What You Came For, Or the Brass Tacks

      Adjusting the gain constants of a controller to produce the desired behavior is known as tuning the controller. There are analytical methods for tuning a system; they require knowledge of its internals (mass of the aircraft, drag, max thrust, etc.) and a certain baseline theoretical background. Given that calculus was the end of the line a long time ago, you're going to be tuning by hand (read as: trial and error). A basic tuning by hand heuristic is:

      First the integral and derivative gains are set to zero. Increase the proportional gain until you observe oscillation in the output. Your proportional gain should then be set to roughly half this value. After the proportional gain is set, increase the integral gain until any offset is corrected for on a time scale appropriate for your system. If you increase this gain too much, you will observe significant overshoot of the SP value and instability in the circuit. Once the integral gain is set, the derivative gain can then be increased. Derivative gain will reduce overshoot and damp the system quickly to the SP value. If you increase the derivative gain too much, you will see large overshoot (due to the circuit being too slow to respond). By playing with the gain settings, you can maximize the performance of your PID circuit, resulting in a circuit that quickly responds to changes in the system and effectively damps out oscillation about the SP value.
      

      (SP refers to set point--target position, in your case. Remember, you can ignore the parts that mention an integral.)

      Increasing bp.maxThrust[3] or decreasing bp.aircraftMass (which are proportional in their effect on the system as seen in Force = Mass * Acceleration, if they exist) will generally increase the possible performance of the system (read as: shorten the time it takes for the transport to settle on the desired location). Note that modifying either of those parameters will require retuning the gain constants.

      [3] Assuming there's a bp.maxSpeed, you should be able to do this without throwing transport speed balance out of whack.

      *EDIT:

      Looking at the base air unit blueprint, there does not appear to be a MaxThrust (but there is a MaxAirspeed). I suspect increasing the gain constants will change flight characteristics without bound, as you discovered when you sent the little guy flying off the map.

      You could look into dynamically adjusting the flight parameters via script when moving to pickup or dropoff to get the behavior you want. It's an intriguing enough idea that I might look into it myself if I get a minute.

      posted in Modding & Tools
      C
      clyf
    • RE: Suggestion: remove "t2 to t3 mex rebuild" game mechanics maybe?

      @arma473 said in Suggestion: remove "t2 to t3 mex rebuild" game mechanics maybe?:

      It just comes down to this: do we want to give people the option to do a little song and dance, to trade APM in exchange for about 600 extra mass?

      This is the key question and all other considerations--faction diversity, time-to-wreck, consistency, that destroying something to rebuild it saves resources (??!?) doesn't make any sense at all--are secondary. And the least interesting part of decisionproblem.com is at the very beginning, when you're clicking a button to make more paperclips.

      @ftxcommando said in Suggestion: remove "t2 to t3 mex rebuild" game mechanics maybe?:

      The "counterintuitive" aspect is adding a weird rule to t3 mex upgrades.

      The numbers aren't the last word on consistency, player behavior is. It doesn't pay to ctrl-k t1 mexes, shields, and radars, why should it for t2 mexes?

      Everyone has seen the most recent APM graph. 80 APM is never just sitting around. Every click spent executing a construction algorithm by hand is taken away from a more interesting decision, for any player at any level.

      posted in Balance Discussion
      C
      clyf
    • RE: Air Movement: Klift, Kmove, Etc.

      Welcome to hell: https://electronicscoach.com/proportional-derivative-controller.html

      (not really, but buckle up rooster)

      Those parameters are inputs for the aforementioned proportional derivative controller, an instance of which controls the motion of each aircraft.

      A straight proportional controller would produce oscillatory motion around the target point that the aircraft is moving to. The introduction of a derivative (damping) term reduces oscillation while increasing the time to reach ("rise time") the target.

      You can see about tuning PD controllers by hand here (ignore the integral Ki term, not relevant here), where Kp ~ KLift and Kd ~ KLiftDamping: https://www.ctrlaltftc.com/the-pid-controller/tuning-methods-of-a-pid-controller

      Before any follow up questions, what's your level of math education?

      posted in Modding & Tools
      C
      clyf

    Latest posts made by clyf

    • RE: TML height needs to be lowered

      The answer to that question is a little out of scope for me*, but I think it could break either way:

      • On one hand, it's a sim based game. Things fly out of range and don't get hit.
      • On the other hand, it's potentially a drag (but also potentially interesting) for players to actually figure out when that will happen in the vertical direction. Additionally, there's carveouts (see MaxHeightDiff in weapon blueprint) for weapons to have cylindrical rather than spherical ranges, so it was meant to happen in some cases. This feels like as appropriate a case as any.

      *The original changes were made for performance reasons, not gameplay ones, and I went to great lengths to match the old trajectories as closely as possible.

      EDIT: Fix will be in the next patch.

      posted in Suggestions
      C
      clyf
    • RE: SACU Rebalance

      @chenbro101

      Or, or, or a Cybran sacrifice module, but it captures instead of constructing.

      Let me float another idea for an enhancement that interacts with wreck veterancy* as well, like it pulls whatever veterancy the dead unit had and applies it to the SACU, or stores and/or distributes it to nearby friendlies. (This also feels Cybran coded to me, but not too strongly.)

      *Unit veterancy would need to be stored on the wreck on death.

      posted in Balance Discussion
      C
      clyf
    • RE: TML height needs to be lowered

      Right here: https://github.com/FAForever/fa/blob/88e11de1f94278164615f0e4dec20d32e9e11a3b/lua/sim/projectiles/components/SemiBallisticComponent.lua#L218

      Put into action here: https://github.com/FAForever/fa/blob/88e11de1f94278164615f0e4dec20d32e9e11a3b/lua/sim/projectiles/components/TacticalMissileComponent.lua#L38

      I put added height in there to catch all possible edge cases, but the reality is the target will never be so high that it's actually necessary and it introduces the drawback you've identified here.

      posted in Suggestions
      C
      clyf
    • RE: TML height needs to be lowered

      I assume this has to do with firing the TML from a lower height onto a higher height, resulting the missile flying at it's usual height + the difference between the low & high ground.

      This is exactly it.

      (Source: I wrote the code that introduced this issue 🙃 )

      posted in Suggestions
      C
      clyf
    • RE: SACU Rebalance

      Add a targeting laser enhancement that allows SACUs to guide TML missiles.

      (How this would work exactly I'm not sure but put a slinger behind the trigger you know what I'm sayin'.)

      posted in Balance Discussion
      C
      clyf
    • RE: SACU Rebalance

      There needs to be some level of justification for it to make finding out if it's possible worthwhile

      On the contrary, sometimes I've found out if as many as six totally useless things are possible before breakfast.

      posted in Balance Discussion
      C
      clyf
    • RE: SACU Rebalance

      Then also rebalance sacrifice. I'm raising the subject at this time because the early stages of a major SACU rebalance is the best time to do it.

      Let me figure out how feasible this is before we have another fight to the death over it though.

      posted in Balance Discussion
      C
      clyf
    • RE: SACU Rebalance

      Philosophically I think the whole point of a modular upgrade system is to leave identifying the best combination up to the player.

      For tele just increase the cost. It'd make it more costly to install after construction, but with custom presets what's the issue? Retrofitting in the field costs more, price for flexibility etc. etc.

      posted in Balance Discussion
      C
      clyf
    • RE: SACU Rebalance

      I'll look into it. It's my understanding that the selection system treating the different presets as different unit types (for double click etc.) is desirable? Or is that just a byproduct of the implementation?

      posted in Balance Discussion
      C
      clyf
    • RE: SACU Rebalance

      Just to stir some shit up how interested are people in custom presets?

      (Is it possible? Probably, but I don't know for sure.)

      posted in Balance Discussion
      C
      clyf