Ludeon Forums

RimWorld => Mods => Releases => Topic started by: Phomor on February 11, 2018, 10:56:58 AM

Title: [1.1] Crafting Quality Rebalanced 1.4.9
Post by: Phomor on February 11, 2018, 10:56:58 AM
Crafting Quality Rebalanced

Description:
Rebalances Item Crafting Quality, for example a skill 20 Crafter will not have the chance to make an awful item anymore.

If anybody wants to translate it into different languages, feel free to contact me.

In Detail:
A skill 9+ pawn will make at least a poor item.
A skill 13+ pawn will make at least a normal item.
A skill 17+ pawn will make at least a good item.
Affects everything where quality is decided by skill, so smithing, tailoring, construction, art,...

You can adjust the skill thresholds in the mod settings menu, now with an option for every quality, Excellent and Masterwork thresholds are disabled by default.

Legendary is now a chance instead of a guarantee, if you want a guarantee just set it to 100%.

I did not change the probabilities of other qualities, just removed the possibilitiy to make a bad quality thing for high skill Colonists.

Modsync (https://ludeon.com/forums/index.php?topic=41634.0) is supported.
Source Code is included and on Github. (https://github.com/Phomor/CraftingQualityRebalanced)

Compatibility:
Compatible with almost every mod, I've only found Static Quality Plus B18 to be incompatible, and when you use these two mods together, mine just will not work. Other than that there could be conflicts if some mod changes the function that gives a random quality item based on a given skill.

Download:
Rimworld 1.0/1.1:
Steam Workshop (https://steamcommunity.com/sharedfiles/filedetails/?id=1542004942)

Rimworld B19:
Steam Workshop (https://steamcommunity.com/sharedfiles/filedetails/?id=1442879524)
NexusMods (https://www.nexusmods.com/rimworld/mods/257)

Rimworld B18:
Steam Workshop (http://steamcommunity.com/sharedfiles/filedetails/?id=1297860365)
NexusMods (https://www.nexusmods.com/rimworld/mods/237)

Version 1.1 is for B18, Version 1.4.5 is for B19, 1.4.9 for Rimworld 1.0 and 1.1.

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.

License:
Modpackers may use it but have to link to this site, the post in the Ludeon Forum or to the Mod on Nexusmods. Derivates are allowed.

Credits:
This Mod uses Harmony by Andreas Pardeike

Version History:
24.02.2020: 1.4.9: Support for Rimworld 1.1
29.10.2018: 1.4.8: Japanese translation updated
29.10.2018: 1.4.7: added option to supress the messages upon masterwork and legendary item creation
18.10.2018: 1.4.6: updated for 1.0
03.10.2018: 1.4.5: Fixed a bug in the settings menu
14.09.2018: 1.4.4: French translation made by pepezilla (https://steamcommunity.com/profiles/76561198053320467)
14.09.2018: 1.4.3: Spanish translation made by 53N4 (https://github.com/53N4)
29.08.2018: 1.4.1: Japanese translation made by Proxyer (https://steamcommunity.com/profiles/76561198257945076) added.
15.08.2018: 1.4: Legendary is now a chance instead of a guarantee, German localization added.
23.07.2018: 1.3: Settings options for Masterwork and Legendary Quality added.
16.07.2018: 1.2: Support for Rimworld 1.0
22.06.2018: 1.1: Added settings menu.
11.02.2018: 1.0: Initial release

[attachment deleted due to age]
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Harry_Dicks on February 11, 2018, 11:02:23 AM
This looks fantastic! Thank you, OP. Have you had any experience with and/or comments on Quality Builder and your mod working together? I have only seen QB in screenshots and not gotten around to testing it yet myself, but was curious if you had.
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Phomor on February 11, 2018, 11:27:28 AM
There should be no conflict between the two, just tested it a bit and it worked just like it should. This mod should be compatible with almost any other mod, thanks to harmony. The only thing it does is run a postfix method after the randomCreationQuality() method of the QualityUtility class of Rimworld.
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Harry_Dicks on February 11, 2018, 11:49:55 AM
Quote from: Phomor on February 11, 2018, 11:27:28 AM
run a postfix method after the randomCreationQuality() method of the QualityUtility class

Mmhmmm, yeah. I know some of these words.

Nah but really, thanks for this! ;D
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Giraffe on February 13, 2018, 06:21:43 AM
This is one of those mods that just has me thinking "this really should be in the game to begin with"

Thank you so much
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Crow_T on February 13, 2018, 08:34:27 PM
Nice mod- can it work with construction as well?
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Canute on February 14, 2018, 03:15:54 AM
QuoteIn Detail:
A skill 7+ Crafter will make at least a shoddy item.
A skill 9+ Crafter will make at least a poor item.
A skill 13+ Crafter will make at least a normal item.
A skill 17+ Crafter will make at least a good item.
Also affects building quality, so tables, chairs, etc.
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Phomor on February 14, 2018, 03:55:46 PM
Changed the text a bit, it actually affects everything where quality is decided by the skill of the crafter, which includes smithing, tailoring, construction and art
Title: Re: [B18] Crafting Quality Rebalanced 1.0
Post by: Crow_T on February 14, 2018, 05:13:56 PM
Quote from: Phomor on February 14, 2018, 03:55:46 PM
Changed the text a bit, it actually affects everything where quality is decided by the skill of the crafter, which includes smithing, tailoring, construction and art

Yeah I guess I missed that part ;) Was a long day... But that means this mod is going into my game WITH GUSTO :D
Title: Re: [B18] Crafting Quality Rebalanced 1.1
Post by: Phomor on June 22, 2018, 01:36:27 PM
New version 1.1, added settings menu
Title: Re: [1.0] Crafting Quality Rebalanced 1.2
Post by: Phomor on July 16, 2018, 03:59:15 PM
New version 1.2: Support for Rimworld 1.0
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Resurak on July 17, 2018, 08:40:45 AM
Fantastic mod!

There is an issue in the settings menu though. When I slide from left to right (and vice-versa) in one slider, in the other sliders the pointer move too (not the number, only the pointer).

Don't know if this is intended, but if there is an algorithm behind (maybe to keep balanced the values) it should actually change the value and not only the pointer position.

Not sure if this is clear to understand (i'm not english), but I wanted to report this anyway and if you are willing to put a sort of balance in the values it would be really nice and not cheaty, because if my workers with lvl 5 of construction can always make excellent stuff thats a little cheaty xD.

Maybe this mod can work very well with an option with fixed values (the ones in the main post are great) and another option (disabled by default) with the possibility to change the values.

P.s: why not adding the possibilty for a lvl 20 worker to make masterpiece and legendary items only?
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Phomor on July 17, 2018, 09:12:18 AM
Thanks for the compliment.
The slider setting isn't an issue, the slider maximums are just based off the values of the other sliders. So the pointer will move because the range changed and the game adjusts to that. The values of the sliders aren't actually changing, just the value of the slider that you are changing is.
Also the original mod didn't have a settings menu but it was requested so I added it.
Balance should be there with the vanilla values, that is skill 9 for poor, skill 13 for normal and skill 17 for good. So if you want that balance you can just never go into the settings menu.
I may add masterwork and legendary settings soon.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: lwki on July 17, 2018, 02:36:15 PM
Was waiting for a mod like this. And yes please add for masterwork and legendary options.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Syrchalis on July 17, 2018, 02:38:36 PM
Quote from: lwki on July 17, 2018, 02:36:15 PM
Was waiting for a mod like this. And yes please add for masterwork and legendary options.
I am hoping for a chance modifier instead of guaranteed here, I would totally love a tiny chance for legendary at skill 20 and more masterworks, but I wouldn't want every item to be masterwork/legendary.

Simply because I would need to modify the stat bonuses. They are truly legendary for legendary items. E.g. a legendary billiards table has like 250% or more recreation power, and that's the least problematic one. (1.5 damage/armorpen multiplier comes to mind).

Also the insane market value of legendary items...
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Madman666 on July 18, 2018, 06:37:00 PM
^ I second that. It was perfectly fine to have a 3% chance on a lvl 20 pawn to get a legendary done, without inspirations, i d really welcome such an option to exist and be percentage based.

And legendary items no longer have insane market prices actually. So.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Syrchalis on July 18, 2018, 08:32:05 PM
A possible implementation could look like this:

Lowest skill for Masterwork
Lowest skill for Legendary

These define which skill a pawn must have at least to have a chance at a Masterwork/Legendary item.

Chance for Masterwork at 20
Chance for Legendary at 20

These define the chance to get said quality at skill 20. Now you just need to make a curve from the lowest level to 20 (linear, quadratic, what you think works well). Say the user inputs 5% for legendary @20 and 10% masterwork @20, then a skill 20 crafter would have a 5% chance for legendary, 10% for masterwork and the remaining 85% get split among the remaining qualities (in this case it would just be excellent).

At a lower level it might look like this: 1% legendary, 3% masterwork, 96% split among excellent and good (40% good 60% excellent => 38,4% good and 57,6% excellent.

Not sure how exactly the code works for this, but this is just an idea of how one could do it.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Madman666 on July 19, 2018, 01:09:12 AM
Yeah, that'd be truly cool implementation.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: KnewOne on July 19, 2018, 05:42:20 AM
Could you add a direct link for 1.0 ?
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: lwki on July 19, 2018, 06:05:11 AM
Quote from: KnewOne on July 19, 2018, 05:42:20 AM
Could you add a direct link for 1.0 ?
It's in the attachments
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Phomor on July 19, 2018, 02:28:56 PM
Nice ideas, the earliest I can look at it though is in about 2 and a half weeks cause I'm not home till then.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Madman666 on July 19, 2018, 02:43:32 PM
No rush, just considering it is enough ;) Thanks for your time. It ll be really nice to have that miniscule legendary chance returned to us once more.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: lwki on July 20, 2018, 08:34:44 AM
Added sliders for masterwork and legendary. Sadly legendary doesn't work due to stack overflow and i can't fix it 'cause i'm dumb.

JobDriver threw exception in initAction for pawn Moehre driver=JobDriver_DoBill (toilIndex=13) driver.job=(DoBill (Job_6033324) A=Thing_ElectricTailoringBench493527 B=Thing_UnfinishedApparel687498 C=(361, 0, 231)) lastJobGiver=Verse.AI.ThinkNode_QueuedJob
System.StackOverflowException: The requested operation caused a stack overflow.
at CraftingQualityRebalanced.HarmonyPatches.Postfix (int&,bool&,RimWorld.QualityCategory&) <IL 0x0001b, 0x00058>
at (wrapper dynamic-method) RimWorld.QualityUtility.GenerateQualityCreatedByPawn_Patch1 (int,bool) <IL 0x001f7, 0x004eb>


Edit:
Forgot to disable legendary by default, set it to 21 or items will disappear.

[attachment deleted due to age]
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.2
Post by: Phomor on July 22, 2018, 07:42:24 PM
The thing that I think is happening is that the probability is too low and cause of that it cancels rolling for it after some tries (I don't actually know how much) and then the item disappears. Also happens if you have set the masterwork skill to 4 and let a skill 4 pawn make something. Item will disappear, Log will show the error most of the time, sometimes it works. You gotta set the skill requirement higher.
Legendary doesn't work cause of the same thing, it tries to roll until it gets legendary quality but that isn't possible without an inspiration anymore. So you'll get the error again.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.3
Post by: Phomor on July 23, 2018, 08:23:04 AM
Just added settings for Masterwork and Legendary, still guaranteed though, I'll look at chances in two weeks.
Minimum skill for Masterwork is 7, anything below that and you'll get the error that lwki discovered.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.3
Post by: KnewOne on July 26, 2018, 11:08:59 AM
Could you add ModSync support ? It's easier to update mods that way
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.3
Post by: Phomor on August 06, 2018, 04:25:52 AM
I'll look into it
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.3
Post by: Phomor on August 15, 2018, 04:40:05 AM
Just a quick update, really high skill builders still have a chance to build masterwork stuff in vanilla from what I've gathered from testing and code, so I won't add another chance for masterwork, just for legendary. Modsync support is added.

Update is out.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.3
Post by: Syrchalis on August 15, 2018, 07:37:08 AM
Quote from: Phomor on August 15, 2018, 04:40:05 AM
Just a quick update, really high skill builders still have a chance to build masterwork stuff in vanilla from what I've gathered from testing and code

Yes that's true. The vanilla quality generation works like this:

I've made my own version of a quality mod that simply extends the range of values in a way that mimics B18 (excluding the removed qualities) - so you can get legendary sometimes at high skill levels.

My version works like this (changes in green):
Result is that you can naturally get legendary at high skill levels. I'm not posting it here because it would be a competitor for Phomor's mod and I haven't tested it enough to ensure it's balanced.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.4
Post by: Phomor on August 15, 2018, 10:18:51 AM
I mean if it's a better mod you're free to post it, the community will benefit from that.
If I may ask though, are you using the transpiler function of harmony? Cause I just use a simple postfix which is obviously limited and can't directly change the numbers.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.4
Post by: Syrchalis on August 15, 2018, 10:57:50 AM
No, I use a postfix as well, because you can just take the __result and set it to a new value. Similar to what your mod does - just instead of doing conditional things I just do my new calculations in every case. Basically I let the game do it's calculations, ignore them, do my calculations and overwrite their __result with it.

It's not the most efficient thing, but since it only happens very rarely and it's just one not-so-difficult calculation it doesn't matter.
Title: Re: [1.0][B18] Crafting Quality Rebalanced 1.4
Post by: Phomor on August 15, 2018, 12:19:14 PM
Yeah, I thought about doing it like that in the last few days too, in the end I didn't know how exactly the numbers behaved and didn't want to test ten different versions to find the right balance so I just did it as it is now.