various improvements for ease of empire management

A place for discussion of making game modifications.
grothmag
Posts: 26
Joined: Sun Apr 08, 2018 5:14 am

Re: various improvements for ease of empire management

Post by grothmag »

sven wrote: I'm afraid this is another instance of the modding bug I was discussing with harpy eagle earlier today. Long story short, to make the mod work inside the Mods\ subdir, you'll probably need to add the line

Code: Select all

reload_script [[GUI\~GalaxyMap\GalaxyMap.lua]]
To the bottom of the PlanetRow.lua file.

In a perfect world, this wouldn't be necessary; I will see if I can update the way mod loading works under-the-hood so that these kinds of strange reload hints aren't needed.
Ah, terrific! It works, thank you.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

Code: Select all

small_shadowed_word_drawer(format("%d",2))(x,y)
thanks Sven, will look into that ... at some point ... I just need a bit of time off, just finished big control related project (lots and lots of time spent in various control algorithms and PLCs) and I don't feel like looking into any code for a few days ...

Code: Select all

reload_script [[GUI\~GalaxyMap\GalaxyMap.lua]]
thanks for this one as well, I usually don't use Mod folder, but I understand people want to use it rather than overwrite game files
How did YOU get a key? All right, go in.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

ok, so here it is ... I want to clean it up (i.e. it may not work from Mod folder at the moment) at some point and maybe completely switch to SCOPE_call instead the way how it is done now ... fixed un-harmonized Tinkers also some scaling should be better now, it needs to be done per icon for instances where there is no chibi_icon as their size seems to vary ... also rounding is done using floor function, so the numbers don't add up always to total population
Attachments
planetrow5.jpg
planetrow5.jpg (33.62 KiB) Viewed 23341 times
How did YOU get a key? All right, go in.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

moved all files to the first post, should work from Mod folder, please let me know if there are any issues
How did YOU get a key? All right, go in.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

zolobolo wrote:Also: would you be interested to do a pie-chart based on the sum of all pop types in the diplomacy menu - wherever it can be inserted?
This is nothing important game-play wise but it should look rely cool to see the empire composition. Think Stellaris had something like this, but due to the boring graph elements I don1t think anyone rely looked at it - should not be a problem with these pop icons though
rendering pie-chart may go beyond my abilities, so far I am only reusing what Sven and Arioch put into the game code already ;) I may look into that at some point :idea:
How did YOU get a key? All right, go in.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

per popular :D demand, added following

visibility toggle on/off by variable
Attachments
planetary_report_03.jpg
planetary_report_03.jpg (51.36 KiB) Viewed 23288 times
How did YOU get a key? All right, go in.
User avatar
harpy eagle
Posts: 296
Joined: Sat Mar 10, 2018 3:25 am

Re: various improvements for ease of empire management

Post by harpy eagle »

Anyone know if it's possible to add a new UI_File from a mod folder?

I tried creating my out side pane, and was able to do so from Lua State, but had trouble moving it over to a mod folder.

The issue seems to be that you need to call FileName(_ENV) from inside GalaxyMap.lua. But when I create my own mod version of GalaxyMap.lua and put my call in there the game crashes :(


But... it does work, even if it currently requires modifying Lua state. The panel is accessible by clicking on the food icon, to right of wrench icon in the top bar.

(I modded your mod BTW :D)
Image

Image

Just like the production list, you can click on planets in the list to transfer population around.

EDIT: Adjusted the spacings and added small population numbers, what do you think?

Image
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

harpy eagle wrote: (I modded your mod BTW :D)
good, that's why it is here, for all of us to improve it :D
harpy eagle wrote: EDIT: Adjusted the spacings and added small population numbers, what do you think?
I like it, can you share the code please, so I don't need to reinvent the wheel :lol:
How did YOU get a key? All right, go in.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

harpy eagle wrote: Image
it seems there is more races that need rescaling for unhappy population icon, I keep adding them as I come across them
How did YOU get a key? All right, go in.
User avatar
harpy eagle
Posts: 296
Joined: Sat Mar 10, 2018 3:25 am

Re: various improvements for ease of empire management

Post by harpy eagle »

Here is the code. Unfortunately GalaxyMap.lua and @PlanetPopPane.lua have to go into Lua state\GUI\~GalaxyMap

@TopBarContents.lua seems like it works just fine from the mods folder

I also added a bunch of sort options specific for population.
Attachments
code.7z
(13.73 KiB) Downloaded 751 times
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

thanks for the code, for the time being (@PlanetPopPane.lua not working from Mods folder), I am toying with some ideas :)

I made left pane wider, the problem is that at the moment the game has one setting for left pane size, regardless of what is being displayed there :(
Attachments
planetary_report_04.jpg
planetary_report_04.jpg (64 KiB) Viewed 23248 times
How did YOU get a key? All right, go in.
zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: various improvements for ease of empire management

Post by zolobolo »

Why do you need to make it wider?

In the above example, it seems you have plenty of space to display both pops and orbital structures
User avatar
harpy eagle
Posts: 296
Joined: Sat Mar 10, 2018 3:25 am

Re: various improvements for ease of empire management

Post by harpy eagle »

I updated my population report code so that, instead of hijacking the food icon, there is a new population icon to access the population report from.

Image

Also shown is the population icon tooltip, which appears just like how the wrench icon shows "Planetary Report" when you hover the mouse over it.

It also works from the mods folder.
Attachments
PopReportMod.zip
(108.45 KiB) Downloaded 759 times
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: various improvements for ease of empire management

Post by siyoa »

merged these together, showing population icons and orbital structures (in planet report) is disabled by default, but you can enable it as per OP

rearranged icons a bit, tanks are a bit separate

for some reason sorting is borked, never touched it (as far as I remember) ... my changes are not based on latest vanilla files, maybe that ?
Attachments
pop_report.jpg
pop_report.jpg (43.43 KiB) Viewed 23178 times
How did YOU get a key? All right, go in.
zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: various improvements for ease of empire management

Post by zolobolo »

Can you make all ground troop types (tanks, marauders and Assault Marines) be always sorted to the end of the planet pop MGMT screen?

It is a recurring bug that these unit types are dynamically sorted during embarking and disembarking troops and thus the player needs to "chase" the icon during this activity :) Has been resolved a couple of times before but the behaviour always seem to crop up again
Post Reply