Announcement

Collapse
No announcement yet.

Tutorialish/Infodump: Information about crafting and structures

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tutorialish/Infodump: Information about crafting and structures

    I'm going to use this post to dump everything I've learned about structures I learned a lot from the video tutorials and https://forums.unrealengine.com/show...938#post340938 but there is still a lot more to go...

    Nothing on foundations/walls/snapping yet.

    Various bits on making structures, and making a way for players to make the structure you made:

    0) (Presumably) an EngramEntry for the player to spend points on to learn how to make this structure.
    0.A) "Blue Print Entry" is the PrimalItemStructure in #1 that the player crafts)
    0.B) "Give Blueprint to Player Entry" is checked if the player can craft this without a crafting station.
    0.B.*) NOTE: if you set a crafting inventory requirement on the item and do not uncheck this, the Engram will appear in the player's crafting screen but clicking craft on it will do nothing
    0.C) Otherwise if the item requires crafting inside another core structure (smithy, fabricator etc) then to avoid modding the core structure (these steps only necessary for core structures, see #4/5 for giving your own structures recipes)...
    0.C.1) Add the structure (not the inventory) to the "Additional Structure Engrams" list as "For Class" if there is not already an entry for the structure here
    0.C.2) Add the items crafted (not the engrams) to the "Class Additions" list for that structure. This is required in order for the crafting engram to appear in the structure's inventory.
    0.D) "Engram Requirement Sets" is the list of Engrams that the player must already have learned before they can craft this. It is not necessary to require a player to have learned to make a fabricator in order to craft something in a fabricator - they can use a tribemate's fabricator.
    0.E) Add your EngramEntry to "Additional Engram Blueprint Classes" in PrimalGameData so it shows up on the screen to learn engrams
    0.F) The description shown in the "Learn Engrams" screen is the item's description, followed by "Can only be crafted in..." (based on the Item blueprint's "Crafting Requires Inventory Component"), followed by the "Extra Engram Description" followed by the required engrams in "Engram Requirement Sets"

    1) A PrimalItemStructure blueprint with that the player can use from their inventory. This item must have "Structure to Build" - points to your structure blueprint with the meshes and placement/snapping information
    1.A) If the player crafts this item, please set "Default Folder Paths" [0] is the main folder (eg "Structures") [1] is the subfolder (eg "Metal") and so on. As a player, please use existing folder paths where possible so my crafting folders are not all messed up
    1.B) "Craft Item Button String Override" will change the "Craft" button to your text. Not sure why anyone would do this, but if you wanted it to say "Build"
    1.C) "Base Crafting Resource Requirements" is the list of things required to make this item. Each entry has a class (wood rock etc) a quantity, and a flag to indicate whether you must use that exact type and not a subclass (This is checked in the recipes for jerky, presumably so if someone makes custom meat types they can't use them to make standard jerky?). There is no requirement that your item use base resources, you could craft your axe-swinging sentry post by crafting a MetalHatchet with a LampPost.
    1.D) Descriptive Name Base is the name that will appear on the icon and tooltip for this item in the inventory
    1.E) Item Description is the text that will appear on the tooltip for this item in the inventory.

    2) A structure blueprint (these mostly don't seem to have filename prefixes). Strongly consider creating this as a child of an existing object with similar behaviour. Most base blueprints are in Game/PrimalEarth/Structures/BuildingBases).
    2.*) This structure blueprint must be listed in PrimalGameData's "Additional Structures to Place" If you use your item and nothing at all happens, this is probably what's wrong.
    2.A) This must have a "Static Mesh"
    2.A.1) If you don't have any 3d modelling skill or a program to create meshes, you aren't stuck with just copying existing structures exactly, use the "MyStaticMesh" section in "Transform" to flip/stretch/squish an existing structure.
    2.A.2) If you press play in the ADK to run the simulator, you can edit the structure blueprint and watch your structure flip/stretch/squish in real-time. Make sure you have a copy of TestMap with the World Settings "Primal Game Data Override" set to your mod's PrimalGameData and load that before pressing Play. Trying to simulate TheIsland was waay too much for my poor computer.
    2.B) You must have "Consumes Primal Item" (which must be the PrimalItemStructure in #1). If you see the green preview and get a clunk when it's placed like it worked but the preview just fades away, then Consumes Primal Item is wrong or there's a problem finding it in your inventory to consume (or you're doing this over the internet and you're lagging)
    2.C) "Targetable" section's "Descriptive Name" is the name the user sees when looking at the placed structure onscreen.
    2.D) "Uses Health" and "Health" should be set, as well as the relevant information in "Targeting" for destroying the structure when the health hits zero (destroyed mesh etc).
    2.E) "Structure Settings Class" determines what tech level will damage this item (eg, metal items require metal damage)
    2.F) "Base"/"Basing" refers to standing on top of this structure. "Based Character Damage" is how campfires burn players standing in them
    2.G) Choose "Auto Activate Container" for structures that should be usable without power or fuel (crafting, etc)
    2.?) Not sure what decides whether you can rotate a structure after placing it before building it (like bookcases) versus just immediately placing it (foundations, campfires)

    Additional options depend on what features you want to use

    3) To make a structure with an Inventory:
    3.A) Create a PrimalInventoryBP (use a storage box inventory as the base class to avoid picking up any recipes)
    3.B) Delete any existing inventory component from the Components tab, then add this blueprint (Click "Add Component" and search for your blueprint, I haven't gotten drag and drop to work here).
    3.C) Check "Allow Remote Inventory" to allow users to open the structure
    3.D) Set "Max Inventory Items"
    3.E) To limit what users can place in the inventory, use "Remote Add Item Only Allow Item Classes"
    3.F) If this is a fridge, use "Item Spoiling Time Multipliers". The "PrimalItemConsumableEatable" class covers all the meat berries and soups.
    3.G) "Inventory Name Override" is what is displayed at the top of the inventory screen for the item
    3.H) "Remote Inventory Description String" is displayed below that.
    3.I) If this structure will craft (#4) or autocraft (#5) items, you should probably check "Add Max Inventory Items to Default Items" I think this is what lets campfires add slots for Charcoal and cooked meat when you have all the regular slots full?

    4) If the player has an engram that should be craftable by the player in this structure (must have Inventory)...
    4.A) Check "Allow Remote Crafting"
    4.B) Check "Allow Remote Repairing" - if you're making weapons/armor that should be repaired
    4.C) Check "Use Craft Queue" and set "Max Item Craft Queue Entries" (always 5?)
    4.D) It is not clear to me what "Crafting Enabled"/"Repairing Enabled" does, if the structure can be activated in some way, it must be activated for crafting/repairing to work.
    4.E) UNcheck "Hide Default Inventory Items from Display"
    4.F) Create a list of PrimalItem blueprints (not engrams) to be crafted in "Default Inventory Items"
    4.F.*) These items must NOT have "Auto-Craft Blueprint" checked, this is what separates them from manually crafted things. An Engram will appear in the structure's inventory for these.
    4.G) Create a list of the exact same length in "Default Engrams". Set each one to "1". (If you set it to "0", then a blueprint will appear in the inventory of the structure, instead of the engram. This can be used to let players manually craft items without learning an engram)

    5) If the structure has auto-crafting items that it should make/cook itself (Must have Inventory)...
    5.*) I recall seeing posts that say the item being crafted MUST have crafting requirements, if you try to create free items the game will crash.
    5.A) In your inventory object check "Check for Auto Craft Blueprints"
    5.B) Create a list of item blueprints (not engrams) to be created in "Default Inventory Items" To convert a normal item in bulk repeat the same item multiple times (see Grill). Otherwise if this is the only way to make this recipe and more than one item should be produced at a time, set "Item Quantity" (see PrimalItemResource_Gasoline)
    5.C.*) These items must have "Auto-Craft Blueprint" checked, this is what separates them from manually crafted things. An Engram will not appear in the inventory for these items.
    5.D) Create a list of the exact same length in "Default Engrams". Set each one to "1". ("0" will actually make it show up as a blueprint, and you will actually see the crafting bar as it crafts)

    NOTES: You can mix autocraft and manually crafted items in the same inventory. If you do not create a Default Engrams array at all, it is the same as setting them to "0". If you are only autocrafting, you can leave "Hide Default Inventory Items from Display" checked and ignore the Default Engrams array.

    6) To make a structure that you "activate" in some way, in the Structure object...
    6.A) Make sure "Auto Activate Container" is unchecked
    6.B) "Activate/Deactivate Container String" - what to say (eg "light fire" or "Turn on")
    6.C) "Container Activated/Deactivated Sound"

    6.D) To make a structure that uses electricity, in the Structure object...
    6.D.1) Do NOT check "Auto Activate Container"
    6.D.1) "Active Requires Power" true
    6.D.2) "Powered Nearby Structure Template" select "ElectricJunction" and enter how far away the power plug will reach in "Powered Nearby Structure Range"
    6.D.3) If it should always be on (see: fridge and AC) set "Auto Activate when Powered" true
    6.D.4) Otherwise set "Can Toggle Activation" (will have on/off switch like a lamppost)
    6.D.5) "Activate Materials" vs "Inactivate Materials" let you specify alternate skins (see fridge/ac with green lights when powered)

    6.E) To make a structure that uses fuel... (Item MUST have Inventory, see #3)
    6.E.1) Do NOT check "Auto Activate Container"
    6.E.2) If it should auto-activate when fueled (see preservation bin) then check "Auto Activate when Fueled"
    6.E.3) "Active Requires Fuel Items" should be a list of resources to burn.
    6.E.3.*) I THINK the order of items here sets the order items burn, if you put thatch and wood into a campfire the thatch will always burn first.
    6.E.4) "Fuel Items Consume Interval" needs to be the same length as #6.D.3 and indicates how many second between burning each item. Item [0] here matches item [0] in Fuel Items
    6.E.5) "Fuel Items Consumed Give Items" needs to be the same length as #6.D.3 and indicates what is given after burning that item [0] matches [0] in Fuel Items. Choose "None" if nothing should be given, otherwise if you are burning wood consider giving Charcoal.
    6.E.6) Consider "Disable Activation Underwater" if you don't want people burning wood in lakes.

    Tested: it is possible to make a structure that requires both electricity and fuel, if you do not choose "Auto Activate when Fueled" or "when Powered". If "Can Toggle Activation" and "Active Requires Power" and "Active Requires Fuel Items" are all checked, then the structure must have both power and fuel to activate.

    6.F) To make a structure that affects the temperature (note: temperature does not change, but players' hyper/hypothermia resistance changes when within range)
    6.F.1) Set Insulation range to the radius of the sphere around the object where the temperature should be affected
    6.F.2) To make the area warmer, enter a negative "Hyper Thermia Insulation" and a positive "Hypo Thermia Insulation". This will make it feel warmer to the player
    6.F.3) To make the area cooler, enter a positive "Hyper Thermia Insulation" and a negative "Hypo Thermia Insulation". This will make it feel cooler to the player
    6.F.4) The AC has positive values for both to make the area more habitable.
    6.F.5) Fires and Fridges all make the area warmer

    6.G) To make a structure that USES water
    6.G.1) "Crafting Subtracts Connected Water" - to subtract water from a tank to fill water bottles
    6.G.2) Autocrafting water refills: TBD see PrimalInventoryBP_Tap
    6.G.3) "Drinking Water" - to allow player to drink from the faucet
    6.G.4) Structure snapping - TBD I think "Structure Snap Type Flags" = 2048 to indicate that this snaps to pipes?

    6.H) To make a structure that GIVES water
    6.H.1) Intakes/plumbing TBD. Water Intake structures are a special subclass of the pipe/cable base class that is it's own blueprint type. The intakes have "requires placement in water" and "always has water".
    6.H.2) Well structures: "Powered water source when active" will make a structure not inside water be a water source. Plumbing to this TBD, but if you also check "Drinking Water" you can drink from the well when it is active. (tested)
    6.H.2.*) Note: attempting to power a metal tank subclass (to reuse existing plumbing/snapping rules) failed to fill the tank with water or water attached taps, the snap point rules will likely have to be copied to a non-tank structure in order to make a well that can fill pipes.

    6.I) To make a structure that GIVES power...
    6.I.1) "Powered water source when active" ... apparently electricity is water that runs through cables that don't have "Is Water Pipe" checked
    6.I.2) "Plumbing" cables TBD, my guess is that the snap type flags indicate which things are pipes and which things are cables so you can't snap them to each other?

    #2
    VERY nice! thank you!

    6.H) To make a structure that GIVES water
    i try that atm. if i make a well based on water intake i can add working pipes and taps. but i can't (yet/how?) fill up water containers or drink from it.
    if its based on a water tap it doesn't work with filling other taps. they visually look like they are irrigated, but drinking doesn't work, and if you put in a water container it gets destroyed(repair icon overlay)... still struggling with a structure that GIVES power.
    Last edited by dubCUT; 10-11-2015, 12:05 PM.
    ______________________________
    dubCUT ARK MODS

    Comment


      #3
      thx helped a lot

      Comment

      Working...
      X