Ludeon Forums

Ludeon Forums

  • August 20, 2019, 02:07:29 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 15

Author Topic: [1.0] Better Workbench Management (QoL mod)  (Read 70580 times)

aleido58

  • Muffalo
  • *
  • Posts: 9
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #15 on: June 11, 2017, 02:18:18 PM »


I'm giving this a try, an awesome proyect overall btw.
Maybe I'm doing something wrong but the -1/+1 buttons to "fine bill resume level", only appears on bills that uses the "counted items filters"?
For example if I set up a bill for some meals I don't have those buttons, but if I set up a bill for a T-Shit I have them.
The "Restrict to" button appear always. And the configs seem to work ok.
So far is the only thing I've noticed.
Btw it would be great if the bills could be copied/exported to other benches.
With JTExport you can export/import the bills but not your mods configs... I don't know which mod should handle that, I imagine JTExport since that mod is which saves the bills.

Sorry for my crappy english...
Logged

falconne

  • Colonist
  • ***
  • Posts: 142
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #16 on: June 11, 2017, 04:37:34 PM »

the -1/+1 buttons to "fine bill resume level", only appears on bills that uses the "counted items filters"?
Oh yeah, thanks, I'll fix that.

I'll look into JTExport and see what can be done about exporting.
Logged

Fluffy (l2032)

  • Super Modder
  • Planetologist
  • ***
  • Posts: 1395
  • Cat guy
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #17 on: June 11, 2017, 05:30:49 PM »

While I like the idea ( I was, in fact, going to do something very similar, to replace the functionality I removed from Colony Manager ), I have to say I really don't care for your implementation.

Subclassing Bill_Production and replacing vanilla instances with your subclass is destructive. It's basically a big f-you to other mods, as there's only one mod that can do that trick at the same time, case-in-point being your incompatibility with Enhanced Crafting. In my opinion, a much better approach would be to implement an 'external' tracking component that keeps a dictionary of bills together with the additional data you need for each bill. That would leave the bills themselves intact, and as an added bonus - allow the save game to be used after removing your mod, as the extra stored data is not intertwined with the bills themselves, but stored as a map/gamecomponent.
Logged

falconne

  • Colonist
  • ***
  • Posts: 142
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #18 on: June 11, 2017, 06:44:44 PM »

I made this mod by basing it on Enhanced Crafting as this is my first mod and I needed a framework to start with. This is how that mod does it. In fact, that mod overrides everything so it won't be compatible with any other mod that wants to work with bills. Mine at least uses the new Harmony library so it goes someway towards coexistence (most functionality is added through prefix and postfix patches rather than subclassing... but this knowledge didn't exist when Enhanced Crafting was created). The only mods this is incompatible with are others that also subclass Bill_Production and that's not a "big f-you" to anything as they are all in the same bucket.

The save games are not dependent on either of the mods though, as the load functionality is just going to ignore data in the save file that it isn't told to load, so you can safely load them without the mods.

I have thought about future compatibility and I also decided a separate dictionary to track extra bill data is the best way. I also think this and the Enhanced Crafting mod should be combined into one (because no matter what I do I can't make this compatible with that mod, as it overrides all the vanilla classes that I need to hook into). A dictionary has to be done carefully though, as it could easily go out of sync if there is any bug in the mod, so it's along term goal.
« Last Edit: June 12, 2017, 05:17:16 AM by falconne »
Logged

Fluffy (l2032)

  • Super Modder
  • Planetologist
  • ***
  • Posts: 1395
  • Cat guy
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #19 on: June 12, 2017, 08:08:26 AM »

I may have come across harsher than intended. I didn't mean to single out your mod, I'm equally annoyed with Enhanced Crafting - but since that has been without its original author for a while, I didn't really have a place to complain. I do still think this is an 'f-you' to other mods, the fact that Enhanced Crafting creates the same problem doesn't make it any less of a problem.

As for the save games, have you tested that? I'm not convinced it would work quite so simply, also because they would be saved with an additional class="MySubClass" attribute?

I'm glad you're moving towards an external tracker, it'll be much better for everyone in the end.
Logged

aleido58

  • Muffalo
  • *
  • Posts: 9
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #20 on: June 12, 2017, 01:21:04 PM »

First of all, I'm not programmer/modder or anything to take my word into account.
My testing is only "playing" with the options save-loading, etc...
Is not very save friendly if you left a bill in any workbench, meaning that the save will load but bills will be messed up.
If you get rid of ALL the bills, save the game, remove the mod, and load that save everything seems to work just fine.
Sorry for intruding in your posts...
Logged

DariusWolfe

  • Colonist
  • ***
  • Posts: 719
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #21 on: June 12, 2017, 01:34:33 PM »

As requested, I tried to play around with this a bit yesterday, regarding the newer features; I didn't have any installed art on my newest colony, but otherwise the new features seemed to be working fine; I wasn't able to play very long due to family commitments, but I'll probably get a chance tonight to do some more in-depth;

For the most part I haven't really needed to mess with assigning specific colonists to craft; I've always used skill-filters, and that works for me, as I don't really care who does it so long as they have the requisite skill level. (Not saying I think this feature is useless, just haven't had a lot of reason to use it myself).

The material-filter feature is excellent, and while I don't have a use for it yet, I definitely will once I'm past the point of just getting any sort of non-crappy clothing on my damned pawns. It will be nice to ensure that there's always a stock of sufficient quality clothing with the right materials for best results, when my colony gets a bit more mature.
Logged

SpaceDorf

  • Transcendent
  • *****
  • Posts: 4032
  • Secretly Captain Obvious
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #22 on: June 12, 2017, 03:18:16 PM »

For the most part I haven't really needed to mess with assigning specific colonists to craft; I've always used skill-filters, and that works for me, as I don't really care who does it so long as they have the requisite skill level. (Not saying I think this feature is useless, just haven't had a lot of reason to use it myself).

The material-filter feature is excellent, and while I don't have a use for it yet, I definitely will once I'm past the point of just getting any sort of non-crappy clothing on my damned pawns. It will be nice to ensure that there's always a stock of sufficient quality clothing with the right materials for best results, when my colony gets a bit more mature.

Just from reading I agree with you.

Though I don't use the specific Pawn assignment very often it is damn useful to convince Pawn McLazyCrafter to finish the damn coat he started in '02 while the 10 other coats where done by someone else.
Since do_until enables several workbenches

The Material Filter is great to finally seperate Trade Goods from Colony Goods .. if this feature only was available for stockpiles and outfits ..


And I never noticed this silent incompabily .. this actually explains some things :-D
 
Logged
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

falconne

  • Colonist
  • ***
  • Posts: 142
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #23 on: June 13, 2017, 03:20:29 AM »

First of all, I'm not programmer/modder or anything to take my word into account.
My testing is only "playing" with the options save-loading, etc...
Is not very save friendly if you left a bill in any workbench, meaning that the save will load but bills will be messed up.
If you get rid of ALL the bills, save the game, remove the mod, and load that save everything seems to work just fine.
Sorry for intruding in your posts...

Hmm... when you say "messed up" what behaviour were you seeing? If you're loading a save with this mod enabled for the first time, then what you should see is existing bills, just as they are, without any of the filters this mod adds. The mod's filters will only take effect on new bills you add after loading it (at least until I do some refactoring of how it stores data), but existing bills shouldn't be broken. If you are loading a save containing the original version of my mod and trying it with the newest version, everything should just work.

Let me know if you noticed any specific behaviour that doesn't match the above.

As for the save games, have you tested that? I'm not convinced it would work quite so simply, also because they would be saved with an additional class="MySubClass" attribute?

Good point, I hadn't thought of that. Presumably that would also throw an error if I made a separate dictionary with my own persistent objects (though the error will be inconsequential then). I expect the solution to that is to use HugsLib's "World Data Storage" functionality.

 
Logged

aleido58

  • Muffalo
  • *
  • Posts: 9
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #24 on: June 13, 2017, 05:54:46 AM »


I think I have explain myself badly.

You can add your mod to any save without issues. The issue is if you want to remove your mod from an existing save and you left bills in the worbenches.

At least for me, if I have a bill set-up (butchers table for example) remove your mod and load that save when I try to add new bills the options to butcher creature, etc didn't show up (or sometimes showed up in a wrong place of the window)... and the help if you have it enabled (right top corner) greys out.
I made those test, in one save with only core and hugslib, and with another save with +30 mods.

If you remove all those bills from all worbenches you can remove your mod (not that i want to works as intented for me, I did those test because you asked us to try the mod before you put it on steam) without issues.

Maybe if that is a thing and if it's not only me, you should put that in the "notes" section of your mod to "show" people how to safely remove the mod.

Logged

falconne

  • Colonist
  • ***
  • Posts: 142
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #25 on: June 13, 2017, 07:10:04 AM »

Ah yeah, that's expected, as Fluffy pointed out above. I need to refactor the mod to be able to safely remove it and still load the save without extra work. I'll make a note of that in the description, for people who want to remove the mod from a save. Thanks for the extensive testing.

For now I am only concerned about not breaking save compatibility for people using the first version of my mod. That's why I didn't want to update the version on the Steam Workshop right away; I wanted to get confirmation from a few people that they could upgrade without problems, which appears to be the case. I'll update Steam shortly.
Logged

DariusWolfe

  • Colonist
  • ***
  • Posts: 719
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #26 on: June 13, 2017, 11:04:28 AM »

For now I am only concerned about not breaking save compatibility for people using the first version of my mod. That's why I didn't want to update the version on the Steam Workshop right away; I wanted to get confirmation from a few people that they could upgrade without problems, which appears to be the case. I'll update Steam shortly.

Oh yeah, zero problems there.
Logged

wwWraith

  • Colonist
  • ***
  • Posts: 388
  • ...
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #27 on: June 18, 2017, 02:43:00 PM »

Voting up for the ability to rename the bills. It would be very useful when trying to manage some situations in queues, for example, preferring vegetarian/meat food sources, and smelting weapons or reclaiming fabrics in several various groups.
Logged
Think about it. Think around it. Probably you'll get some new good idea even if it would be completely different from my words.

My mods

Please don't copy Core bases in your mods

falconne

  • Colonist
  • ***
  • Posts: 142
  • Refugee
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #28 on: June 19, 2017, 06:30:48 AM »

I have a new update with some new features that I'd appreciate some play testing and feedback on before I update on the Steam Workshop, if you guys have time.

As before, it's save compatible both on fresh saves and ones with a previous version of the mod. The new version uses a new data storage format to be more independent from the base game's code; the mod will automatically port the old format data from your saves.

It would be good if you could have dev mode turned on so if you do get an error in the log it will tell you. Please keep a copy of your save from before applying the update.

Thanks for everyone who tested

Updates:

  • Bills can now be copied and pasted within and between compatible workbenches. This can be done one at a time or you can copy all the bills in a workbench and paste them all at once. New buttons will appear in the Bills tab UI for this.

  • When pasting bills you can "Paste Link", which links the bills back to their originals. Any changes made to a linked bill will be mirrored to all bills in the chain. Links can be made across workbenches and can be broken manually later.

  • When a workbench is selected, its Bills tab will automatically open. This can be disabled in the Mod Settings menu.

  • Bills can now be renamed from the Details pane, like in Enhanced Crafting.

Note about copy/paste: when a bill is copied only a reference to the copied bill is made at the time. No data copy is done until you paste, so if you change the original bill before pasting, the pasted bill will have the modified data. If you delete a copied bill, it will be removed from the "clipboard" too.

« Last Edit: June 21, 2017, 07:35:54 AM by falconne »
Logged

XeoNovaDan

  • Super Tester
  • Planetologist
  • ***
  • Posts: 1568
  • Yee-Haw!
    • View Profile
Re: [A17] Improved workbench filters (QoL mod)
« Reply #29 on: June 19, 2017, 07:34:49 AM »

This mod definitely looks like a must-have, thank you!
Logged
My mods - Turret Extensions, Adjustable Predator Count, Profitable Weapons and various other goodies
Pages: 1 [2] 3 4 ... 15