Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Egg Conversion at a workshop  (Read 1395 times)

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Egg Conversion at a workshop
« on: September 29, 2015, 11:56:46 pm »

Trying to get eggs to convert at my workshop. ITEM TOKEN WIKI says that should look something like...

[REAGENT:A:1:EGG:NO_SUBTYPE:CHIDDRIN:T0QUEEN]
[PRODUCT:100:1:EGG:NO_SUBTYPE:CHIDDRIN:T0CHEMIST]

So I am trying to control which castes are available and create them, in egg form, and then through another reaction, spawn the appropriate caste.

Fixed the first problem
[REAGENT:A:1:EGG:NO_SUBTYPE:T0QUEEN:NONE]

however,
[PRODUCT:100:1:EGG:NO_SUBTYPE:T0CHEMIST:NONE]
produces nothing.

I went in and modded the other castes in this fashion.
Spoiler (click to show/hide)

However, despite clutch_size 0:0, the still lay eggs >< AND the reaction is still not producing ANY egg, much less the correct one. Also the reaction, despite ASKING for a T0QUEEN egg is producing nothing.

Anyone tried to produce two different types of eggs like this, within the same speicies? The game differentiates between the eggs, IE.
16 T0QUEEN EGGS, 1 T0WORKER EGG, etc.

but the reaction seems to think of them as universal, despite getting upset when I didn't have Chiddrin eggs but had T0QUEEN.

EDIT: Posted in wrong Channel...
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Egg Conversion at a workshop
« Reply #1 on: September 29, 2015, 11:58:04 pm »

wont work, you cant make creature-specific items. Anything with CREATURE_ID:CASTE_ID in reactions does not function. The wiki is wrong.
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 :::

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #2 on: September 30, 2015, 12:00:11 am »

So I have to use unusual eggs? Tried that already, and game got 'angry' at me. Was hoping this would be easier, thanks Meph!
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Egg Conversion at a workshop
« Reply #3 on: September 30, 2015, 12:30:04 am »

I'm sorry, but what are you trying to do? Without dfhack, you cant make creatures in workshop anyway.

You cant create specific eggs as a PRODUCT, but you can use specific eggs as a reagent, if you go with REACTION_CLASSES that you add to the eggs material.
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 :::

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #4 on: September 30, 2015, 12:45:20 am »

Reread Expwnents post:
http://www.bay12forums.com/smf/index.php?topic=152119.0
With a little work, units will be createable.

My race is best seen through here
http://www.bay12forums.com/smf/index.php?topic=152024.msg6381330#msg6381330

Really getting familiar with workshops and reactions (and DEFINITELY DFHACk, still no hope of writing my own .lua, but I can read through it now :)

This morning I also did my first pixel art, trying to do a workshop. Still no idea how I can get an image on the forum though. Crashed this post trying. Otherwise I would show it off.



HEY! got it to work! Finally! Course, now that I look at it I think... Ughh
« Last Edit: September 30, 2015, 12:56:51 am by taldarus »
Logged

Bogus

  • Bay Watcher
    • View Profile
Re: Egg Conversion at a workshop
« Reply #5 on: September 30, 2015, 08:50:48 am »

i guess you could modify the creature type in the reaction product using a script. you would basically use a [ITEM_REACTION_PRODUCT] on the base egg that is pointing to the local creature (ie the creature that laid the egg) - that is, the reaction would without script just produce the same kind of egg that was used as a reagent. in the script you would change the creature pointer in the product item to the other creature.

i never did that so i cant tell you where to find that pointer or if its possible at all, but presumably it is possible as the creature data has to be referenced somewhere on the item.

tho that whole procedure isnt really necessary if you are going to use a script to spawn a creature anyway, you can just make a number of script-based spawn reactions that all use the same kind of egg and produce different creatures if you so desire. or you can make fake eggs with a tag using the first reaction and the spawn script then reads that tag and creates an appropriate creature.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Egg Conversion at a workshop
« Reply #6 on: September 30, 2015, 11:51:19 am »

Since you're using a script to spawn a creature in via reaction completion (if I recall DFhack allows that, I don't use it personally but I still read up on it here and there) I'd recommend an interaction that makes certain castes (mainly female ones) STERILE (as far as I know can only be applied VIA syndrome) and the QUEEN or egg layer to lay unusal egg which is a tool made from said Egg Material within the creature.

Reason for this is if you use REACTION_CLASSes for the egg uses (Tier Egg 0 makes X Caste) you would be making several materials which is identical other than the REACTION_CLASS for reaction reagents to use, And materials as the list grows makes the system take longer when doing calculations (FPS)

Where as if you make each Egg a "Tool" using one material you just have to define the reagent to use:
TOOL:EGG_TIER_#:CREATURE_MAT:MY_CREATURE:EGG_MATERIAL (or use Reaction_class and just have NONE:NONE as the ending)

After that it's getting DFhack to spawn the proper creature:caste for each egg_tier use
Logged

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #7 on: September 30, 2015, 05:25:50 pm »

I was actually going to ask about that, thanks for the pre-answer Hugo! You also ninja'd part, because I was going to ask what material a tool should be, but..
..Ah well..
 8)
Logged

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #8 on: September 30, 2015, 07:13:05 pm »

I hadn't even thought of FPS...

I just quickly did this
Spoiler (click to show/hide)

Item material is less important this way, as each item is individually different (correct?). However, this project will need A LOT of these items. I don't intend on just dealing with eggs, I plan on much much more. (200+ item_tools using the above).

Would creating a single 'egg' item, and then distinguishing among the material types improve performance? Or is there some problem the with the above (it is similar to my first attempt, but my first attempt was trying to use inorganic gems)? I used to use a crappy laptop, and I don't want to force unnecessary lag on people.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Egg Conversion at a workshop
« Reply #9 on: September 30, 2015, 10:18:45 pm »

in that case I'd split it evenly. I didn't know you were doing "Make worker/soldier/etc"

So what you do is make I guess... hmm do you say take a queen's laid generic egg, upgrade it to a worker egg or something then use that worker egg in a reaction to make a unit?

I'd use the tools you made, then make a material for each tier, and I think reading your mod you have 10 tiers
so it's tier_mats * tools

Tad late in the night for me to get too into a design concept other than even out the number of mats to 10/11 0- 10? and then the tools for the category of egg
Logged

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #10 on: October 01, 2015, 01:28:21 am »

ITEM_TOOL
Spoiler (click to show/hide)

INORGANIC
Spoiler (click to show/hide)

REACTIONS
Spoiler (click to show/hide)

CREATURE QUEEN:
Spoiler (click to show/hide)

Tried, so far, to get queen to lay unusual eggs, but it doesn't seem to work. Anyone used unusual eggs for the 40.24 version? Does it need a male or something, or just not work? She lays the eggs, something appears, but nothing else...

As to the tools, I can make them, but for some reason I keep getting Mortars, Pestles, etc.. the good news is that I am getting the right material at least T1 mat...

EDIT: Changed reaction for
Spoiler (click to show/hide)
to
Spoiler (click to show/hide)
but no effect. Still got a variety of 'tool' items.
« Last Edit: October 01, 2015, 01:53:33 am by taldarus »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Egg Conversion at a workshop
« Reply #11 on: October 01, 2015, 02:04:27 am »

T0CHEMISTEGG is not the same as TOCHEMISTEGG, that's your problem. Your product has an invalid ID, T0CHEMISTEGG tool does not exist. You used the letter O and not the number zero in the ID.
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 :::

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #12 on: October 01, 2015, 02:32:28 am »

hahah, wow, you spotted that!

Yeah, thats true...
Spoiler (click to show/hide)

Spoiler (click to show/hide)

Already changed that, and no apparent effect.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Egg Conversion at a workshop
« Reply #13 on: October 01, 2015, 08:35:29 am »

Quote from: Your Tool
[ITEM_TOOL:TOCHEMISTEGG]
   [NAME:t0chemistegg:t0chemisteggs]
   [VALUE:1]
   [DISPLAY_COLOR:0:0:1]
   [TILE:231]
   [SIZE:10]
   [MATERIAL_SIZE:1]

Quote from: Your Reaction
[PRODUCT:100:1:TOOL:ITEM_TOOL_T0CHEMISTEGG:INORGANIC:T1MAT]

You product is wrong because you are not using the correct tool id for the TOOL subtype, remove the red, keep the green
PS if you didn't already the tool is TO (as in 'open') not T0 (as in your balance is "$0.00")
For writing purposes to prevent this from happening you should be naming it T0_CHEMIST_EGG
BUT since you are using materials to dictate if the egg is 0 - 10 you just need CHEMIST_EGG because the material will apply the "T#" like "T1mat chemist egg"
« Last Edit: October 01, 2015, 08:38:42 am by Hugo_The_Dwarf »
Logged

taldarus

  • Bay Watcher
  • Awkward Post Master
    • View Profile
Re: Egg Conversion at a workshop
« Reply #14 on: October 01, 2015, 06:02:27 pm »

 :D
This is why I never post. Don't post, can't figure it out on my own. If I do post, I find lots of little bugs that other people point out.

Already changed, as posted (Still not working, btw)
ITEM_TOOL:ITEM_TOOL_T0CHEMISTEGG & PRODUCT:100:1:TOOL:ITEM_TOOL_T0CHEMISTEGG:INORGANIC:T1MAT

I hate the ITEM_TOOL:ITEM_TOOL_name, but it seemed a popular, so I wanted to verify if it was causing the problem. Didn't work.
I saw the T0 & TO thing, but honestly don't know where it came from. (I used notepad ++'s autocomplete feature- should have been correct). Didn't work.

T0_CHEMIST_EGG while a little easier on the eye, would require me re-editing the design key I have. It would actually require me to change a LOT of values for everything. (I want an organized file) So I would only change it, if I thought that it would fix the problem.

Removing ITEM_TOOL_T0CHEMISTEGG shouldn't fix it either but will make me feel better.
Logged