Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Magic weapons and armor  (Read 1231 times)

Dragromblue

  • Bay Watcher
    • View Profile
Magic weapons and armor
« on: May 02, 2008, 12:24:00 am »

I have seen other mods do some magic weapons and armor, but I don't know how they did them. I would appreciate it if someone could help me get started with making them.
Logged
A HREF="http://www.bay12games.com/cgi-local/ultimatebb.cgi?ubb=get_topic&f=13&t=000642">Glass Bed Mod, perfect for those desert maps where wood can be difficult to get.
Glass goodies abound, so now you can download my Glass Mod to get a complete co

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Magic weapons and armor
« Reply #1 on: May 02, 2008, 01:52:00 am »

OMG I typed LONG-LONG tutorial text and occasionally hit the "x" in the right-upper corner of my browser window :0! (Damn this touchpad).
Wait a few minutes, I'll try again.

[EDIT] O.K.

Open /raw/objects/item_weapons.txt

This is a file where your weapons' info is stored.
You have two options - to add your weapon here, or to make another .txt file with your weapon which can be easily shared in internat (because it won't replace original files and will be modular). To make a modular file create new item_weapons_custom .txt file (or something like this) and input this text:
[text]
item_weapons_custom

[OBJECT:ITEM]
[/text]

Then copy short sword entry from item_weapons.txt to your file.
Let's look at it.

[ITEM_WEAPON:ITEM_WEAPON_SWORD_SHORT] <- item ID
[NAME:short sword:short swords] <- item name singular/plural
[DAMAGE:100:SLASH] <- damage amount and type
[WEIGHT:30] <- weapon weight
[SKILL:SWORD] <- which category this weapon in (sword/axe/mace/hammer)
[CRIT_BOOST:1] <- [optional] increases chance to hit internal parts (1-..)
[TWO_HANDED:4] <- race <= size 4 will use this as two-handed
[MINIMUM_SIZE:4] <- race < size 4 cannot use this weapon
[CAN_STONE] <- [optional] can be made from obsidian
[MATERIAL_SIZE:3] <- number of metal bars to forge the weapon

I hope it's not that hard.
A few comments:
Damage type for usual weapons are PIERCE, BLUDGEON, SLASH and GORE (whips).
There're 3 more types: COLD, HEAT and BURN.

CRIT_BOOST is not boolean, 1 is value, so it may be 2, 3 and more.

Damage for short sword is 100, for long sword is 120.
Look at other weapons to determine the comparative power of your custom weapon in-game.

Example of "magma sword":
[ITEM_WEAPON:ITEM_WEAPON_SWORD_MAGMA] <- item ID
[NAME:magma sword:magma swords]
[DAMAGE:120:HEAT] <- OUCH IT IS HOT!
[WEIGHT:50]
[SKILL:SWORD]
[TWO_HANDED:5]
[MINIMUM_SIZE:5]
[MATERIAL_SIZE:3]

Also there're ranged weapons:

[ITEM_WEAPON:ITEM_WEAPON_BOW] <- ID again
[NAME:bow:bows] <- name again
[DAMAGE:40:BLUDGEON] <- damage again
[WEIGHT:30] <- weight
[SKILL:SWORD] <- in melee a bow is considered as a sword
[RANGED:BOW:ARROW] <- main part here. Look below*
[TWO_HANDED:0] <- ranged weapons are one-handed but require 2nd hand to be empty
[MINIMUM_SIZE:5] <- minimum size to use
[MATERIAL_SIZE:3] <- namber of bars inside

*BOW shows that it uses bow skill in ranged, ARROW indicates the type of ammo it uses. There're common ARROW and BOLT, but you can make other types.
There's AMMO in item_ammo.txt

[ITEM_AMMO:ITEM_AMMO_ARROWS] <- ID again
[NAME:arrow:arrows] <- name
[CLASS:ARROW] <- ammo type
[DAMAGE:100:PIERCE] <- damage again

Example of harpoon shooter:
[ITEM_WEAPON:ITEM_WEAPON_HARPOONGUN]
[NAME:harpoon gun:harpon guns]
[DAMAGE:40:BLUDGEON]
[WEIGHT:30]
[SKILL:HAMMER]
[RANGED:CROSSBOW:HARPOON] - is considered crossbow and uses HARPOON ammo
[TWO_HANDED:0]
[MINIMUM_SIZE:5]
[MATERIAL_SIZE:3]

Let's make harpoon ammo (in item_ammo.txt or make a modular file as shown above):
[ITEM_AMMO:ITEM_AMMO_HARPOONS]
[NAME:harpoon:harpoons]
[CLASS:HARPOON] <- new type of ammo
[DAMAGE:100:PIERCE]

Let's add some magic:

[ITEM_AMMO:ITEM_AMMO_HARPOONS_LIGHT]
[NAME:harpoon of light:harpoons of light]
[CLASS:HARPOON]
[DAMAGE:100:BURN] <- IT BURNS!

[ITEM_AMMO:ITEM_AMMO_HARPOONS_FROST]
[NAME:frost harpoon:frost harpoons]
[CLASS:HARPOON]
[DAMAGE:100:COLD] <- IT CHILLS!


The last part:
open entity_default.txt and find the race you want to use this weapon.
There's text like:

code:

   ...
   [WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [WEAPON:ITEM_WEAPON_MACE]
   [WEAPON:ITEM_WEAPON_CROSSBOW]
      [AMMO:ITEM_AMMO_BOLTS]
   ...


Insert your weapon and ammo for ranged weapons (below their names)
So in our case it'll be:

code:

   ...
   [WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [WEAPON:ITEM_WEAPON_SWORD_MAGMA]
   [WEAPON:ITEM_WEAPON_HARPOON_GUN]
      [AMMO:ITEM_AMMO_HARPOONS]
      [AMMO:ITEM_AMMO_HARPOONS_LIGHT]
      [AMMO:ITEM_AMMO_HARPOON_FROST]
   [WEAPON:ITEM_WEAPON_MACE]
   ...



I hope it helps.

[ May 02, 2008: Message edited by: Deon ]

Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Loctavus

  • Bay Watcher
  • British Hammerdwarf
    • View Profile
Re: Magic weapons and armor
« Reply #2 on: May 02, 2008, 10:29:00 am »

Adding the HEAT damage to a weapon should cause the target to catch fire. This could be very good, and very bad for you. Fire arrows would be lethal, and a flaming sword is too entertaining to pass up if it would work well.
Logged
Tea and -Elf Tallow Biscuits- anyone?

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Magic weapons and armor
« Reply #3 on: May 02, 2008, 10:37:00 am »

Really?
I tried hard to make "heat" damage set fire, but haven't succeed in my many attempts.
Are you sure this can be done?
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Loctavus

  • Bay Watcher
  • British Hammerdwarf
    • View Profile
Re: Magic weapons and armor
« Reply #4 on: May 02, 2008, 10:47:00 am »

Ah I was just working from the wiki, it might be a bug or it might just be specific creature attacks.

Heat    Ignition of target    Special Creature Tokens(Attack)

My bad, should really test this stuff first before I crow about it but I just discovered it  :p

Logged
Tea and -Elf Tallow Biscuits- anyone?

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: Magic weapons and armor
« Reply #5 on: May 02, 2008, 12:12:00 pm »

Is there any way to give a modded item the nifty triangular symbols that denote a magic item, that aren't currently being used for anything?
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Magic weapons and armor
« Reply #6 on: May 02, 2008, 02:08:00 pm »

Heat atack do not set fire.
But if the creature's body temperature is hot enough, it will set fire on hit (if the enemy wear clothes, I don't think you can lit body, just clothes that they wear).
It's [HOMEOTHERM:VALUE], where value = Farenheit + 9968 (or [Celsius*9/5 + 10000]).
So water boiling is at 10180, while cave temperature is something near 10015. Human doby temperature is 10067.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Magic weapons and armor
« Reply #7 on: May 02, 2008, 03:38:00 pm »

Creating magic weapons is a VERY tedious process.

You can look in my new MA mod in this forum (the test version one), I've included a weapon file from the magic weaponry mod I was planning to add. I've had to make 80 weapon entries for each of the 8 weapons I've made, and that's only 8 prefixes and 8 suffixes for each. 640 weapon entries to make 8 magic weapons. Damn tedious.

Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Dragromblue

  • Bay Watcher
    • View Profile
Re: Magic weapons and armor
« Reply #8 on: May 02, 2008, 10:25:00 pm »

Thank you for the guide. Is there a way to make sure that the weapon can only be made with a certain matirial?
Logged
A HREF="http://www.bay12games.com/cgi-local/ultimatebb.cgi?ubb=get_topic&f=13&t=000642">Glass Bed Mod, perfect for those desert maps where wood can be difficult to get.
Glass goodies abound, so now you can download my Glass Mod to get a complete co

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Magic weapons and armor
« Reply #9 on: May 03, 2008, 12:26:00 am »

No for now -.- .
As I said, I hate "iron fireblasts" :-). But it's better than nothing. Use your imagination.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Dragromblue

  • Bay Watcher
    • View Profile
Re: Magic weapons and armor
« Reply #10 on: May 03, 2008, 12:39:00 am »

ok... Well, thank you all for the assistance you have given. Magic glass weapons will hopefully be soon avlible in my glass mod. I have a plan, but it will take time to come into creation.

Success, I have added some magic glass weapons, so please look and post what you think of them. They are in the glass mod. I am glad it didn't take me as long as I thought it would.

[ May 03, 2008: Message edited by: Dragromblue ]

Logged
A HREF="http://www.bay12games.com/cgi-local/ultimatebb.cgi?ubb=get_topic&f=13&t=000642">Glass Bed Mod, perfect for those desert maps where wood can be difficult to get.
Glass goodies abound, so now you can download my Glass Mod to get a complete co

Arkose

  • Bay Watcher
    • View Profile
Re: Magic weapons and armor
« Reply #11 on: May 03, 2008, 12:13:00 pm »

Does anyone know if it is possible to give creatures ranged attacks other than fire breath? I'd like to have creatures that shoot cold projectiles and the like.
Logged

Fleeb

  • Bay Watcher
  • The Fleebiest
    • View Profile
Re: Magic weapons and armor
« Reply #12 on: May 03, 2008, 01:01:00 pm »

Pretty sure firebreath is all there is, for now.
Logged
"If you push something hard enough, it will fall over" -Fudds First Law of Opposition
"If it goes in, it must come out" -Teslicles Deviant to Fudds Law

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Magic weapons and armor
« Reply #13 on: May 03, 2008, 02:04:00 pm »

If the creatures aren't in entities, you have no luck with that.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository