Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: How to make 'foreign' armour and weapons  (Read 3004 times)

doomxorz

  • Bay Watcher
    • View Profile
How to make 'foreign' armour and weapons
« on: July 31, 2012, 08:54:12 am »

Would it be possible to allow dwarves to make weapons considered 'foreign', such as scimitars and what not?

I recently struck me first adamantine vein, and would like to replace the foreign weapons my militia captains have with candy ones.
Logged

krisslanza

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #1 on: July 31, 2012, 09:04:11 am »

I think the only way would've been to change the raws so those items aren't foreign and are actually makeable by Dorfs.

As it stands the only way for it to happen is a fey mood, and hope.

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #2 on: July 31, 2012, 09:08:59 am »

what raws is the foreign tag in? I didnt see anything in item_weapons
Logged

krisslanza

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #3 on: July 31, 2012, 09:17:50 am »

It's not a tag, but any weapon/armor type that exists in the game but isn't in the civilization's raws as an item they can make is considered "foreign" as I recall. So if you wanted to have all dwarves make scimitars, you'd have to add them into the civilization's raws.

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #4 on: July 31, 2012, 10:22:14 am »

Oh that makes sense, thank you :) erm.. which raw file is that?
Logged

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #5 on: July 31, 2012, 10:32:52 am »

Nevermind, found it, entity_default. Another question: how much does whitespace matter in raws?
Logged

Scelly9

  • Bay Watcher
  • That crazy long-haired queer liberal communist
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #6 on: July 31, 2012, 10:34:03 am »

Nevermind, found it, entity_default. Another question: how much does whitespace matter in raws?
It does not, but it makes everything MUCH easier.
Logged
You taste the jug! It is ceramic.
Quote from: Loud Whispers
SUPPORT THE COMMUNIST GAY MOVEMENT!

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #7 on: July 31, 2012, 10:45:18 am »

Okay thanks. Hmm. I've added the foreign weapons to the dwarven civ, but the workshops don't offer the making of them. Is that moddable?
Logged

Scelly9

  • Bay Watcher
  • That crazy long-haired queer liberal communist
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #8 on: July 31, 2012, 10:46:18 am »

It is. You need to find the workshop files though, I can't remember where they are.
Logged
You taste the jug! It is ceramic.
Quote from: Loud Whispers
SUPPORT THE COMMUNIST GAY MOVEMENT!

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #9 on: July 31, 2012, 10:47:42 am »

are they not in the raws?
Logged

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #10 on: July 31, 2012, 11:03:20 am »

They are, IIRC, it is in a reactions file, and you have to gen a new world for that, again, IIRC.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #11 on: July 31, 2012, 11:07:54 am »

To convert Scimitars from a foreign to a domestic weapon, you don't need to make any changes to workshops, only add [WEAPON:ITEM_WEAPON_SCIMITAR:FORCED] in the Dwarven section of entity_default.  But any changes to your entity probably can't be made in an existing world (there is a stickied thread on that topic in this forum, if you want to read more.) In the new world they will just appear normally in your forges, manager list, etc.

If you want to create a custom workshop that makes Scimitars, that is a different way of doing it, and that requires editing reactions and workshops.  But still, you'd have to change your Entity to give yourself access to that workshop.

http://www.bay12forums.com/smf/index.php?topic=29157.0

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #12 on: July 31, 2012, 11:13:59 am »

hrrm.. I dunno that its worth making a new world.. But thank you! :)
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: How to make 'foreign' armour and weapons
« Reply #13 on: July 31, 2012, 11:31:01 am »

If you're not opposed to using DFHack, you can very easily accomplish this using the "lua" command: just type df.global.world.entities.all[df.global.ui.civ_id].resources.unk8[1]:insert(0,20) and you should be able to make scimitars at any of your forges. If you want to add the ability to create other types of weapons, run the command for i,j in pairs(df.global.world.raws.itemdefs.weapons) do print(i,j.name) end to get the proper numeric subtype, then rerun the above command with that number instead of '20'.

You can use similar commands to add other types of items (ammo = unk8[4], armor = unk8[3], helms = unk8[5], gloves = unk8[6], shoes = unk8[7], pants = unk8[8]); in the next release, those will be replaced by more reasonable field names (weapon_type, ammo_type, armor_type, etc.).
« Last Edit: July 31, 2012, 11:36:22 am by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

doomxorz

  • Bay Watcher
    • View Profile
Re: How to make 'foreign' armour and weapons
« Reply #14 on: July 31, 2012, 02:27:15 pm »

hrrrmm... I typed that, with and without 'lua' before it, and it said command not recognized
Logged
Pages: [1] 2