Topic: Modding Tutorial and Help  (Read 16027 times)


Dr.Hossa

« Reply #15 on: December 08, 2020, 05:09:45 PM »
erm...
i did not add any bone item...
But i think i did not test it correctly. I just saw "you need branch - preferably a bone" and i had only branches, and i just supposed it would work with a bone. So i think i have to put in some interstage product, like two different swimmers and two different hooks.

and now im really confused, you mix up the bone with the clay lump in one recipe... i dont get it, sorry...

yeah, didnt work with "better clay lump"
its now really messy, i guess i will have to take a step back and simplify things.


For every person who is wondering what we are talking about: I want to make a clay lump item with better quality, out of a normal clay lump. In the final clay pot recipe both should be allowed

Privateer

« Reply #16 on: December 08, 2020, 05:43:08 PM »
 The parameter afaik (designed for preferred tool) is not made to distinguish between different items when string text is used.

Eg; {Knife} is a generic call for any knife item <Fisher`s knife> would set a preference to use the fisher`s knife.
{Clay lump} is calling for a specific item spelled exactly as "Clay lump" and this <Fine clay lump> is ignored.

I could see this sort of thin working if the generic item types are used in the {};
{Tying equipment} <Random string name>
{Cutting weapon} <some edged weapon name>

 Though I have not tested that the above works.

Edit: Tried to apply some items using the <preferred> tag
Tried {Raw fish}<Roach> and it auto used a pike
Tried {Tying equipment}<Random cloth> and it prompts for selection on tying equipment
Neither of these generate text message that xxx is preferred
Added {Cutting weapon}<Axe>  to see what happens, with no axe, it displays text that Axe would be preferred and auto selects a knife. With Axe in hand it auto uses an axe.

 Even without [remove] in the recipes that may force selection only the axe worked as expected. So I'm back to don't think it's possible.
« Last Edit: December 08, 2020, 07:52:32 PM by Privateer »
To help is it's own reward.
Mods:
https://www.unrealworld.fi/forums/index.php?action=profile;area=showposts;sa=attach;u=10 Player Quests, Arrow quiver, Bee hives honey & mead, Massive menus, Fish Farmer, Combat trainer, Player made markers, Weaving, Wood stacks, Chicken coop Fish cuts, string&bone.

Dr.Hossa

« Reply #17 on: December 13, 2020, 03:49:03 PM »
thanks a lot for also looking into this. i think i now understand some mechanics way better.
Alas, this leads me a much more simple way to implement desired things...

Dr.Hossa

« Reply #18 on: December 17, 2020, 02:04:06 PM »
Next question:

Is there any way to write an item code that produces byproducts as well?

For example, my punt needs 8 wooden stakes as scaffold to stand on over night, to dry.
When i use the [remove] tag, they are wasted.
I actually dont want to add a scaffold (that would be the most obvious solution; but not sure how i would acomplish that anyway), because i want my mod to be clearly laid out, not overloaded.
Spoiler: show
//PHIL'S STONE AGE
.Punt.  [effort:3] [phys:stance,arms]   *COMMON* [assist:2]      %-20%   /6h/   \1d\
{Log}   [remove]   
{Glue}   #6#    [remove]          '+to make it waterproof'
{Axe} <Carving axe>    
{Fire} {Water}
{wooden stake} (12) 

Same for my glue item.
Spoiler: show
//PHIL'S STONE AGE
.Make Glue from fish skin. "rock" [effort:1] [phys:hands,one-armed] *COMMON*  /5/ \2h\ %50% |-2| #0.2#
{Raw fish} #1# [remove]
{Pot}
{Fire}
{Water} #2#
{Knife} <Fisher's Knife>
[NAME:Glue]   


////--------(YOU ARE HERE: SUBMENU_Bowying)-------////

//PHIL'S STONE AGE
.Make Glue from bones. "rock" [effort:1] [phys:hands,one-armed] *COMMON*  /5/ \4h\ %50% |-2| #0.5#
{Bone} #1# [remove]
{Pot}
{Fire}
{Water} #2#
{Knife} <Fisher's Knife>
[NAME:Glue]   

//PHIL'S STONE AGE
.Make Glue from Birch Tar. "rock" [effort:1] [phys:hands,one-armed] *COMMON*  /5/ \7h\ %50% |-2|  #0.1#
{Birch-bark strip} =80= [remove]
{Pot}
{Fire}
[NAME:Glue]     

I do not want to create an extra submenu or put it into the cooking menu(again, obvious solution).
A pot is needed for it, but this time i dont use the [remove] tag as i really dont see the pot being used up.
But that means that the pot is not occupied while the glue is cooking, so one can instantly cook a lot of the glue with just one pot.

any ideas or suggestions? is it possible to use the "pot of" expression somehow(the pot should be occupied during the cooking process, but given back of course after...)?
Would it make sense to create a scaffold "building" and give it more purposes(e.g framework for a shelter, drying rack, etc...)?

both issues are not extremely problematic or immersion breaking, but would be quite nice to get rid of.


 another issue i ran into:
I cannot find the valid item tag for clothes that define the protection value... Perhaps my mind is fooling me, but i am almost sure i saw a kind of [BLUNT/POINT/EDGE...blabla PROTECTION:x] - tag... 
 
or is it?...
« Last Edit: December 17, 2020, 05:51:07 PM by Dr.Hossa »

Privateer

« Reply #19 on: December 17, 2020, 08:15:21 PM »
 Firstly,
There are no 'byproducts' per say, AND/OR every task must have a product outputted.

Now, there are three 'types' of 'crafting'
Cooking - adds/combines removed (consumed) recipe items nourishment values into a brand new item.
 Using hardcoded cooking method 'logic' ie: boil, bake, roast. Which sets default water %, spoilage etc.
When cooking, 'containers' generally need not be programed as the cooking method asks for it automatically, and does not destroy it, but use it to hold the product.

Crafting - Ingredients are purely for ambiance/emersion and realism.
 Only existing (defined in the game) items can be made and a simple .name. will produce it.
Since no ingredients are truly needed, any with [remove] are destroyed. To create "unique" items further values need to be changed in the recipe to 'alter' the game defined object.

Flora - Items created here can be 'Crafted" with .name. once the game has read them in they become defined items to the game.

 I babbled on for a while and am not sure if I answered any of your questions.

Edit ~ about armor tags
From ver. 3.30 notes
Spoiler: show

***

        [ARMOUR_MATERIAL:] - material of armour type items. This defines the protection values.

            possible values: lamellar / iron / mail / leather / fur / cloth / wool / birch-bark

            Examples:
            [ARMOUR_MATERIAL:iron] - the armour is made of iron

        ***

        [ARMOUR_COVERAGE:] - bodyparts covered by the armour

            possible values:
              one of these predefined coverage categories:
                 cloak / hauberk / long_hauberk / habergeon / cuirass / overcoat / greaves / rerebraces / vambraces /
                 shirt / short_shirt / long_shirt / trousers / tunic
              or any combination of these bodyparts values:
                 skull / face / neck / shoulder / upper_arm / elbow / forearm / hand /
                 thorax / abdomen / hip / groin / thigh / knee / calf / foot

            Examples:
            [ARMOUR_COVERAGE:overcoat]         - the armour has coverage of an overcoat
            [ARMOUR_COVERAGE:skull neck shoulder] - the armour covers skull, neck and shoulders


There for 'protection level' is only modifiable by area covered and which 'hard coded" material values you use to define the specific components.
« Last Edit: December 17, 2020, 08:44:41 PM by Privateer »
To help is it's own reward.
Mods:
https://www.unrealworld.fi/forums/index.php?action=profile;area=showposts;sa=attach;u=10 Player Quests, Arrow quiver, Bee hives honey & mead, Massive menus, Fish Farmer, Combat trainer, Player made markers, Weaving, Wood stacks, Chicken coop Fish cuts, string&bone.

Dr.Hossa

« Reply #20 on: December 18, 2020, 11:18:34 AM »
Firstly,
There are no 'byproducts' per say, AND/OR every task must have a product outputted.

Now, there are three 'types' of 'crafting'
Cooking - adds/combines removed (consumed) recipe items nourishment values into a brand new item.
 Using hardcoded cooking method 'logic' ie: boil, bake, roast. Which sets default water %, spoilage etc.
When cooking, 'containers' generally need not be programed as the cooking method asks for it automatically, and does not destroy it, but use it to hold the product.

Crafting - Ingredients are purely for ambiance/emersion and realism.
 Only existing (defined in the game) items can be made and a simple .name. will produce it.
Since no ingredients are truly needed, any with [remove] are destroyed. To create "unique" items further values need to be changed in the recipe to 'alter' the game defined object.

 I babbled on for a while and am not sure if I answered any of your questions.


There for 'protection level' is only modifiable by area covered and which 'hard coded" material values you use to define the specific components.

Yes you did. I feared there is no way to make leather armor better. I could supplement it with [ARMOR MATERIAL:fur]... which is not satisfying. Perhaps i will do that to the cuirass and increase the working effort, to give at least that item some kind of purpose.

Thanks a lot! I am aware of that mechanics. i always start with a simple .xxx. - "Item", then adding properties and parameters step by step, until it stops working.
But i appreciate your explanations, so this conversation can actually help other people who want to learn about modding, too.

And there are still so many questions ::)...:
How does the Engine recognize {[TILES:xxx]}? For example, i have to use the word "shelter", so i can get it to work properly. But I remember reading about the mod mechanics, that the engine wants the gfx-file name(without extension). However "{[TILES:ter-shelter]}" doesnt work, but "{[TILES:shelter]}" does, which is confusing me.
Got a dried mushroom here(only second recipe works as desired):
Spoiler: show
//PHIL'S STONE AGE
.Dried mushrooms(broken).  (4)   *COOKERY*   /10/ \6d\  %30%    :151:  [patch]
{Mushrooms}   #0.5#     [remove]  [name:dried %s] [patchwise]
{Tying equipment} =1= '+to leave dem scurvy sponges high and dry!'
{[TILE:ter-shelter]} 'Rainproof place'
[COOK_WEIGHT_DIV:20]
[WATER:0]
[SPOILAGE_DAYS:180]

//PHIL'S STONE AGE
.Dried mushrooms.  (4)   *COOKERY*   /10/ \6d\  %30%    :151:  [patch]
{Mushrooms}   #0.5#     [remove]  [name:dried %s] [patchwise]
{Tying equipment} =1= '+to leave dem scurvy sponges high and dry!'
{[TILE:shelter]} 'Rainproof place'
[COOK_WEIGHT_DIV:20]
[WATER:0]
[SPOILAGE_DAYS:180]


While with the {[TILEGFX:xxx]}-tag, it's just the other way around. For example with my better stone axe(again, only second recipe works as desired):
Spoiler: show
//PHIL'S STONE AGE
.Better Stone-axe(broken). "Handaxe" [effort:3] [phys:arms,hands] *COMMON*    /3h/         %-35%
{Stone-axe-head}   [remove]   
{Slender trunk} [remove] 
{Rope} =3= [remove] 
{Fire} '+for piercing a hole for the head into the handle'
{Knife} <Small knife>
[WEIGHT:4.0]
[PRICE:50] 
[BLUNT_ATTACK:6]   
[EDGE_ATTACK:4]   
[POINT_ATTACK:-]   
[1H_PENALTY:0]
[AD_CLASS:2/1]
[NAME:Better Stone-axe]
[TILEGFX:Stone-axe]

//PHIL'S STONE AGE
.Better Stone-axe. "Handaxe" [effort:3] [phys:arms,hands] *COMMON*    /3h/         %-35%
{Stone-axe-head}   [remove]   
{Slender trunk} [remove] 
{Rope} =3= [remove] 
{Fire} '+for piercing a hole for the head into the handle'
{Knife} <Small knife>
[WEIGHT:4.0]
[PRICE:50] 
[BLUNT_ATTACK:6]   
[EDGE_ATTACK:4]   
[POINT_ATTACK:-]   
[1H_PENALTY:0]
[AD_CLASS:2/1]
[NAME:Better Stone-axe]
[TILEGFX:wp-stnaxe]


i mean, its working, but im just curious
« Last Edit: December 18, 2020, 03:58:28 PM by Dr.Hossa »

Privateer

« Reply #21 on: December 18, 2020, 07:30:47 PM »
Quote
How does the Engine recognize {[TILES:xxx]}? For example
This tag is used as an ingredient to a recipe and states that the player needs to be standing on a specific type of tile and uses game defined tile names like "Shelter" or "Surface of the earth" (the official wiki does have a list of names, or you can just F3 the tile to see the name)
{[NEARBY_TILE:xxx}] uses the same method except the named tile needs to be on one of the adjacent tiles.

Quote
While with the {[TILEGFX:xxx]}-tag, it's just the other way around.
This tag is used at the end of a recipe and is an item definition, as opposed to an ingredient.
It defines what sprite the product will use when set on the floor. The name of the graphic with no extension is how it's used.


To help is it's own reward.
Mods:
https://www.unrealworld.fi/forums/index.php?action=profile;area=showposts;sa=attach;u=10 Player Quests, Arrow quiver, Bee hives honey & mead, Massive menus, Fish Farmer, Combat trainer, Player made markers, Weaving, Wood stacks, Chicken coop Fish cuts, string&bone.

Dr.Hossa

« Reply #22 on: December 19, 2020, 01:08:38 AM »
This tag is used as an ingredient to a recipe and states that the player needs to be standing on a specific type of tile and uses game defined tile names like "Shelter" or "Surface of the earth"(...)

Ah, so the engine uses the actual tile names, as i can see them ingame by f3... ...Intredasting... thanks!

This tag is used at the end of a recipe and is an item definition, as opposed to an ingredient.
It defines what sprite the product will use when set on the floor. The name of the graphic with no extension is how it's used.

yeah, kinda obvious. dumb minded, i am

GrimmSpector

« Reply #23 on: May 22, 2021, 08:21:29 AM »
I'm trying to add in a Quern flour recipe for lake reed roots, into the BAC mod. Here's how they've defined the working recipe for Barley Flour:

Code: [Select]
.Grind Barley-Flour. "barley-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{Barley grains} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:barley-flour]

It works just fine. However, when I try to modify it to do lake-reed as below, the recipe simply doesn't show up in the Utility menu with the other recipes in this file. In the BAC mod it's part of the diy_BAC_Utility.txt file.

Code: [Select]
.Grind Lake Reed-Flour. "lake reed-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{lake reed root} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:lake reed-flour]

I thought it might be a limit on the number of menu items, it's around 24, but even if I move the recipe above the other two grinding recipes in the file my recipe doesn't show up and the barley and rye flour recipes do. Anyone know what I'm doing wrong?? Thanks!

Privateer

« Reply #24 on: May 22, 2021, 12:15:04 PM »
I'm trying to add in a Quern flour recipe for lake reed roots, into the BAC mod. Here's how they've defined the working recipe for Barley Flour:

Code: [Select]
.Grind Barley-Flour. "barley-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{Barley grains} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:barley-flour]

It works just fine. However, when I try to modify it to do lake-reed as below, the recipe simply doesn't show up in the Utility menu with the other recipes in this file. In the BAC mod it's part of the diy_BAC_Utility.txt file.

Code: [Select]
.Grind Lake Reed-Flour. "lake reed-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{lake reed root} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:lake reed-flour]

I thought it might be a limit on the number of menu items, it's around 24, but even if I move the recipe above the other two grinding recipes in the file my recipe doesn't show up and the barley and rye flour recipes do. Anyone know what I'm doing wrong?? Thanks!

There are two (2) types of base flour(s) which can be produced in the game: rye-flour and barley-flour

 You could make something called "lake reed-flour" but it will still need to be either (rye-flour or barley-flour) in the background.

So something like this should work as well as expected:
Code: [Select]
.Grind Lake Reed-Flour. "rye-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{lake reed root} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:lake reed-flour]

In order to add your own flour you could probably do it via the flora files, but that's a more involved discussion.

Hope that helps you out
To help is it's own reward.
Mods:
https://www.unrealworld.fi/forums/index.php?action=profile;area=showposts;sa=attach;u=10 Player Quests, Arrow quiver, Bee hives honey & mead, Massive menus, Fish Farmer, Combat trainer, Player made markers, Weaving, Wood stacks, Chicken coop Fish cuts, string&bone.

JP_Finn

  • Honorary Lifetime Supporter
  • Member
  • *
  • Posts: 776
  • Total likes: 386
  • Thawed Finn in SoCal
    • View Profile
« Reply #25 on: May 22, 2021, 04:20:34 PM »
Lake reed flour exist in vanilla, as does bogbean root flour as well.
I need to check if their base items are barley, rye or their own flours.

GrimmSpector

« Reply #26 on: May 23, 2021, 05:19:13 AM »
I'm trying to add in a Quern flour recipe for lake reed roots, into the BAC mod. Here's how they've defined the working recipe for Barley Flour:

Code: [Select]
.Grind Barley-Flour. "barley-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{Barley grains} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:barley-flour]

This puzzles me because in the base game I can grind lake reed roots into flour with the Agriculture action Grind Flour, and I get an item called Lake reed-flour. What item is it in the base game??
It works just fine. However, when I try to modify it to do lake-reed as below, the recipe simply doesn't show up in the Utility menu with the other recipes in this file. In the BAC mod it's part of the diy_BAC_Utility.txt file.

Code: [Select]
.Grind Lake Reed-Flour. "lake reed-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{lake reed root} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:lake reed-flour]

I thought it might be a limit on the number of menu items, it's around 24, but even if I move the recipe above the other two grinding recipes in the file my recipe doesn't show up and the barley and rye flour recipes do. Anyone know what I'm doing wrong?? Thanks!

There are two (2) types of base flour(s) which can be produced in the game: rye-flour and barley-flour

 You could make something called "lake reed-flour" but it will still need to be either (rye-flour or barley-flour) in the background.

So something like this should work as well as expected:
Code: [Select]
.Grind Lake Reed-Flour. "rye-flour" [effort:1] [noquality] [phys:arms,one-armed] [patch:10] *COMMON*  /20/
{lake reed root} #1# [remove] [patchwise]
{Quern-Stone} [ground]
[NAME:lake reed-flour]

In order to add your own flour you could probably do it via the flora files, but that's a more involved discussion.

Hope that helps you out

GrimmSpector

« Reply #27 on: May 23, 2021, 05:21:20 AM »
Lake reed flour exist in vanilla, as does bogbean root flour as well.
I need to check if their base items are barley, rye or their own flours.

How can I find out? Is it possible from the game files? I've searched up flour in all of them, but no dice. I'd like to make the recipe appropriate to the vanilla recipes if possible. Whatever it gives, it seems to be at a 3:1 proportion, but I assume the nutritional values between Rye and Barely flours vary in the game files, otherwise why have them both right?

Privateer

« Reply #28 on: May 23, 2021, 06:37:07 AM »
Lake reed flour exist in vanilla, as does bogbean root flour as well.
I need to check if their base items are barley, rye or their own flours.

How can I find out? Is it possible from the game files? I've searched up flour in all of them, but no dice. I'd like to make the recipe appropriate to the vanilla recipes if possible. Whatever it gives, it seems to be at a 3:1 proportion, but I assume the nutritional values between Rye and Barely flours vary in the game files, otherwise why have them both right?

For all the "Base" or vanilla items that exist in the game (That can be made from a craft etc) You can search the file "create_objects.txt" after running the game at least once.

Note: Certain mods may add "names" in to this file even though they are not true base items.
To help is it's own reward.
Mods:
https://www.unrealworld.fi/forums/index.php?action=profile;area=showposts;sa=attach;u=10 Player Quests, Arrow quiver, Bee hives honey & mead, Massive menus, Fish Farmer, Combat trainer, Player made markers, Weaving, Wood stacks, Chicken coop Fish cuts, string&bone.

GrimmSpector

« Reply #29 on: May 23, 2021, 10:43:29 PM »
Lake reed flour exist in vanilla, as does bogbean root flour as well.
I need to check if their base items are barley, rye or their own flours.

How can I find out? Is it possible from the game files? I've searched up flour in all of them, but no dice. I'd like to make the recipe appropriate to the vanilla recipes if possible. Whatever it gives, it seems to be at a 3:1 proportion, but I assume the nutritional values between Rye and Barely flours vary in the game files, otherwise why have them both right?

The item for lake reed root flour isn't in there, the other two are, so I'm quite puzzled.

For all the "Base" or vanilla items that exist in the game (That can be made from a craft etc) You can search the file "create_objects.txt" after running the game at least once.

Note: Certain mods may add "names" in to this file even though they are not true base items.

 

anything