Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question: How would I add a new profession to my game?  (Read 765 times)

Doomshifter

  • Bay Watcher
  • Deal with it.
    • View Profile
Question: How would I add a new profession to my game?
« on: July 26, 2009, 03:24:48 am »

Okay, I'll set it nice and simple. I want to make a Gunner profession. I've already modded guns in, but I want to specifically be able to set my dwarves to pick up guns instead of crossbows.

Also, while I'm here... how do I change the materials an object can be made of?
« Last Edit: July 26, 2009, 03:28:03 am by Doomshifter »
Logged
Add me on PesterChum! My chumhandle is doomedHermit.
Right now Rampages seem to be Godzilla quietly walking into Tokyo, biting the leg off of one reporter... then creeping off again without a sound.

Dohon

  • Bay Watcher
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #1 on: July 26, 2009, 05:46:53 am »

While I'm still pretty new to modding, I can give you some pointers. :)

1) I don't think it is possible to create an extra "profession". Every ranged weapon reverts back to the crossbow skill and while you can change the damage the projectile/weapon does, you cannot change the skill AFAIK. I think you will have to fiddle around in-game (using forbidding) to make sure a dwarf picks up a gun instead of a crossbow.

2) If I am not mistaken, it is a combination of files. matgloss_metal shows you the metal and the tags there determine for what the metal can be used. [DIGGER] means you can make picks from the metal, [WEAPON] means you can make axes out of it, ... That's all the weapon stuff though.

Furniture is hardcoded, so every stone in the other matgloss files, every woodtype in the matgloss_wood and every metal in the  matgloss_metal file can be used for furniture. I don't know in case of the metal you need a seperate tag, but a quick look showed me that wasn't the case.

Hope this all helps a bit. I'm still new to the modding, so you might want to wait a bit until an experienced modder gives the green light. :)

EDIT: You probably already took a look at this, but just for the sake of being thorough, here is the wiki link to the topic modding:

http://dwarf.lendemaindeveille.com/index.php/Category:Modding
Logged
Quote from: Lolfail0009
Quote from: GuesssWho
Also, why is there a stray hen having a tantrum?
CLUCK CLUCK MOTHERF***ER

Doomshifter

  • Bay Watcher
  • Deal with it.
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #2 on: July 26, 2009, 06:22:20 am »

While I'm still pretty new to modding, I can give you some pointers. :)

1) I don't think it is possible to create an extra "profession". Every ranged weapon reverts back to the crossbow skill and while you can change the damage the projectile/weapon does, you cannot change the skill AFAIK. I think you will have to fiddle around in-game (using forbidding) to make sure a dwarf picks up a gun instead of a crossbow.

2) If I am not mistaken, it is a combination of files. matgloss_metal shows you the metal and the tags there determine for what the metal can be used. [DIGGER] means you can make picks from the metal, [WEAPON] means you can make axes out of it, ... That's all the weapon stuff though.

Furniture is hardcoded, so every stone in the other matgloss files, every woodtype in the matgloss_wood and every metal in the  matgloss_metal file can be used for furniture. I don't know in case of the metal you need a seperate tag, but a quick look showed me that wasn't the case.

Hope this all helps a bit. I'm still new to the modding, so you might want to wait a bit until an experienced modder gives the green light. :)

EDIT: You probably already took a look at this, but just for the sake of being thorough, here is the wiki link to the topic modding:

http://dwarf.lendemaindeveille.com/index.php/Category:Modding

Thanks for this! I've noticed that Adventurer mode dwarves have a fifty-fifty chance of starting off with a crossbow or a rifle. I just made a new character and got a Bizmuth Bronze Rifle with 30-odd iron bullets. Excellent.
Logged
Add me on PesterChum! My chumhandle is doomedHermit.
Right now Rampages seem to be Godzilla quietly walking into Tokyo, biting the leg off of one reporter... then creeping off again without a sound.

Teldin

  • Bay Watcher
  • Canadian Bacon
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #3 on: July 26, 2009, 09:01:58 am »

All you can really do is remove crossbows and rename the profession.
Logged

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #4 on: July 26, 2009, 11:56:28 am »

1) I don't think it is possible to create an extra "profession". Every ranged weapon reverts back to the crossbow skill and while you can change the damage the projectile/weapon does, you cannot change the skill AFAIK
You can.
[ITEM_WEAPON:ITEM_WEAPON_CROSSBOW] unique identifier
[NAME:crossbow:crossbows] name, obviously
[DAMAGE:70:BLUDGEON] damage done by melee, use ammo class for ranged damage
[WEIGHT:40] weight of weapon
[SKILL:HAMMER] melee skill
[RANGED:CROSSBOW:BOLT]
RANGED:skill:ammo
[TWO_HANDED:0] creatures smaller then this size require two hands to use it
[MINIMUM_SIZE:5] minimum size that creature must be to wield
[MATERIAL_SIZE:3] amount of metal used in creation?
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Teldin

  • Bay Watcher
  • Canadian Bacon
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #5 on: July 26, 2009, 01:55:16 pm »

1) I don't think it is possible to create an extra "profession". Every ranged weapon reverts back to the crossbow skill and while you can change the damage the projectile/weapon does, you cannot change the skill AFAIK
You can.
[ITEM_WEAPON:ITEM_WEAPON_CROSSBOW] unique identifier
[NAME:crossbow:crossbows] name, obviously
[DAMAGE:70:BLUDGEON] damage done by melee, use ammo class for ranged damage
[WEIGHT:40] weight of weapon
[SKILL:HAMMER] melee skill
[RANGED:CROSSBOW:BOLT]
RANGED:skill:ammo
[TWO_HANDED:0] creatures smaller then this size require two hands to use it
[MINIMUM_SIZE:5] minimum size that creature must be to wield
[MATERIAL_SIZE:3] amount of metal used in creation?

I am pretty sure what he was saying was that you can't edit the skill besides changing its name in the entity raw. You can make any weapon use any combat skill freely, though, but you're still going to always need the defaults. You can't currently make, for example: 'RANGED:RIFLE:BULLET', but you could make 'RANGED:CROSSBOW:BULLET', change crossbows into rifles, and change the profession name to 'RIFLEMAN'. Voila, you have your rifles. Remove the actual crossbow item and nobody's the wiser.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #6 on: July 26, 2009, 03:12:50 pm »

Yeah, the original question was about profession, and it's impossible for now,

Toady told us that it's not a limiter in the next release.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Sensei

  • Bay Watcher
  • Haven't tried coffee crisps.
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #7 on: July 26, 2009, 06:47:46 pm »

You could, in fortress mode, rename them to gunners and use elaborate stockpiles to ensure they have rifles.

In the next release, you will just be able to tell them to equip rifles.
Logged
Let's Play: Automation! Bay 12 Motor Company Buy the 1950 Urist Wagon for just $4500! Safety features optional.
The Bay 12 & Mates Discord Join now! Voice/text chat and play games with other Bay12'ers!
Add me on Steam: [DFC] Sensei

Doomshifter

  • Bay Watcher
  • Deal with it.
    • View Profile
Re: Question: How would I add a new profession to my game?
« Reply #8 on: July 27, 2009, 07:08:50 am »

Thanks everyone for the help!
Logged
Add me on PesterChum! My chumhandle is doomedHermit.
Right now Rampages seem to be Godzilla quietly walking into Tokyo, biting the leg off of one reporter... then creeping off again without a sound.