Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: weapons, armor, and new metals modding  (Read 3272 times)

Goldenrod47

  • Bay Watcher
    • View Profile
weapons, armor, and new metals modding
« on: April 09, 2021, 11:05:06 am »

so, I'm trying to add in some new weapons and armor as well as new metal to make said weapons and armor out of, to a large mod I'm working on and i cant seem to figure out how to do it, i cant figure out what the problem is so... really any advise would be appreciated

also, this is my first time posting here so... sorry if I'm doing this wrong
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #1 on: April 09, 2021, 11:36:27 am »

If you post your raws, people might be able to pinpoint if/where something is wrong.

Without that, I'd suggest you to look up on

1) You gave your civ access to those weapons/armors/metal or the necessary reactions
2) You defined your metal as weapon/armor grade (for vanilla reactions)
3) You defined your tokens or reaction classes properly (for custom reactions)
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #2 on: April 10, 2021, 07:36:28 am »

i could do that, could i ask how though? there seems to be a specific thing people here do when posting raws and i don't know how to do that
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #3 on: April 10, 2021, 01:18:08 pm »

Some people use the "insert code" functionality (the text bubble in the editor)  but it's not really necessary. I'm not sure why to do it that way either. You can just copy and paste your raws inside a spoiler (nuclear sign in the editor) so that the post doesn't take too much space visualy.
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #4 on: April 10, 2021, 03:41:57 pm »

alrighty, so here's the raws for the new metal ore, the other one is just cobaltite so it should spawn , i haven't checked to see if this one actually spawns or not because i don't want to gen multiple fortresses trying to check

Spoiler (click to show/hide)

this is supposed to be an ore you smelt together with steel to make a better, fireproof version of steel, although i copied the ore from iron i believe

here's the raws for the metal bars, also i apologize for the spaced out nature of these, its easier for me to see what I'm doing when everything's separated like this

Spoiler (click to show/hide)

the reaction to create the steel, i don't know if this is actually nessassary

Spoiler (click to show/hide)

one of the weapons and one of the armors, as i feel like posting all of them would just be inconvenient for everyone, i havnt created the reactions to make these yet but they don't show up in the object testing arena, that could very well be the problem now that i actually think about it

Spoiler (click to show/hide)

Spoiler (click to show/hide)

now there is the chance I'm completely missing something in this process or doing this completely wrong but i couldn't find a tutorial or instructions for this anywhere so I'm just going off what i can tell needs to be done by looking at other mods. looking at the error logs when i boot up the testing arena its saying that it doesn't recognize the entity weapon tokens, although I'm not entirely sure what that means
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #5 on: April 11, 2021, 09:59:26 am »

First of all, I assumed that you have read the modding guide in the wiki, if not then you can find it here.

Now before I say anything specific based on your raws, I'd like to say that if you just want to make vanilla type weapons and armor out of a new material (in this case your dragonblood steel) then it is enough to only define the new material as suitable for such use and give your civ access to it. After that you should be able to forge them just like you would with any vanilla metal. This also means that if you don't want vanilla items made from it then you shouldn't make the material suitable for these uses. (Suitability is defined through the [ITEMS_X] tokens).

On to your raws (disclaimer: based on what I could spot):

The error in the log is probably due to misnaming some reference in the raws, for example your civ having a [WEAPON:ITEM_WEAPON_DRAGONBLOOD_STEEL_BATTLE_AXE] reference instead of a [WEAPON:ITEM_WEAPON_DRAGONBLOOD_STEEL_AXE_BATTLE] which is how the item is defined in the raws.

About the smelting reaction:

Spoiler (click to show/hide)

About the custom items:

Spoiler (click to show/hide)

Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #6 on: April 11, 2021, 03:00:14 pm »

yes, i am only using vanilla weapons and armors right now. i plan on adding new stuff in the future but im trying to work on one thing at a time.
as for misspellings, i dont see any, and my civs should have access to it, all that is in the entity files correct?

and either i didn't notice it earlier, or it just now showed up in my errorlog that its also not recognizing my inorganic tokens for any of the new metals or bars but i cant seem to figure out what the problem is

i have read the modding guide on the wiki but if im honest i don't entirely understand it, not sure why, it happens with textbooks too. if you need any more of the raws just tell me
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #7 on: April 11, 2021, 04:26:25 pm »

I did some in game testing.

The "dragonblood steel ore" itself is working, as in it can be spawned through DFHack I'm not sure if it would spawn normaly as a vein in a stone layer.

The "dragonblood steel" metal is also working, as in you can craft weapons with it. I didn't test other types of items but it should be just fine.

*edit: I didn't test your custom weapons, I just crafted some of the vanilla ones*

The custom reaction has some mistakes. I managed to make it work by modifying it as seen in the spoiler:

Spoiler (click to show/hide)

Some additional notes:

1) By giving the ore the [METAL_ORE:DRAGONBLOOD_STEEL:70] token, the game adds automatically a "smelt dragonblood steel ore Ore" reaction. This will take one ore boulder and a bar of fuel and produce up to 4 dragonblood steel bars. I assume that you want to make it to also need regular steel so I think you should just remove said token and add the custom reaction to your civ. To answer your question, yes that's the permitted reaction stuff in the entity's file.

2) Pay some more attention to your spelling. Most of the errors in the reaction had to do with how the game needs you to define some things but there was also a case of misnaming (DRAGONSBLOOD_STEEL instead of DRAGONBLOOD_STEEL). It's a minor mistake but it's also one of the less obvious ones and can result in a lot of lost time.
« Last Edit: April 11, 2021, 04:28:49 pm by Ulfarr »
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #8 on: April 11, 2021, 07:24:09 pm »

yes, i did realize when looking over it earlier that i occasionally misnamed it. i think what happened was i started out with dragonSblood steel, then i proceeded to forget the s in the future

youre saying i need to remove the [METAL_ORE:DRAGONBLOOD_STEEL:70] token correct? what would i need for a custom reaction? is that what i already have? i don't actually have any custom weapons or armor, like i said, ill add those later after i get my new inorganics sorted out, i just thought i needed the item raws specifically for things crafted with my dragonblood steel
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #9 on: April 12, 2021, 12:20:20 am »

A custom reaction is one that you made yourself, just like the "create dragonblood steel" one.

The [METAL_ORE:DRAGONBLOOD_STEEL:70] token, tells the game to create another reaction for the dragonblood steel bars which is cheaper and more efficient than your custom one. You could leave it like it is, if you don't mind seeing it in game, but another player (should you release the mod) would be inclined to use the autogenerated one.

Similarily the [ITEMS_WEAPONS] tag tells the game to create reactions for any native weapons, so you don't have to make custom reactions for them. This system works for custom weapons too as long as they are added as native designs to your civ.

A native design is one that has been added to the civ entity raws with a [WEAPON:ITEM_WEAPON_x] token and represent the weapons that your civ knows how to make. The term "native" comes from the military screen where weapons that your civ doesn't know how to make are marked as foreign. To give an example, a battle axe is a native weapon for dwarves, but a two handed sword isn't.

In the case of your dragonblood steel axe, you can add the ability to craft them in two ways. You can either add it through a custom reaction, which allows you to limit the resources used and the outcome of the reaction (use dragonblood steel to make a dragonblood steel axe) or you could go through the "native" system. Going through the native system will result in oddities like a "copper dragonblood steel axe".

That would happen because the game doesn't assign any material properties through the name of the item. For it, "dragonblood steel axe" is just how you call the whole "family" of weapons with the weapon properties as defined in the weapons raws and thus they can be crafted from any weapons grade metal.

PS I might write too much about it, but i'm trying to explain the logic behind each decision/option. The thing is that, DF usualy gives you more than one ways to accomplish the same thing, so it's up to you how you go about it.

Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #10 on: April 12, 2021, 08:44:08 am »

no, actually its really good that you go in depth about it, it helps me understand it better

ive actually got things working now by fixing a couple of my misspellings and changing a couple of the tokens. i may create some custom reactions to create the weapons and armor since, as you said, using the native system will cause oddities

would you happen to know what the reaction raws for creating weapons and armor look like? i cant seem to find them anywhere. though i may just be missing them, im really good at that
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #11 on: April 12, 2021, 10:59:28 am »

The reaction raws for weapons/armors are basicaly the same as for anything else. It's only a matter of defining the reagents/products really. So it should look something like that:

Spoiler (click to show/hide)
« Last Edit: April 12, 2021, 11:08:33 am by Ulfarr »
Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #12 on: April 12, 2021, 12:00:17 pm »

alright, cool, working on that now.

 now ill need to add my new reactions to my entity raws correct? will i also need to add custom raws for the items too? i get the impression that i will.

i think im getting the hang of this, i just want to make sure im doing everything correctly so i can do it right in the future
Logged

Ulfarr

  • Bay Watcher
  • Going on a pilgrimage to Mars
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #13 on: April 12, 2021, 12:52:46 pm »


 now ill need to add my new reactions to my entity raws correct?

yes

will i also need to add custom raws for the items too? i get the impression that i will.

And yes. Without those then you haven't really added anything in the game and the reaction won't know what to create (I think in such cases it defaults to producing some magma)

Logged
Bring Kobold Kamp to LNP! graphics compatibility fix.

So the conclusion I'm getting here is that we use QSPs because dwarves can't pilot submarines.

Goldenrod47

  • Bay Watcher
    • View Profile
Re: weapons, armor, and new metals modding
« Reply #14 on: April 12, 2021, 03:24:03 pm »

alright! everything seems to be working perfectly, i think i know what im doing. thank you for your help!
Logged
Pages: [1] 2