Forged Alliance Forever Forged Alliance Forever Forums 2018-10-08T17:11:49+02:00 /feed.php?f=2&t=16776 2018-10-08T17:11:49+02:00 2018-10-08T17:11:49+02:00 /viewtopic.php?t=16776&p=168284#p168284 <![CDATA[Re: Change AI cheat mulitpliers in console?]]>

@swaaye:
Since this is a AI related topic, please visit our new "AI" forum section:
viewforum.php?f=88

There you can make a "AI Mod request".
Maybe you will get a standalone mod for it, or i will include this in my new AI.
(btw. did you already played against my AI ?)
viewtopic.php?f=88&t=16381

[Edit] You should also try Franck83's "Alliance of Heroes" Mod. :mrgreen:
viewtopic.php?f=41&t=14919

Statistics: Posted by Uveso — 08 Oct 2018, 17:11


]]>
2018-10-08T08:42:42+02:00 2018-10-08T08:42:42+02:00 /viewtopic.php?t=16776&p=168274#p168274 <![CDATA[Re: Change AI cheat mulitpliers in console?]]>
Otherwise, it could be cool to have a AI mode with dynamic cheat level. If a human player takes a big eco or military lead, AI could increase its cheat level.

Statistics: Posted by Franck83 — 08 Oct 2018, 08:42


]]>
2018-10-08T06:58:58+02:00 2018-10-08T06:58:58+02:00 /viewtopic.php?t=16776&p=168273#p168273 <![CDATA[Re: Change AI cheat mulitpliers in console?]]> Statistics: Posted by swaaye — 08 Oct 2018, 06:58


]]>
2018-10-07T10:30:38+02:00 2018-10-07T10:30:38+02:00 /viewtopic.php?t=16776&p=168238#p168238 <![CDATA[Re: Change AI cheat mulitpliers in console?]]>
there is no way to change the cheat multipliers from the console.
That's not how it works.

If you set a cheat multiplier, then every unit gets a cheat buff on unit creation. (Unit.lua -> OnCreate)

If you want to change the cheat multiplier while playing, you need to loop over every unit, remove the old cheat buff and apply a new buff with your new cheat multipliers.
This can only be done with a (sim) mod.

If you want to make this with a mod (in case you are a LUA coder) your script should do:

1. loop over every unit and remove the cheat buff
Code:
Buff.lua.RemoveBuff(unit, 'CheatIncome', true)
Buff.lua.RemoveBuff(unit, 'CheatBuildRate', true)

2. Set a new cheat factor for eco and buildspeed.
Code:
ScenarioInfo.Options.BuildMult = 2.0
ScenarioInfo.Options.CheatMult = 2.0

3. Call the function SetupCheat to set the new values
Code:
aiutilities.lua.SetupCheat(aiBrain, true)

4. loop over every unit and add the new cheat buff
Code:
Buff.lua.ApplyBuff(unit, 'CheatIncome')
Buff.lua.ApplyBuff(unit, 'CheatBuildRate')

Done.

Statistics: Posted by Uveso — 07 Oct 2018, 10:30


]]>
2018-10-06T23:09:20+02:00 2018-10-06T23:09:20+02:00 /viewtopic.php?t=16776&p=168211#p168211 <![CDATA[Change AI cheat mulitpliers in console?]]>

Statistics: Posted by swaaye — 06 Oct 2018, 23:09


]]>