v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "40d Talk:Modding guide"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Magma-safe mechanism mod)
Line 55: Line 55:
 
My word processer won't let me save .txts. Does that matter?
 
My word processer won't let me save .txts. Does that matter?
 
:Yes. A word processor program (like anything from Microsoft Office) will generate all sorts of gibberish in addition to your text. [[User:HeWhoIsPale|HeWhoIsPale]] 11:22, 5 August 2008 (EDT)
 
:Yes. A word processor program (like anything from Microsoft Office) will generate all sorts of gibberish in addition to your text. [[User:HeWhoIsPale|HeWhoIsPale]] 11:22, 5 August 2008 (EDT)
 +
::Just use notepad, assuming you have it.  --[[User:Arkenstone|Arkenstone]]
  
 
== Adventure mode? ==
 
== Adventure mode? ==

Revision as of 18:23, 17 August 2009

[re: Creating separate .txt file for new creatures]

This didn't work well for me. I added a new playable civ (Klackon) to the entity_default file like this page said, and the species (Klackon) in that new civ was located in a new .txt file. Dwarves still showed up, but never my civ. I kept reducing the number of allowable dwarf civs thinking they were just competing for selection, culminating in getting rid of them entirely, ending up in developing a world that had humans and elves only! Oops.

Finally, I added my Klackon creature to the end of the creature_standard file instead of only having them in the creature_klackon.txt file.. Voila! I now have dwarf civs and klackon civs in the same world and actually get a choice between them when I make a fort.

It's very possible that I just messed up something basic when I made the new .txt file to contain the creature definition, but I could still point out that making a new, separate .txt file certainly didn't make things simpler for me, so it's not such great advice for budding modders.

Everything else worked fine though, so thanks, still!

Have to be sure to add the text files name ( "creature_klackon" without the parenthesis, or brackets) and the line [OBJECT:CREATURE] to tell the game its a creature file. --Darkone 18:17, 2 May 2008 (EDT)

Bad info?

So someone added a big notice at the top that suggests there's a fair bit of out-of-date text.. but no mention of what that may be, no links to forum posts, et cetera. Someone want to clue me in on just what, exactly, is no longer relevant? --Nunix 15:14, 28 February 2008 (EST)

I think it's safe to take off the version warning but the examples need to be tested. It would probably be easier to manage if this article was split into smaller, in depth, modding guides. --Hex Decimal 23:07, 28 February 2008 (EST)

I would love to see a little more descriptive way of handling the raw files as opposed to simply a slew of examples on things to mod. Perhaps I'm just not spending enough time "tinkering", but it seems that the current article is set up rather poorly. Is that just me? --Borgin [EDIT] I didn't realize there were complete lists of tokens. Silly me; that sure makes things easier. 1:37, 15 May 2008 (CST)

Arachnid Tutorial

Minor nitpick here, but it apears he forgot to add :5FINGERS: tested it and it works, added it to wiki. as one of its body tags to go with its hands. Also, as a nice additional tutorial, maybe add in this little bit of code to show people how to add joints? --Darkone 18:39, 2 May 2008 (EDT)

[BODY:ARACHNID_JOINTS]
[BP:RUA_J:right shoulder][CON:RUA][JOINT][SMALL][INTERNAL][RIGHT]
[BP:LUA_J:left shoulder][CON:LUA][JOINT][SMALL][INTERNAL][LEFT]
[BP:RLA_J:right elbow][CON:RLA][JOINT][SMALL][INTERNAL][RIGHT]
[BP:LLA_J:left elbow][CON:LLA][JOINT][SMALL][INTERNAL][LEFT]
[BP:RH_J:right wrist][CON:RH][JOINT][SMALL][INTERNAL][RIGHT]
[BP:LH_J:left wrist][CON:LH][JOINT][SMALL][INTERNAL][LEFT]

Dwarven Flight

If I add the line [FLIER] to my dwarven civilisation would anything interesting happen? --AlexFili 05:30, 18 June 2008 (EDT)

No, dwarves will just spam "Task cancelled: dangerous terrain". They will have problems doing anything. --Someone-else 08:09, 18 June 2008 (EDT)
Flight pathing is even broken for invaders. What a shame! Swimmers can have problems too, though not that bad. --Navian 16:40, 21 November 2008 (EST)

Fireproof Trees?

Is there any means to create a wood material (and corrosponding trees to harvest for it) which will not burn, or at least won't ignite from contact with magma? --Rakankou 00:47, 25 July 2008 (EDT)

I am no expert but, what if you added the [FIRE_IMMUNE] tag to trees. Do not know if that will work, or if thats even the right tag. Magikarcher 02:12, 25 July 2008 (EDT)
[FIREIMMUNE] doesn't seem to work for making a fire safe wood. I think it's a creature token, anyway, so it makes sense that it wouldn't work for materials. --Rakankou 12:27, 25 July 2008 (EDT)
It's a creature token so it won't work. However, taken from Adamantine's entry (it is magma-proof):
[SPEC_HEAT:7500]
[MELTING_POINT:25000]
[BOILING_POINT:50000]
Hopefully that helps. --Borgin 20:11, 12 August 2008

IGNITE_POINT is a matgloss token. Random832 17:01, 21 November 2008 (EST)

.txt

My word processer won't let me save .txts. Does that matter?

Yes. A word processor program (like anything from Microsoft Office) will generate all sorts of gibberish in addition to your text. HeWhoIsPale 11:22, 5 August 2008 (EDT)
Just use notepad, assuming you have it. --Arkenstone

Adventure mode?

Do I have to add the tag adventure tier to the dark elves to make them playable in adventure mode? Yaddy1 16:13, 5 August 2008 (EDT)

Yup. --Navian 16:40, 21 November 2008 (EST)

Modded creatures not showing?

I tried making my own races for a test. Spartans, copied from entity_info of dwarves and creature_Standard info from Humans and small bit from Titans. Persians, Like goblins but weaker and stupider. after running 4 different regions with different settings, only Goblins, Dwarves and Humans showed up. What am I doing wrong? There is not a single trace of them even existing at the legends screen. I really want to kick persians with spartans instead of biting goblins with dwarves. Skibiliano 14:22, 27 August 2008 (EDT)

The problem probably lies in the titan tags. In any case, backing up the original raws and just editing them would be easier to test. --Navian 16:40, 21 November 2008 (EST)
Did you get the filenames and [OBJECT] tags at the top? Those are easy to miss. I'd say make them copies of dwarves and goblins, respectively - once worlds generate with them, tweak them to be like you want. Also, you can temporarily move entity_default.txt to another dir to make it easier to debug. Darekun 11:39, 1 April 2009 (UTC)

"Random" civ selection with more than one playable civ

In the main text on this page (and I swear in a fair few other places, but I can't find them for some reason), it notes that if you have the [CIV_CONTROLLABLE] token on more than one entity it will randomly select from the playable civs when you embark. Well, yes, it's random in the sense that it initially selects a random group for your fortress to be an offshoot of, but you can easily select the desired species of your fort inhabitants by manually picking the appropriate group from the embark screen, either using legends mode to work out which group is which species, or by checking the "nearby civilizations" section and seeing which species is at the top (it seems that your species will always be at the top of the list). I'm going to adjust the "random selection" note to say you can choose your civilization, but I'm not sure if a whole mini-tutorial on picking your civ really belongs in the modding guide, or whether it should go somewhere else. Comments? --Quil 12:10, 16 November 2008 (EST)

Just the one line about how the race you'll be playing will be at the top of the 'neighbours' list wouldn't be that bad, wouldn't it? No tutorial required, anyway. Maybe we could divide the topic later, but I think this is an relevant as anything, considering how much depth can be added to the game this way. --Navian 18:55, 16 November 2008 (EST)
Okay, added a paragraph on picking your species. I think I covered all the pertinent points fairly succinctly. As a random aside, while the species I added is quite hardy and long-lived, so they've never been wiped out, I'm not sure if the game will care if some of the playable species die out. While in the vanilla game with the default settings it's impossible to kill off the dwarves, since the game will reject it due to having no playable civs, with additional playable races it may just be possible to have your extra species (or the dwarves) all die out and be unplayable in an otherwise acceptable map.--Quil 09:44, 17 November 2008 (EST)
I confirmed that. My aquatic playable civ didn't appear on a map without their starting biome, and my single gender race was wiped out by humans on the next go, leaving only the other playable each time. --Navian 16:40, 21 November 2008 (EST)

Rock Crystals

How would I go about modding the game to either allow me to import rough rock crystals or allowing me to make crystal glass from cut rock crystals?--Mjo625 07:37, 19 March 2009 (UTC)

Or add a reaction that will change rock crystals into rough rock crystals. I added

[REACTION:ROUGH ROCK CRYSTAL] [NAME:Melt Rock Crystal] [SMELTER] [REAGENT:1:SMALLGEM:NO_SUBTYPE:STONE:ROCK_CRYSTAL] [PRODUCT:100:1:ROUGH:NO_SUBTYPE:ROCK_CRYSTAL] [FUEL]

to reaction_standard but it doesn't seem to be working. The dwarf takes the rough crystal and charcoal to the smelter, works for a while but doesn't produce anything.--Mjo625 10:22, 19 March 2009 (UTC)

If they take the reagents and don't produce a product, that means there's an error in the [PRODUCT] tag. In this case, you're missing a term - ROCK_CRYSTAL is a matgloss with no material token. I'd guess the correct version would be [PRODUCT:100:1:ROUGH:NO_SUBTYPE:STONE:ROCK_CRYSTAL].
It looks like imports are rather hardcoded, so no importing it; you could add a creature that drops it via [ITEMCORPSE], but smelter reactions are probably the way to go. Darekun 11:35, 1 April 2009 (UTC)

adding a programming emphasis

Hi, I am interested in modding and am a programmer by profession. I think it would be nice to approach the modding guide the same way as any programming language guide. It may be that not a lot of people who are programmers are coming to do Modding in DF but that doesn't mean they couldn't benefit greatly from some basic programming theory and knowledge. In fact, it was modding old-school rogue games for BBS systems that actually introduced me to real programming... I hope any edits I make meet with your approval. I also hope maybe we can start a plain-speech syntax guide for the mod files and a glossary of terms for all the hard-coded tags. I must admit that at this stage, going through the default files, I am a bit overwhelmed with the variety and have trouble knowing which tags/flags/tokens correspond to a hard-coded concept and which ones are simply built from other tags. The entity tags also have tokens whose importance I cannot yet determine. At these times, I wish I just had a simple glossary to refer to! So my request is that the wiki could have some sort of glossary/index for all these terms similar to the way creatures are organized. For an example of a code dictionary, please see: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/ (I know the terms are a bit esoteric for non-programmers, like bitwise operators appear at the top of the list... but the concept is simple--and df modding has no operators, only keywords)

If there's anything over at bay12 like this, please let me know. I looked but couldn't find anything. Consensus seemed to be that it belonged on this wiki.

Well, I will try to do this myself unless there are serious objections, but since I have a full-time job, I would love it if others were to participate! --Jpwrunyan 02:38, 27 March 2009 (UTC)

Healing Mods?

Is it possible to mod body parts that do not normally heal (like the spine) to heal like any other broken limb? If so, that should probably be here.--Zipdog 03:39, 6 May 2009 (UTC)

Making Coke from Other Materials

So rather than keep re-rolling maps before I found a small map with both adamantine and fuel/magma, I decided I'd just mod in a reaction to change gneiss or graphite or something into coke.

What I did was copy the entry under "smelt lignite into coke" from matgloss_reactions.txt and then changed all the "lignite" into "gneiss". However, it didn't work. There's no option at the smelter to create coke from gneiss. Is there something else I need to do? Lymojo 18:53, 15 May 2009 (UTC)Lymojo


I believe that gneiss uses the "METAMORPHIC" subtype tag--whereas lignite does not have a subtype specified--so in the reaction.txt (mine's called reaction_standard, maybe because I'm using the Mac version) you have to change [REAGENT:1:STONE:NO_SUBTYPE:STONE:LIGNITE] to [REAGENT:1:STONE:METAMORPHIC:STONE:GNEISS]. Also: it appears that only stone in the "layer" and "soil" matglosses have defined subtypes, so you will always have to check their subtypes if you want to use them in reactions; minerals and ores, on the other hand, should work with "NO_SUBTYPE".Ohsottovoce 16:43, 17 May 2009 (UTC)

Magma-safe Mechanism Mod?

While I know this wiki isn't an FAQ-guide, I think it would be helpful for those poor noobs who can never find both Bauxite and magma/rivers in the same place. I can list the mod to give Iron the "any" property of adamantine, but I don't know specifically how to make Iron available for mechanisms otherwise.

To give Iron the "any" property of adamantine you need to (close Dwarf Fortress and) open your "...[Dwarf fortress]\raw\objects" folder, and open "matgloss_metal.txt". Lucky for you, Iron is the top most item and all you have to do is add "[ANY_USE]" (without quotation marks) to the end of the "[WEAPON][WEAPON_RANGED][AMMO][DIGGER][ARMOR][ANVIL]" string, save the file enjoy!

I didn't add this yet because I want to see if anyone else feels this should be added here before I do so on my own. Kenji 03 10:11, 24 July 2009 (UTC)