[A13] [GUI] Enhanced Tabs || NEW WORK TAB BETA!

Started by Fluffy (l2032), September 07, 2015, 07:15:05 PM

Previous topic - Next topic

Would you prefer animals and work tabs to be split into two mods?

Yes, and I'm fine if that means I have to install a third common dependency mod.
65 (27.1%)
Yes, but I don't want to have to deal with a third dependency mod
50 (20.8%)
No, it's fine as it is
125 (52.1%)

Total Members Voted: 240

Fluffy (l2032)

#75
Small update; settings are now properly saved when the mod is enabled/updated in existing games.
(The MapComponent is properly injected.)

Further updates;
Fixed some outstanding issues;
- the pawn list is now always rebuilt every 5 seconds to reflect external changes
- clicking now works to toggle jobs in the simple view.

LustrousWolf

The priority details thing, is it possible to change that for each colonist individually ? And is it also possible to take out some jobs? For example I have CuproPandas RimPharma mod, and for someone to granulate seeds they need high medicine skill, so I get my medicine guy to be on crafting as well in work priorities, but then he always does other things like smelting steel from slag which I do not want him to do because he is not good at crafting. So then I saw this mod and thought it was great because I could only make him do the medicine crafting bits and nothing else! But now I am not sure if this is possible?

Fluffy (l2032)

It's not possible at the moment, sorry.

This mod (and others like it) alter the parameters used by the game to decide which job to do. What you're suggesting would require rewriting the way the game decides which jobs to do, not just altering the parameters it uses to make that decision.

It's certainly an interesting suggestion though, and I'll keep looking for a way to do this. Thanks for the feedback!

LustrousWolf

Quote from: Fluffy (l2032) on October 28, 2015, 10:53:25 AM
It's not possible at the moment, sorry.

This mod (and others like it) alter the parameters used by the game to decide which job to do. What you're suggesting would require rewriting the way the game decides which jobs to do, not just altering the parameters it uses to make that decision.

It's certainly an interesting suggestion though, and I'll keep looking for a way to do this. Thanks for the feedback!

I see. Its ok tho, this mod already has some very useful features :D I will be looking forward to the day when it is possible to do that tho :)

exodus1028

im using the MVP since i've bought the game (like 2 weeks before), only as of late i started to look closer which mods are included when i ran into problems settings work priorities on my colonists

I've noticed the job priority list, but the workgivers one gave me headache, the entries there are confusing, meshed between english/german (I'm on german client), yield entries labeled the same, provide no tooltip etc...

I'd like to help you out providing an update there...correct labels & tooltips, for my fellow germans that use your mod aswell
I found the language-folder and the keys.xml
While getting an translation there is no problem, it doesnt exactly target the workgivers

which file would i have to look at? are those labels hardcoded or could you, say, easily implement some sort of wrapper that choses different translation files based on what language the client runs on?

TLDR; if you are interested in adding a german translation, what exactly do you need? (i can write xml/c# well enough if required, at least i think so  :o)

keep up the great work :)

Fluffy (l2032)

Hey exodus,

Thanks for the offer, but the problem is a bit more complicated. The workgivers weren't really intended to be exposed to the user, and as a consequence they don't have any user friendly labels defined. The way they're displayed is basically the verb used for reporting pawn status and a tooltip with an attempt to prettify the defname for the workgiver, since that's more or less all I had to work with.


label = workGiver.verb.CapitalizeFirst();
// very naive camelcase splitter, should help make things a tad more friendly, added sentence casing.
// http://stackoverflow.com/questions/773303/splitting-camelcase
tooltip = System.Text.RegularExpressions.Regex.Replace( workGiver.defName, "([A-Z])", " $1", System.Text.RegularExpressions.RegexOptions.Compiled ).Trim().ToLower().CapitalizeFirst();


If you have a better idea, I'm all ears ;) This particular bit of code is in here; https://github.com/Karel-Kroeze/RW_EnhancedTabs/blob/master/Source/BetterAnimalsTab/Dialogs/Dialog_Priority.cs, around line 500. This is a fairly recent bit of code, so unlike the earlier code, this file is actually fairly well documented/structured ;).

As for translations, most (I'm aiming for all, but I'm sure to have missed one somewhere) of the strings I use that are not taken from other defs are defined as translatable strings. Check out https://github.com/Karel-Kroeze/RW_EnhancedTabs/blob/master/Languages/English/Keyed/Keys.xml . You can provide a German translation by copying that file, and translating all the strings to German. Then put the new thing in /Languages/German/Keyed/<name>.xml, and it should work. I'll be happy to add that to the release, with proper credits of course!

exodus1028

#81
Quote from: Fluffy (l2032) on December 07, 2015, 07:21:57 AM
Hey exodus,

Thanks for the offer, but the problem is a bit more complicated. The workgivers weren't really intended to be exposed to the user, and as a consequence they don't have any user friendly labels defined. The way they're displayed is basically the verb used for reporting pawn status and a tooltip with an attempt to prettify the defname for the workgiver, since that's more or less all I had to work with.


label = workGiver.verb.CapitalizeFirst();
// very naive camelcase splitter, should help make things a tad more friendly, added sentence casing.
// http://stackoverflow.com/questions/773303/splitting-camelcase
tooltip = System.Text.RegularExpressions.Regex.Replace( workGiver.defName, "([A-Z])", " $1", System.Text.RegularExpressions.RegexOptions.Compiled ).Trim().ToLower().CapitalizeFirst();


If you have a better idea, I'm all ears ;) This particular bit of code is in here; https://github.com/Karel-Kroeze/RW_EnhancedTabs/blob/master/Source/BetterAnimalsTab/Dialogs/Dialog_Priority.cs, around line 500. This is a fairly recent bit of code, so unlike the earlier code, this file is actually fairly well documented/structured ;).


alright, just came back from work, its 1am here and i wont delve right into it now...but you can be sure i'll have a closer look at this tomorrow/following days

looking purely at this (of course not knowing as of now, how exactly all this is interfaced etc.) i could imagine doing some sort of wrapper, as i mentioned above....easiest would be to load the required translationstrings into an object, based on what language the client runs on, then  make some sort of case loop or lambda expression to assign "label" and "tooltip" the specific strings of the object, and based on that hand our desired strings back to the label/tooltip, instead of the raw ones you assigned above

only thing I'd need to know for that would be all possible verb-strings

but thats just a quick shot and may be completely unfeasable, we'll see

Quote
As for translations, most (I'm aiming for all, but I'm sure to have missed one somewhere) of the strings I use that are not taken from other defs are defined as translatable strings. Check out https://github.com/Karel-Kroeze/RW_EnhancedTabs/blob/master/Languages/English/Keyed/Keys.xml . You can provide a German translation by copying that file, and translating all the strings to German. Then put the new thing in /Languages/German/Keyed/<name>.xml, and it should work. I'll be happy to add that to the release, with proper credits of course!

will have a look at that, too...this is just a matter of a few minutes ;)

i guess i finally will have to make myself more familiar with git..for some reason i never went into it, it always looked kinda messy for me lol  Oo ;)

catch ya later!

Fluffy (l2032)

The verb strings aren't really the problem - they're translatable using the normal systems (I believe def injection(?) for these, dunno, never got into the translating stuff much). That means vanilla ones are translated, and mod ones might be, or could be translated in the mod itself.

Compiling a list of all verbs seems like a bit of overkill, since we don't know what mods (might) use.

The real problem starts with workgivers that have the same verb. For example, construction is done in three stages - pop frame from blueprint, get resources, and actual building. All three stages share the building verb. The only indication for what the workgiver actually does is the name of the worker class, and/or the def name of the workgiver. The vanilla defs have descriptive names that are generally a short sentence in camelCase, so what I'm doing is a simple attempt at parsing that back into a sentence.

I think the best solution would be to actually add labels to workgivers. They're defs, so the property should be defined - it's just never set. I'm not sure how translations for def label strings work, but ideally one could try to add the labels through the translation system.

As a final effort, you could add the labels directly into the defs, but that would require either overwriting all vanilla workgiverdefs (and hoping modders set proper labels) and risking all kinds of mod conflicts, or injecting labels at runtime based on a custom dictionary kind of thing.

In all cases, you're still left with mods which probably don't set labels, since many/most will just copy the vanilla style and omit them. I don't intend to add translations for all (or even any) mods, as that would introduce dependencies and more work for me (e.g., if the mod updates I have to update my translation table). I'ld be happy to make changes so that you/people can provide their own translations (I don't even think I'd need to make changes, but if I do, happy to :P). A small mini-mod with translation files for mod verbs and labels that aren't translated (or set) should be easy to create for those interested, and if I understand the system correctly should work just fine (assuming defs can take translations from other mods than the one in which they are defined.)


Fluffy (l2032)

I've finally gotten around to slightly improving the labelling of the priority screen - it should now demangle the names better in some edge cases, and it shows the workType/workGiver def label and description, if set. Sadly vanilla doesn't actually set these elements, so that's only helpful for mods. Anyhow, check it out if you were bothered by the bad tooltips/labels, and hopefully it'll be a bit better now.

skullywag

Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

oreganor

I have a small glitch after activating this excellent mod (It should be integrated ASAP in vanilla, imho). In the animal tab I miss the pregnacy icon on the far right. It's a minor non-breaking glitch... But I have grown used to focus all my animal management on this single screen and I miss the pregnacy state when deciding which animals to trade/butcher. Is it hidden somewhere? As I activated this mod on an already existing colony (A13)... May be the cause? Or it's a genuine "glitch"?
Contributions:
Melee Skill Rebalance

Fluffy (l2032)

There is no pregnancy icon at the moment ( it's a recent addition to vanilla as well I think? ), but there is a filter for pregnant animals - and I've just confirmed it still works.

Left-click the filter button, it's one of the options on the right in the window that opens.

oreganor

QuoteThere is no pregnancy icon at the moment ( it's a recent addition to vanilla as well I think? ), but there is a filter for pregnant animals - and I've just confirmed it still works.

Thanks for the reply, I will use the filter approach then.
Contributions:
Melee Skill Rebalance

nuschler22

Is there an "All Haul" or "All Clean?"  Something where I can designate everyone to do it and then set them back to normal work.

How would I use it?

Thanks. :)

Fluffy (l2032)

I'm in the process of overhauling and consolidating my various tab mods. The work tab is now done, and is the first to be released as part of the new Fluffy Tabs mod. It's fresh of the press, but I wanted to show it off and/or get some feedback, so here goes;

Fluffy Tabs - Download

And for a quick (well, ~10 minutes - it's a big mod!) overview of what it can do and how to use it, watch this;
https://www.youtube.com/watch?v=3hO8CtsYH2o

(I do apologize for the crappy audio - I need to buy myself a decent microphone)