Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need lessons in adventure mode modding.  (Read 835 times)

Shudokai

  • Bay Watcher
    • View Profile
Need lessons in adventure mode modding.
« on: July 30, 2014, 01:31:57 pm »

Right now I am trying to get into modding and I start that by adding some crafting reactions and later new weapons and armor and at last new creatures and materials.

Spoiler (click to show/hide)
!!!Thats done!!! Thanks to Nathail for helping me out.

Now that I know how to make reaction to alter and upgrade the material I want to add some materials.

I need to know how most of the material tokens work, wiki explains kinda WHAT they do but not what the max and min values are or whether high or low values are good.


This spoiler is kinda big and i added some questions and some stuff i know about each line behind it, so please read thru it and help me to understand what I dont get :D

Spoiler (click to show/hide)
« Last Edit: July 31, 2014, 10:27:12 pm by Shudokai »
Logged

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: Need lessons in adventure mode modding.
« Reply #1 on: July 31, 2014, 01:20:16 am »

First, you need to add a material reaction product token to standard bone. Say [MATERIAL_REACTION_PRODUCT:HARDEN:LOCAL_CREATURE_MAT:HARDBONE]. Then, go into the standard materials body detail plan (the first entry in b_detail_plan_default) and add [ADD_MATERIAL:HARDBONE:HARDBONE_TEMPLATE] to the list. The first bit lets the game know that reactions with the appropriate token using bone will produce hard bone. The second adds hard bone to the list of materials that creatures using standard materials (skin, bone, muscle, etc) can produce hard bone.

Now you need to make the reaction. For ease of design, let's say you want to just harden the bone spear, since hardening the bones themselves would have difficulties producing the appropriate number of hard bones. Anyway, the reaction would use a normal bone spear as a reagent and produce a hard bone one. So the reagent line would be [REAGENT:bone spear:WEAPON:ITEM_WEAPON_SPEAR:NONE:NONE][ANY_BONE_MATERIAL] and the product line would be [PRODUCT:100:1:WEAPON:ITEM_WEAPON_SPEAR:GET_MATERIAL_FROM_REAGENT:bone spear:HARDEN]. The product line tells the game there is a 100% chance to produce one spear with a material based on the HARDEN product of the material of the original spear.

And that should do it. Keep in mind that reaction makes a completely new spear out of the original bone one, so any decorations will be removed and a new quality modifier will be applied. I'm not actually sure that the game will actually recognize any of the things involving the HARDEN token, so you may wind up having to use TAN_MAT instead, which means there'll be hard bone cloaks and stuff in the arena (I think), but won't really effect genned worlds.
Logged

Shudokai

  • Bay Watcher
    • View Profile
Re: Need lessons in adventure mode modding.
« Reply #2 on: July 31, 2014, 07:28:34 am »

Great, thank you for the detailed explaination, I will try that right now and tell you what works and what not :D

ADD: Okay, I tinkered with the reactions and materials a bit now.

First I tried to use BAR and GLOB as a Product but that ended up very weird and I had like 100+ Items in my inventory afterwards ... happened to me when I first tried to add metalmaking to adventure mode, I guess thats something with MATERIAL_SIZE or something, not sure.

Anyways, after that failed I now added a new ITEM_TOOL just named "material" for now.

my reaction now takes one "stack" of bones of the butchered enemy and "prepares" it to one "bone material" this can be used to craft or to process further.

second reaction takes one "bone material" and HARDENS it to make "hardened bone material"

last reaction takes 2 "hardened bone material" and makes 1 "composite bone material"

I will attach my reaction file so far, nothing interesting with the new ITEM_TOOL I made and the materials are just the same as common bone for now, only new names.

Spoiler (click to show/hide)





please check back on the first post whenever something is solved ;3
« Last Edit: July 31, 2014, 10:25:30 pm by Shudokai »
Logged

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: Need lessons in adventure mode modding.
« Reply #3 on: July 31, 2014, 10:30:12 pm »

Well, it seems to be working as expected. You could possibly refer to the ITEM_TOOL form as "cleaned bone pile" or something, and then have "hardened bone pile" and "composite bone pile" for the next two tiers.
Logged

Shudokai

  • Bay Watcher
    • View Profile
Re: Need lessons in adventure mode modding.
« Reply #4 on: July 31, 2014, 11:49:38 pm »

Good point there, the name was a bit weird :D but I think I fixed it pretty good now.

We'll see how I manage that with other stuff like Leather, Scales, Plates, Horns and stuff.



Now I have something else and it troubles me a lot.

I read through the forum and found something interesting about material_definition tokens and as far as i understood only impact and shear values matter for armored / armed combat, the other values are for wrestling, scratching and biting.
So I edited the values for the hardened and composite bones, hardened bone values are x10 and composite x2 compared to the lower tier.

Considering that Armors made of prepared bone should EASILY be penetrated by hardened bone but oddly enough that wont happen ..... slashing gets deflected 100% of the time, stabbing mostly penetrates and bashing feels like 50/50 ..... now I dont know if thats caused by the weapon attributes or by the material :/



Here is what I changed ... I didn't touch torsion, bending etc. because that doesn't seem to affect armor and weapons a lot.
Spoiler (click to show/hide)

Maybe I should change STRAIN_AT_YIELD values :/
« Last Edit: July 31, 2014, 11:53:05 pm by Shudokai »
Logged

Nathail

  • Bay Watcher
  • Dabbling Modder
    • View Profile
Re: Need lessons in adventure mode modding.
« Reply #5 on: August 01, 2014, 06:51:41 pm »

Oh yeah, STRAIN_AT_YIELD is really important. The wiki has a good explanation about how material values effect weapons: http://dwarffortresswiki.org/index.php/DF2014:Weapon#Material
Logged

Shudokai

  • Bay Watcher
    • View Profile
Re: Need lessons in adventure mode modding.
« Reply #6 on: August 01, 2014, 07:21:03 pm »

Oh wow, thank you again Nathail :D

I've never seen this wiki article before :D
Logged