Bay 12 Games Forum

Please login or register.

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

Author Topic: Some straightforward modding help, please [Morul]  (Read 1903 times)

Martin

  • Bay Watcher
    • View Profile
Some straightforward modding help, please [Morul]
« on: May 23, 2012, 01:44:00 pm »

So, I have a Morul sorta-sequel planned.


Originally with Morul, I had problems with the following items:


1) Strand extraction, due to limited quantities of adamantine on each map. This was easily resolved by making some other material give strand extracting. I plan on doing that again once I decide what material. I'm thinking nether caps. Sufficiently rare and weird anyway.
2) Trapping, due to vermin extinction. I'm going to remove notrap from all the vermin on the map except for bees, but I'm still concerned about extinction. Anyone think this is a concern, or should I mod in some more vermin and regen? Or does anyone have any other idea. I would consider giving trapping skill to some other reasonably difficult activity, if anyone can think of something.
3) Fishing. I expect to find underground water, but I don't know if they'll produce sufficient fish. If so, then should be easy. I'd prefer something breedable, though, but I don't know if that's possible since fishing only catches vermin.
4) Animal and fish dissection. Animal dissection I was able to do with fire snakes and cave spiders, but they both extincted with Morul and he was lucky to finish. I'd like something here that is renewable. For animal, how hard is it to extract blood from animals and set it to be non-lethal, so it works like milking? That would preserve the spirit of the skill at least. For fish, it depends on above, but moghoppers won't be on the map. For Morul I modded toads or turtles or something to give mogjuice. Again, I'd like something renewable.
5) Medical skills. I'd prefer to avoid torturing a dwarf for the sake of constantly breaking/setting limbs. For Morul for animal care, I dropped war dogs off a 4 story bridge and set him to care of them. Can something similar be done, maybe with some other animal to cause it to trigger non-animal care? I know it doesn't apply to non-members of the fortress like caravan guards and humans, but what about a pet goat or something like that?


I think these will be much easier to solve - modding in 40d was much more limited. And which of these need a regen? I can do that, if needed.


[Edit] Another question - the [AUTOMATIC] tag on things like fat rendering. What else can that be added to? Can I add that to steel making and have the job automatically queue up at the smelter if the reagents are present? Any way to add that to reactions not in the reaction_ raws? (I assume not)
« Last Edit: May 23, 2012, 01:55:35 pm by Martin »
Logged

Captain Crazy

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #1 on: May 23, 2012, 02:29:28 pm »

I think the auto steel-smelt is possible. If it is, and I hope to every hair on Armok's beard it is, an auto pig-iron reaction would be cool too.
Logged
Quote
I usually think of Armok as the pure essence of FUCK YOU!

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Some straightforward modding help, please [Morul]
« Reply #2 on: May 23, 2012, 04:00:05 pm »

ANIMAL CARE WORKS! how do you make dwarves do that? I haven't got it to work in ages [/offtopic]

yes [AUTOMATIC] will make any reaction that has it que as soon as there is the required reagents

1. on copper ore you can use [THREAD_METAL:COPPER:100] instead of [METAL_ORE:COPPER:100] and that should make it so you must extract copper thread instead of the standard smelting it down. But a custom reaction might be needed to turn copper thread into copper bars

2. you can make a special 1x1 workshop called "vermin hunting zone" and have a custom reaction that takes a trap and has a low chance of producing a VERMIN in the trap

3.same as 2.

4.saddly no but with 2. you can make those types of vermin so yes?

5.books or some tool that is used in a reaction to train medical skills.

2 - 5 will require a regen, and maybe 1 depending.
Logged

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #3 on: May 24, 2012, 12:28:41 pm »

Ok, so I think two workshops - one for vermin and one for fish vermin would work.


For each, Toady has has indicated that there's between a 50% and a 0% chance of losing your bait depending on trap quality and gaining no vermin. So, 85% is the midpoint of his formula. I assume we can't mod things like success rates based on item quality? Or can we?


So I'm looking for a building that takes an animal trap, a piece of meat, and 85% of the time produces a vermin like a cave spider inside of the trap and consumes the meat. So, once I sort this modding thing out, that looks pretty straightforward.


A second building takes an animal trap, a piece of fish, and 85% of the time produces a moghopper inside of the trap and consumes the fish.


Those take care of trapping and the two dissecting skills and mimic the in-game system well enough that it doesn't feel like a cheat if I need to resort to them. Let me think about fishery, but it might be similar.


For medical, how about this: Can we make a building (I'd make it look like a table or traction bench) that takes a humanoid body like a goblin, and results in a medical skill being improved and leaving behind either nothing or some kind of refuse like bones? Basically a medical cadaver workshop. It'd also require thread, cloth, some gypsum powder, a bucket of water, as appropriate - maybe a knife as a tool if possible. But I don't think the dwarves will use a sentient body, or is there a way around that other than messing with sentient/morality tags?

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Some straightforward modding help, please [Morul]
« Reply #4 on: May 24, 2012, 12:42:09 pm »

[REACTION:BAIT_CAVE_SPIDER]
   [NAME:bait a cave spider]
   [BUILDING:<building id>:NONE]
   [REAGENT:A:1:ANIMALTRAP:NONE:NONE:NONE][EMPTY] --- not sure if this will work, if not remove it, you might get oddies of using a trap that already has vermin in it
   [REAGENT:B:1:MEAT:NONE:NONE:NONE] --- one chunk/stack of meat (warning it will consume the wholse stack)
   [PRODUCT:85:1:VERMIN:NONE:SPIDER_CAVE:MALE][PRODUCT_TO_CONTAINER:A] --- this im not sure of either, but the *Trap* and this [PRODUCT_TO_CONTAINER] can be removed because the vermin gets stuck in the building and someone comes along with a trap to put it in anyways
   [SKILL:TRAPPING]

[REACTION:BAIT_HOPPER_MOG]
   [NAME:bait a moghopper]
   [BUILDING:<building id>:NONE]
   [REAGENT:A:1:ANIMALTRAP:NONE:NONE:NONE][EMPTY] --- not sure if this will work, if not remove it, you might get oddies of using a trap that already has vermin in it
   [REAGENT:B:1:FISH:NONE:NONE:NONE] --- one chunk/stack of fish (warning it will consume the whole stack)
   [PRODUCT:85:1:VERMIN:NONE:HOPPER_MOG:MALE][PRODUCT_TO_CONTAINER:A] --- this im not sure of either, but the *Trap* and this [PRODUCT_TO_CONTAINER] can be removed because the vermin gets stuck in the building and someone comes along with a trap to put it in anyways
   [SKILL:TRAPPING]

thats that for trapping I guess, the fishing one you could make the building called a fishermen's dock, and make it a magma building, that should allow overhang over emptyspace, but it might force you to find magma first

And I'm sure reactions  that take CORPSE don't care if the creature is sentient, since it is not butchering. I'll be doing tests at some point on this, if not just change dwarf ethics.
Logged

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #5 on: May 24, 2012, 01:01:29 pm »

Wow, thank you very much. Let me dump these in and play around a bit.


I forgot that the vermin got caught in the building. That was always the point when Morul would eat the damn thing. But that makes it less complicated.


I just downloaded Masterwork mod to have enough raws to pore through to figure out how this modding thing works now.

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #6 on: May 24, 2012, 02:22:05 pm »

Ok, what am I doing wrong? I can't even get basic things to work. I added the following to reaction_other in raws, generated a new world, built a tanner workshop, and it's not there:


Code: [Select]
[REACTION:SUTURE]
[NAME:suture]
[BUILDING:TANNER:NONE]
[REAGENT:A:1:NONE:NONE:NONE:NONE][USE_BODY_COMPONENT][UNROTTEN]
[HAS_MATERIAL_REACTION_PRODUCT:TAN_MAT]
[PRODUCT:100:1:SKIN_TANNED:NONE:GET_MATERIAL_FROM_REAGENT:A:TAN_MAT]
[SKILL:SUTURE]


I checked the save raw, and it's in the file. All I did was change the name, skill, and remove [AUTOMATIC].

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #7 on: May 24, 2012, 02:30:12 pm »

Ok, missed that I needed to add it to the entity file. Bein a newb.

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #8 on: May 24, 2012, 03:17:58 pm »

Some progress:


Code: [Select]
[REACTION:BAIT_CAVE_SPIDER]
   [NAME:bait a cave spider]
   [BUILDING:KITCHEN:NONE]
   [REAGENT:B:1:MEAT:NONE:NONE:NONE]
   [PRODUCT:85:1:VERMIN:NONE:SPIDER_CAVE:MALE]
   [SKILL:TRAPPING]


It produces roughly one spider per meat in the stack. I could put on [DOES_NOT_DETERMINE_PRODUCT_AMOUNT] to make that harder. If I have the trap as a reagent and try to put the vermin in the trap, both items disappear and nothing is produced.


The vermin in the above reaction stay in the workshop, but are never tasked to be put in a trap - even if I queue trap small animal at a butcher shop or kennel. If I queue the dissect skill, they happily go over to the kitchen and grab one. So, we're in the neighborhood, but I need to be able to transport the vermin, so somehow I need to get them in a container.


Masterwork has something that might work. Vermin goes in a glass box instead. I'm going to try that - maybe the problem is the trap, maybe it's just coded wrong on my end. There's no [PRESERVE_REAGENT] on the trap, so that might be all it is. And it has a fishing farm, so I may just take that nearly wholesale.

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #9 on: May 24, 2012, 04:53:05 pm »

Success! Here are two reactions:


Code: [Select]
[REACTION:BAIT_CAVE_SPIDER]
   [NAME:bait a cave spider]
   [BUILDING:KITCHEN:NONE]
   [REAGENT:A:1:CAGE:NONE:NONE:NONE][EMPTY][PRESERVE_REAGENT]
   [REAGENT:B:1:MEAT:NONE:NONE:NONE]
   [PRODUCT:100:1:VERMIN:NONE:SPIDER_CAVE:MALE][PRODUCT_TO_CONTAINER:A]
   [SKILL:TRAPPING]


Code: [Select]
[REACTION:AUTOPSY]
   [NAME:Autopsy]
   [BUILDING:KITCHEN:NONE]
   [REAGENT:A:1:CORPSE:NONE:NONE:NONE][USE_BODY_COMPONENT]
   [PRODUCT:100:1:REMAINS:NONE:NONE:NONE]
   [SKILL:DIAGNOSE]


Need to hook them to proper workshops and tweak the % a bit, but I like these. I'll dream up the other medical ones now that I have this getting figured out.

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Some straightforward modding help, please [Morul]
« Reply #10 on: May 24, 2012, 08:09:52 pm »

A full sized cage for a little spider :P just kidding, those are great, Im also happy that CORPSE can be used, does the reaction accept sentient corpses as well?
Logged

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #11 on: May 24, 2012, 09:53:36 pm »

Ok, now I'm trying to get a building working - and it's not.


Lifted almost straight out of Masterwork mod:



Code: [Select]
[OBJECT:BUILDING]


[BUILDING_WORKSHOP:FISH_FARM]
[NAME:Fish Farm]
[NAME_COLOR:7:0:1]
[BUILD_LABOR:MASON]
[BUILD_KEY:CUSTOM_SHIFT_F]
[DIM:5:5]
[WORK_LOCATION:5:3]
[BLOCK:1:0:0:0:0:0]
[BLOCK:2:0:1:1:0:0]
[BLOCK:3:0:1:1:0:0]
[BLOCK:4:0:1:1:0:0]
[BLOCK:5:0:0:0:0:0]
[TILE:0:1:220:220:32:32:32]
[TILE:0:2:32:32:32:32:32]
[TILE:0:3:222:32:32:221:32]
[TILE:0:4:32:32:32:221:32]
[TILE:0:5:32:32:223:32:32]
[COLOR:0:1:0:0:1:0:0:1:0:0:0:0:0:0:0:0:0]
[COLOR:0:2:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:0:3:0:0:1:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:0:4:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:0:5:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0]
[TILE:1:1:32:220:32:32:32]
[TILE:1:2:32:32:32:221:32]
[TILE:1:3:222:32:32:221:32]
[TILE:1:4:222:32:32:221:32]
[TILE:1:5:32:32:223:32:32]
[COLOR:1:1:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0]
[COLOR:1:2:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:1:3:0:0:1:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:1:4:0:0:1:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:1:5:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0]
[TILE:2:1:32:220:220:43:32]
[TILE:2:2:222:32:32:221:150]
[TILE:2:3:222:32:32:221:32]
[TILE:2:4:222:32:32:221:32]
[TILE:2:5:32:223:223:32:32]
[COLOR:2:1:0:0:0:0:0:1:0:0:1:0:0:1:0:0:0]
[COLOR:2:2:0:0:1:0:0:0:0:0:0:0:0:1:0:0:1]
[COLOR:2:3:0:0:1:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:2:4:0:0:1:0:0:0:0:0:0:0:0:1:0:0:0]
[COLOR:2:5:0:0:0:0:0:1:0:0:1:0:0:0:0:0:0]
[TILE:3:1:43:220:220:43:153]
[TILE:3:2:222:142:161:221:150]
[TILE:3:3:222:160:142:221:43]
[TILE:3:4:222:142:160:221:160]
[TILE:3:5:43:223:223:43:237]
[COLOR:3:1:0:0:1:0:0:1:0:0:1:0:0:1:0:0:1]
[COLOR:3:2:0:0:1:3:3:0:3:3:0:0:0:1:0:0:1]
[COLOR:3:3:0:0:1:3:3:0:3:3:0:0:0:1:0:0:1]
[COLOR:3:4:0:0:1:3:3:0:3:3:0:0:0:1:0:0:1]
[COLOR:3:5:0:0:1:0:0:1:0:0:1:0:0:1:7:0:0]
[BUILD_ITEM:1:NONE:NONE:NONE:NONE][BUILDMAT][WORTHLESS_STONE_ONLY]
[BUILD_ITEM:1:BOX:NONE:GLASS_CLEAR:NONE][CAN_USE_ARTIFACT][EMPTY]


This added to entities



Code: [Select]
[PERMITTED_BUILDING:FISH_FARM]

Put in raws, regen world. No new building listed. Anything else need to be done here?

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Some straightforward modding help, please [Morul]
« Reply #12 on: May 24, 2012, 10:00:53 pm »

odd it should work
Logged

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #13 on: May 25, 2012, 12:02:05 am »

Ok, after working on some other things, a few worlds later the building works. No clue what changed if anything.


The cave spider/cage/extract skill is working fine.
The moghopper isn't though. I can put it in a cage, an aquarium, and an animal trap, and the fishery workshop keeps giving the "Needs unrotten extract bearing fish item"
I might just need to create some other thing that gives fish dissection skill.


I haven't been able to get the autopsy work on sentient beings - well, on dwarves at least. I changed this in the entity and it didn't matter:



Code: [Select]
[ETHIC:MAKE_TROPHY_SAME_RACE:ACCEPTABLE]

I also told the reaction to preserve the corpse, but that didn't change anything. It works fine on animals, so I may just have them work on pigs.


There are interesting little issues that come up in all of this. Fishing successfully puts raw fish in the workshop, but nobody will haul them. I tried putting a barrel in as a reagent, but the workshop complains about not having reagents even though there's a pile of wooden barrels sitting there. This is what I added:



Code: [Select]

[REAGENT:A:1:TOOL:NONE:NONE:NONE]
[EMPTY]
[DOES_NOT_ABSORB]
[PRESERVE_REAGENT]
[HAS_TOOL_USE:LIQUID_CONTAINER]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]


I keep reading about modding, but these little hurdles are maddening because they seem so minor.

Martin

  • Bay Watcher
    • View Profile
Re: Some straightforward modding help, please [Morul]
« Reply #14 on: May 25, 2012, 08:50:41 pm »

Ok, a bit closer. I have 3 buildings that all appear to work properly: Vermin Trap, Medical Table, Fish Farm.


The medical reactions all mirror the surgery tasks (bone setting requires a bucket of water, cloth, gypsum powder, etc.) but I still can't get them to take sentient corpses. Any ideas what entity tags need to be changed to fix that?


The cave spider trap works, but the extraction reaction in the butcher shop fails, so it doesn't quite recognize the product, but it gives skills - just doesn't give venom. I can cope with that. Moghoppers still don't work, so I'm modding in mog juice to other vermin as I did first time. Hopefully that'll still work.


I tried making mog juice directly - bypassing the capture step, but that doesn't work either:



Code: [Select]
[REACTION:EXTRACT_MOG_JUICE]
[NAME:Extract mog juice]
[BUILDING:FISH_FARM:CUSTOM_J]
[REAGENT:bucket:1:BUCKET:NONE:NONE:NONE][EMPTY][PRESERVE_REAGENT]
[REAGENT:barrel:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:100:25:DRINK:NONE:MOG_JUICE:DRINK]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT_DIMENSION:150]
[SKILL:DISSECT_FISH]


I can get the raw fish captured at the fish farm into barrels, but they don't get hauled. They'll get processed just fine, but I need them hauled. Even if I deconstruct the building they still won't haul the barrels.



Code: [Select]
[REACTION:FISH]
[NAME:fish]
[BUILDING:FISH_FARM:CUSTOM_SHIFT_P]
[REAGENT:barrel:1:NONE:NONE:NONE:NONE]
[EMPTY]
[FOOD_STORAGE_CONTAINER]
[PRESERVE_REAGENT]
[DOES_NOT_DETERMINE_PRODUCT_AMOUNT]
[PRODUCT:25:1:FISH_RAW:NONE:FISH_MOLLY_SAILFIN:MALE]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT:25:1:FISH_RAW:NONE:FISH_TROUT_RAINBOW:MALE]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT:25:1:FISH_RAW:NONE:FISH_KNIFEFISH_BANDED:MALE]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT:25:1:FISH_RAW:NONE:FISH_BULLHEAD_BROWN:MALE]
[PRODUCT_TO_CONTAINER:barrel]
[PRODUCT:25:1:FISH_RAW:NONE:FISH_LUNGFISH:MALE]
[PRODUCT_TO_CONTAINER:barrel]
[SKILL:FISH]


I see this setup in other mods, and I presume it works, but it's not working for me. So close...
Pages: [1] 2