Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: My first mod!  (Read 753 times)

TLV

  • Escaped Lunatic
    • View Profile
My first mod!
« on: February 08, 2019, 07:34:16 pm »

I must admit to beign greener than green at Dwarf Fortress at the time of writing I never even played an actual game but just scanning over a few worldgens got me all fired up!
So I decided to create my own little mod namely adding a race with a functioning civ, I decided on not adding items my first go around.
I can proudly say that from scrounging the wiki for a bit and looking at other mods I got the general idea, and finished up pretty quickly, I even got it working rather quickly after finding out about the errorlog.txt.

I am playing with a standard PyLNP and have no problems getting working worldgens with the advanced generator and can load up both fortress and adventure modes.

In general:
I would very much apreciate a proof read and some comments if things are too overpowered / bland.
I'de like to add some monster races I would only need a creature file for that? how do they become cave dwelling? In all honesty I haven't looked into the files yet for this one.

creature file questions:

[Preffstring:beard, strength, ect.]
how dous this function? I was'nt able to find any lists detailing all the possible strings. . Is this because there is a great, GREAT variation of things that can be put in there or am I missing something entirely?

Subcasts?
[popratio:5] how dous this function exactly? dous it scale to % where 100 would stand for 100%?
[viewrange:25] as opposed to what other viewrange? i could not find the standard non defined viewrange.
[MAXAGE:111:222]  if set for a sub cast they cannot intermarry others? what if both castes have the same age range?
how do I setup subcastes properly? I got the general idea and it seems to be working but I have not a clue as to how where one would place certain things and if it's working correctly.
do you need set babies for each subcast or do they come from you general population?
as for the stats and abilities where do I place those? are they in the correct order or spot?

Entity file questions:

Settlement and type, I understand this for the most part but as I gather I still get to make like dwarves in fortress mode. . for mining, reaching 'endgame' stuff, ect.?
        [DEFAULT_SITE_TYPE:CITY]
        [LIKES_SITE:CITY]
        [TOLERATES_SITE:CITY]
        [TOLERATES_SITE:CAVE]
        [TOLERATES_SITE:CAVE_DETAILED]

do these three always need to present when configuring these?
        [EXCLUSIVE_START_BIOME:TUNDRA]
        [SETTLEMENT_BIOME:TUNDRA]   
        [BIOME_SUPPORT:TUNDRA:3]

pantheon and gods, so it asigns a god for each sphere correct? how do competing spheres function in a pantheon?
        [RELIGION:PANTHEON]
        [RELIGION_SPHERE:VALOR, ect.]

Values for CIV, what are the minimal and maximum values and at what point do they stop making sense?
   [VALUE:LAW:10]
   [VALUE:LOYALTY:15]
   [VALUE:FAMILY:15]
   [VALUE:FRIENDSHIP:0]
        ect. . .

here it is shameslessly ripped and templated from the vanilla files and mods perhaps dreadfully OP.
Size dousnt permit me posting these together so they are in the next posts.
« Last Edit: February 08, 2019, 07:38:15 pm by TLV »
Logged

TLV

  • Escaped Lunatic
    • View Profile
Re: My first mod!
« Reply #1 on: February 08, 2019, 07:34:57 pm »

Creature File
Spoiler (click to show/hide)
« Last Edit: February 08, 2019, 07:40:10 pm by TLV »
Logged

TLV

  • Escaped Lunatic
    • View Profile
Re: My first mod!
« Reply #2 on: February 08, 2019, 07:35:16 pm »

Entity File
Spoiler (click to show/hide)
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: My first mod!
« Reply #3 on: February 08, 2019, 11:33:36 pm »

Welcome to the forum, TLV! There were a lot of questions here, so I decided to go through them one by one in bold text.

I'de like to add some monster races I would only need a creature file for that? how do they become cave dwelling? In all honesty I haven't looked into the files yet for this one.

It depends on what you mean by monster races. Animals never need entity files, but if you want them to have weapons and a semblance of culture then they'll need one. For example, giant cave spiders don't have an entity, but bat men do. Subterranean animal people derive their underground tribes from being in the SUBTERRANEAN_ANIMAL_PEOPLES civ, which has the LAYER_LINKED tag.

creature file questions:

[Preffstring:beard, strength, ect.]
how dous this function? I was'nt able to find any lists detailing all the possible strings. . Is this because there is a great, GREAT variation of things that can be put in there or am I missing something entirely?

You can put pretty much whatever you want in the PREFSTRING token, so long as it fits the sentence "Urist McDwarf likes (creatures) for their (prefstring)." The period is included in the hardcoded sentence.

Subcasts?
[popratio:5] how dous this function exactly? dous it scale to % where 100 would stand for 100%?

It's a ratio, relative to the other castes within the creature that have this token. If, say, you had a caste with a ratio of 1 and a caste with a ratio of 5, then the second caste would be 5 times more common. They don't have to add up to anything.

[viewrange:25] as opposed to what other viewrange? i could not find the standard non defined viewrange.

The default is 20, according to the wiki. That tag controls how close you can get to a creature before it becomes hostile.

[MAXAGE:111:222]  if set for a sub cast they cannot intermarry others? what if both castes have the same age range?

I think Toady did once mention that there's code for relative ages controlling who marries who, but that's not really what the tag is for. That tag determines the minimum to maximum ages between which the creature will die of old age. Since everyone is born at 0, I'm pretty sure any caste could still marry any other as long as they were reasonably close together when the game checked. As a side note, the absence of that tag makes the creature immortal.

how do I setup subcastes properly? I got the general idea and it seems to be working but I have not a clue as to how where one would place certain things and if it's working correctly.

What you've made looks reasonable at a glance, I guess I'd have to try it out to make sure. The best way to test them would be to load up Arena mode, spawn one of each, check their descriptions and body part lists, and have them kill each other. The first step runs them through the errorlog, the second step ensures they're there, the third checks if the description works and ensures that they have the right number of body parts, and the fourth lets you read the combat log and that they are taking damage appropriately.

*From the bit of testing I did, they seem to be working right. I hope this doesn't come off as bragging, but my Jawa Fortress mod uses castes heavily, especially in the settler creature and those derived from it like Jedi. You might want to look at that for examples. You could also look at Antmen, they're the only ones that make major use of castes in the vanilla game as far as I know.


do you need set babies for each subcast or do they come from you general population?

You don't need to set them, they should be automatically generated from the castes as long as they have a BABY token with a duration.

as for the stats and abilities where do I place those? are they in the correct order or spot?

You put them in the main section of the creature if you want every caste to have them, or you put them in castes if you want certain castes to have different abilities. I'll have to try them out to see if they're working right in this case. *Edit, I tested them, it seems you did it correctly. The current arrangement seems to define a default state that gets overridden by the more powerful castes.

Entity file questions:

Settlement and type, I understand this for the most part but as I gather I still get to make like dwarves in fortress mode. . for mining, reaching 'endgame' stuff, ect.?
        [DEFAULT_SITE_TYPE:CITY]
        [LIKES_SITE:CITY]
        [TOLERATES_SITE:CITY]
        [TOLERATES_SITE:CAVE]
        [TOLERATES_SITE:CAVE_DETAILED]

You're correct. Those tokens mean that the settlements they build themselves in worldgen will be human-style towns, but you can still make whatever you want in Fortress mode.

do these three always need to present when configuring these?
        [EXCLUSIVE_START_BIOME:TUNDRA]
        [SETTLEMENT_BIOME:TUNDRA]   
        [BIOME_SUPPORT:TUNDRA:3]

You do need settlement biomes and biome support, although EXCLUSIVE_START_BIOME can be replaced by START_BIOME if you'd rather give them several places to start in.

pantheon and gods, so it asigns a god for each sphere correct? how do competing spheres function in a pantheon?
        [RELIGION:PANTHEON]
        [RELIGION_SPHERE:VALOR, ect.]

The Pantheon setting means that they have gods, as opposed to the Elves' "Force" or the goblins' atheism. It doesn't necessarily assign gods to spheres on a 1:1 basis, what it actually does is control what sort of traits this culture favors in its religion. It generates gods that, while likely not matching exactly, will be mostly based on the spheres you specified.

Values for CIV, what are the minimal and maximum values and at what point do they stop making sense?
   [VALUE:LAW:10]
   [VALUE:LOYALTY:15]
   [VALUE:FAMILY:15]
   [VALUE:FRIENDSHIP:0]
        ect. . .

The values range from -50 to positive 50. The more positive the number, the more the civ approves of a value and vice versa. 0 is neutral.

here it is shameslessly ripped and templated from the vanilla files and mods perhaps dreadfully OP.
Size dousnt permit me posting these together so they are in the next posts.

*Edit, here's what I found from testing the mod. The only major issue I see is that you've double-spaced their body plan and their descriptions for some reason. This is breaking those lines, so the Norsemen are missing their skulls, fingers, toes, mouth, tongue, facial features, teeth, and ribcages since the line cuts off there. It's a simple fix, but they won't work without it. Also, their descriptions are cut off at the gaps, which means that in-game they are only displayed up to the line breaks. After those minor problems are fixed though, it looks fun to me. I'd have played longer if I had time.
« Last Edit: February 08, 2019, 11:59:30 pm by Enemy post »
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!

TLV

  • Escaped Lunatic
    • View Profile
Re: My first mod!
« Reply #4 on: February 09, 2019, 10:44:27 am »

Thank you for your in-depth response :D.

first off thanks allot, the arena mode was very good advice and turned up some unexpected results. (I neglected it myself after loading it up and not understanding what I saw right away.)
The double space I suspect comes from a copy/pasting mistake on my part I think, it dousn't show up in the files themselves. Squashed some minor bugs and made some minor edits including adding male and female casts for the ulfhednar and berserker caste respectively. Rather by accident I noticed I gave most female variants beards, It was quite funny to read it in said creatures descriptions but I removed them nonetheless.

The subterranean peoples are something I hadn't though off because of my innate noobness with Dwarf Fortress. For now my aim would be add two or three goblin/orc/ect races and to replace the vanilla nations with a bit more flavour/variety ones.

I also shot a look at your jawa mod, as I understand it you can add additional 'races' under the caste header. do you need to specify them twice like I did for my 'sub-species' or do I just add another entry at the bottom if the file? By the way it's not bragging if you got the patience to get all that working.

I'm glad you liked it, if I might ask what were your thoughts on the power scaling of caste variants. I ment to differentiate a bit between a base human and more powered up variants. My worries are that it's way to overpowered at the top end.
« Last Edit: February 09, 2019, 10:51:51 am by TLV »
Logged

Enemy post

  • Bay Watcher
  • Modder/GM
    • View Profile
Re: My first mod!
« Reply #5 on: February 09, 2019, 11:19:29 am »

For the first question, technically you don't need to, but in most cases it's more efficient if you don't want to double tags for nearly identical castes, such as different sexes of the same species.

As for the second, I can't be sure if they're balanced without lots of testing, but it really isn't as big a deal in Dwarf Fortress as it is in most games. This game cares much more about simulating its world than it does about being play balanced. If a user downloads a mod to play as Norse gods, they almost certainly won't mind if they're powerful.

Oh, there was one more thing I noticed in there that I wanted to mention. Some of your castes have the NOFEAR tag. This will work to ensure that they never run from combat, but will also prevent bogeymen from attacking in Adventure Mode. If you want bogeymen to still be hostile while keeping the Norsemen's resistance to running, the natural Discipline skill you've given them should work pretty well.
Logged
My mods and forum games.
Enemy post has claimed the title of Dragonsong the Harmonic of Melodious Exaltion!