Dwarf Fortress > DF Modding

Snake Fortress: A learning project

(1/6) > >>

ViolinAnon:
Hello!
I have been trying to get started in the wonderful world that is DF modding for a few days, and thought that doing a large project like this one would help me learn a bit of everything, while also possible contributing to this great community we have here.

The most basic goal of this little project will be to add a new playable civilization to the game, Snakemen. (Placeholder name)
The reason I created this thread is that... Well, I will most likely need a lot of help to create all of this, and rather than make a new thread (Or spam the modding questions thread) everytime I need help with something, I'll have it all over here in the same thread. It will also help me keep things organized and will let people who are interested in the mod (If there is any) follow its progress.

TO-DO LIST
Spoiler (click to show/hide)
* Planning
* Creatures
* Snakemen
* Body structure (Snake head, snake tail, torso w/ 2 arms, size, etc)
* Syndrome (Bite, Pain & Numbness?)
* Egg laying (How many per clutch?)
* Materials & Tissues
* Domesticated snakes (Rattlesnakes?)
* Items
* Glaive: 2-handed polearms, slash & shaft bash
* Barding: Armor for the lower body, only for the snakemen
* Entity
* Biomes: Deserts
* Language: Human
* Religion: Pantheon
* Spheres: Balance, Light, Scholarship, Sun, Writing
* Position: Empire-based
* Ethics: Most likely the same as humans
* Values: Artwork, Martial Prowess, Law, Eloquence
* Active Season: Summer
* Ambusher
* Armor: No leggings or boots, but use bardings
* Weapon: Scimitar, Glaive, Bow, Whip, Morning Star
* Modding
* RAWs
* Make body in body_default
* Make Snakemen creature in creature_standard
* Change/create a species of snake to be a pet
* Create Glaive
* Create Barding
* Write new Entity
* Test!
I hope this is the right place to make the thread, and that it'll interest people enough so that they are willing to help me.
Speaking of help... How would one go about modding in a new body type with a lower body that consists on only a tail?

BlackFlyme:
Body parts aren't too hard. The important thing to remember is that the order that body parts are listed in are important, though the order depends on any reliance that body parts have. For example, hands are connected to lower arms and rely on them as anchors of sorts. If the hand is defined before the lower arm, then it will not be able to find the arm, and will be unable to connect the hand.

It helps to visit the wiki, so I'll drop a link to the body tokens here. I find that it also helps to look at pre-existing objects in the raws to compare the work-in-progress to.

A new body part can be started with the tag [BODY:ID], with the letters ID being whatever you want the ID of the body to be called. The ID can be anything you want, so long as the ID is unique, and not shared by any other object of its type.

The easiest possible way that I can think of to make the body you want would be to take the pre-existing HUMANOID_LEGLESS or HUMANOID_LEGLESS_NECK and create a copy of it that alters the lower body.

As an example, here is the default legless humanoid body:
Spoiler (click to show/hide)
--- Code: ---[BODY:HUMANOID_LEGLESS_NECK]
[BP:UB:upper body:upper bodies][UPPERBODY][CATEGORY:BODY_UPPER]
[DEFAULT_RELSIZE:1000]
[BP:LB:lower body:lower bodies][CON:UB][LOWERBODY][CATEGORY:BODY_LOWER]
[DEFAULT_RELSIZE:1000]
[BP:NK:neck:STP][CON:UB][CATEGORY:NECK]
[DEFAULT_RELSIZE:150]
[BP:HD:head:STP][CON:NK][HEAD][CATEGORY:HEAD]
[DEFAULT_RELSIZE:300]
[BP:RUA:right upper arm:STP][CON:UB][LIMB][RIGHT][CATEGORY:ARM_UPPER]
[DEFAULT_RELSIZE:200]
[BP:LUA:left upper arm:STP][CON:UB][LIMB][LEFT][CATEGORY:ARM_UPPER]
[DEFAULT_RELSIZE:200]
[BP:RLA:right lower arm:STP][CON:RUA][LIMB][RIGHT][CATEGORY:ARM_LOWER]
[DEFAULT_RELSIZE:200]
[BP:LLA:left lower arm:STP][CON:LUA][LIMB][LEFT][CATEGORY:ARM_LOWER]
[DEFAULT_RELSIZE:200]
[BP:RH:right hand:STP][CON:RLA][GRASP][RIGHT][CATEGORY:HAND]
[DEFAULT_RELSIZE:80]
[BP:LH:left hand:STP][CON:LLA][GRASP][LEFT][CATEGORY:HAND]
[DEFAULT_RELSIZE:80]
--- End code ---

And here is an altered variant where the lower body is a tail:
Spoiler (click to show/hide)
--- Code: ---[BODY:EXAMPLE_HUMANOID_SNAKE]
[BP:UB:torso:torsos][UPPERBODY][CATEGORY:BODY_UPPER]
[DEFAULT_RELSIZE:1000]
[BP:LB:tail:tails][CON:UB][LOWERBODY][LIMB][STANCE][CATEGORY:BODY_LOWER]
[DEFAULT_RELSIZE:1000]
[BP:NK:neck:STP][CON:UB][CATEGORY:NECK]
[DEFAULT_RELSIZE:150]
[BP:HD:head:STP][CON:NK][HEAD][CATEGORY:HEAD]
[DEFAULT_RELSIZE:300]
[BP:RUA:right upper arm:STP][CON:UB][LIMB][RIGHT][CATEGORY:ARM_UPPER]
[DEFAULT_RELSIZE:200]
[BP:LUA:left upper arm:STP][CON:UB][LIMB][LEFT][CATEGORY:ARM_UPPER]
[DEFAULT_RELSIZE:200]
[BP:RLA:right lower arm:STP][CON:RUA][LIMB][RIGHT][CATEGORY:ARM_LOWER]
[DEFAULT_RELSIZE:200]
[BP:LLA:left lower arm:STP][CON:LUA][LIMB][LEFT][CATEGORY:ARM_LOWER]
[DEFAULT_RELSIZE:200]
[BP:RH:right hand:STP][CON:RLA][GRASP][RIGHT][CATEGORY:HAND]
[DEFAULT_RELSIZE:80]
[BP:LH:left hand:STP][CON:LLA][GRASP][LEFT][CATEGORY:HAND]
[DEFAULT_RELSIZE:80]
--- End code ---

[BP:ID:singular name:plural name] is the tag used to start a part of a body. The changes I made were mainly to the tail. I changed the upper body's name to torso, and the lower body's to tail. The tail also has [STANCE], which means that it is used by the creature to stand, and [LIMB], which should allow the part to be used in wrestling, like arms can.

Nil Athelion:
This looks all quite doable... except for eggs, last I recall.  However, I think something egg-related happened in the latest update, so it might be best to look around or do science on this yourself.  It would be embarrassing for them to not be able to have children, also embarrassing if they had a habit of eating said eggs.

Also, find the tissue layers for reptiles and work from there.  Or maybe just reference them.  Custom tissue-layers for a gecko-like civ I was making was definitely the worse part of body-making.

I look forward to natural weapons of venomous biting and tail-whipping.

ViolinAnon:

--- Quote from: BlackFlyme on July 29, 2014, 05:54:35 pm ---And here is an altered variant where the lower body is a tail:
Spoiler (click to show/hide)
--- Code: ---[BODY:EXAMPLE_HUMANOID_SNAKE]
[BP:UB:torso:torsos][UPPERBODY][CATEGORY:BODY_UPPER]
[DEFAULT_RELSIZE:1000]
[BP:LB:tail:tails][CON:UB][LOWERBODY][LIMB][STANCE][CATEGORY:BODY_LOWER]
[DEFAULT_RELSIZE:1000]
[BP:NK:neck:STP][CON:UB][CATEGORY:NECK]
[DEFAULT_RELSIZE:150]
[BP:HD:head:STP][CON:NK][HEAD][CATEGORY:HEAD]
[DEFAULT_RELSIZE:300]
[BP:RUA:right upper arm:STP][CON:UB][LIMB][RIGHT][CATEGORY:ARM_UPPER]
[DEFAULT_RELSIZE:200]
[BP:LUA:left upper arm:STP][CON:UB][LIMB][LEFT][CATEGORY:ARM_UPPER]
[DEFAULT_RELSIZE:200]
[BP:RLA:right lower arm:STP][CON:RUA][LIMB][RIGHT][CATEGORY:ARM_LOWER]
[DEFAULT_RELSIZE:200]
[BP:LLA:left lower arm:STP][CON:LUA][LIMB][LEFT][CATEGORY:ARM_LOWER]
[DEFAULT_RELSIZE:200]
[BP:RH:right hand:STP][CON:RLA][GRASP][RIGHT][CATEGORY:HAND]
[DEFAULT_RELSIZE:80]
[BP:LH:left hand:STP][CON:LLA][GRASP][LEFT][CATEGORY:HAND]
[DEFAULT_RELSIZE:80]
--- End code ---

[BP:ID:singular name:plural name] is the tag used to start a part of a body. The changes I made were mainly to the tail. I changed the upper body's name to torso, and the lower body's to tail. The tail also has [STANCE], which means that it is used by the creature to stand, and [LIMB], which should allow the part to be used in wrestling, like arms can.

--- End quote ---

Thanks a lot for the tips and details, I'll most likely be using that, and change the size of the tail to make it bigger. (Around 1500, probably)


--- Quote from: Nil Athelion on July 29, 2014, 07:14:37 pm ---This looks all quite doable... except for eggs, last I recall.  However, I think something egg-related happened in the latest update, so it might be best to look around or do science on this yourself.  It would be embarrassing for them to not be able to have children, also embarrassing if they had a habit of eating said eggs.

Also, find the tissue layers for reptiles and work from there.  Or maybe just reference them.  Custom tissue-layers for a gecko-like civ I was making was definitely the worse part of body-making.

I look forward to natural weapons of venomous biting and tail-whipping.

--- End quote ---
Oh, right. Actually forgot about that. Well, I can just say they're ovoviviparous, which means eggs that hatch inside of the mother's body, and be done with it.
As for the tissue-layers, that's pretty much what I'd have went for. I'll look to see what cave crocs are made of and take it from there, or take similar.

I'm also really curious about how the game's AI will make them fight. Tail slams, and hopefully constriction would be really nice.

Nil Athelion:
I can't find any science saying you can't get them to lay eggs, so you should try to find out.

In the mean time, I've modded my dwarves by replacing [MULTIPLE_LITTER_RARE] with the egg-laying stuff with pythons.  Unfortunately, this seems like somethign that will take a while to test, since I actually have to sustain fortresses.

EDIT: Okay, so modded dwarves do lay eggs.

Currently I have a stack of 21 dwarf eggs and a stack of 11 dwarf eggs, both in a barrel.  I made a separate stockpile for them right next to a new kitchen, but they have not been cooked yet.  They also don't turn up on the kitchen cook/brew page.

I noticed that dwarves will take dwarf-eggs away from the nest box, so I staked out the egg box and did a bit of forbidding on the next stack of eggs laid there.  (By Inod Nokgollibash.)  So far, Inod has not stayed on the nest box, but instead keeps returning to it.  I don't know if the eggs are still viable.  I think a chicken lay eggs in the next while Inod was away, but I'm not sure - someone was definitely carrying eggs away from the nest box and Inod's eggs are still there, but no verification.  If Inod hatches 26 dwarf  babies, it will be very fun.

Navigation

[0] Message Index

[#] Next page

Go to full version