Bay 12 Games Forum

Please login or register.

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

Author Topic: Spiders  (Read 5131 times)

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Spiders
« Reply #15 on: September 26, 2015, 02:06:24 pm »

DFHack? I could do it with a Lua hook or maybe reaction-trigger, but that would mean that it would no longer work without DFHack, which I know some dislike...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Kazoo

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #16 on: September 26, 2015, 02:14:01 pm »

Yeah, it's probably the most efficient way of doing things but i don't feel sacrificing simplicity through dfhack efficiency would be the best option. Its of my personal opinion Toady should provide more modding support so we can have greater interaction with reactions... but i'm sure i'm no special snowflake with this opinion. :'(
Logged

CulixCupric

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #17 on: September 26, 2015, 03:06:36 pm »

No it's a lot simpler. There's a material called EGGSHELL_TEMPLATE, this is what all eggs are made of, the EGG_WHITE and EGG_YOLK are just kind of like attributes.

As it stands, all animals that lay eggs make them out of [MATERIAL_TEMPLATE:EGGSHELL_TEMPLATE], but you can designate them to lay them out of any MATERIAL_TEMPLATE, in my mod they do so out of [MATERIAL_TEMPLATE:SILK_TEMPLATE].

[LAYS_EGGS]
         [EGG_MATERIAL:LOCAL_CREATURE_MAT:SILK:SOLID]
         [EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
         [EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
         [EGG_SIZE:150]
         [CLUTCH_SIZE:3:6]

Then you can do whatever you want with the eggs and if the reaction takes material from the egg reagent it will make a product of that material.

However to stop weavers making EGGSHELL thread out of chicken eggs, i use a [REACTION_CLASS:SILK_EGG] under silk, so reagents of that material can only be used in the reaction.

As for [PRODUCT_DIMENSION:1500], i don't believe that's relevant anymore, but we can trick dwarf fortress and turn the eggs into globs (like meat and fat), which will give us an arbitrary amount of "egg globs" in relativity to egg size, which can then be exchanged into an appropriate amount of thread by a second reaction.

I hope this makes sense, and i haven't horribly misunderstood...
the eggshell uses the spider's web silk material for the eggshell.

Code: [Select]
[BODY_DETAIL_PLAN:EGG_MATERIALS]
[USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]
Code: [Select]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:SILK:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:150]
[CLUTCH_SIZE:3:6]
so the eggshell is silk, and since the reaction contains [ANY_SILK_MATERIAL] attached to the egg reagent, it only accepts silk eggs. i have tested it and it seems to be working...
Code: [Select]
[REACTION:COLLECT_EGG_SILK]
[NAME:harvest silk from eggs]
[BUILDING:FARMER:NONE]
[REAGENT:silk:1:EGG:NONE:NONE:NONE][UNROTTEN][ANY_SILK_MATERIAL]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:silk:NONE][PRODUCT_DIMENSION:1500]
[SKILL:SPINNING]
Logged
Don't know what to put here... let me know if you have any ideas...

CulixCupric

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #18 on: September 26, 2015, 03:07:21 pm »

No it's a lot simpler. There's a material called EGGSHELL_TEMPLATE, this is what all eggs are made of, the EGG_WHITE and EGG_YOLK are just kind of like attributes.

As it stands, all animals that lay eggs make them out of [MATERIAL_TEMPLATE:EGGSHELL_TEMPLATE], but you can designate them to lay them out of any MATERIAL_TEMPLATE, in my mod they do so out of [MATERIAL_TEMPLATE:SILK_TEMPLATE].

[LAYS_EGGS]
         [EGG_MATERIAL:LOCAL_CREATURE_MAT:SILK:SOLID]
         [EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
         [EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
         [EGG_SIZE:150]
         [CLUTCH_SIZE:3:6]

Then you can do whatever you want with the eggs and if the reaction takes material from the egg reagent it will make a product of that material.

However to stop weavers making EGGSHELL thread out of chicken eggs, i use a [REACTION_CLASS:SILK_EGG] under silk, so reagents of that material can only be used in the reaction.

As for [PRODUCT_DIMENSION:1500], i don't believe that's relevant anymore, but we can trick dwarf fortress and turn the eggs into globs (like meat and fat), which will give us an arbitrary amount of "egg globs" in relativity to egg size, which can then be exchanged into an appropriate amount of thread by a second reaction.

I hope this makes sense, and i haven't horribly misunderstood...
the eggshell uses the spider's web silk material for the eggshell.

Code: [Select]
[BODY_DETAIL_PLAN:EGG_MATERIALS]
[USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]
Code: [Select]
[LAYS_EGGS]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:SILK:SOLID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_WHITE:LIQUID]
[EGG_MATERIAL:LOCAL_CREATURE_MAT:EGG_YOLK:LIQUID]
[EGG_SIZE:150]
[CLUTCH_SIZE:3:6]
so the eggshell is silk, and since the reaction contains [ANY_SILK_MATERIAL] attached to the egg reagent, it only accepts silk eggs. no reaction class is necessary with that constraint. i have tested it and it seems to be working...
Code: [Select]
[REACTION:COLLECT_EGG_SILK]
[NAME:harvest silk from eggs]
[BUILDING:FARMER:NONE]
[REAGENT:silk:1:EGG:NONE:NONE:NONE][UNROTTEN][ANY_SILK_MATERIAL]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:silk:NONE][PRODUCT_DIMENSION:1500]
[SKILL:SPINNING]
Logged
Don't know what to put here... let me know if you have any ideas...

Kazoo

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #19 on: September 26, 2015, 03:27:02 pm »

I don't understand the necessity of:
[BODY_DETAIL_PLAN:EGG_MATERIALS]
   [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]
When you've:
[LAYS_EGGS]
      [EGG_MATERIAL:LOCAL_CREATURE_MAT:SILK:SOLID]

You're just giving chickens the ability to lay silk eggs.

[PRODUCT_DIMENSION:1500] does nothing but make a thread 10 times larger than the egg.

Also a reaction class allows me to create separate reactions with silk eggs, to which i may or may not be doing...
Logged

CulixCupric

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #20 on: September 26, 2015, 04:47:26 pm »

I don't understand the necessity of:
[BODY_DETAIL_PLAN:EGG_MATERIALS]
   [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE]
When you've:
[LAYS_EGGS]
      [EGG_MATERIAL:LOCAL_CREATURE_MAT:SILK:SOLID]

You're just giving chickens the ability to lay silk eggs.

[PRODUCT_DIMENSION:1500] does nothing but make a thread 10 times larger than the egg.

Also a reaction class allows me to create separate reactions with silk eggs, to which i may or may not be doing...
I use the material silk template because the spiders are also webbers, and have silk fur that is shearable, so i use the silk for all of it. also so it is identical to the base material template silk.
also, the local_creature_mat:silk is referring to a local creature material, which needs to be defined.
the [BODY_DETAIL_PLAN:EGG_MATERIALS] defines local creature mats EGG_SHELL EGG_WHITE EGG_YOLK based off of mat templates, which are then referred to in the LAYS_EGGS for egg mat definition.

I can change the product dimension to 150.

I have the reaction reagent set up that way because i don't like using reaction classes unless i have no other choice, it's my personal preference.
« Last Edit: September 26, 2015, 04:53:31 pm by CulixCupric »
Logged
Don't know what to put here... let me know if you have any ideas...

Kazoo

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #21 on: September 26, 2015, 05:08:26 pm »

I know all this, i was just confused as to why the [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE] was indented under [BODY_DETAIL_PLAN:EGG_MATERIALS]

You seem defensive about this, i'm only trying to help.
Logged

CulixCupric

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #22 on: September 26, 2015, 05:29:01 pm »

I know all this, i was just confused as to why the [USE_MATERIAL_TEMPLATE:SILK:SILK_TEMPLATE] was indented under [BODY_DETAIL_PLAN:EGG_MATERIALS]

You seem defensive about this, i'm only trying to help.
the indent was accidental, and i am very direct/blunt at times. I am sorry if i seem angry. I do appreciate the assistance.
Logged
Don't know what to put here... let me know if you have any ideas...

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Spiders
« Reply #23 on: September 28, 2015, 10:41:30 am »

-snip-

[PRODUCT_DIMENSION:1500] does nothing but make a thread 10 times larger than the egg.

Also a reaction class allows me to create separate reactions with silk eggs, to which i may or may not be doing...

What?

Quote from: wiki
PRODUCT_DIMENSION | size | Specifies the size of the product. A size of 150 is typical for BAR, POWDER_MISC, LIQUID_MISC, and DRINK. A size of 15000 is typical for THREAD, and a size of 10000 is typical for CLOTH.

not only does that reaction miss a "0", but it doesn't make it 10 times larger, well it kinda does, but THREAD and CLOTH are counted in larger numbers as [1] because they have 'uses' to use that lightly. Because you can use the same spool of thread to suture multiple dwarves, as with cloth you can just wrap something up, and cut off the remainder (or if you're that person, measure out what you need and cut off the correct length)


Back on track:
But yeah unless you want a bunch of reactions that can just things that can be generic that don't fit the hardcoded ANY_XXXX_MATERIAL is when I use reaction classes. Like I have a "Break wooden furniture down" (which roughly translates to a reaction for each ITEM_TYPE {TABLE, CHAIR, CABINET, etc}) which leads me to use [REACTION_CLASS:ANY_WOOD_MATERIAL] on the MATERIAL_TEMPLATE:WOOD_TEMPLATE

So KAZOO's method is actually the easiest and simplist way of using silk collection via eggs
Quote
Code: [Select]
[REACTION:COLLECT_EGG_SILK]
[NAME:harvest silk from eggs]
[BUILDING:FARMER:NONE]
[REAGENT:silk:1:EGG:NONE:NONE:NONE][UNROTTEN][ANY_SILK_MATERIAL]
[PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:silk:NONE][PRODUCT_DIMENSION:1500]
[SKILL:SPINNING]

Altho it should be [PRODUCT:100:1:THREAD:NONE:GET_MATERIAL_FROM_REAGENT:silk:NONE][PRODUCT_DIMENSION:15000]

As for SILK laying, when you make a creature and you use WEBBER if the creature is VERMIN it will have a chance to create a web on the tile it is on. Large Creatures will "disperse" webs around during worldgen (why embarking there is webs in the caves or surface if it's a surface WEBBER), Giant cave spiders have an interaction to "Spew" webs as an attack, but with careful setup you could make a large pet that would spew webs at each other as a greeting, or make it mutual (like cats head bump) or set it up that the spider would use the web spew whenever it can for no reason. Which turns into:
Use Kazoo's egg method
or
do some interaction SCIENCE to get the desired effect of a silk farm with herd able spiders.
Logged

Kazoo

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #24 on: September 28, 2015, 12:02:11 pm »

To be honest i had no idea size works that way. I was under the impression PRODUCT_DIMENSION was outdated and no longer relevant, I apologize if i've made a fool of myself.

Thanks for the guidance i'll read more into it and do some maths on my mod's thread output.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Spiders
« Reply #25 on: September 28, 2015, 12:26:00 pm »

To be honest i had no idea size works that way. I was under the impression PRODUCT_DIMENSION was outdated and no longer relevant, I apologize if i've made a fool of myself.

Thanks for the guidance i'll read more into it and do some maths on my mod's thread output.
Don't worry I always say "Sometimes you need someone to say something wrong, before you can hear what is right" which falls into the same thing as "No Question is a dumb question" only the latter is regarding questions and the other is to answers.

Also I apologize if I sounded angry/scolding, hard to display kindness + information on a black and white median
Spoiler: Off Topic Again (click to show/hide)
« Last Edit: September 28, 2015, 12:31:28 pm by Hugo_The_Dwarf »
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Spiders
« Reply #26 on: October 01, 2015, 04:18:08 pm »

You know, most of the things in your first OT/rant are annoying for everyone, but a little (OK, a lot) of DFHackery can get something that works more or less the way you want.

Item dimensions are so broken it's not even funny, nothing uses them, and there is no way to see how much is left in game. Actually that was incorrect, medical jobs use little bits of thread and cloth, but then you end up with unusable (partial) cloth and thread items. Like I said, really buggy.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

klefenz

  • Bay Watcher
  • Obey the Fist!
    • View Profile
Re: Spiders
« Reply #27 on: October 01, 2015, 04:54:43 pm »

How about silkworms you "shear" for silk? has anyone done that?

CulixCupric

  • Bay Watcher
    • View Profile
Re: Spiders
« Reply #28 on: October 01, 2015, 07:07:41 pm »

How about silkworms you "shear" for silk? has anyone done that?
the spiders i posted above have shearable silk, and the silk eggs, and they eat vermin like cats do... and i have been improving them since my last upload of their code...

new code below...

Spoiler (click to show/hide)
the reaction for silk egg harvesting...
Spoiler (click to show/hide)

and also... mini livestock if you want it...
Spoiler (click to show/hide)
Logged
Don't know what to put here... let me know if you have any ideas...

klefenz

  • Bay Watcher
  • Obey the Fist!
    • View Profile
Re: Spiders
« Reply #29 on: October 01, 2015, 07:27:19 pm »

Its just that obtaining silk from spiders/spider webs is such a common trope in games, I've seen in DF, Minecraft, Terraria, WoW, etc. and the only game I can think of in which silk comes from silkworms is Civilization. Mhh, maybe some other historical games have it too.
Pages: 1 [2] 3