Bay 12 Games Forum

Please login or register.

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

Author Topic: 10 advanced modding questions.  (Read 3186 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
10 advanced modding questions.
« on: February 04, 2012, 09:28:35 pm »

Ok, here a long list of things I want to fix/change but currently lack the knowledge. I would appreciate the help, but can understand if it is a bit much ;) I post this in a seperate thread, because I dont want to clog up the normal thread, and because the answers might require several posts as well. Here you go:

1. Custom-reaction made ammo seems not to be used. (ammo that is not listed as permitted_ammo in the entity file) For example I want bullets only be made in the Ammunition mint. But if I "permit" them, I can also make wooden bullets in the craftsmen and any metal bullets in the forge. How to solve this ? I either want custom ammo to be use/equip/stockpile-able, OR make permitted ammo not appear in the forge/crafter.
Semi-Solved: Make the ammo out of a custom plant mat that shares the same material values then the actual inorganic material you simulate. Would work good for my bullets, works bad for my gem ammo, and might work not at all for the syndrome bearing ammo.

(1.5): All permitted ammo types are activated by default in the ammunition screen of the military section. This causes crossbowdwarves to fill their quivers with unuseable ammo. An example: [NAME:throwing spear:throwing spears][CLASS:SPEAR] is used, but they still put them into ranged squads, that wield crossbows. The dwarf does not pick up new bolts, because he believes that he has ammo. In reality he has spears that he cant fire with his weapon.
Kind-of-clutchy-way-solved: I will add a macro that manually removes all the additional ammo types from the default archer squad. If a better solution exists, please go ahead.

2. I have new minerals that should only be made into metals in a custom reaction. The mineral drops stones instead of ore (because ore would automatically added to the smelter, I want to avoid that) The stones are used in the custom reaction and work fine. The problem: The stones are also used for furniture/blocks/and so on. How do I make them economic (red in the stone stocks screen) by default ?
Solved: Raising the materail value to 3, or making it sharp.

3. I have named races with fitting language files. But two problems: The individual creatures have no name (they are called "orc" the orc, instead of "name" the orc) If they kill some dwarves and are "named enemies" the name is in one language only. Usually The name is in the language they use, and in english. (like artifact names, you know what I mean) How do I make them be named and use proper language ?
Solved: Add Can_Speak and babysnatcher or thief tags. Not a perfect solution, but it might do.

4. Itemcorpse Statues (like the bronze colossus) are stockpiled under corpses, and cant be built as statues.

5. Some names are funny. I would like to use the same system for creatures that is possible for items: [NAME:daggers:daggers][ADJECTIVE:dual] This way you have a "dual steel daggers" It reads much nicer then "steel dual daggers" I want to use it for creatures. "Stray war advanced golem" is just stupid. ;) It would also be nice to remove the "Stray" or the names from pets. Is this possible ? (dont expect it to be)
Solved: Impossible

6. Any way to restrict naturally occuring stones/minerals/metals/gems from trading ? (guess not, but asking cant hurt)
Solved: Impossible (possible for Metals with the DEEP_SPECIAL tag)

7. Elves wear weak wooden equipment. I want them to wear only things of a certain type of wood. Steelbark and Ironbark. I can add these easily enough with a custom reaction only for elves, but how do I take aways the other wooden types ? (or make disable "real" wooden items, and add these two new "metal-wooden" items to them?)
Solved: I will add a custom inorganic mat, a custom reaction and remove WOOD_ARMOR WOOD_WEAPON from their entity file.

8.Caverns are barren, no underground plants. I dont know where this problem comes from, I have it sometimes, with normal worldgen and adv. worldgen. Anyone know what causes it ? (no fancy wood, fancy plants, no underground farming, no normal alcohol, ugly caverns... quite an issue) (this happened last time in a DRY cavern, no underground water.)
Hints: Might have to do with the water level in caverns ?

9. Does anyone know the material properties of [AMBER] and [CORAL] ? Both are hardcoded materials that I would like to add.
Solved:
Spoiler (click to show/hide)
9.5 What the hell are: [ITEMS_DELICATE] ? Crafts?

10. Thanks for reading all this. :)
« Last Edit: February 04, 2012, 11:10:40 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: 10 advanced modding questions.
« Reply #1 on: February 04, 2012, 09:59:51 pm »

1. make a custom reaction to produce bullets from iron/copper/lead and remove AMMO:BULLETS from the entity.

1.5 make sure you delete those other ammo types in the "f" ammo menu in the military screen (NOTE you can't have mixed ranged squads, I had that issue before. you have to tell all ranged dwarves to drop weapons and then wait untill all are unarmed then tell them to grab all the same weapon and then assign proper ammo use to squad)

2. Make the stone sharp so it acts like obsidian.

3. CAN_SPEAK but that will stop their "KILL EVERYONE" attidtue you can give them [UTTERANCES] that kobolds have. they will still be aggressive to all and have gibberish names.

4. No Idea sorry. must be a DF bug

5. Creature names no I don't thing so. Also for the dual daggers be careful. I had got the "WTF AM I MAKING" bug in the forges because of using the [ADJECTIVE:dual] because that dual doesn't show up in the forge menu so if the race can make "large daggers" and "dual daggers" they will both show up as "daggers" in the forge YOU HAVE BEEN WARNED! lol

6. I'm not 100% sure but I'd like to know as well

7. might have to go for a metal-wood idea, and a custom reaction that makes that metal wood (warning they will trade these Metal-Wood Bars)

8. I had that on a few embarks. usally up north.

9. I don't sorry

EDIT:
Noticed in your thread that throwing ammo and weapon are hard to tell apart. just add a "(t)" to the thrown weapon/thrower weapon
« Last Edit: February 04, 2012, 10:06:50 pm by Hugo_The_Dwarf »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: 10 advanced modding questions.
« Reply #2 on: February 04, 2012, 10:09:50 pm »

Hugo, your #1 won't work. I'm pretty sure foreign ammo as a whole doesn't work. In fact, Meph said that his problem was specifically that reaction ammo isn't working, and yet your suggestion was to use a custom reaction.

2. Change their value to that of Obsidian's, 3.

3. That sounds like a typo somewhere or they can't speak.

4. That's pretty freaking weird >_>

5. Nope.

6. Nope.

7. Don't allow them to wear wood at all and give them the reactions to make the steelbark and ironbark, which should be inorganics instead.

8. You mean covered in mud? That's just a normal part of the game.

9.

Amber:

Code: [Select]
[MATERIAL_VALUE:2]
[SPEC_HEAT:1000]
[HEATDAM_POINT:11000]
[SOLID_DENSITY:1200]
[ITEMS_DELICATE]

Coral:

Code: [Select]
[MATERIAL_VALUE:2]
[SPEC_HEAT:1000]
[HEATDAM_POINT:10600]
[SOLID_DENSITY:1200]
[ITEMS_DELICATE]

Upright Path

  • Bay Watcher
    • View Profile
Re: 10 advanced modding questions.
« Reply #3 on: February 04, 2012, 10:12:44 pm »

2.) Listing a stone as a reagent in a reaction also will automatically select it on the Economic Stone list.

This can be done by using a 'specific' stone name for it, or by attaching a REACTION_CLASS to that stone, then using the REACTION_CLASS in a reaction. For reference, look at the reaction_other.txt file. It has [REACTION:MAKE_PLASTER_POWDER], and a GYPSUM REACTION_CLASS. Then look at inorganic_minerals.txt there are several stones with this reaction class. All of them are marked off on the economic screen.

8.) That's the only one of these I can add to. As for the 'no interesting things in caverns', do they extend off the map and do they contain water? I remember that in earlier game iterations that prior to being able to make tower cap farms you had to have access to an underground water supply. Perhaps something of that still exists in the code? Really, I don't know though, because either I find an interesting cavern or my dwarves are all dead before they dig that deep. xD
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: 10 advanced modding questions.
« Reply #4 on: February 04, 2012, 10:15:55 pm »

Hugo, your #1 won't work. I'm pretty sure foreign ammo as a whole doesn't work. In fact, Meph said that his problem was specifically that reaction ammo isn't working, and yet your suggestion was to use a custom reaction.

I was going to say something about this. Then I re-read his question 1. which makes me want to do a quick fort test and see if my bolter dwarves can use shells (areana mode works but I never did a field test)

So all in all I've never fully tested this. I shall return

EDIT:
My test run my dwarves stockpiled the foreign bolter and shells, and the bolter user picked up his gun, assigned his squad 100 rounds. He picked those up. And he is using both foreign weapons... What sorcery is this?
« Last Edit: February 04, 2012, 10:24:07 pm by Hugo_The_Dwarf »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: 10 advanced modding questions.
« Reply #5 on: February 04, 2012, 10:17:26 pm »

THIS IS ABOUT HUGOS ANSWERS

1. This will make them unstockable/unuseable. I have ammo like that, it does not appear in the military-ammunition screen and is never used.

1.5. I will write a macro for that then, if this is the only solution. Still, works in a way...

2. Thanks, problem solved. :)

3. Can_speak makes them friendly, utterances seems not to work. I want to avoid babysnatcher/thief tags, since they dont fit the character of the races. Any other idea ?

4. ---

5. That explains a lot. I have several weapons twice in the forge, and was wondering about that. This is where my bearded and double-sided axes are gone... How did you solve it ? Not using adjectives anymore ? (or only on unique-name weapons ?)

6. ---

7. Will do that. Guess it is just removing [WOOD_WEAPONS][WOOD_ARMOR] then and adding some reactions for them. I would prefer them to be made of actual wood though, since the "fake-metal-wood" can be smelted and would pop up as a material option in my smelters/forges. (at least I think so)

8. I just had it in a normal map, temperate climate. Snow in winter, no freezing water... Question still open.

9. ---


@hugo: The special ammo and the bullets for the guns work in arena mode, because you manually put them into the inventory of the dwarf. Mine work, yours work, but I just make an educated guess, that you bolter ammo wont work in Fortress mode. If yes, please report ;)

EDIT: Read your report, could you post the raws for the weapon, ammo and reaction that procuces the two ?
« Last Edit: February 04, 2012, 10:34:35 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: 10 advanced modding questions.
« Reply #6 on: February 04, 2012, 10:29:38 pm »

THIS IS ABOUT PUTMANS ANSWERS:

7. Wont the new inorganic mat not show up in my smelter/forge ? As in: Weapons => Steelbark => make weapon, and so forth ? (maybe not if they have no mineral that produces an ore. Actually, I am quite certain that they wont. I will try it.)

8. With 0 tunnel tubes, tower caps, goblin caps, nether caps, no plants what-so-ever ?  Muddy I dont mind, but empty ?

Thanks for the rest. :)

@upright path: Thanks to you as well :) Maybe it is the water.
« Last Edit: February 04, 2012, 10:32:25 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: 10 advanced modding questions.
« Reply #7 on: February 04, 2012, 10:36:08 pm »

THIS IS ABOUT HUGOS ANSWERS

1. This will make them unstockable/unuseable. I have ammo like that, it does not appear in the military-ammunition screen and is never used.

3. Can_speak makes them friendly, utterances seems not to work. I want to avoid babysnatcher/thief tags, since they dont fit the character of the races. Any other idea ?

5. That explains a lot. I have several weapons twice in the forge, and was wondering about that. This is where my bearded and double-sided axes are gone... How did you solve it ? Not using adjectives anymore ? (or only on unique-name weapons ?)

1. Then how is it working in my Mod? Shells and Bolters are not permitted weapons/ammo they are both made through custom reactions. They get stockpiled correctly. show up in the military screen and are used correctly. Every thing works just fine

Spoiler (click to show/hide)
these reactions are chopped down for quick testing purposes

3. Hmm... [CAN_SPEAK] will be the only way to get them named. But you would need those [BABY_SNATCHER]/[ITEM_THEIF] tags. You could make their ethics the complete opposite of dwarves/humans/ and elves so they piss everyone off and wage war. But then they will end wars due to peace treaties cause they can speak.

5. I just bit the bullet and jammed my "dual" into the weapons name. and throwing weapons I dropped a (t) at the end of the name so they don't get confused with normal weapons.

Also I'm reading you list in your main thread

DAMN THAT LIST IS LONG, and most of them I can answer :( but I have no time tonight :(
« Last Edit: February 04, 2012, 10:41:29 pm by Hugo_The_Dwarf »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: 10 advanced modding questions.
« Reply #8 on: February 04, 2012, 10:42:08 pm »

THIS IS ABOUT PUTMANS ANSWERS:

7. Wont the new inorganic mat not show up in my smelter/forge ? As in: Weapons => Steelbark => make weapon, and so forth ? (maybe not if they have no mineral that produces an ore. Actually, I am quite certain that they wont. I will try it.)

8. With 0 tunnel tubes, tower caps, goblin caps, nether caps, no plants what-so-ever ?  Muddy I dont mind, but empty ?

Thanks for the rest. :)

@upright path: Thanks to you as well :) Maybe it is the water.

7. Yes, but you must compromise often in modding.

8. Yep. Completely barren. It happens pretty often. I'm pretty sure it has to do with the water levels in the cavern.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: 10 advanced modding questions.
« Reply #9 on: February 04, 2012, 10:45:07 pm »

@hugo:
Thanks for the help.

I also read that entities that you are at "war" with, will attack you from the very beginning. They ignore the trigger tags. Not sure if it is true though. BUT I read something else that is interesting. If you make 2 enemy civs, with different ethics, they might wage war against each other. This means that the individual creatures at a siege will attack the other race. If orcs and undeads attack at the same time, they fight each other as well. Will definetly add this :)

But: DAMN, I just cant imagine a Frost Giant stealing a mug, giggling manicly and running for the hills... Thieves and Babysnatchers also replace Sieges, no ? There would be a 50/50 chance, for a snatcher or a siege, if I understand it correctly.

I will also do more testing with my guns then.


____________________________________________________________________________________

@putman: Thanks. Seems to be the water then. I was wondering quite a bit about this, since the home civ has no plants as well, and they are in a different world tile...
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: 10 advanced modding questions.
« Reply #10 on: February 04, 2012, 10:50:34 pm »

It's not true, so far as I can tell. I have trigger tags on my sburb player civ, and they only show up at the correct times, even though they only besiege you if they are at war with you.

Thieves and snatchers don't replace sieges, but ambushes, maybe.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: 10 advanced modding questions.
« Reply #11 on: February 04, 2012, 10:51:51 pm »

In regard to question 6:

If you add the tag [DEEP_SPECIAL] to a material, it will never show up in trade caravans.  [DEEP_SPECIAL] stones will show up in the underworld, so you don't want to add it for those, but [DEEP_SPECIAL] metals never occur naturally and will also never be available from caravans.  So if you want a metal to only ever be available through custom reactions, add [DEEP_SPECIAL] to it.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: 10 advanced modding questions.
« Reply #12 on: February 04, 2012, 10:59:21 pm »

@putman: Ok, I just read it somewhere. Good to know.

@sphalerit: Awesome, that helps a lot.

@hugo: I know all the solutions for the problems/issues I mentioned in the big list in my mod-thread. Dont waste time solving all of them. These here are the ones I need help with ;)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: 10 advanced modding questions.
« Reply #13 on: February 04, 2012, 11:05:25 pm »

Apart from hugos mystery solution (sure they are no permitted ammo, and dont show up in your forge ?) of working custom ammo, Deon also found a fix for this:

He makes his stone ammo out of a plant mat, using a fake plant with the properties of stone. This resutlts in one, generic, stone bolt type, disregarding the actual names and material values of the stone used.

If I use this, I will need:
8 bullet ammo plants
45 special ammo plants. (hope these work, since I use syndromes for these)
3 gem ammo plants. (this would remove the actual gem name, I would add: weak gem/gem/strong gem ammo. It would also remove the color, which is sad, since gem ammo is very colordiverse)

EDIT: Wiki says this about the babysnatcher tag:
Sends thieves to steal babies. Also sends ambush parties to harass your civilization. Without this tag, enemy civs will only siege, and will siege as early as they would otherwise babysnatch. This can happen as early as the first year of the fort! In addition, babysnatcher civs will snatch children during worldgen, allowing them to become part of the civ if they do not escape.

Also send ambush parties.... I hope they are wrong.

---------------------------------------------------------------------------------------

About 6. Do GEM_PREF, STONE_PREF and METAL_PREF still work ? If yes  I might remove gem trading all together.
« Last Edit: February 05, 2012, 12:09:52 am by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Raptor_a22

  • Bay Watcher
  • [DERP]
    • View Profile
Re: 10 advanced modding questions.
« Reply #14 on: February 05, 2012, 04:38:02 am »

BABYSNATCHER basically makes the civ 'evil' like the Goblins are. Eventually the 'evil' part will be made into a new tag, HATES_LIFE. If you add BABYSNATCHER to the elves for example, they will not trade and will send thieves and ambushes against you.
Logged
Raptor's CivMod, Mithril and Dark Elves and Alchemy, oh my!
Quote
Dwarf Fortress: The only game where severe necrosis leading to exploding limbs is "awesome."
Pages: [1] 2