Engines NIFE Roadmap Shatterloop Game Projects
Deprecated Saepes Mundi Other Projects Blog

Shatterloop

[P-7] PGCS: Procedurally-generated crafting system Notes

Posted May 4, 2021 by Xhin

Materials Tiers

Tier Resource Completion Work required
1 Surface resources Complete N/A
2a Surface fishing Complete 1
2b Surface nests Complete 1
3a Caves resources Complete 2a+2b
3b Cave nests Complete 2a+2b
3c Cave fishing Complete 2a+2a+2b
4a Dungeons Complete 3a
4b Alt dimension / specific element (Tachyons) Complete N/A¹
5a Alt Void sea Complete N/A¹
5b Myriads/Myrtriads Complete N/A²
6 Special Melange Materials Complete 5b+4a
7 Spectral Fish Complete 2a+2a+3c


Note 1: Technically doesn't require anything, but involves a lot of exploration or game knowledge, so higher tiers respectively.

  • Spectral Fish> spectral scales should be used in recipes, as well as spectral magical ingredients being used in local recipes or along trade routes.

  • Same deal with potion ingredient extracts of cave fish.

  • There are 8 Replies


    Outline

    Before I get to any technical specifics, here's a basic outline of how this system works.

    The basic idea is that a recipe that uses this system will require a random assortment of materials that are pulled out of the world or refined from materials pulled from the world. With the materials upgrade and the advanced materials upgrade, there will be a looooooooot of options available to the system.

    The refinement processes are themselves randomly-generated... the basic way this works is you create base fixtures that can turn one type of material into another type of material for the cost of Base Fuel. The specific refinement fixtures and their inputs and outputs are all randomly generated, and there can be multiple levels of work involved in this, especially once you realize that refinement fixtures themselves are crafted from materials.

    Recipes and refinement processes vary depending on the dimension. This means that you'll have a different set of challenges if you want to live in an alternate dimension, and the overall gameplay involved is essentially infinite. It also might make more sense to check out recipes in alternate dimensions to see if they're easier or to get around materials that are particularly hard to find or whatever.

    While random, the recipes have definite minimums and maximums based on game progression level. The game is getting distinctly more nonlinear and open, but there are still areas you just won't be able to reach until later (or are realistically going to happen later on, like elemental void structures). A lot of the work in this post will be figuring out where those cutoffs actually are, and how to wire the system to respect them (while also respecting things like the amount of work put in via the tiered refinement system).

    Recipes

    Recipes tend to require multiple materials. These can be very specific materials (like "Shortpig Hide"), refined materials (like "Poisonmoth Silk"), general materials (like "Wool"), or general refined materials (like "Studded Leather").

    You get a lot of help with recipes -- it'll tell you how to make them, and then how to make whatever you need to make them, and so on. When you get to basic materials, you'll learn how to actually get that material -- where it is and the terrain patterns surrounding it, or same deal for nests or fishing spots, etc. Essentially, you'll have a pretty involved emergent quest to gather and process the materials you need.

    In order to actually get recipes, you have to complete Quests, fulfill Guild objectives, or sell stolen items at a Pawn Shop. These all tie into my Civilization v2 notes, all the systems I've already built, and should all be fairly nonlinear and emergent as well. You do at least get a sense of which recipes you need to find if you want a specific feature.

    System hooks

    This system ties into quite a lot:

  • Base Fixtures, including the refinement fixtures in this very post

  • Fishing Modules and Upgrades

  • Lab unlocks

  • Automation modules

  • Farming fixtures

    Conclusion

    Still have more work to do -- got to hammer out some of the specifics and make this more technical.

    This system is a key part of the central gameplay loop, and has a very emergent feel to it. It should help contribute to the overall game feel.

  • May 4, 2021
    Xhin
    Sky's the limit

    Definitions

    Each material in a recipe fits one of these two recipes (which have variations).

    This piece of notes is mostly for my own use -- all the user actually sees is a recipe which should be reasonably balanced.

    Industry Levels

  • Level 0 -- Surface materials and their extractives.

  • Level 1 -- Materials produced through industry.

  • Level 2 -- Materials produced through industry, made by industry machines which are themselves tier 1 to create

  • Level 3 -- A level deeper

    This is a bit hard to explain, so it goes something like this:

    Level Material Instructions
    0 Shortpig Hide You can extract this from a Shortpig corpse.
    1 Shortpig Leather Refine Shortpig Hide at a Tanner (which is made from surface materials)
    2 Shortpig Silk Refine Shortpig Leather at a Silker. Silkers are made from Leather.
    3 Shortpig Web Refine Shortpig Silk at a Webber. Webbers are made from Silk.


    Mechanic-specific definitions

    These definitions are meant to keep systems self-contained (for example have fishing modules require materials gained via fishing).
    https://gtx0.com/thread/shatterloop_new_materials_
    Tier 1, 2a, 2b, 3a, 3b, 3c, 4a, 4b, 4c, 5a, 5b, 5c, 6

    Industry Level 0 1 2 3


    This definition is always equal to the Tier selected here.

    Random definitions

    These definitions are based around a certain amount of exploration and/or industry work.
    https://gtx0.com/thread/shatterloop_new_materials_
    Tier 1, 2, 3, 4, 5, 6

    Tier Type Less than or equal to Greater than or equal to

    Industry Level 0 1 2 3


    "Less than" is for cases where I want to make sure features are available early on and "Greater than" is when I want features to only be unlockable later in the game.

  • May 14, 2021
    Xhin
    Sky's the limit

    Paradigms

    Every single upgrade/unlock that uses this system has a Paradigm attached to it -- this is a piece of hardcoded data that tells this system what kind of Recipe to generate.

    Definitions Mixed Single Single + Mixed Double Double + Mixed Triple

    Mixed amount 1 2 3 1-2 2-3 1-3


    Definition Position Data
    1 (insert definition data)
    2 (insert definition data)
    3 (insert definition data)
    Mix (insert definition data)


    (The definitions here match the post above)

  • Single -- Uses exactly one definition, meaning that the recipe requires exactly one kind of material.

  • Double -- Requires two.

  • Triple -- Requires three.

  • (Mixed) -- Mixed components are always material classes (like "Leather" in general), however there can be more than one in a recipe at a time (Mixed Amount), and it can also require refined materials (Mixed Industry Level).

    Something like "Single + Mixed" would require both a specific material and some amount of generalized materials.

    Archetypes

    To heavily simplify all of the above, unlocks can also be assigned "archetypes", which are premade paradigms. Unlocks can also be assigned archetypes that have different individual properties, to give them some amount of variation.

    Overall, this should heavily simplify this set of work.

  • May 14, 2021
    Xhin
    Sky's the limit

    Misc UX as I think about it

  • Unlocks should always be based on the home dimension and its trade routes (and deeper trade networks).

  • However there should be some kind of unlockable fixture that binds PCGS recipes to whatever dimension the fixture is in.

    This should cut down heavily on confusion, while still allowing alternate routes.

  • August 12, 2021
    Xhin
    Sky's the limit

    Notes via Bases v1 (probably deprecated, but you never know)

    This system will exist alongside the normal crafting recipes -- it applies exclusively to Fixtures as well as Modules for things like the Fishing Rod or Bow. Potentially Researched Features as well, depending on what that system looks like.

    What this system does is it generates recipes for different optional features based on the materials that are potentially possible to find/extract/etc in whichever province you're in. These recipes call for specific materials.

    There are several points to this system:

  • It cuts down on the amount of work I have to do. I have no idea how to design/balance the crafting of those optional systems, so this does the work for me.

  • It makes each seed more unique, which is a core part of the game so this is a good thing.

  • It integrates the procedural generation more into basic gameplay, which is another core part of the game.

  • It also integrates back into the materials system -- you have to explore more (or use scouts more) or use the crops/etc system or shop systems to get the materials you need. This is yet another core part of the game.

    A couple notes for this:

  • Alternate provinces have different requirements. This is kinda confusing but it does encourage more exploration if you're going to be building a base or upgrading things in an alternate province. It also fits into the Lore. Nonetheless I might rethink this to cut down on confusion.

  • You can "reseed" a recipe if it's literally impossible -- this requires Starshards. Or if you're just annoyed with some set of difficult requirements.

  • January 30, 2022
    Xhin
    Sky's the limit

    Simplification

    Getting rid of Industry levels here makes a certain amount of sense, for the following reasons:

  • Simplifies the PGCS, which is a good thing.

  • Systems like the Fuel Refinery, Composter, Battery Metal, etc are already making use of Industry-type systems so there would be overlap. Additionally, those systems have extra gameplay so they work better.

  • This produces increasingly useless items, particularly as the PGCS isn't making consumable items. And then if they are, the barrier is too high on everyday consumables. I've already pulled out crafting intermediates, so it doesn't make sense to have this system, which is also a kind of intermediates system. You should instead be focusing on gathering resources and exploiting them rather than transforming them with a useless time sink.

  • The Fuel Refinery and the new trading mechanic are making use of procgen tiers, so I still get that gameplay element in there without overcomplicating this game.

  • There's already a time-wasting mechanic in the form of all transformations taking real time (but are pumpable with base fuel or particularly with making your fuel go infinite).

  • July 11, 2022
    Xhin
    Sky's the limit

    Strength Station

    After this update, I'll be able to flesh out the Strength Station.

    Since I forgot to add a note here about it (or it might be elsewhere...), I should go ahead and look at all fixtures and see if any of them make more sense after this update, or if they're instead reliant on some future update, add notes therein.

    July 15, 2022
    Xhin
    Sky's the limit

    Misc

  • It makes sense to flesh out the help menus after or during this update, since you'll need to actually be able to see how to get a particular material.

  • Same deal with some of the v0 wikification of the game.

    I do like the general concept of the early alpha 4 being a fully-playable alpha. It might even be enough of a game to begin the marketing push, if I can get it fun enough.

  • July 15, 2022
    Xhin
    Sky's the limit

    Reply to: [P-7] PGCS: Procedurally-generated crafting system Notes

    Username
    Password