Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Making my first mod - Help needed  (Read 605 times)

Zambaku

  • Bay Watcher
    • View Profile
Making my first mod - Help needed
« on: December 28, 2009, 12:26:28 pm »

So I want to make a simple mod (or two, hehe...) By simply adding a new race. Like goblins but a bit stronger. I was thinking that perhaps I could simply copy the goblin race and rename it and make small changes here and there, like editing the name and such.

Will it work?
[CREATURE:GNOLL]
   [NAME:gnoll:gnolls:gnoll]
   [TILE:'g'][COLOR:7:0:0]
   [GLOWTILE:'"'][GLOWCOLOR:4:0:1]
   [GENPOWER:3]
   [CAN_LEARN][CAN_SPEAK]
   [EVIL]
   [INTELLIGENT][liKES_FIGHTING]
   [BONECARN]
   [CANOPENDOORS]
   [PREFSTRING:terrifying features]
   [BODY:HUMANOID:TAIL:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS:THROAT:NECK:SPINE:BRAIN:5FINGERS:5TOES:MOUTH]
   [ATTACK:MAIN:BYTYPE:GRASP:punch:punches:1:2:BLUDGEON][ATTACKFLAG_WITH]
   [ATTACK:SECOND:BYTYPE:MOUTH:bite:bites:1:2:GORE][ATTACKFLAG_CANLATCH]
   [CHILD:12][BABY:1][MULTIPLE_LITTER_RARE]
   [SIZE:7]
   [FAT:2]
   [EQUIPS]
   [DIURNAL]
   [STANDARD_FLESH]
   [HOMEOTHERM:10067]
   [LAYERING:10]
   [SWIMS_LEARNED][SWIM_SPEED:2500]
   [PERSONALITY:ANGER:25:75:100]
   [PERSONALITY:IMMODERATION:50:75:100]
   [PERSONALITY:EXCITEMENT_SEEKING:0:60:100]
   [PERSONALITY:CHEERFULNESS:0:40:90]
   [PERSONALITY:ALTRUISM:0:25:50]
   [PERSONALITY:MODESTY:0:40:90]
   [PERSONALITY:SYMPATHY:0:25:50]

entity_default:
   [CREATURE:GNOLL]
   [trANSLATION:GOBLIN]
   [DIGGER:ITEM_WEAPON_PICK]
   [WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [WEAPON:ITEM_WEAPON_SPEAR]
   [WEAPON:ITEM_WEAPON_MACE]
   [WEAPON:ITEM_WEAPON_BOW]
      [AMMO:ITEM_AMMO_ARROWS]
   [WEAPON:ITEM_WEAPON_PIKE]
   [WEAPON:ITEM_WEAPON_HALBERD]
   [WEAPON:ITEM_WEAPON_SWORD_LONG]
   [ARMOR:ITEM_ARMOR_PLATEMAIL:RARE]
   [ARMOR:ITEM_ARMOR_CHAINMAIL:UNCOMMON]
   [ARMOR:ITEM_ARMOR_LEATHER:COMMON]
   [ARMOR:ITEM_ARMOR_CLOAK:COMMON]
   [ARMOR:ITEM_ARMOR_TUNIC:COMMON]
   [ARMOR:ITEM_ARMOR_ROBE:UNCOMMON]
   [HELM:ITEM_HELM_HELM:NEVER]
   [HELM:ITEM_HELM_CAP:NEVER]
   [HELM:ITEM_HELM_HOOD:RARE]
   [HELM:ITEM_HELM_MASK:NEVER]
   [GLOVES:ITEM_GLOVES_GAUNTLETS:UNCOMMON]
   [GLOVES:ITEM_GLOVES_GLOVES:UNCOMMON]
   [SHOES:ITEM_SHOES_SHOES:NEVER]
   [SHOES:ITEM_SHOES_BOOTS:NEVER]
   [SHOES:ITEM_SHOES_BOOTS_LOW:NEVER]
   [SHOES:ITEM_SHOES_SANDAL:NEVER]
   [SHOES:ITEM_SHOES_SOCKS:NEVER]
   [PANTS:ITEM_PANTS_PANTS:NEVER]
   [PANTS:ITEM_PANTS_GREAVES:NEVER]
   [PANTS:ITEM_PANTS_LEGGINGS:NEVER]
   [PANTS:ITEM_PANTS_LOINCLOTH:ALWAYS]
   [SHIELD:ITEM_SHIELD_SHIELD]
   [SHIELD:ITEM_SHIELD_BUCKLER]
   [SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA]
   [TOY:ITEM_TOY_AXE]
   [trAPCOMP:ITEM_TRAPCOMP_GIANTAXEBLADE]
   [trAPCOMP:ITEM_TRAPCOMP_ENORMOUSCORKSCREW]
   [trAPCOMP:ITEM_TRAPCOMP_SPIKEDBALL]
   [trAPCOMP:ITEM_TRAPCOMP_LARGESERRATEDDISC]
   [trAPCOMP:ITEM_TRAPCOMP_MENACINGSPIKE]
   [INSTRUMENT:ITEM_INSTRUMENT_DRUM]
   [CLOTHING]
   [CURRENCY:COPPER:1]
   [CURRENCY:SILVER:5]
   [CURRENCY:GOLD:15]
   [SELECT_SYMBOL:WAR:NAME_WAR]
   [SUBSELECT_SYMBOL:WAR:VIOLENT]
   [SELECT_SYMBOL:BATTLE:NAME_BATTLE]
   [SUBSELECT_SYMBOL:BATTLE:VIOLENT]
   [SELECT_SYMBOL:SIEGE:NAME_SIEGE]
   [SUBSELECT_SYMBOL:SIEGE:VIOLENT]
   [SELECT_SYMBOL:ROAD:NAME_ROAD]
   [SELECT_SYMBOL:TUNNEL:NAME_TUNNEL]
   [SELECT_SYMBOL:BRIDGE:NAME_BRIDGE]
   [SELECT_SYMBOL:WALL:NAME_WALL]
   [SELECT_SYMBOL:REMAINING:EVIL]
   [CULL_SYMBOL:ALL:DOMESTIC]
   [CULL_SYMBOL:ALL:FLOWERY]
   [CULL_SYMBOL:ALL:HOLY]
   [CULL_SYMBOL:ALL:PEACE]
   [CULL_SYMBOL:ALL:NEGATOR]
   [CULL_SYMBOL:ALL:GOOD]
   [WOOD_PREF]
   [USE_CAVE_ANIMALS]
   [USE_EVIL_ANIMALS]
   [USE_EVIL_PLANTS]
   [USE_EVIL_WOOD]
   [USE_ANIMAL_PRODUCTS]
   [USE_MISC_PROCESSED_WOOD_PRODUCTS]
   [EQUIPMENT_IMPROVEMENTS]
   [ABUSE_BODIES]
   [SPHERE_ALIGNMENT:WAR:512]
   [ART_FACET_MODIFIER:GOOD:0]
   [ART_FACET_MODIFIER:EVIL:512]
   [FRIENDLY_COLOR:5:0:1]
   [DEFAULT_SITE_TYPE:DARK_FORTRESS]
   [liKES_SITE:DARK_FORTRESS]
   [TOLERATES_SITE:DARK_FORTRESS]
   [CAN_HAVE_MILITARY_SITE_LEADER]
   [START_BIOME:ANY_DESERT]
   [BIOME_SUPPORT:ANY_WETLAND:1]
   [BIOME_SUPPORT:ANY_DESERT:3]
   [BIOME_SUPPORT:ANY_FOREST:2]
   [BIOME_SUPPORT:ANY_OCEAN:1]
   [BIOME_SUPPORT:ANY_LAKE:1]
   [BIOME_SUPPORT:MOUNTAIN:1]
   [BIOME_SUPPORT:ANY_GRASSLAND:1]
   [BIOME_SUPPORT:ANY_SAVANNA:3]
   [BIOME_SUPPORT:ANY_SHRUBLAND:1]
   [BIOME_SUPPORT:ANY_RIVER:1]
   [PROGRESS_TRIGGER_POPULATION:2]
   [PROGRESS_TRIGGER_PRODUCTION:2]
   [PROGRESS_TRIGGER_TRADE:2]
   [ACTIVE_SEASON:SPRING]
   [ACTIVE_SEASON:SUMMER]
   [ACTIVE_SEASON:AUTUMN]
   [MAX_STARTING_CIV_NUMBER:100]
   [START_GROUP_NUMBER:10]
   [MAX_POP_NUMBER:10000]
   [MAX_SITE_POP_NUMBER:120]
   [RELIGION:ANY_APPROPRIATE_POWER]
   [BEAST_HUNTER]
   [SCOUT]
   [PERMITTED_JOB:MINER]
   [PERMITTED_JOB:BOWYER]
   [PERMITTED_JOB:WOODCUTTER]
   [PERMITTED_JOB:ENGRAVER]
   [PERMITTED_JOB:ANIMAL_CARETAKER]
   [PERMITTED_JOB:ANIMAL_TRAINER]
   [PERMITTED_JOB:HUNTER]
   [PERMITTED_JOB:TRAPPER]
   [PERMITTED_JOB:ANIMAL_DISSECTOR]
   [PERMITTED_JOB:WOODCRAFTER]
   [PERMITTED_JOB:LEATHERWORKER]
   [PERMITTED_JOB:BONE_CARVER]
   [PERMITTED_JOB:WEAVER]
   [PERMITTED_JOB:CLOTHIER]
   [PERMITTED_JOB:COOK]
   [PERMITTED_JOB:BUTCHER]
   [PERMITTED_JOB:TANNER]
   [PERMITTED_JOB:WOOD_BURNER]
   [PERMITTED_JOB:SIEGE_OPERATOR]
   [PERMITTED_JOB:TRADER]
   [WORLD_CONSTRUCTION:TUNNEL]
   [WORLD_CONSTRUCTION:BRIDGE]
   [ETHIC:KILL_ENTITY_MEMBER:PERSONAL_MATTER]
   [ETHIC:KILL_NEUTRAL:ACCEPTABLE]
   [ETHIC:KILL_ENEMY:ACCEPTABLE]
   [ETHIC:KILL_ANIMAL:ACCEPTABLE]
   [ETHIC:KILL_PLANT:ACCEPTABLE]
   [ETHIC:TORTURE_AS_EXAMPLE:ACCEPTABLE]
   [ETHIC:TORTURE_FOR_INFORMATION:ACCEPTABLE]
   [ETHIC:TORTURE_FOR_FUN:ACCEPTABLE]
   [ETHIC:TORTURE_ANIMALS:ACCEPTABLE]
   [ETHIC:TREASON:PUNISH_CAPITAL]
   [ETHIC:OATH_BREAKING:PERSONAL_MATTER]
   [ETHIC:LYING:PERSONAL_MATTER]
   [ETHIC:VANDALISM:PERSONAL_MATTER]
   [ETHIC:TRESPASSING:PERSONAL_MATTER]
   [ETHIC:THEFT:PERSONAL_MATTER]
   [ETHIC:ASSAULT:PERSONAL_MATTER]
   [ETHIC:SLAVERY:ACCEPTABLE]
   [ETHIC:EAT_SAPIENT_OTHER:ACCEPTABLE]
   [ETHIC:EAT_SAPIENT_KILL:ACCEPTABLE]
   [ETHIC:MAKE_TROPHY_SAME_RACE:UNTHINKABLE]
   [ETHIC:MAKE_TROPHY_SAPIENT:ACCEPTABLE]
   [ETHIC:MAKE_TROPHY_ANIMAL:ACCEPTABLE]
« Last Edit: December 28, 2009, 01:58:10 pm by Zambaku »
Logged

Amalgam

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #1 on: December 28, 2009, 02:06:16 pm »

Of course it'll work. They'll be identical to goblins in all respects except for the name unless you changed something though. Not that that's necessarily a problem, they'll start separate civs and everything, they just won't be very unique.
Logged

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Making my first mod - Help needed
« Reply #2 on: December 28, 2009, 02:11:49 pm »

[CAN_LEARN][CAN_SPEAK] and [INTELLIGENT] are somewhat redundant; [intelligent] implies [can_learn], [can_speak], and [can_civ]. The last is necessary for the gnolls to become a civilization.

You don't need to mark things that gnolls shouldn't use as "never", rather, you can delete the undesired armor entries from the entity entirely. I don't know if the item rarity tags include "never".

A problem you might run into is that the gnolls will not automatically be hostile unless a war is triggered with your civ in world gen. Do you want the gnolls to always be hostile or occasionally trade? If the former, you want to add either [babysnatcher] or [itemthief], or else delete [can speak] and [intelligent] and add [can_civ].
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Zambaku

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #3 on: December 28, 2009, 02:42:27 pm »

Ah, okay =)
Was a bit afraid it would get messed up and become weird^^
I added a tail to it's body (hoping the game knows where the tail goes)
[BODY:HUMANOID:TAIL:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS:THROAT:NECK:SPINE:BRAIN:5FINGERS:5TOES:MOUTH]

Do I have to  make the syntax:
[CAN_LEARN][CAN_SPEAK] or can I do it like:
[CAN_LEARN]
[CAN_SPEAK]

Then I understand how this works...It wasn't so complicated afterall =)
I only have one more question about creatures.
Slimes, how would I go about doing slime creatures? Simply make a tail with a mouth?
« Last Edit: December 28, 2009, 02:46:47 pm by Zambaku »
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Making my first mod - Help needed
« Reply #4 on: December 28, 2009, 03:01:15 pm »

If you want more than "bigger goblins":
http://www.bay12games.com/forum/index.php?topic=44562.0

Grab entity, creature and items info there.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Amalgam

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #5 on: December 28, 2009, 03:09:57 pm »

Tails are added to the lower body, yeah. DF doesn't care how you separate tokens, you can put them on the same line or on the line below or even skip a few for clarity. As for how to make a slime, that's pretty much your decision. You don't have to stick with the existing parts when making new creatures either (wiki), so you can get creative. Or you could use something like [BODY:BASIC_1PARTBODY] to give it a single core body part, and add any other organs you see fit after that. Make sure to either give it a brain or [NOTHOUGHT], I think creatures will drop dead if they think they're supposed to have a brain but don't :P
Logged

Zambaku

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #6 on: December 28, 2009, 03:37:09 pm »

Nice, so I don't have to be afraid of where I put things, I can basically just pop things in wherever and it will sort itself out?=D

One last thing: Colors, is there a guideline on how to give the tiles specic colors? I want the gnolls to be brown for example: [TILE:'g'][COLOR:7:0:0]
Logged

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Making my first mod - Help needed
« Reply #7 on: December 28, 2009, 04:03:20 pm »

Nice, so I don't have to be afraid of where I put things, I can basically just pop things in wherever and it will sort itself out?=D

One last thing: Colors, is there a guideline on how to give the tiles specic colors? I want the gnolls to be brown for example: [TILE:'g'][COLOR:7:0:0]

Search the wiki for colors.
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Amalgam

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #8 on: December 28, 2009, 04:08:13 pm »

Not quite, parts are always added to a specific part or type of part defined in body_default.txt. For example:

[BODY:BASIC_1PARTBODY]
[BP:UB:body][UPPERBODY][LOWERBODY]

[BODY:BASIC_3PARTARMS]
[BP:RUA:right upper arm][CONTYPE:UPPERBODY][liMB]
[BP:LUA:left upper arm][CONTYPE:UPPERBODY][liMB]
[BP:RLA:right lower arm][CON:RUA][liMB]
[BP:LLA:left lower arm][CON:LUA][liMB]
[BP:RH:right hand][CON:RLA][GRASP]
[BP:LH:left hand][CON:LLA][GRASP]

It's usually something sensible, legs all go on the lower body and arms and heads go on the upper body. BASIC_1PARTBODY is defined as both an upper body and lower body so you can add most preexisting parts you want to it. If you want to do something nonstandard like put arms on a creature's head it would be trivial to make a copy of the arms you want to in body_default.txt, give it a unique name and change [CONTYPE] to whatever (in this example [CONTYPE:HEAD]), then select that for your creature. Or use [CON] and input the exact ID used for the part in the [BP] token. It's not actually that hard once you get used to it, but it's good to have the parts all connected or your creature won't work quite right...

Note that the body file and the creature files are completely different. They both use the [BODY] token, but it's used in an entirely different way in the two files. In body_default.txt you're using the [BODY] token to define different parts to use in creatures, in the creature files you're using it to select which parts they use. This confused me when I first started out, but I don't know about you... :P
Logged

Zambaku

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #9 on: December 28, 2009, 04:15:27 pm »

Humm, humm. It is a bit confusing, but I feel I understand it if I take my time with it =)
So, my gnoll uses a humanoid body, that means the lowerbody is included?
Logged

Amalgam

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #10 on: December 28, 2009, 04:19:48 pm »

Yup, humanoid is a useful part because it's got everything a human would have, that is, upper/lower body, arms/legs, hands/feet, and a head. Still have to add your own organs though.
Logged

Zambaku

  • Bay Watcher
    • View Profile
Re: Making my first mod - Help needed
« Reply #11 on: December 28, 2009, 04:36:57 pm »

Alright, then I belive I understand creature modding. A thousand thanks! ;D



Edit: Ehem...One last question. How do I make civs invade once you have enough valuables?
« Last Edit: December 29, 2009, 05:17:25 am by Zambaku »
Logged