Bay 12 Games Forum

Please login or register.

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

Author Topic: Guide to (probably) making cool magic systems  (Read 4846 times)

squamous

  • Bay Watcher
    • View Profile
Guide to (probably) making cool magic systems
« on: February 03, 2022, 03:39:05 pm »

After fiddling with this a lot on my own I have decided to try and write out a guide for making cool magic systems. All kinds of magic is possible in dwarf fortress even if the vanilla game only has necromancers, so here's how you could go about doing it.

I should clarify here that there are a lot of ways to add abilities, syndromes, powers, etc. My goal with this guide is to show how to create a system that dynamically adds magic to the world as a whole instead of just the player. As such, I won't be touching things like fort or adventure mode crafting or the ingestion of specific stuff to gain powers, as only the player can get magic that way. This guide explains how to make magic that both the player and NPCs can take advantage of. It also assumes you already have a basic understanding of the raws and raw modding. It is recommended you already have an understanding of necromancer, vampire, and werebeast mechanics at minimum.


Magic injection vectors:


1. Slabs/Secrets: Slabs are used in the vanilla necromancy interaction. An individual desiring immortality (no other goals work) will be given one by a god, and learn the powers associated with it. Slabs are very useful, but also very tricky. For one, they do not work in fortress mode. Fort NPCs will never read a slab. They will read books or scrolls copied from the slab, though, and gain the power that way. Also, slabs will usually describe what power they teach, such as in vanilla the secrets of life and death. However, if you have more than one slab secret, the description will always default to the one which is lowest in alphabetical order, but only if the slabs share the same sphere (or have no spheres attached, in which case the sphereless slab description will overwrite ALL slab descriptions higher than them in alphabetical order). On that note, slabs are tied to divine spheres. The vanilla ones are usually associate with death, for example. Slab powers can be thematically linked to spheres this way, like having fire powers come from fire gods. Usually, but not always, someone will only read one slab in worldgen. Books which copy slab secret DO NOT suffer from the description bug and will accurately tell you what they teach. In addition, removing the line about IS_SECRET:MUNDANE_RECORDING_POSSIBLE will prevent a secret from coming with a slab at all or written into a book, and removing  [IS_SECRET:MUNDANE_TEACHING_POSSIBLE] prevents the learner from teaching it to any apprentices they take on.

2. Curses: Curses come from toppling statues in and out of worldgen. Doing so in the vanilla game can result in becoming a werebeast or vampire. However, this can also be used to bestow magical powers. Curses are also useful because an individual may topple many statues in their lifetime and thus accrue many curses, making it easier for them to gain a lot of different magic types that way.

3. Infection: Infection happens both during and after worldgen. In vanilla, infection can happen from werebeasts bites. But this can be changed to grant magic abilities instead of a disease. It is a useful way to spread powers if you, for example, attach it to a powerful megabeast that "teaches" those brave enough to seek it out some secret, if they survive it of course.

4. Blood: This is one of the least effective methods of spreading secrets, at least in my experience, but it is worth mentioning. In worldgen, vampires can gain minions by offering, and sometimes delivering on, the promise of bestowing vampirism on them. This spreading system can be applied to any slab or curse based secret, giving it an alternative mode of transmission, but this has certain effects if applied to slab secrets. Specifically, it makes it so the slab will not tell you what power it teaches. While this is annoying, it serves an useful purpose of negating false information. Due to the aforementioned slab bug, where slabs with different powers that share a sphere will have incorrect descriptions, blanking out the description entirely can be more aesthetically pleasing while also preventing the player from being mislead. You can also change the learning vector from blood to, for example, brain matter, and since you can't eat sapient meat for whatever reason this would prevent this method from being used by players and would allow it to exist only to negate the slab bug. Also, blanking out the slab descriptions does not affect books, meaning if you make a book copy of a blank slab secret the book will tell you what secret you will learn.

Note that these vectors can be used separately or together. You could make an interaction which can be learned from both a curse AND a slab AND through blood, or just one of the three.

Tower Building:

Necromancers build towers in worldgen, separating them from the rest of the world as distinct factions. However, this is not mandatory for slab-based secrets. Towers only appear under specific conditions and it can easily be controlled if a secret leads to tower building. Firstly, an individual must gain a zombie-raising ability, NOT the ability to revive the dead, summon creatures like bogeymen, or raise undead lieutenants, but basic mindless zombies. Secondly, it seems to only work if the zombie ability is the FIRST secret they learn, and needs to come from a Slab rather than any other method.

It should also be noted that a zombie-raiser and potential tower-builder of any kind will only wage wars on other factions if they are a mortal creature with the NO_AGING tag applied, and also any intelligent beings they produce from corpses using the FIT_FOR_RESURRECTION interactions are also mortal creatures with NO_AGING. This seems to be required for them to wage wars. Also, any intelligent beings they raise cannot themselves raise corpses.

However, if a power is taught that does not cause tower building, opposition to life, or madness, something very important happens. That individual will remain within the society they were born into and retain their original loyalties. This allows for magic users to rule as kings and fight as soldiers in battles, or be wandering adventurers and mercenaries. In short it allows for more traditional magic users that are popularly depicted in fantasy.

Immortality:

Magic users can only appear from the historical figure population and of them only a small amount become magic users. As such, if they age and die, they will do very little given how small their population is. While it isn't necessary for magic systems to function, I personally recommend you give your magic users NO_AGING or transform them into immortal creatures if you want them to be relevant in worldgen. With this in mind, I personally would suggest designing your wizards more under the themes of rare and powerful individuals like Gandalf or Thulsa Doom than the typical level 1 dnd wizard.

Chance and Duration:

In worldgen, percentages and time do not apply. If you make form of interaction which has a percentage-based chance of happening, it will usually default to successful. For example, if you made a custom necromancy interaction that has a 1% chance of turning the user into a lich, EVERY individual who learns this secret will become a lich, and this applies most interactions. Furthermore, time-based abilities also do not end until gameplay begins. If you, for example, added the NO_AGING tag but set it to end after a worldgen year, then it would not actually end through all of worldgen. However, the moment that individual entered your fort, or you visited them in adventure mode, they would immediately die as the game remembers that their immortality was supposed to end.

The one finicky area of this is interactions which apply tags such as NO_AGING. I believe that, for example, adding a percentage-based chance of NO_AGING will cause the game to run those odds immediately upon loading the individual in during gameplay. So someone who learns a secret with a 1% chance of NO_AGING will be treated as immortal during worldgen, but upon being loaded into gameplay the actual roll will occur, usually resulting in them dying instantly. When it comes to creature transformations and other interactions however, as far as I know it will always be treated as a 100% chance. In general it's weird so use these sorts of things with caution.

Magic Systems:

A "Magic System" as defined by me is a comprehensive system of integrating magic into the world of dwarf fortress utilizing the above knowledge. Not just adding it to fort mode or making it available to your adventurer, but ensuring you will encounter magic users or superpowered individuals out and about in the world, and ensuring the player can interact and participate in it. I will list some "styles" that I find to be viable.


The Sphereless Single Spell System:

The Single Spell system is set up so that every interaction that is part of it teaches a single spell, and none are tied to spheres, so any god can produce any spell, which creates thousands of magic users in longer worlds. So for example, a single slab/statue topple/etc would just teach "fireball" or "firejet" instead of multiple spells, though multiple spell interactions are possible as well. The design principle of this system is to allow for a wide variety of wizards who each have a unique arsenal of abilities, because instead of becoming pyromancers or necromancers, all wizards are unique individuals who have learned individual spells, allowing for a wide variety of combinations. An example of this is my system I use in my Long Night mod, where each individual spell can be learned in multiple ways, and magic users can be combined.

In fact, this system relies on spells being accessible through curses, because NPCs rarely read multiple slabs. What happens is that NPCs will read one slab, become immortal, and then will topple multiple statues to gain many curses. But because all spells can be learned from curses, what happens is they just learn new spells an become more powerful. You can alter how safe this is by increasing or decreasing the number of actual curses which could be bestowed on the individuals that do this. For example, if there are 5 learneable spells total, and 1 actual curse that turns you into an insane monster, then it's basically playing Russian roulette.

The downside is that there is often very little thematic cohesion unless the entire system has a specific theme. Again, in my Long Night mod, everything is based around nanomachines and energy transmission, so no matter what combination of "spells" you get, it all fits together thematically as techno-wizardry. But if you were to add many different flavors of spell, it would result in everyone having a thematically incoherent arsenal of spells. Though if that's okay with you and you are focused more on a wide variety of unique opponents, then this won't be a problem.  Another downside is that due to the slab description bug, all slabs will be blank, and will not tell you what power you will learn.


Here is an example of a sphereless single spell interaction:

Spoiler (click to show/hide)

The Sphere-Oriented Single Spell System:

This system works like the one above, but classifies spells into spheres rather than leaving them sphereless. This tends to result in fewer magic users overall in my experience but also somewhat fixes the thematic cohesiveness problem by restricting what spells someone can learn to what gods they are familiar with. A nation with a fire god would be able to produce pyromancers, one that doesn't can't.


The downside both the necessity of slab blanking and also that by tying yourself to spheres you need to come up with spells that fit all or most of the spheres to get a good amount of magic out there. It also restricts the kind of schools you can use, since they need to mesh with sphere themes.


The Sphere-Oriented School System:

The School system is the clearest-cut one. It takes the vanilla necromancy method and uses it for different themed wizard types. So fire gods bestow a list of spells based around fire to make pyromancers, earth gods bestow earth-themed spells to make geomancers, and so on. As many "schools of magic" as spheres can exist. Because each sphere only has one school associated with it, the slabs will not misinform the user and don't need to be blanked out, which makes it more intuitive. The Spellcrafts mod is an example of this magic system.

The downside of this system is the lack of dynamicism. Because of how percentage-based interactions are weird in worldgen, every member of a specific school will have the exact same list of abilities, making encounters more predictable. In addition, it can be difficult to come up with comphrehensive schools for the less interesting or more abstract spheres, or avoiding overlap between similar spheres.



Here is an example of a sphere-oriented school interaction:

Spoiler (click to show/hide)


The Sphereless Single Spell/School Hybrid:

This is by far one of the most tedious but, in my opinion, potentially rewarding systems. It merges the thematic cohesiveness of the School system with the dynamicism of the Single Spell system. Essentially, one can prevent someone who learns a certain spell from learning other spell through the use of IT_CANNOT_HAVE_SYNDROME_CLASS. So, let us say there are just two lists of learnable spells, List 1 with all water-themed learnable interactions, and List 2 with fire-themed ones. Let us say that all the spells of List 1 add the tag [SYN_CLASS:WATERSPELL] and List 2 spells add  [SYN_CLASS:FIRESPELL]

So what you do is then add [IT_CANNOT_HAVE_SYNDROME_CLASS:WATERSPELL] to List 2, and [IT_CANNOT_HAVE_SYNDROME_CLASS:FIRESPELL] to list 1.

What this means is that if an individual learns a List 1 spell, it can only learn other List 1 spells. Meaning, these individuals will be "locked into" a water-themed spell list, but how many they have is dynamically generated by their actions. Some might only have one spell, others might have all of them.

And you could add even more spell lists to this, but it would work such that every new school you add, you have to go to all the old schools and add a new IT_CANNOT_HAVE_SYNDROME_CLASS category to them, which is the tedious part I mentioned.

This allows for you to add as many different schools as you like, using any kind of theming, and keep it all both thematically cohesive and dynamically generated.

The downside to this is that it is tedious to both add and remove schools, and would have to use slabs with no description so you wouldn't know which school of magic you were locking yourself into until you already read the slab.


The Sphere-Oriented Single Spell/School Hybrid:

This is like the Sphereless Single Spell/School Hybrid, but with one additional restriction. All spells of a particular list are tied to one or more spheres, making them even rarer. Pyromancers could only appear in places with a fire god, for example, but would still have to learn their spells individually. The advantage of this is making magic even more cohesive by tying magical schools to a particular god which represents that sphere.

It has the same advantages and downsides of the above hybrid school including needing to make the slab descriptions blank. In the sphereless version of this system, you could have three schools, such as witchcraft, shamanism, and holy magic, and any god could teach any of them, meaning there will be a large amount of magic users belonging to one of the three schools. Here, those three would be tied to specific spheres an you need to fill out all the other ones to have a meaningful population of magic users.


So, Spheres or Sphereless:


As you can see the use of spheres is a pretty major distinguishing factor between magic systems. Broadly speaking, the advantages of spheres is that they take advantage of the current religion system by ensuring those who worship a given god are likely to obtain powers associated with that god. On the other hand, sphereless systems let every god bestow any power, which is less thematically cohesive from a divine portfolio perspective but allows for a greater number and wider variety of magic users to appear.

Personally, I prefer sphereless systems for that reason, especially because it allows the player to create their own categories of magic rather than be restricted to the sphere portfolios, but both options have their pros and cons.



AND BEAR THIS IN MIND:


Everything I have described above is taking the existing bare-bones filler system and pushing it to its limits, and it will all be replaced and thrown out when the Real Magic Update happens 10 years from now, so if you go making a very big and complicated magic system using these methods accept the fact you will eventually have to throw it all out and start over even if you keep updating it until Myth and Magic.
« Last Edit: March 20, 2022, 06:07:14 pm by squamous »
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

that_eye

  • Bay Watcher
  • admires eyeballs for their looks
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #1 on: February 03, 2022, 03:55:25 pm »

Great guide, very informative. Would it be possible to construct some example RAWs? How do I make a creature 'know' a secret and teach it to people during worldgen?
Logged

squamous

  • Bay Watcher
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #2 on: February 03, 2022, 03:59:07 pm »

Great guide, very informative. Would it be possible to construct some example RAWs? How do I make a creature 'know' a secret and teach it to people during worldgen?

Teaching is already part of the vanilla system. A secret can be classified as  [IS_SECRET:MUNDANE_TEACHING_POSSIBLE], meaning that an apprentice of this individual can be taught the secret. How apprenticeships work is very obtuse however so I don't know how to force it to happen.
« Last Edit: February 03, 2022, 04:01:01 pm by squamous »
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #3 on: February 03, 2022, 04:01:45 pm »

Great guide, very informative. Would it be possible to construct some example RAWs? How do I make a creature 'know' a secret and teach it to people during worldgen?
Seconding that.

Also, i'm wondering if it would be possible to set up a magic system as such so that an individual first must learn a secret from a slab before being able to accumulate spells from curses, etc.
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

squamous

  • Bay Watcher
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #5 on: February 03, 2022, 04:05:01 pm »

Great guide, very informative. Would it be possible to construct some example RAWs? How do I make a creature 'know' a secret and teach it to people during worldgen?
Seconding that.

Also, i'm wondering if it would be possible to set up a magic system as such so that an individual first must learn a secret from a slab before being able to accumulate spells from curses, etc.

I've added that to the slab section.

Also, regarding your own question, you cannot make an interaction/syndrome require another syndrome, only make it so that upon learning an interaction/syndrome, it is excluded from learning others, so basically the reverse of what you want.

There is a more convoluted way to do it actually. You will need to transform the creature who reads the slab into another creature, because while you cannot require syndrome classes to learn something, you can make it so you need to be a specific creature or creature class to learn something. For example, a slab that turns you into a half-demon hybrid, and that half-demon hybrid can now learn demon magic. But transforming things is tricky in its own way, see http://www.bay12forums.com/smf/index.php?topic=178887.0
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

that_eye

  • Bay Watcher
  • admires eyeballs for their looks
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #6 on: February 03, 2022, 04:55:16 pm »

Quote
Also, regarding your own question, you cannot make an interaction/syndrome require another syndrome, only make it so that upon learning an interaction/syndrome, it is excluded from learning others, so basically the reverse of what you want.

Could get around that by making SYNDROME_A impart a CREATURE_CLASS, and SYNDROME_B only affect creatures of type CREATURE_CLASS, no?
Logged

squamous

  • Bay Watcher
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #7 on: February 03, 2022, 05:09:39 pm »

Quote
Also, regarding your own question, you cannot make an interaction/syndrome require another syndrome, only make it so that upon learning an interaction/syndrome, it is excluded from learning others, so basically the reverse of what you want.

Could get around that by making SYNDROME_A impart a CREATURE_CLASS, and SYNDROME_B only affect creatures of type CREATURE_CLASS, no?
There's no way to impart a creature class, just a syndrome class, and the problem is that there is no IT_REQUIRED_CLASS like there is IT_IMMUNE_CLASS. Well, there is, but only for creature classes, which you can't use syndromes to add.


I've also added some raw examples for a few of the spell systems
« Last Edit: February 03, 2022, 05:34:04 pm by squamous »
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #8 on: February 04, 2022, 03:14:31 am »

Thanks for taking the time to unpack this mess!

I've got one thing to add that's slightly adjacent to the topic: the learning of secrets themselves and the gaining of abilities from them are separate things. It's why you can have plump helmet men and the like teaching necromancy (as they've learned the secret), while not having the abilities to use necromancy themselves (filtered out by the IT_REQUIRES:CAN_SPEAK requirement when adding the syndrome granting the abilities). You can even have normal animals learn the secrets if you manage to hack on the ability to read to them, though I don't think they'll normally read slabs if the player isn't controlling them(?).

I've never actually tested to see if this applies with sources outside of/used alongside the SECRET source, though... 🤔

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Guide to (probably) making cool magic systems
« Reply #9 on: February 05, 2022, 02:53:55 pm »

Very nice!  I've been doing a lot of experiments myself with magic systems and was almost planning on writing one of these myself.  Thanks for doing it first!

There are a few discoveries I'd like to add:

Secret Discovery (and Immortality Fake-Outs)

Mortal historical figures occasionally develop an obsession with their own mortality.  When this happens, they will become the worshipper of either a deity or a megabeast with the SUPERNATURAL tag that has a sphere associated with at least one secret with the SECRET_GOAL:IMMORTALITY tag.  They will then gradually increase their devotion to that creature, and upon reaching a high enough worship level, will be granted a secret through either a slab or direct teaching.

If the secret has MUNDANE_RECORDING_POSSIBLE, the secret will have a slab.  If not, the deity/megabeast will teach the secret directly, and no slab will be created.  You can use this if you want to make a secret that cannot be learned by players.

IF the secret grants NO_AGING, the study will stop there and the creature will no longer seek out any more secrets.  However, if the secret does NOT grant NO_AGING, the creature may select another deity and begin the process again.  A creature may do this a multiple times, provided it is long-lived enough, until it learns a NO_AGING secret.  This allows the creation of individuals who know many different secrets.

Apprenticeship

If a secret-holder lives in a tower, other immortality-seekers may seek an apprenticeship with them.  The secret-keeper will then teach the apprentice ALL of the teachable secrets they know.

Combining the above facts, another secret system is possible:

Great Secret / Lesser Secret System

In this system, there are many "minor secrets" that do not convey immortality or animation powers, and a smaller number of "Great Secrets" that do convey immortality and animation.  In such systems, an immortality-seeker may pick up several minor secrets before picking up a major one, then construct a tower.  Apprentices who join the tower will all learn the original mage's specific combination of secrets, creating a world where each tower has a different, unique combination of powers at their disposal.

Although somewhat rare, it is possible for other creatures to learn more minor secrets, then go to live in an existing tower where they will learn the secrets already known there (it's probably rare because most immortality-seekers in range of a tower will just go there first).  This adds that creature's discoveries to the tower's existing ones, and any students of that particular mage will likewise have access to both old and new secrets.  If history goes on long enough, towers can wind up with quite a large pile of spells!

This system works best if your magic-learning race is long-lived, but mortal.  If they don't live long enough they may die before learning a Great Secret, and all of their previous discoveries will die with them.  You can adjust the average number of secrets learned by changing the minor secret/major secret ratio.

Scholars

All of the above rules do not apply to scholars.  If a library exists, scholars who live in that city can read any book in the library and will learn any secrets contained within.  They do not lose interest in learning upon gaining immortality.  Scholars can also take apprentices, and will teach all of their known secrets to said apprentices.  This is rare but can be loads of fun when it happens.  Be careful starting fights in libraries in worlds with many secrets!

Transmission through Resurrection

Although all vanilla "intelligent undead" are opposed to life, they do not need to be.  A simple resurrection spell will make the resurrected creature loyal to the mage who revived them (provided they are resurrected off-screen), but has no other significant impact on their behavior.  (I would advise giving them NO_AGING though, as otherwise they will attack/be attacked by animated undead once they enter play.)

It is possible to give resurrected creatures the ability to resurrect other creatures, which can be used to create a "viral" syndrome with a somewhat different flavor than attack-based ones.  Resurrections are less common than attacks, but they do happen.  Creatures resurrected by intelligent undead typically join the same site as their creator, though I am not sure if they are loyal to their creator or their creator's creator (or if there's any practical difference).

If you want to make it so that resurrections only happen off-screen, you can give the resurrection interaction an [EXPERIMENT_ONLY] tag.  This tag does not actually have anything to do with the NIGHT_CREATURE_EXPERIMENTER or I_SOURCE:EXPERIMENT tags, it just disables the interaction during gameplay. This can be used to avoid the issue where an enemy is resurrected and attacks the creature who resurrected them.

It is also possible to give an ANIMATE interaction the EXPERIMENT_ONLY tag.  This will allow the creation of zombies and towers during worldgen, but will not allow animation during gameplay.  Useful if you want towers to be built in worldgen but don't want them animating corpses they come across during gameplay.

Concerning Experiments

A creature with the NIGHT_CREATURE_EXPERIMENTER tag may occasionally "perform horrific experiments" offscreen and while doing so can use any creature-targeting interactions with the I_SOURCE:EXPERIMENT tag in their arsenal.  Unfortunately, any creature with the NIGHT_CREATURE_EXPERIMENTER tag will also generate all kinds of procedurally generated monsters, and due to the number of these that are generated most of their experiments will be from that pool, rather than custom ones.  So, while it is technically possible to make syndromes spread through experimentation, it is a very inefficient way of doing so.  In all of my testing, I have only seen an experimentally-created creature create a custom experiment of its own once.

However, there is one fun thing you can do with experimental creatures by using the minor/major secret system.  If one secret lacks the NIGHT_CREATURE_EXPERIMENTER tag, but has an I_SOURCE:EXPERIMENT interaction associated with it, and a different secret adds the tag, the experiment interaction will only be "activated" if the second secret is learned.  So you can, for example, teach a basic fire secret that lets the user create fire-based monsters, but these monsters will only appear if they also learn the experimentation secret.  Again though, most of the experiment creatures will be generated ones, not custom ones, so this should be seen as rare easter egg you can put into your mod, not something you should expect to see in every world.

squamous

  • Bay Watcher
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #10 on: February 05, 2022, 06:32:55 pm »

It really is a shame there's no way to ensure a secret user only makes a certain kind of experiment(s). I'd get so much mileage out of that. Also that's some useful info, thanks.
« Last Edit: February 05, 2022, 06:40:03 pm by squamous »
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #11 on: February 05, 2022, 07:31:49 pm »

After worldgen ends, the best ways to spread spells around ends up being through slabs and books. However, obtaining slabs in fortress or adventure mode can be tricky, and there's no way I've found to create slabs in play without dfhack scripting. There's also no way to increase the frequency of books being written that contain secrets. Having civs which respect knowledge enough to build libraries helps, but the majority of texts will be about other subjects.

By far the easiest way to spread secrets in fortress mode is to just not use secrets, but "mundane" interactions/syndromes. One option is to create a consumable food or drink that imparts a syndrome, and another is to have the syndrome bearing material boil, and be inhaled. Inhalation is not a guaranteed result, it works maybe one in three times. Consumables are guaranteed "infection" but dwarves don't eat/drink constantly, maybe one meal/beverage a month, and a lot of micromanagement is necessary to ensure the correct dwarf eats the correct foodstuff.

A third option is for a special creature to have an interaction they can use that grants powers associated with it to those its used on. This will require checks for intelligence or other criteria to ensure animals and species you don't want this option to be available to don't get targeted. If this this is a viral/self-replicating loop where the target can also spread it to others, it can very quickly be passed to the entire population. In Spellcrafts I used this technique to spread magic for creatures that I wanted to be born with magic powers (all the playable races), but not use castes or give any individual a guaranteed chance of gaining any power. It requires a CDI on a creature or added by a consumable or inhalation syndrome or secret, which when used applies an interaction to a target granting a syndrome containing a set of additional CDIs, which are the actual powers being granted. If they have a percent chance of being applied, then only those that the creature rolls true for will become available to them. My interaction has both a set of generic powers any race can gain, and additional interaction effects applying their own syndromes that only target certain races, giving racial abilities.

To make this vanilla-friendly, i.e. not overwriting any vanilla files, only the new races added by the mod start with this interaction, and the vanilla races can be targeted by them when they encounter one. I also created a potion foodstuff that grants the imbiber a cdi allowing them to apply the interaction to themselves and others. This lets the player innitiate the sequence without visitors and give their dwarves/adventurer racial abilities without modifying any vanilla files.

Oh, and secret/curse interactions can be applied in-play through consumable/inhalations that grant a cdi that applies the secret/curse to the target, as long as the secret/curse has an i_source:creature_action source type.

Sorry I'm on my phone at work so my formatting/information is limited
« Last Edit: February 05, 2022, 07:37:40 pm 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.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Guide to (probably) making cool magic systems
« Reply #12 on: February 06, 2022, 08:57:59 am »

It really is a shame there's no way to ensure a secret user only makes a certain kind of experiment(s). I'd get so much mileage out of that. Also that's some useful info, thanks.

It would be nice, but I've found resurrections to be a mostly acceptable substitute. I'm even testing a system that can produce hybrids of races that live within range of the same tower.

I did this by giving sorcerers the ability to resurrect certain specific races as "genetic experiments", which gave each one a unique resurrection ability of its own that could target any race aside from its own, and turn that creature into an "X hybrid" where X is the species that was turned into the original genetic experiment, and infuse the second "generation" with traits associated with that race.  So you could get acid-spitting "elf saurian hybrids" or long-toothed "dwarf tarkatan hybrids".  It's pretty fun.

squamous

  • Bay Watcher
    • View Profile
Re: Guide to (probably) making cool magic systems
« Reply #13 on: February 07, 2022, 12:47:55 am »

It really is a shame there's no way to ensure a secret user only makes a certain kind of experiment(s). I'd get so much mileage out of that. Also that's some useful info, thanks.

It would be nice, but I've found resurrections to be a mostly acceptable substitute. I'm even testing a system that can produce hybrids of races that live within range of the same tower.

I did this by giving sorcerers the ability to resurrect certain specific races as "genetic experiments", which gave each one a unique resurrection ability of its own that could target any race aside from its own, and turn that creature into an "X hybrid" where X is the species that was turned into the original genetic experiment, and infuse the second "generation" with traits associated with that race.  So you could get acid-spitting "elf saurian hybrids" or long-toothed "dwarf tarkatan hybrids".  It's pretty fun.

That's interesting, does it work in worldgen too? I've been using resurrection to transform people via wizards but have not figured out how to make anyone but zombie tower types use it.
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Guide to (probably) making cool magic systems
« Reply #14 on: February 07, 2022, 02:07:52 am »

That's interesting, does it work in worldgen too? I've been using resurrection to transform people via wizards but have not figured out how to make anyone but zombie tower types use it.

It works in worldgen, but I believe that the user has to be zombie-tower aligned, even if they cannot make zombies themselves (I have never seen a resurrection interaction work in worldgen unless the user was either a zombie-raiser or the creation of a zombie-raiser).

My guess is that worldgen generates events - possibly after a necromancer army wins a battle - in which the necromancer and anyone else in their army are allowed to raise/resurrect creatures in the area.
Pages: [1] 2