[MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Topics and discussion about specific mods
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2173
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Ranakastrasz »

Narc wrote:
Ranakastrasz wrote:Suggest alternate evolution factor display. Showing linear values. Should work as long as mods don't break the standard limits.

Code: Select all

[...] (1/(1-x))-1
I don't think that formula works:

Code: Select all

(1/(1-0.9)) - 1 == 9
(1/(1-0.99)) - 1 == 99
But you don't need a formula:

Code: Select all

if evo > 0.99 then return 6
elseif evo > 0.8 then return 5
elseif evo > 0.75 then return 4
elseif evo > 0.66 then return 3
elseif evo > 0.5 then return 2
else return 1 end
https://wiki.factorio.com/index.php?tit ... #Evolution

Code: Select all

The percentages are applied on the base of (1 - current_evolution_factor). So for instance destroying the enemy spawner in the beginning of the game results in increase of evolution factor by 0.005 (half a percent) while doing this when the evolution factor is 0.5 the increase is only 0.0025 (quarter a percent).
Ofc it works.Evolution factor follows diminishing returns, in that each 0.01 of evolution factor is far larger than the previous one. Going from 0 to 0.5 is the same as going frm 0.5 to 0.75, and 0.75 to 0.875, and so on. Hence the alternate display. It makes it linear instead of... Uhm... Hyperbolic I think? Essentially, killing that spawner would always give +0.005 to the given value regardless of whether you are at 0 or .8, (since it would actually display 5)

As for the formula, it is required to get a smooth value. Otherwise you could just say, Low, medium, high, extreme, and be done with it. This is to give more information.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

Ranakastrasz wrote:Ofc it works.Evolution factor follows diminishing returns, in that each 0.01 of evolution factor is far larger than the previous one. Going from 0 to 0.5 is the same as going frm 0.5 to 0.75, and 0.75 to 0.875, and so on. Hence the alternate display. It makes it linear instead of... Uhm... Hyperbolic I think? Essentially, killing that spawner would always give +0.005 to the given value regardless of whether you are at 0 or .8, (since it would actually display 5)
Right, ok, I see where you're going with this, thank you. I'm not sure I see how it results in more information, though: the raw evolution_factor number can just be looked up in the unit-spawner prototypes' result_units, which will tell you directly what can be spawned at the current value (e.g., "above 0.25 (25%) evolution_factor, you will start seeing small spitters").

The linearized scale is nicer for calculating how much you've done to affect the evo factor, but it takes away the simple lookup ability.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by DRY411S »

Thanks for this mod. As well as giving great information, it's so well-written and easy to understand.

I'm using it as a basis to write a GUI interface to my own mod. I only need the 'Settings' functionality. I'll make sure you are credited.
User avatar
ChurchOrganist
Filter Inserter
Filter Inserter
Posts: 256
Joined: Sun Apr 17, 2016 12:45 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by ChurchOrganist »

Are there any plans to update this to be useable in 0.13??
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 381
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by jockeril »

ChurchOrganist wrote:Are there any plans to update this to be useable in 0.13??
I know narc will update his mods once he had a chance to work on them - you'll just have to be patient 8-)
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

ChurchOrganist wrote:Are there any plans to update this to be useable in 0.13??
Yup, absolutely, but my time is limited at the moment. Thankfully, I have some help (from Afforess and sparr), but I think their available time is also quite low.

It's not going to be a simple search-and-replace, that's for sure.
User avatar
ChurchOrganist
Filter Inserter
Filter Inserter
Posts: 256
Joined: Sun Apr 17, 2016 12:45 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by ChurchOrganist »

Narc wrote:
ChurchOrganist wrote:Are there any plans to update this to be useable in 0.13??
Yup, absolutely, but my time is limited at the moment. Thankfully, I have some help (from Afforess and sparr), but I think their available time is also quite low.

It's not going to be a simple search-and-replace, that's for sure.
Well I have some experience with scripting - mainly writing Neverwinter Nights mods in Bioware script - so I would need to learn the lua dialect, and also familiarise myself with the Factorio specific stuff, but if there's anything I can do to help - let me know.

Looking at the modding changes in the 0.13 release, it seems to me that maybe a complete rewrite may be necessary?
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

ChurchOrganist wrote:Well I have some experience with scripting - mainly writing Neverwinter Nights mods in Bioware script - so I would need to learn the lua dialect, and also familiarise myself with the Factorio specific stuff, but if there's anything I can do to help - let me know.
Do feel free to take a look -- the more, the merrier: https://github.com/narc0tiq/evoGUI/pull/63
ChurchOrganist wrote:Looking at the modding changes in the 0.13 release, it seems to me that maybe a complete rewrite may be necessary?
Might do; I had one on my list anyway, because EvoGUI really is written quite poorly to begin with, but that's going to take a fair old while and I hoped to get something out sooner that was just a straight port. It hasn't been working very well so far.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by DRY411S »

I trawled this code to understand how GUIs can be implemented in Factorio. Happy to help too where I can. Anything specific I could look at?
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

DRY411S wrote:I trawled this code to understand how GUIs can be implemented in Factorio. Happy to help too where I can. Anything specific I could look at?
The big question at the moment is why the GUI shows but doesn't update with any of the non-default sensors activated.

I suspect I might have an idea (some things moved from game.whatever to surface.whatever), but because it's not generating any kind of error, it's pretty opaque to me, and I really don't have the time to spend on trial-and-error.
User avatar
ChurchOrganist
Filter Inserter
Filter Inserter
Posts: 256
Joined: Sun Apr 17, 2016 12:45 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by ChurchOrganist »

Narc wrote: Do feel free to take a look -- the more, the merrier: https://github.com/narc0tiq/evoGUI/pull/63
OK I've forked your Mod to my GitHub account. Will take a look this weekend.

Should you want to see how I'm doing you can check it here......
https://github.com/ChurchOrganist/evoGUI/
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by DRY411S »

Narc wrote:
DRY411S wrote:I trawled this code to understand how GUIs can be implemented in Factorio. Happy to help too where I can. Anything specific I could look at?
The big question at the moment is why the GUI shows but doesn't update with any of the non-default sensors activated.

I suspect I might have an idea (some things moved from game.whatever to surface.whatever), but because it's not generating any kind of error, it's pretty opaque to me, and I really don't have the time to spend on trial-and-error.
Since you wrote this, you have updated your GitHub. Have you fixed it?
User avatar
Devious Null
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 22, 2016 9:06 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Devious Null »

Narc wrote:
DRY411S wrote:I trawled this code to understand how GUIs can be implemented in Factorio. Happy to help too where I can. Anything specific I could look at?
The big question at the moment is why the GUI shows but doesn't update with any of the non-default sensors activated.

I suspect I might have an idea (some things moved from game.whatever to surface.whatever), but because it's not generating any kind of error, it's pretty opaque to me, and I really don't have the time to spend on trial-and-error.
I took a look at the code myself and fixed the issue with the error logging, at least: in control.lua, function evogui.log, you have ipairs(game.players). This apparently doesn't work in 0.13. I get errors as expected with the following version of that function:

Code: Select all

function evogui.log(message)
    if game then
        for _, p in pairs(game.players) do
            p.print(message)
        end
    else
        error(serpent.dump(message, {compact = false, nocode = true, indent = ' '}))
    end
end
Would you like some additional help updating to 0.13? I could fork this github and send some pull requests as I find issues.
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

Devious Null wrote:I took a look at the code myself and fixed the issue with the error logging, at least: in control.lua, function evogui.log, you have ipairs(game.players).
Ahh, yes, I was just looking at LuaCustomTable the other day, but I didn't remember I'd been fond of ipairs at some point. Thanks, that will help greatly.
Devious Null wrote:Would you like some additional help updating to 0.13? I could fork this github and send some pull requests as I find issues.
Yes, please! The more, the merrier! I greatly appreciate all the help, everyone's being awesome.

DRY411S wrote:
Narc wrote:The big question at the moment is why the GUI shows but doesn't update with any of the non-default sensors activated. [...]
Since you wrote this, you have updated your GitHub. Have you fixed it?
No, I just published what I had into a WIP branch to avoid duplicating others' efforts.

As I just updated that branch again, I have to mention I haven't even tested it at all -- though I am about to get around to that.


I've been using pull request 63 for coordination (under the assumption that it was the first published effort, so is authoritative), but maybe I should set up another. If I do, I'll remember to leave a note in #63 about it.
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

Okay, folks, I have a version that appears to work, so it's now published on the mod portal: https://mods.factorio.com/mods/Narc/EvoGUI. Thanks again for all the help, you guys, you've been super-awesome!
User avatar
ChurchOrganist
Filter Inserter
Filter Inserter
Posts: 256
Joined: Sun Apr 17, 2016 12:45 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by ChurchOrganist »

Narc wrote:Okay, folks, I have a version that appears to work,
Brilliant :)
Want to know where the biters chewing your power plant have come from??
Wondering where your next iron is going to come from??
You need Long Range Radar
bryreichle
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Jun 27, 2016 7:18 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by bryreichle »

Sweet thanks!!
Bizobinator
Fast Inserter
Fast Inserter
Posts: 193
Joined: Fri May 06, 2016 10:35 pm
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Bizobinator »

I loaded the save of the game that I was playing pre .13, and it keeps saying "[EvoGui] No sensor matching the name phase_deduction! Create a sensor first." It's spamming it in the console

Is there something I can do to turn it off? Is it bug?
User avatar
jockeril
Filter Inserter
Filter Inserter
Posts: 381
Joined: Sun Feb 08, 2015 11:04 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by jockeril »

Narc - got an error for you...
evogui_daytime_error(v 4.101).jpg
evogui_daytime_error(v 4.101).jpg (1013 KiB) Viewed 8796 times
What say you ?
Attachments
testing_heb4factorio_w-tanker.zip
My save (thought you might need it) - it's before updating to 0.13 & mods...
(18.97 MiB) Downloaded 121 times
My mods

Formerly Hebrew translator for FARL & EvoGUI - two mods I highly recommend for anyone to check-out

join me on
- Twitter[@jockeril],
- Twitch.tv/jockeril,
- Youtube/jocker-il (or JoCKeR-iL)
- and steam !
Image
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 280
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.11+] EvoGUI (Evolution Factor Indicator) v0.4.16

Post by Narc »

Bizobinator wrote:I loaded the save of the game that I was playing pre .13, and it keeps saying "[EvoGui] No sensor matching the name phase_deduction! Create a sensor first." It's spamming it in the console

Is there something I can do to turn it off? Is it bug?
A mod is trying to update a sensor it calls "phase_deduction" without having registered it first. What other mods do you have installed?

jockeril wrote:Narc - got an error for you...
Works fine for me, using EvoGUI 0.4.102. I'm guessing you're one of the lucky 28 who got 0.4.101 before I found and fixed that very bug.
Post Reply

Return to “Mods”