Bay 12 Games Forum

Please login or register.

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

Author Topic: Modding Lessons  (Read 2455 times)

Kyubee

  • Bay Watcher
  • modding is hard
    • View Profile
Modding Lessons
« on: May 20, 2018, 10:02:39 pm »

So, there's a lack of a big "What have you learned modding" thread active. I think that should be a thing, for both comedy and genuine interaction, so here goes. Feel free to add your own, be them serious moding tips, or tips for the real world based off modding.

Some things I learned;

If youre a night creature, and you raise zombies, those zombies will target you.

Being completely fireproof and being able to eat are mutually exclusive.

You may be able to completely overhaul the game, but forgotten beasts are eternal.

When you want something to be a harmless "fluff" creature, it will be an unstoppable engine of destruction. Conversely, when you want to make an unstoppable worldbreaker, a single unarmed dwarven infant will take it out without being damaged at all.

Even though it's simple text editing, modding DF is like programming; If things work, you don't know why, and when they inevitably experience errors, you also don't know why.

Cheating is okay, if you're doing it for the sake of reaching a certain fortress level to further test for bugs.

Of all the parts of the object testing arena, you're almost guaranteed to only use one or two. (I mean, does anyone actually use more than the center and bottom right portions, unless testing hyper specific scenarios?)

Losing is fun, unless that loss comes in the form of an unprecedented game crash.

Flying sentients are good on paper, but then you realize theyre always stuck in trees.

One small tag can completely change how modding works (just look at how [ANIMAL_CLASS] and related tokens have made so much more possible)

It's seriously impractical to try and change giant animals as opposed to just remaking them from scratch.

There's always one error in your raws you just cant fix.

It's more practical to  just use vanilla weaponry than to add your own custom arsenal.

Put yours down here~
« Last Edit: May 20, 2018, 10:04:54 pm by Kyubee »
Logged
My (long abandoned) mod: http://www.bay12forums.com/smf/index.php?topic=176501.0
The litten is wandering around the dump now, occasionally exploding.

fishboyliam

  • Bay Watcher
    • View Profile
Re: Modding Lessons
« Reply #1 on: May 21, 2018, 08:15:03 am »

One of the most important things a modder can learn, IMO, is that you can easily copy raws and edit them; like I, for example, wanted to make a big ol' amphibious reptile that can fight, but would rather chill. I realized that it's basically a hippo; I just had to throw in a few changes (like give it a horn, remove the ivory teeth, make it lay eggs, the works). Saves you a ton of time with the body setup.
Logged

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: Modding Lessons
« Reply #2 on: May 21, 2018, 08:42:28 am »

Some things from me...

Test, Test, Test, Test, Test.  It is really easy to leave very tiny bugs in.  It is much harder to notice them a month after you inadvertently introduced them and are only now just noticing it.

DF Modding is a process of bringing out your deepest creative desires, coming to terms with the meager tools you have available in reality, and then kludging together a half-assed solution that only barely resembles what you wanted in the first place.

Interactions only trigger in combat, even if they are should be usable as non-combat interactions.

Worldgen crashes just suck.

Even the mightiest of mortal, meat based creatures can be taken out by lucky critical hits.  As such, your meager fleshy megabeasts will always go down like chumps to the mighty dorf militiaball.  Don't expect anything better.

Scripting and plugin writing is a bad solution to any modding problem.  Sadly, it is frequently the best (and only) solution too.  As such, get comfortable with the idea of your dfhack window being filled with red angry error messages.

If you are doing heavy weight modding, get used to making slight variations of the same fort 20 times on 20 different embarks.

Consider some form of version control.  Even if you never have to do a full revert in your life, knowing that your old mod is 5 mouseclicks away makes changing thing and experimenting much less worrying, and it is a hell of a lot more convenient than manually backing up mods.  Oh, and being able to examine the changes to your mod (and only the changes) with diff is incredibly useful for debugging and sanity checking mod updates.

Did you remember to add it to the entity file?  Yeah, didn't think so.  Welcome to the club.

Civ wide equipment rarity is a thing, even in vanilla.  FORCED is your friend for fort playable civs.
Logged
Fallout Equestria Redux - that's right, it's back

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Modding Lessons
« Reply #3 on: May 21, 2018, 10:14:47 am »

One of the most important things a modder can learn, IMO, is that you can easily copy raws and edit them; like I, for example, wanted to make a big ol' amphibious reptile that can fight, but would rather chill. I realized that it's basically a hippo; I just had to throw in a few changes (like give it a horn, remove the ivory teeth, make it lay eggs, the works). Saves you a ton of time with the body setup.
Always copy-paste raws you know already work and edit only what you need to instead of trying to write every entry from scratch.
It will save time and endless frustration trying to find that one typo the game didnt tell you about or tag you forgot to include.

Plants cannot have animal milk, even if they have the corresponding cheese. Or any creature material that has a reaction product. The game will decide that lizards should produce cheese or leather somehow. But only years after youve forgotten you made that plant.
So if your plant needs to be made out of animal skin or produce milk, you have to make a new material specifically for it.

Creatures with too many material emission interactions or one that can have multiple targets can really slow down the game. Simplify them as best possible. Sometimes its better to use a denser material rather than more of it.

Murphy's law always applies. Always assume that youre doing it wrong and test it first.

Be careful making an inorganic specifically to set things on fire. If theres any way civilizations can get ahold of it, they will, and every caravan will go up in flames.

Broken workarounds are your friend. Because what you really want to do is probably impossible without dfhack, or even with dfhack. Just fudge it.

You can infect a creature with a syndrome instantly by making its infection vector one of the creatures materials, like a creature extract or its blood, that leaks out of its brain via an unending secretion and is a contact poison. This way you can ensure a plant-critter gets a cave adaptation syndrome that causes it to die if kept underground, or ensure a creature gets all the abilities drinking its blood would grant other creatures, without having to define those abilities twice.
« Last Edit: May 21, 2018, 10:25:42 am by Eric Blank »
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

scourge728

  • Bay Watcher
    • View Profile
Re: Modding Lessons
« Reply #4 on: May 21, 2018, 07:27:43 pm »

Legs and air breathing are important for civs

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Modding Lessons
« Reply #5 on: May 22, 2018, 08:58:25 am »

When faced with inexplicable, errorless crashes at the beginning of worldgen, try inserting intentional errors periodically throughout the raw files.  When the error log stops catching the errors, that's where the crashes are coming from.

VERMIN_EATERs and VERMIN_ROTTERs do not follow normal population rules.  If you want to make a rare vermin with a fun bite effect, don't give them these tags.

Be very careful when defining exotic materials in creatures that have their body parts available for civs to use.  Your game will appear to work fine until a caravan suddenly explodes because they are carrying a barrel of melted fire drake skin or something.

If it's possible to do without a transformation syndrome, do it without a transformation syndrome.  Many crashes come from transformation related issues.

Don't even bother with resurrection.  The game will probably crash and you'll have no way to tell why.

Body size modification syndromes are fun.  You can make a creature grow or shrink for combat purposes, or change their facial appearance for subtle detals.

Speaking of facial appearance, any descriptor may be applied to any body part.  His beak is hooked.  Her arms are extremely long.  Be creative for interesting sapient species.

Don't define weird materials as inorganic, unless you want forgotten beasts to show up made of them.  Create a nonexistent creature and define those materials in it instead.

Material butcher items are fun.  You can make a creature with body parts that turn into weapons or armor, or even make a creature out of plants.

fishboyliam

  • Bay Watcher
    • View Profile
Re: Modding Lessons
« Reply #6 on: May 22, 2018, 09:19:51 am »

Speaking of facial appearance, any descriptor may be applied to any body part.  His beak is hooked.  Her arms are extremely long.  Be creative for interesting sapient species.

I'm sorry, I don't quite understand this. Mind elaborating?
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Modding Lessons
« Reply #7 on: May 22, 2018, 09:41:54 am »

Speaking of facial appearance, any descriptor may be applied to any body part.  His beak is hooked.  Her arms are extremely long.  Be creative for interesting sapient species.

I'm sorry, I don't quite understand this. Mind elaborating?

The tags that are used for facial descriptions, that makes humanoids have different faces (like the hooked/upturned nose, which has NOSE as a parameter, or the length of the hair) can be applied to any body part, and the details will show up in the creature's description (and also in how they are described in adventure mode).  So if you have a race of bird people for example, you can apply the nose description to their BEAK and then the game will say things like "his long beak is curved" and this will vary between individuals, just like noses are different for humans.  (Just make sure to limit the possible range or you can end up with weird things like upturned beaks.)  See my koopas for an example.

Kyubee

  • Bay Watcher
  • modding is hard
    • View Profile
Re: Modding Lessons
« Reply #8 on: May 23, 2018, 07:18:20 pm »


Don't even bother with resurrection.  The game will probably crash and you'll have no way to tell why.


What sort of resurrections?
Logged
My (long abandoned) mod: http://www.bay12forums.com/smf/index.php?topic=176501.0
The litten is wandering around the dump now, occasionally exploding.

fishboyliam

  • Bay Watcher
    • View Profile
Re: Modding Lessons
« Reply #9 on: May 23, 2018, 09:15:41 pm »

(Shorten)

The tags that are used for facial descriptions, that makes humanoids have different faces (like the hooked/upturned nose, which has NOSE as a parameter, or the length of the hair) can be applied to any body part, and the details will show up in the creature's description (and also in how they are described in adventure mode).  So if you have a race of bird people for example, you can apply the nose description to their BEAK and then the game will say things like "his long beak is curved" and this will vary between individuals, just like noses are different for humans.  (Just make sure to limit the possible range or you can end up with weird things like upturned beaks.)  See my koopas for an example.

That is news to me. Making a note of that for when I make a tailed civ; ty man
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Modding Lessons
« Reply #10 on: May 26, 2018, 02:39:47 pm »

A creature that's made of 1 meat, 15 meat, 6 meat, 6 meat, 4 meat and 4 meat yields 36 meat under a butcher's knife.

A creature that's made of 0.5 meat, 0.7 meat, 1 meat, 3 meat, 0.9 meat and 0.9 meat does not yield 7 meat, but only 4. The game checks each individual tissue chunk's volume separately and then either tosses it on the pile or discards it as insufficient. It doesn't tally fractional amounts together.

(I tried to make tiny animals like ducks give off usable quantities of flesh by making all of the different materials of innards be renamed muscle instead. I failed)
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Modding Lessons
« Reply #11 on: May 26, 2018, 03:09:14 pm »

You can achieve that by simplifying the creatures anatomy, though!

Oh, heres something; the ai used to pick targets is bad at prioritizing, so while that million fingered monster is still easy enough to kill because a player would know to aim for important parts, npcs would waste time targetting individual fingers and end up getting eaten. Simpler monsters will have lesser discrepency in that way. In general, you shouldnt have to model all five toes per foot on an eight legged monster anyway, just apply the finger nail tissue or whatever to its foot so it can perform a scratch attack with that
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Modding Lessons
« Reply #12 on: May 26, 2018, 11:29:06 pm »

What ive learned....


If you have a question and are unsure, feel free to ask, but while waiting for a response, its best to experiment incase u figure it out.

If you plan on making new Civs, take notes on what type of Civ building types each civ is, cuz some wont spawn in certain biomes, ect. Example: Towns/Halmets wont spawn in tundra, same for forest retreats.

Regaurdless of how much modding you do, you will probly keep on having a tab open for DFwiki to double check a lot lol.

From what I have learned for making Entity Civs, or Creatures, its best to use 1 as a base, then change from there.

theres so much to say honestly lol





Legs and air breathing are important for civs
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: Modding Lessons
« Reply #13 on: May 27, 2018, 02:44:02 pm »

Legs and air breathing are important for civs

They only need gaits for walking tbh, I got a naga-like civ that don't use legs to move

Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Modding Lessons
« Reply #14 on: May 27, 2018, 03:22:09 pm »

Gaits define multiple setups of what the creature can do for movement, there are default values if you don't, it's not just for walking, you can do WALK, CLIMB, SWIM, CRAWL, and FLY setups
when the AI is just being all casual they pick the appropriate speed that doesn't drain energy, but when in combat or fleeing they'll choose the fastest one they can. Until they get tired.

so to say Gaits for "walking" wouldn't be correct unless you removed all STANCE parts and they are "ON-GROUND" all the time (which is bad as any attacks done to a prone creature have the velocity doubled)

You can setup gaits like "WALK:quick slither" etc to make it look like they pick from snake like movement types instead of sprinting or fast walks/runs

And as GAIT takes things in to say if it drains energy you could create a race that could sprint without getting tired but will get tired during combat so you can avoid NOEXERT godlike tags
Logged
Pages: [1] 2