Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need help with my first mod.It's about transformations.  (Read 1794 times)

King_of_Baboons

  • Bay Watcher
    • View Profile
Need help with my first mod.It's about transformations.
« on: January 17, 2015, 03:47:38 pm »

I am planning on making a mod that adds a new type of liquid called "Essencia".The liquid flows alongside blood in every organic creature and whoever drinks it becomes the creature itself for a short period of time.For instance:if you drink horse essencia you will become a horse for some time.

So is it possible for a creature to have 2 liquids flowing as blood?Will skills and attributes carry on after the transformation?Can someone post an example code?
Logged
A medium-sized creature prone to madness and insanity.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #1 on: January 17, 2015, 06:14:27 pm »

The "blood" is hardcoded: it comes out of any tissue which has VASCULAR value.
You can have a butcherable product though which when eaten turns a person into a creature. You can do it with EBO ("extra bucher object") token.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #2 on: January 18, 2015, 09:17:13 am »

The "blood" is hardcoded: it comes out of any tissue which has VASCULAR value.
You can have a butcherable product though which when eaten turns a person into a creature. You can do it with EBO ("extra bucher object") token.

Interesting.I love the idea of consuming someone's soul to acquire it's power.This could lead to some awesome adventures in adventure mode.

In the early winter of 257,Roz Taldylus defeated the dragon Barreon Deadlyflames.Roz consumed Berreon's soul,acquiring it's powers and increasing his lifetime.
Logged
A medium-sized creature prone to madness and insanity.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #3 on: January 18, 2015, 10:03:06 am »

Sadly it won't happen in worldgen. But I assume with elven habits this mechanic would make them the most powerful creatures (since they have to eat all their victims) :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #4 on: January 18, 2015, 10:34:45 am »

Sadly it won't happen in worldgen. But I assume with elven habits this mechanic would make them the most powerful creatures (since they have to eat all their victims) :).

Nope.The effects of essencia will be temporary and last only for a day.Maybe not enough time to kill a whole civilization but enough time to destroy a tower and become a necromancer or raiding the ██████ for divine stuff.
Logged
A medium-sized creature prone to madness and insanity.

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #5 on: January 18, 2015, 11:51:04 am »

The game crashes when I butcher a human.What's wrong?

Code: [Select]
[EXTRA_BUTCHER_OBJECT:BY_TOKEN:UB]
                [EBO_ITEM:ESSENCIA:ITEM_ESSENCIA_HUMAN]

Code: [Select]
item_essencia

[OBJECT:ITEM]

[ITEM_ESSENCIA:ITEM_ESSENCIA_HUMAN]
[NAME;human essencia:human essencias]
[MATERIAL_SIZE:1]
[SYNDROME]
    [SYN_NAME: human transformation]
    [SYN_AFFECTED_CLASS:GENERAL_POISON]
    [SYN_IMMUNE_CREATURE:HUMAN:ALL]
    [SYN_INGESTED]
    [CE_BODY_TRANSFORMATION:START:15:END:30]
            [CE_CREATURE:HUMAN:MALE]
Logged
A medium-sized creature prone to madness and insanity.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #6 on: January 18, 2015, 12:01:05 pm »

[EBO_ITEM:ESSENCIA:ITEM_ESSENCIA_HUMAN] lacks any material definitions and has incorrect format overall.

It should be [EBO_ITEM:<ITEM TYPE HERE>:ITEM_ESSENCIA_HUMAN:<MATERIAL DEFINITIONS HERE>]
So ESSENCIA is not a valid item type from the game. Also you need to make it either creature mat or inorganic which you can eat.

Also [ITEM_ESSENCIA:ITEM_ESSENCIA_HUMAN], what is that ITEM_ESSENCIA at the beginning? There's no "item type" called ITEM_ESSENCIA in DF, so it should be ITEM_TOOL, ITEM_TOY, ITEM_INSTRUMENT or something else.

Also note that you have ; instead of : in the item name.

Also you cannot attach syndromes to items, you need to put that syndrome on the material your item is going to be made of.

I would make it something like

Code: [Select]
[ITEM_TOY:ITEM_ESSENCIA_HUMAN]
[NAME:essencia:essencias]

Code: [Select]
[USE_MATERIAL_TEMPLATE:ESSENCIA:MUSCLE_TEMPLATE]
    [SYN_NAME: human transformation]
    [SYN_AFFECTED_CLASS:GENERAL_POISON]
    [SYN_IMMUNE_CREATURE:HUMAN:ALL]
    [SYN_INGESTED]
    [CE_BODY_TRANSFORMATION:START:5:END:500]
            [CE_CREATURE:HUMAN:MALE]

[EXTRA_BUTCHER_OBJECT:BY_TOKEN:UB]
                [EBO_ITEM:TOY:ITEM_ESSENCIA:LOCAL_CREATURE_MAT:ESSENCIA]

I could make a typo, I am typing it from my phone, but I hope it helps.
« Last Edit: January 18, 2015, 12:05:16 pm by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #7 on: January 18, 2015, 01:48:56 pm »

PROGRESS:the humans now drop muscle toys when butchered and can't be eaten. :D.Hilarious and horrifying

I tried replacing Toy with Food but that made the game crash.I created the essencia material and once I figure out how to make an edible product out of that I will be able to finish the mod.
« Last Edit: January 18, 2015, 02:34:02 pm by King_of_Baboons »
Logged
A medium-sized creature prone to madness and insanity.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #8 on: January 18, 2015, 11:39:12 pm »

You probably want MEAT:NONE for your item.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #9 on: January 19, 2015, 03:44:00 am »

Oh, I forgot that you cannot eat meat toys. Yeah, Putnam is right, make it either a plant or a meat piece.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Rydel

  • Bay Watcher
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #10 on: January 19, 2015, 12:48:01 pm »

This kind of reminds me of the system in the Final Fantasy Legend (SaGa) games, where if you killed a monster, sometimes it would drop meat that would let you transform in to that monster.

King_of_Baboons

  • Bay Watcher
    • View Profile
Re: Need help with my first mod.It's about transformations.
« Reply #11 on: January 20, 2015, 09:03:44 am »

What exactly do I have to change to make it a meat or plant?The material I made it's just a heart with a different name and a syndrome.

Maybe I can put it inside the creature instead of using extra butcher object?Like an extra organ?
Logged
A medium-sized creature prone to madness and insanity.