<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mod for dynamic growth in prices for economic buildings]]></title><description><![CDATA[<p dir="auto">Our game has one distinctive feature that makes it stand out from many other games. I'm talking about economic growth, which, under certain conditions, scales almost infinitely, is limited only by the overall unit limits, and can lead to some crazy resource income values. For some, this is good; for others, it's bad. I can confidently say that more advanced players, thanks to their experience and skill, grow their economies much faster and better than average players, snowballing their economic superiority. I don't want to talk about countermeasures, raids, long-range artillery, and everything else that, in the standard game, is essentially game-breaking and won't allow the economy to grow indefinitely. I understand that. However, I still set myself the goal of somehow balancing or complicating economic growth.</p>
<p dir="auto">I have two ideas for how to change this.</p>
<ul>
<li>set a hard limit on buildings of a specific type, for example, T3 Mass Fabricators based on their ID.</li>
<li>somehow dynamically increase the construction cost of a building of a specific type, for example, T3 Mass Fabricators based on their ID.</li>
</ul>
<p dir="auto">I tried to use a neural network to force it to write me scripts for both options, but unfortunately, it didn’t lead to any results.<br />
Basically, what the neural network sent simply resulted in a black screen or a complete breakdown of the commander.<br />
The latest code she sent me looks like this. It's supposed to change resource consumption, even without changing the cost in the Blueprint or the cost display on the icon, but it still doesn't work.</p>
<p dir="auto">local EcoGroupMapping = {<br />
['ueb1201'] = 'T2_Energy', ['urb1201'] = 'T2_Energy', ['uab1201'] = 'T2_Energy', ['uxb1201'] = 'T2_Energy',<br />
['ueb1303'] = 'T3_Mass',   ['urb1303'] = 'T3_Mass',   ['uab1303'] = 'T3_Mass',   ['uxb1303'] = 'T3_Mass',<br />
['ueb1104'] = 'T2_Mass',   ['urb1104'] = 'T2_Mass',   ['uab1104'] = 'T2_Mass',   ['uxb1104'] = 'T2_Mass',<br />
}</p>
<p dir="auto">-- 1. ВАШ ХУК НА НАЧАЛО СТРОИТЕЛЬСТВА (Через ветеранство фундамента)<br />
local oldVeterancyOnCreate = VeterancyComponent.OnCreate<br />
function VeterancyComponent.OnCreate(self)<br />
if oldVeterancyOnCreate then oldVeterancyOnCreate(self) end</p>
<pre><code>local id = self:GetUnitId()
local groupName = EcoGroupMapping[id]

if groupName and self.GetFractionComplete and self:GetFractionComplete() &lt; 1 then
    local brain = self:GetAIBrain()
    if brain then
        if not brain.CustomEcoGroupCount then
            brain.CustomEcoGroupCount = { T2_Energy = 0, T3_Mass = 0, T2_Mass = 0 }
        end

        local currentCount = brain.CustomEcoGroupCount[groupName] or 0
        local priceMultiplier = math.pow(2, currentCount)

        if priceMultiplier &gt; 1 then
            local bp = self:GetBlueprint()
            if bp and bp.Economy then
                local extraMass = bp.Economy.BuildCostMass * (priceMultiplier - 1)
                local extraEnergy = bp.Economy.BuildCostEnergy * (priceMultiplier - 1)
                local buildTimeSeconds = bp.Economy.BuildTime / 10 

                FloatingEntityText(self.EntityId, string.format("Налог на группу %s: х%d!", groupName, priceMultiplier))

                self:ForkThread(function(buildingSelf)
                    local taxMassSec = extraMass / buildTimeSeconds
                    local taxEnergySec = extraEnergy / buildTimeSeconds

                    while not buildingSelf:IsDead() and buildingSelf:GetFractionComplete() &lt; 1 do
                        -- Проверяем наличие ресурсов, чтобы не уходить в ошибку при нулевом балансе
                        if brain.GetEconomyStored then
                            brain:DumpMass(taxMassSec)
                            brain:DumpEnergy(taxEnergySec)
                        end
                        WaitSeconds(1.0)
                    end
                end)
            end
        end
    end
end
</code></pre>
<p dir="auto">end</p>
<p dir="auto">-- 2. БЕЗОПАСНАЯ ИНЪЕКЦИЯ ХУКОВ В КЛАСС UNIT (Чтобы не ломать Командира и другие моды)<br />
local oldUnitOnStopBeingBuilt = Unit.OnStopBeingBuilt<br />
Unit.OnStopBeingBuilt = function(self, builder, layer)<br />
if oldUnitOnStopBeingBuilt then oldUnitOnStopBeingBuilt(self, builder, layer) end</p>
<pre><code>local id = self:GetUnitId()
local groupName = EcoGroupMapping[id]

if groupName then
    local brain = self:GetAIBrain()
    if brain then
        if not brain.CustomEcoGroupCount then
            brain.CustomEcoGroupCount = { T2_Energy = 0, T3_Mass = 0, T2_Mass = 0 }
        end

        local newCount = (brain.CustomEcoGroupCount[groupName] or 0) + 1
        brain.CustomEcoGroupCount[groupName] = newCount

        FloatingEntityText(self.EntityId, string.format("Группа %s: %d шт. Следующее х%d дороже!", groupName, newCount, math.pow(2, newCount)))
    end
end
</code></pre>
<p dir="auto">end</p>
<p dir="auto">local oldUnitOnKilled = Unit.OnKilled<br />
Unit.OnKilled = function(self, instigator, type, overkillRatio)<br />
local id = self:GetUnitId()<br />
local groupName = EcoGroupMapping[id]</p>
<pre><code>if groupName then
    local brain = self:GetAIBrain()
    if brain and brain.CustomEcoGroupCount then
        local currentCount = brain.CustomEcoGroupCount[groupName] or 0
        if currentCount &gt; 0 then
            brain.CustomEcoGroupCount[groupName] = currentCount - 1
        end
    end
end

if oldUnitOnKilled then oldUnitOnKilled(self, instigator, type, overkillRatio) end
</code></pre>
<p dir="auto">end</p>
<p dir="auto">Please tell me how I can do it?</p>
]]></description><link>https://forum.faforever.com/topic/10131/mod-for-dynamic-growth-in-prices-for-economic-buildings</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 03:28:54 GMT</lastBuildDate><atom:link href="https://forum.faforever.com/topic/10131.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 May 2026 08:25:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Fri, 22 May 2026 07:02:33 GMT]]></title><description><![CDATA[<p dir="auto"><img src="https://forum.faforever.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f62e.png?v=30176cb40ac" class="not-responsive emoji emoji-android emoji--open_mouth" style="height:23px;width:auto;vertical-align:middle" title=":O" alt="😮" /><br />
it sounds complicated</p>
]]></description><link>https://forum.faforever.com/post/73182</link><guid isPermaLink="true">https://forum.faforever.com/post/73182</guid><dc:creator><![CDATA[cychwa_klaymberg]]></dc:creator><pubDate>Fri, 22 May 2026 07:02:33 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Fri, 22 May 2026 04:20:28 GMT]]></title><description><![CDATA[<p dir="auto">You could hook <code>OnProductionPaused</code> and <code>OnProductionActive</code> of the <code>MassFabricationUnit</code> class for fabs, <code>MassCollectionUnit</code> for mex, or <code>Unit</code> class for both mex and fabs (might mess with RAS upgrades though).<br />
There you can access in <code>self.Brain</code> a shared counter of units and a list of units. You would adjust the counter and list, calculate the correct mass production modifier using the counter, re-create the Buff Blueprint using the new value (make sure it uses "REPLACE" for stacking), and then go through the list of units applying the new buff.</p>
<p dir="auto">If you want an example of a game with non-linearly non-exponentially scaling economy there's zero-k: <a href="https://zero-k.info/mediawiki/Cold_Takes/5_-_Making_Metal" rel="nofollow ugc">https://zero-k.info/mediawiki/Cold_Takes/5_-_Making_Metal</a><br />
Basically you have to use a square root on mass production to counteract the exponential scaling of reinvesting eco.</p>
]]></description><link>https://forum.faforever.com/post/73181</link><guid isPermaLink="true">https://forum.faforever.com/post/73181</guid><dc:creator><![CDATA[Nomander]]></dc:creator><pubDate>Fri, 22 May 2026 04:20:28 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Wed, 20 May 2026 06:35:59 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/defiant" aria-label="Profile: Defiant">@<bdi>Defiant</bdi></a> <a href="/post/73160">said</a>:</p>
<p dir="auto">A very different option is to make a Handicap sim mod, which nerfs players to earn lower eco income throughout the game. This could be a nice way to challenge more experienced players.</p>
</blockquote>
<p dir="auto">Yes, I agree. Such a mod already exists, but it won't solve my problem; it will only prolong it and give some players an unfair advantage early on. Plus, it's not always clear what level the player is facing. It could be someone with a 100 rating and 10 games, who's been playing mods their whole life and is very good. Or it could be someone with a 1500 rating and 1000 games, but knows nothing except Dual Gap.</p>
]]></description><link>https://forum.faforever.com/post/73163</link><guid isPermaLink="true">https://forum.faforever.com/post/73163</guid><dc:creator><![CDATA[cychwa_klaymberg]]></dc:creator><pubDate>Wed, 20 May 2026 06:35:59 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Wed, 20 May 2026 04:37:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/defiant" aria-label="Profile: Defiant">@<bdi>Defiant</bdi></a> <a href="https://forum.faforever.com/topic/10117/player-modifier-pcx-balance-games-between-different-rated-players">https://forum.faforever.com/topic/10117/player-modifier-pcx-balance-games-between-different-rated-players</a></p>
]]></description><link>https://forum.faforever.com/post/73162</link><guid isPermaLink="true">https://forum.faforever.com/post/73162</guid><dc:creator><![CDATA[maudlin27]]></dc:creator><pubDate>Wed, 20 May 2026 04:37:22 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Wed, 20 May 2026 03:36:16 GMT]]></title><description><![CDATA[<p dir="auto">A very different option is to make a Handicap sim mod, which nerfs players to earn lower eco income throughout the game.  This could be a nice way to challenge more experienced players.</p>
]]></description><link>https://forum.faforever.com/post/73160</link><guid isPermaLink="true">https://forum.faforever.com/post/73160</guid><dc:creator><![CDATA[Defiant]]></dc:creator><pubDate>Wed, 20 May 2026 03:36:16 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Wed, 20 May 2026 02:23:38 GMT]]></title><description><![CDATA[<p dir="auto">It'll be in the mod folder, e.g.:<br />
C:\ProgramData\FAForever\user\My Games\Gas Powered Games\Supreme Commander Forged Alliance\mods\PlayerModifierPCx</p>
<p dir="auto">It applies a resource buff to every resource generating unit when that unit is created, with the buff being a factor determined by the game options</p>
<p dir="auto">If you need help on modding more generally I'd suggest asking in the modding discord channel part of the FAF discord:<br />
<a href="https://discord.com/channels/197033481883222026/832710161847287819" rel="nofollow ugc">https://discord.com/channels/197033481883222026/832710161847287819</a></p>
]]></description><link>https://forum.faforever.com/post/73158</link><guid isPermaLink="true">https://forum.faforever.com/post/73158</guid><dc:creator><![CDATA[maudlin27]]></dc:creator><pubDate>Wed, 20 May 2026 02:23:38 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Tue, 19 May 2026 08:08:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/maudlin27" aria-label="Profile: maudlin27">@<bdi>maudlin27</bdi></a> Can you write in more detail how this works and in which folders it is located?</p>
]]></description><link>https://forum.faforever.com/post/73149</link><guid isPermaLink="true">https://forum.faforever.com/post/73149</guid><dc:creator><![CDATA[cychwa_klaymberg]]></dc:creator><pubDate>Tue, 19 May 2026 08:08:47 GMT</pubDate></item><item><title><![CDATA[Reply to Mod for dynamic growth in prices for economic buildings on Mon, 18 May 2026 17:09:54 GMT]]></title><description><![CDATA[<p dir="auto">You could alternatively reduce the resources generated by such buildings by using a sim mod and applying buffs to the units either when created or on an ongoing basis<br />
Eg resource generation of the nth building is max(1, 100 - n) / 100%</p>
<p dir="auto">The PCx mod is an example of using buffs to modify resource generation values</p>
]]></description><link>https://forum.faforever.com/post/73143</link><guid isPermaLink="true">https://forum.faforever.com/post/73143</guid><dc:creator><![CDATA[maudlin27]]></dc:creator><pubDate>Mon, 18 May 2026 17:09:54 GMT</pubDate></item></channel></rss>