I was attempting to create a mod where:
- quality modules/intrinsic quality machines can only bump up a product by one level
- there exists a crafting machine with an intrinsic quality bonus which can combine an item X with other resources to create a better X (obviously requiring quality extra resources to improve things beyond uncommon.)
- recyclers cannot accept quality modules
I found to my dismay that the first (which is the lynchpin of making this system have the gameplay effects I want) is not possible, because the effectiveness of quality modules is multiplied by the ingredients' quality's next_probability. So setting next_probability to 0 on all qualities to ensure things only bump up by one level at a time actually prevents anything from ever being produced above normal quality. This feels frankly mod-hostile and unnecessarily hardcoded; if nothing else I would like to know why the system was implemented this way.
There are two ways to do this differently that I think would generally work better and be more amenable for modding:
First, simply skip multiplying the probability of quality effects by the current quality's next_probability (reducing the effectiveness of quality modules themselves to compensate.) This would create the ability to only make quality increase by a maximum of one tier in one crafting process, which is all I want. next_probability would only be used when a quality upgrade has been successfully rolled to determine whether quality is increased by multiple levels. Presumably this multiplication step is in place to make it impossible to upgrade legendary items further, however you could simply have it so that qualities with no next quality cannot be upgraded further. However this would remove the ability to make certain quality tiers "harder to escape from" (this is not used in vanilla or in any mod I am aware of, but is technically a loss in functionality).
The second is to split next_probability into next_probability (used for the chance to upgrade the quality when this is the ingredient quality) and next_probability_recursive (used for the chance to upgrade by another tier when this quality is tentatively the quality upgraded to). This enables the behavior I want and does not sacrifice any existing functionality; I only wonder whether it isn't possible because of some under-the-hood implementation details.
Change how quality chances are calculated to make it more flexible for modding
Place to ask discuss and request the modding support of Factorio. Don't request mods here.
- planetfall
- Burner Inserter
- Posts: 18
- Joined: Fri May 04, 2018 7:49 pm
- Contact:
Change how quality chances are calculated to make it more flexible for modding
Post by planetfall »
fulgora? i find it quite empty actually
Return to “Modding interface requests”
Jump to
- General
- ↳ Releases
- ↳ News
- ↳ General discussion
- ↳ Multiplayer
- ↳ Find Servers / Tools / Guides
- ↳ Show your Creations
- ↳ Videos
- ↳ Combinator Creations
- ↳ Mechanical Throughput Magic (circuit-free)
- ↳ Railway Setups
- ↳ Energy Production
- ↳ Medium/Big/Gigantic Sized Structures
- ↳ Fan Art
- ↳ Gameplay Help
- ↳ Spread the Word
- ↳ Off topic
- ↳ This Forum
- ↳ Celebration Party
- Support
- ↳ Gameplay Help
- ↳ Discover Factorio Wiki
- ↳ Discover Others Creations
- ↳ Discover Mods
- ↳ Discover Tools Around Factorio
- ↳ Technical Help
- ↳ Bug Reports
- ↳ Resolved for the next release
- ↳ Assigned
- ↳ Not a bug
- ↳ Pending
- ↳ 1 / 0 magic
- ↳ Duplicates
- ↳ Minor issues
- ↳ Desyncs with mods
- ↳ Won't fix.
- ↳ Resolved Problems and Bugs
- Factorio Direction
- ↳ Ideas and Suggestions
- ↳ Outdated/Not implemented
- ↳ Frequently Suggested / Link Collections
- ↳ Implemented Suggestions
- ↳ Development Proposals
- ↳ Balancing
- Contributions
- ↳ Mods
- ↳ Download mods
- ↳ Mod portal Discussion
- ↳ Mods
- ↳ Mod Packs / Libs / Special Interest
- ↳ 5dim's mod
- ↳ Angels Mods
- ↳ Atomic Power
- ↳ Bob's mods
- ↳ DyWorld
- ↳ F.A.R.L
- ↳ Fentus Challenge & Tool Mods
- ↳ Logistic Train Network
- ↳ MoMods
- ↳ Reika's Mods
- ↳ Resource Spawner Overhaul
- ↳ Yuoki Industries
- ↳ PyMods
- ↳ Questions, reviews and ratings
- ↳ Modding Discussions
- ↳ Modding discussion
- ↳ Modding help
- ↳ Ideas and Requests For Mods
- ↳ Modding interface requests
- ↳ Implemented mod requests
- ↳ Already exists
- ↳ Won't implement
- ↳ Documentation Improvement Requests
- ↳ Resolved Requests
- ↳ Development tools
- ↳ Tools
- ↳ Mod and installation managers
- ↳ Cheatsheets / Calculators / Viewers
- ↳ Development tools
- ↳ Special interest mods and libraries
- ↳ Modding Development
- ↳ Multiplayer / Dedicated Server
- ↳ Multiplayer Board
- ↳ Archive
- ↳ Maps and Scenarios
- ↳ Translations
- ↳ Texture Packs
- ↳ Fan Art
- ↳ Wiki Talk
- ↳ To be sorted
- ↳ Campaign / Scenario suggestions