[1.0][MODLIST] Fluffy's Mods - New mini-mod: Power Cleaner [BETA]

Started by Fluffy (l2032), September 14, 2015, 06:16:45 AM

Previous topic - Next topic

Blue9

@fluffy i kinda figured how to edit the colours as i wanted to (green---kinda brownish----gray) as the priority goes lower, the problem is that the mod doesn't recognize the "current max priority" and always take max priority as 9
so if you set max priority 4, it just colours all brown to gray...or white to gray in the unedited mod.
I don't know much about this things, i just do trial and error, but i don't know how to make the mod to recognize the "current max priority".

Blue9

#1186
So, i edited the "ColorOfPriority" part of the worktab to better reflect the colors of vanilla. Also now if you change your max priority it respects the colors (with the actual mod, if you put less than 9 max priorities, priority 1 will be already white).

What i could not do cuz i don't know how, is no matter what max priority you set, when you open the mod settings it will be set as "9" (but you keep the priority that you had set before).

i'll put the edit here if anyone want's to use it, with some images to see what is the difference.

   
private static Color ColorOfPriority(int priority)
        {
            // first 1/3rd of priority levels lerp from green to brown, then lerp to grey (vanilla style)
            if (priority == 0)
                return Color.grey;
            if (priority == 1)
                return Color.green;
            // define sizes of colour ranges
            int firstThird = Settings.maxPriority /3;
            int secondThird = firstThird * 2;
            int thirdThird = firstThird * 3;
            if (priority == Settings.maxPriority)
                return new Color(0.74f, 0.74f, 0.74f);
       

            // from green to brown
            if ( priority <= firstThird )
                return Color.Lerp( Color.green, new Color(1f, 0.9f, 0.5f),((float) (priority-1)) / (firstThird  ));

            // brown to darker brown
            if (priority <= secondThird)
            return Color.Lerp(new Color(1f, 0.9f, 0.5f), new Color(0.8f, 0.7f, 0.5f), ( (float) (priority - (firstThird+1) ) ) / (firstThird ));

            //brown to gray
            return Color.Lerp(new Color(0.8f, 0.7f, 0.5f), new Color(0.74f, 0.74f, 0.74f), ((float)(priority - (secondThird+1) )) / (firstThird ));

        }


I know it's a minor change but whatever xD.

[attachment deleted by admin: too old]

Blue9

#1187
actually, i'm having a little problem here. The only thing i changed from the original worktab was those lines i posted, but i'm making something wrong cuz now it gives me a log of every work priority change every hour and such. i'll leave the output log if you care to take a look, it's just the part of the work tab showing in the dev log ingame.

I don't know what did i do but now the mod is loggin every change in priorities and loading of the work images, etc. i only changed the colorOfPriority part but i've must fkd up somewhere xD


EDIT: it appears that the problem is in how i am re building the source project. I tried to open the project and rebuild it, without changing anything, and the problem with the extensive logging still happens. I'm using microsoft visual studio and when i open the project i don't change anything but the yellow triangle references that are missing (assembly-CSharp and unityengine) that i get from the rimworld "managed" folder.

Any idea what i'm doing wrong?

[attachment deleted by admin: too old]

Harry_Dicks

Fluffy, I was thinking about this the other day, and was curious if it would be viable without too much work.

Could there be a way we can save our WorkTab settings as a "profile" or something, either for the whole colony or individual pawns, and save/load profiles from a list that we create, whenever we choose? I ask because there might be a temporary situation where I need to significantly change a lot of work priorities for a decent amount of pawns. Then when this situation is resolved, I'm SOL trying to remember what priorities were what number for whichever pawns. The only solution I have at the moment, is I would have to either write down what the original setup was, write down just the changes, reload a save from before the changes to see what they originally were, or have to take screenshots and toggle back and forth trying to rectify my WorkTab page. I know there is the copy/paste settings, but that would only work for my situation if I had to change only one pawns' priorities, and then paste the settings back in later. That is, assuming that when priorities are saved to be pasted later, that this save happens when you press the button, and won't paste whatever the current pawns' priorities are that you are pasting elsewhere.

Canute

Quote from: Blue9 on February 01, 2018, 10:05:41 AM
actually, i'm having a little problem here. The only thing i changed from the original worktab was those lines i posted, but i'm making something wrong cuz now it gives me a log of every work priority change every hour and such. i'll leave the output log if you care to take a look, it's just the part of the work tab showing in the dev log ingame.
Did you try to move WorkTab at the end of the modlist ?

Blue9

yes. The problem is (i think) that the source files have a lot of "logging" that the "ready to use" mod doesn't have. but i don't know why tho.

Harry_Dicks

Quote from: Blue9 on February 01, 2018, 01:07:15 PM
yes. The problem is (i think) that the source files have a lot of "logging" that the "ready to use" mod doesn't have. but i don't know why tho.

I'm an idiot, but maybe you could find a difference between the release versions and the master branch downloads?

Blue9

yeah, i kinda did, the source stuff have logging lines that the other doesn't, i guess it is just for testing purposes but idk.

Kori

I've been playing with ResearchTree for a while now and it works wonderfully! :)

minakurafto

how to make stuffed floor inside architect sense subcategory? ie. stuffed floor mod give some stone floor, so i want to make 1 icon that contained all kind of floor and have stuff selection in it. is it possible? example please

Saberwulfy

While fluffy do not add the production tab.

Do you know a similar mod for substitute the production tab?

Ruisuki

Wondering what determines who the faction leader is of your colony when viewing under the colony section of the relation tab?? Can it be changed?

Harry_Dicks

Quote from: Ruisuki on February 13, 2018, 02:24:15 AM
Wondering what determines who the faction leader is of your colony when viewing under the colony section of the relation tab?? Can it be changed?

Maybe we could just have a small flavor ability to choose who our representative is for this?

Thinking back to my silly "Colony Council" mod idea, it would be really fun to have an ambassador as a role/title to assign one of your colonists. Their social skills and/or traits and/or personal relations with other leaders could affect all sorts of interesting relation mechanics with other factions. One step further: have all of Psychology's traits thrown into the mix of colony leader relationships as well.

Kori

When playing with the psychology mod there will be elections for a mayor, who will be your faction leader.
You can't influence the outcome though.

Harry_Dicks

Right, but the mayor wouldn't necessarily have to be your "leader", or at least the one who talks to other factions. Or maybe it could be if there was integration with Psychology :P