FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    1. Home
    2. Raysor
    3. Best
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!
    R
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 7
    • Posts 11
    • Groups 0

    Posts

    Recent Best Controversial
    • Why does some mod not have a "Write review" button on FAF?

      Hello,

      I've noticed some inconsistencies with how mods are displayed in the FAF client regarding the "Write review" button:

      • Some mods have the "Write review" button and reviews.
      • Some mods don’t have the button at all, yet somehow they still have reviews.

      I recently uploaded a mod to the FAF Mod Vault, but it doesn’t have the "Write review" button. I would like players to be able to leave reviews and ratings for my mod.

      Could someone explain the criteria or process that determines whether a mod gets the "Write review" button? Is there something I need to configure or update during the submission process?

      Thanks in advance for your help!

      posted in I need help
      R
      Raysor
    • RE: M28AI Devlog (v302)

      Hi there,
      First of all, thanks for all the hard work on M28AI – it’s a great addition to the game (Can't play without it to be honest).

      I’ve encountered a recurring issue during my games where Ground and Air factories disappear after being upgraded to T2 or T3. This doesn’t just affect human players, but also the AI itself. Once the upgrade finishes, the factory vanishes completely and doesn’t complete the transition.

      For now, I’ll stick with the previous version of the mod so I can play without issues. This post is just meant to inform you in case it hasn’t been reported yet.

      Here's the log:
      game_24956583_copy.log

      posted in AI development
      R
      Raysor
    • Crash Report Help Needed: "bad allocation" Error

      Hello everyone,

      I've encountered a perma freeze (Not crashing though) in FAF during a game, and I’m not sure what might be causing it. Below is the relevant portion of the log file, where it reports a crash in DoSimBeat() with the error "bad allocation." Unfortunately, I'm not familiar enough to pinpoint the issue.

      Here’s a snippet from the log:

      info: Sim crashed hard in DoSimBeat(): bad allocation
      ...
      debug: Session time: 00:54:38 Game time: 00:48:54 Heap: 808.8M / 729.2M
      ...
      

      It looks like memory usage was a factor, but I’m uncertain if it’s tied to my mods or a specific in-game event.

      Mods I'm Using:
      UI Mods:
      • Advanced Selection Info
      • Advanced Target Priorities
      • BrewLAN: Gameplay Mods
      • Build Range Preview
      • Phillip Crofts Soundtrack
      • Penguin's Icon Mod
      • Redux ACU Icons
      • SupCom Vanilla Music FAF
      • ShareMouse
      • Supreme Economy Next
      • Supreme Score Board
      SIM Mods:
      • BlackOps FAF: ACUs
      • BlackOps FAF: EXUnits
      • BlackOps FAF: Unleashed
      • BrewLAN
      • BrewLAN: Additional Unit Mods
      • Buildable Lower Tiers Experimentals in Factories for TotalMayhem
      • Damage Numbers
      • EXPERIMENTAL UNIT HEALTH X1.5
      • Kennel Engineering Stations for All
      • M28AI
      • No Build Restrictions in Campaign
      • No Friendly Fire
      • PJ Infrastructure Pack
      • Reclaim Turret Aggressive
      • Smart Tactical Missiles
      • T4 Energy Generators
      • Total Mayhem

      If anyone has experience debugging this kind of crash or sees a potential mod conflict that might be triggering the issue, I’d really appreciate your insights. Could it be memory-related due to heavy mod usage, or is something else at play here?

      Let me know if more information is needed.

      Thanks in advance for your help!

      posted in Game Issues and Gameplay questions
      R
      Raysor
    • How to Dynamically Modify Threat Levels in Unit Blueprints Based on Unit Stats

      Hi everyone,

      I’m working on creating a mod for FAF (Forged Alliance Forever) that dynamically modifies the Threat Levels of all units during runtime, without manually editing .bp files. The goal is to implement a system that calculates new Threat Levels based on the unit's stats (like DPS, range, and HP) and applies these changes automatically.

      This idea stems from my desire to make my games with the M28AI mod more interesting and balanced. I love the M28AI, but I’ve noticed that units with very low Threat Levels tend to be too passive, while units with overly high Threat Levels can be excessively aggressive. By dynamically recalculating Threat Levels to better represent the capabilities of each unit, I believe this will not only improve how M28AI plays but also enhance the performance of other AI mods or systems that rely on Threat Levels for decision-making.

      The specific section I want to adjust in the .bp files looks like this:

      Defense = {
          AirThreatLevel = 0,
          ArmorType = 'Normal',
          EconomyThreatLevel = 0,
          Health = 13000,
          MaxHealth = 13000,
          RegenRate = 0,
          SubThreatLevel = 0,
          SurfaceThreatLevel = 50,
      },
      

      What I Want to Achieve:

      • Dynamically calculate Threat Levels using relevant unit stats:
        • Combat units: Use stats like DPS, range, and HP to compute values for AirThreatLevel, SurfaceThreatLevel, and SubThreatLevel.
        • Economic units: Use mass and energy production to calculate EconomyThreatLevel.
      • Apply these calculations at runtime without manually editing .bp files, ensuring compatibility with all units (including those added by other mods).
      • Ensure compatibility with AI mods like M28AI and potentially improve how AI systems interact with units based on their adjusted Threat Levels.

      My Current Approach:

      I believe this can be achieved by overriding the UnitBlueprint function in Lua, which processes unit blueprints during game loading. The idea would be to intercept each blueprint, extract the relevant stats, calculate new Threat Levels, and update the blueprint accordingly.

      Here’s a rough outline of how I imagine the logic:

      local OldUnitBlueprint = UnitBlueprint
      
      function UnitBlueprint(bp)
          if bp.Defense then
              -- Example calculation for combat Threat Levels
              local dps = 0
              local range = 0
              local hp = bp.Defense.MaxHealth or 0
      
              if bp.Weapon then
                  for _, weapon in ipairs(bp.Weapon) do
                      dps = dps + (weapon.Damage or 0) * (weapon.RateOfFire or 1)
                      range = math.max(range, weapon.MaxRadius or 0)
                  end
              end
      
              -- Calculate new Threat Levels dynamically
              if dps > 0 and range > 0 then
                  bp.Defense.SurfaceThreatLevel = (dps * range) / 1000 + (hp / 1000)
              end
      
              -- Example calculation for economic Threat Levels
              if bp.Economy then
                  local massProd = bp.Economy.ProductionPerSecondMass or 0
                  local energyProd = bp.Economy.ProductionPerSecondEnergy or 0
                  bp.Defense.EconomyThreatLevel = (massProd * 10) + (energyProd / 10)
              end
          end
      
          -- Call the original function to ensure other mods and game features work
          OldUnitBlueprint(bp)
      end
      

      Questions:

      • Is overriding UnitBlueprint the best way to dynamically adjust Threat Levels based on unit stats?
      • For extracting stats like DPS and range from weapons, is there a better approach than iterating over bp.Weapon?
      • How can I ensure compatibility with other mods and make sure my mod loads after them?
      • Are there any potential performance concerns with dynamically calculating Threat Levels for all units during loading?
      • Has anyone implemented a similar system, and are there best practices or caveats I should keep in mind?

      Why This Matters:

      My main objective is to improve how AI mods like M28AI handle units, but I suspect this would also apply to other AI mods or systems I haven’t yet considered. By dynamically calculating Threat Levels based on unit stats, I hope to make the AI’s decision-making more logical and engaging, resulting in more interesting games.

      I’d love to hear any advice, suggestions, or experiences you might have. Thank you in advance for your help!

      posted in I need help
      R
      Raysor
    • RE: Crash Report Help Needed: "bad allocation" Error

      Hi everyone,

      After extensive testing, I’ve encountered a consistent freeze during games in FAF, accompanied by the same "bad allocation" error in the logs. Despite disabling various mods one at a time, the freeze persists no matter which mods I remove. This leads me to conclude that the issue might be related to the sheer number of mods I'm running, rather than any single one of them being at fault.

      That said, I’d really prefer not to remove my mods altogether. Is there a solution to increase the game's memory capacity to handle this? I’ve already tried using a 4GB patch, but it seems incompatible with FAF.

      Does anyone have advice or experience with managing large mod loads and memory limits in FAF? Are there any alternative solutions to enhance memory allocation or optimize performance for heavily modded setups?

      Thanks in advance for your help.

      posted in Game Issues and Gameplay questions
      R
      Raysor
    • Seeking Help to Develop a Mod: Adjusting Commander Collision Properties

      Hello everyone,

      I’m reaching out to ask for help with a mod I’m currently developing for Supreme Commander: Forged Alliance. The goal of this mod is to adjust the collision properties of the commanders for each faction.

      The main idea behind this change is to address a specific frustration I’ve encountered during gameplay: the commander often gets overwhelmed by units in the base, making it difficult to move effectively. By tweaking the collision properties, I hope to create a smoother experience where the commander can navigate better without feeling bullied by every single unit around.

      This is my first time tackling a mod of this kind, so I’m looking for guidance on how to approach these changes and ensure they integrate naturally into the game. Any advice, pointers, or resources you can share would be greatly appreciated, thank you!

      posted in I need help
      R
      Raysor
    • RE: Seeking Help to Develop a Mod: Adjusting Commander Collision Properties

      @Uveso
      Thank you so much for your help, I really appreciate it! I just have one question: if we change the hitbox, will it also affect the interaction with projectiles? I’m concerned it might cause issues and make the commander untouchable, which I definitely want to avoid.

      posted in I need help
      R
      Raysor