EcoManager [v7 for 3641]

Everything about mods can be found here.

Moderator: Morax

Re: EcoManager [v7 for 3641]

Postby Furud » 01 Oct 2017, 21:31

Furud wrote:I have a hotkey issue that I'm hoping someone can help with. This only happens when I have Eco Manager enabled.

When I press Ctrl+T (which I have bound to selecting transport) it gives simultaneous orders to land factories to build scouts and air factories to build interceptors. It also doesn't select the transports.

I use speed2's hotkeys, so tanks and bombers are bound to T key, so that makes no sense.

If I open the F1 menu and then close it, it fixes the problem until the next game.

Have tried disabling all other mods, which doesn't help. Also had same issue with EM v7.0.

Using:
Common Mod Tools v1.0
EcoManager v8.0


I installed FA and FAF on a different computer with just 2 mods: Common Mod Tools v1.0 and EcoManager v11.0

The same issue of Ctrl + T sending land scout and interceptor orders to factories still occurred.

Does this happen to anyone else?
Furud
 
Posts: 3
Joined: 25 May 2017, 11:20
Has liked: 1 time
Been liked: 0 time
FAF User Name: Furud

Re: EcoManager [v7 for 3641]

Postby PhilipJFry » 29 Oct 2017, 20:41

adding V11 of the EcoManager to this post since the mod search is currently not working

also adding common mod tools since it is required to run the EM
Attachments
common.zip
CommonModToolsV1
(33.3 KiB) Downloaded 157 times
EM.zip
EcoManagerV11
(81.55 KiB) Downloaded 185 times
cats>dogs
post logs
User avatar
PhilipJFry
Supreme Commander
 
Posts: 2635
Joined: 23 Mar 2016, 21:16
Location: Austria
Has liked: 232 times
Been liked: 348 times
FAF User Name: PhilipJFry

Re: EcoManager [v7 for 3641]

Postby Strogo » 26 Dec 2017, 13:49

Added "Only massfabs" option so you don't need to type "/t 0" command every game if you use eco manager only for massfabs.

Spoiler: show
em.png
em.png (235.34 KiB) Viewed 4359 times



EM\hook\lua\options\options.lua

EM\modules\throttle.lua
Attachments
throttle.lua
(12.55 KiB) Downloaded 110 times
options.lua
(2.96 KiB) Downloaded 106 times
Strogo
Avatar-of-War
 
Posts: 53
Joined: 25 Oct 2017, 00:51
Has liked: 7 times
Been liked: 33 times
FAF User Name: Strogo

Re: EcoManager [v7 for 3641]

Postby Strogo » 27 Dec 2017, 18:25

Added "Toggle throttle" hotkey (switching between "massfabs" and "auto" mode). Could be useful if you running "massfabs" mode and need to stop stalling energy at some critical moment (shields blinking, nuke/smd loading etc.)

Spoiler: show
Screenshot_444.png
Screenshot_444.png (3.91 KiB) Viewed 4311 times



Mods\EM\hook\lua\ui\game\gamemain.lua

Mods\EM\modules\throttle.lua
Attachments
gamemain.lua
(1.42 KiB) Downloaded 87 times
throttle.lua
(12.9 KiB) Downloaded 94 times
Strogo
Avatar-of-War
 
Posts: 53
Joined: 25 Oct 2017, 00:51
Has liked: 7 times
Been liked: 33 times
FAF User Name: Strogo

Re: EcoManager [v7 for 3641]

Postby PhilipJFry » 28 Dec 2017, 01:44

i really like the additional option for massfab only
but i kinda dislike having more options in the option menu

i suggest something like this instead:
options.lua
Code: Select all
table.insert(options.gameplay.items,
    {
        title = "EM: Throttle energy",
        key = 'em_throttle',
        type = 'toggle',
        default = 0,
        custom = {
            states = {
                {text = "<LOC _Off>", key = 0 },
                {text = "<LOC _On>", key = 1 },
            {text = "Mass fabs only", key = 2 },
            },
        },
    })

throttle.lua
Code: Select all
local Prefs = import('/lua/user/prefs.lua')
local options = Prefs.GetFromCurrentProfile('options')
  if options['em_throttle'] == 2 then -- Enable only massfabs option
  throttle_min_storage = 0
  else
  throttle_min_storage = 'auto'
  end
cats>dogs
post logs
User avatar
PhilipJFry
Supreme Commander
 
Posts: 2635
Joined: 23 Mar 2016, 21:16
Location: Austria
Has liked: 232 times
Been liked: 348 times
FAF User Name: PhilipJFry

Re: EcoManager [v7 for 3641]

Postby Strogo » 28 Dec 2017, 09:10

Nice idea. Added your code.

Here is updated version without unnecessary option and with throttle hotkey.

And without syntax errors thanks to Philip. (English has never been my strong suit =)

Spoiler: show
Image



note: There is a problem with switching between modes via options menu. For example: you have throttle "on" -> click "Mass fabs only" -> click "Apply" and nothing will change until you restart the game (or restart throttler using chat commands /t off/on). In old version with 2 options if you want change mode via options your algoritm should be: click massfab on/off -> apply -> click throttle off -> apply -> throttle on -> apply (simply put, you changed throttle parameter first and then restarted it). And you can't do it this way if there is only 1 option.

But all of this doesn't matter as I added "toggle throttle" hotkey ;)

Mods\EM\hook\lua\ui\game\gamemain.lua
Mods\EM\modules\throttle.lua
Mods\EM\hook\lua\options\options.lua
Attachments
gamemain.lua
(1.42 KiB) Downloaded 123 times
throttle.lua
(12.9 KiB) Downloaded 123 times
options.lua
(3.02 KiB) Downloaded 127 times
Strogo
Avatar-of-War
 
Posts: 53
Joined: 25 Oct 2017, 00:51
Has liked: 7 times
Been liked: 33 times
FAF User Name: Strogo

Re: EcoManager [v7 for 3641]

Postby Strogo » 17 Aug 2018, 02:27

Bennis mentioned a bug when EcoManager randomly unpauses rebuilded mexes. I fixed it a few month ago but forgot/was too lazy to upload it ;)

These files fix pause bug:

\Mods\EM\modules\pause.lua
\Mods\EM\modules\mexes.lua

and this fixes no overaly/no auto-upgrade issue for rebuilded mexes (!this one is for "Common Mod Tools" mod, don't put it in EM\modules):

\Mods\common\units.lua
Attachments
pause.lua
(1.96 KiB) Downloaded 207 times
mexes.lua
(6.37 KiB) Downloaded 211 times
units.lua
(3.15 KiB) Downloaded 199 times
Strogo
Avatar-of-War
 
Posts: 53
Joined: 25 Oct 2017, 00:51
Has liked: 7 times
Been liked: 33 times
FAF User Name: Strogo

Re: EcoManager [v7 for 3641]

Postby schwartz1030 » 19 Sep 2018, 03:58

Hi all,

Apologies if I missed this, but I've read so many threads on this, I'm now confused. I'm running v11 (you guys who write these things are awesome BTW) and I'm getting the bug described in last year's post:
Does this also fix the upgrade on-click and assist to build mass storages bug?


I am only using upgrade on-click and when I select an engy and right click a T2 mex, it upgrade pauses to T3, I get the build queue for the mass storage, and then the engy starts assisting the upgrade of the mex.

Am I missing some option to prevent this?
schwartz1030
Crusader
 
Posts: 15
Joined: 19 Sep 2018, 03:52
Has liked: 8 times
Been liked: 2 times
FAF User Name: schwartz1030

Re: EcoManager [v7 for 3641]

Postby SpoCk0nd0pe » 20 Sep 2018, 00:47

schwartz1030 wrote:Hi all,

Apologies if I missed this, but I've read so many threads on this, I'm now confused. I'm running v11 (you guys who write these things are awesome BTW) and I'm getting the bug described in last year's post:
Does this also fix the upgrade on-click and assist to build mass storages bug?


I am only using upgrade on-click and when I select an engy and right click a T2 mex, it upgrade pauses to T3, I get the build queue for the mass storage, and then the engy starts assisting the upgrade of the mex.

Am I missing some option to prevent this?

As far as I know, EcoManager is still incompatible with assist storage build by default. There is a workaround that triggers assist upgrade only if x storages are built already. In cases of adjacent factories, bad terrain or lost commands, you have to remember though. I tried x=2, problems came up very rarely.
I lost the code since my last reinstall but I'm pretty sure I posted it in this thread.
SpoCk0nd0pe
Avatar-of-War
 
Posts: 246
Joined: 24 Sep 2014, 21:17
Has liked: 20 times
Been liked: 37 times
FAF User Name: SpoCk0nd0pe

Re: EcoManager [v7 for 3641]

Postby keyser » 20 Sep 2018, 00:55

what does it triggers at 4 storages; The "start and pause" of the mexx upgrade or the assist on the already started but paused upgrade ?
Zockyzock:
VoR is the clan of upcoming top players now
keyser
Councillor - Game
 
Posts: 1870
Joined: 17 May 2013, 14:27
Has liked: 424 times
Been liked: 540 times
FAF User Name: keyser

PreviousNext

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest