Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question about implementing characters  (Read 857 times)

Tesseract

  • Bay Watcher
    • View Profile
Question about implementing characters
« on: May 17, 2015, 10:32:40 pm »

How can I create a specific creature ? Suppose for example that I want one specific human (say, King Arthur) to exist (or at least have existed during world creation and have a chance to be in the legends) in my world, how would I do that ? I have no idea how modding works, I figure I have to copy the human object in the raw files and do things to it, so how can I specify that one MUST be spawned, but no more than one ? Can I have any effect on the creature reputation ?

Edit:
More questions:
Can I specify it's inventory ?
Can I make it playable in adventure mode ?
« Last Edit: May 17, 2015, 10:41:45 pm by Tesseract »
Logged

Delioth

  • Bay Watcher
  • Mass Gauntlet Wizard
    • View Profile
Re: Question about implementing characters
« Reply #1 on: May 18, 2015, 01:44:06 am »

I'm pretty sure it's completely impossible to force something to spawn AND make it not spawn more than once. Specific figures are even worse, due to a couple reasons:
  • Anything to do with historical figures is NOT in the RAWs (Probably because we'd mess with it and break it.)
  • Anything we can influence is just that- we can INFLUENCE, but we can't actually make it happen. It's all procedural.
  • Anything in the RAWs is available, and there aren't ways of guaranteeing that something will only happen once. You could generate a world with a new megabeast and it might spawn once... but at the same time it might spawn 17 times, and you have a ton of King Arthurs.

You couldn't specify any inventory, that's generated (actually when you meet them- they technically don't have anything except maybe a named weapon or something until you get close to them in adventure mode. Can't have any effect on reputation, &c. &c.

The only way you'd be able to play as it (or have it work in any sense) would be to make it a race/caste of its own.... a Caste would work best, but then you'd again end up with at least a few of them popping up.


tl;dr- No.
Logged
Help us write a story!
We're currently setting the scene and world- characters, civilizations, flora/fauna, cities, places, anything setting!
Products of my Boredom (Old)
Quote from: Shawtay
Delioth, you sir, are a wonderful, wonderful person.
When in doubt, Apply Magma

Tesseract

  • Bay Watcher
    • View Profile
Re: Question about implementing characters
« Reply #2 on: May 18, 2015, 01:59:59 am »

Ah, I see. Thank you.

Suppose that I accept the possibility of not having it spawned or having a small multiple (I suppose that having only 10 King Arthurs still make it rare enough to meet one), how do I restrict it to a little number ? There are much more goblins than dragons, for example.

Maybe I could make a "great person" creature, having "King Arthur" as a caste, among many others. That way there would be a random number of great persons from a greater pool, thus reducing the probability of having a double.
Logged

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Question about implementing characters
« Reply #3 on: May 18, 2015, 02:42:32 am »

The idea of the procedural world creation in DF is for great historical figures to arise on their own from the mists of history, it's not set up to be seeded with pre-created heros.  So however you make this work may turn out to be kind of a hack solution.

> There are much more goblins than dragons, for example.

Goblins are a common creature within a civilization; dragons are a megabeast.  You could make "King Arthurs" a megabeast.  Then in your next world you might have someone like Joe "Deathbringer the Plougher of Sorrow" Smith the King Arthur arise in a lair near one town, while a less famous Jane Doe the King Arthur lives over the next hill.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Question about implementing characters
« Reply #4 on: May 18, 2015, 03:55:15 am »

I have a unique overlord in my warlock mode, but it only works with castes and on your map, not in worldgen. It uses interactions.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Tesseract

  • Bay Watcher
    • View Profile
Re: Question about implementing characters
« Reply #5 on: May 18, 2015, 12:18:24 pm »

I have a unique overlord in my warlock mode, but it only works with castes and on your map, not in worldgen. It uses interactions.

If I understand correctly, for a given creature, you may decide that only one at a time may exist for a specific caste ? What do you mean by using interations ?

What about creating specific playable characters for adventure mode ? Can it be done ?
Logged

Usul

  • Bay Watcher
    • View Profile
Re: Question about implementing characters
« Reply #6 on: May 18, 2015, 12:40:08 pm »

No you can't do it like that. What meph does with his overlord is applying a syndrome on a member of a civ through a reaction. Then the warlock's stats are buffed and he display the name 'Overlord'. As for the unique thing, it is due to everyone else having a SYN_CLASS:BLOCK_OVERLORD, which prevents them from being affected by the same syndrome, should the player decide to run the reaction again. It is only feasible in a running fort.

Depending on what (and who) you want to play, you could always create a race with unique stats, abilities or even bodyparts, then roleplaying.
Logged

Tesseract

  • Bay Watcher
    • View Profile
Re: Question about implementing characters
« Reply #7 on: May 18, 2015, 01:45:11 pm »

Ah, all right. I see. Too bad !

Thanks a lot for the help.
Logged

Urist McCoder

  • Bay Watcher
    • View Profile
Re: Question about implementing characters
« Reply #8 on: May 18, 2015, 02:37:56 pm »

What about [DOES_NOT_EXIST] that would make them show up in dwarven legend I think
Logged

Tesseract

  • Bay Watcher
    • View Profile
Re: Question about implementing characters
« Reply #9 on: May 19, 2015, 08:32:57 pm »

What does that tag do exactly ? (Or what can I read to learn those things by myself ?)
Logged

Delioth

  • Bay Watcher
  • Mass Gauntlet Wizard
    • View Profile
Re: Question about implementing characters
« Reply #10 on: May 19, 2015, 08:39:06 pm »

Logged
Help us write a story!
We're currently setting the scene and world- characters, civilizations, flora/fauna, cities, places, anything setting!
Products of my Boredom (Old)
Quote from: Shawtay
Delioth, you sir, are a wonderful, wonderful person.
When in doubt, Apply Magma

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: Question about implementing characters
« Reply #11 on: May 20, 2015, 08:51:40 pm »

What does that tag do exactly ? (Or what can I read to learn those things by myself ?)
[DOES_NOT_EXIST] means the creature does not exist. They can still show up in artwork if they also have [FANCIFUL]
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Question about implementing characters
« Reply #12 on: May 20, 2015, 10:20:40 pm »

What does that tag do exactly ? (Or what can I read to learn those things by myself ?)
[DOES_NOT_EXIST] means the creature does not exist. They can still show up in artwork if they also have [FANCIFUL]
You can get close to [DOES_NOT_EXIST] by neglecting to give the creature any natural biomes.  Then the creature type is known to the game (with a body plan, attacks, etc.) but will never spawn.  A DFHack script called spawn-unit can then be used to poof one into existence on your map.  It's not included in the base Starter Pack, so it'll take a bit of work if you want to go that route.

Needless to say, such a creature will never appear during worldgen... though it could show up in artwork if it has a [FANCIFUL] tag.

Though it's an interesting thought experiment to work out how to make King Aurthur appear, I recommend you generate a world with a decent history and then peruse Legends mode to see what the world generator came up with on its own.  The interface in Legends mode is a bit obtuse because, well, because it's part of Dwarf Fortress, but there are utilities to export the Legends data into something easier to browse.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Question about implementing characters
« Reply #13 on: May 21, 2015, 01:39:26 am »

Usul is right, that's what I did. So for example you can make a workshop called "Sword in the Stone" and the first guy that runs the reaction gets a sword and turns into Arthur, with appropriate stats and description. This is done by affecting the worker with a syndrome. He then spams an harmless interaction that affects all other civ-members on the map, to stop them from receiving anything from the same syndrome. Other workers could still try the reaction, but nothing happens.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::