Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Biome changing tag for entities  (Read 1700 times)

Shonai_Dweller

  • Bay Watcher
    • View Profile
Biome changing tag for entities
« on: May 27, 2019, 04:20:27 am »

New necromancers will spread evil from their towers, which is nice. What would be even nicer is the ability to mod this somewhat.

Since we don't get site raws yet, an entity tag would work. Add it to your civ to make their major sites spread the biome of your choice at whatever rate you choose.

While vanilla elves spreading savagery from their forest retreats is probably way too OP for vanilla, mods featuring numerous smaller civs, mystical civs in cave sites, and of course necromancer alternatives would surely benefit (and all those who just want to see elven savagery take over the world).
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #1 on: May 27, 2019, 10:28:15 am »

I think this should wait until the magic arc, unless its going to be the means to replace natural evil/good biomes entirely. Mainly for the sake of arguement that magic and religious practices affect the enviroment this way, just as how necromancers practice and corrupt.

Would tie nicely into development goals for region wide curses/sanctity of ground and the means to 'cure it' (raze the place until something  more concrete comes along)


Quote
The force Ukzmol blessed the "Sweaty Forests" and remade it in their image, calling it the "Springs of Towers", and hence all supernatural or good creatures exist from that point on.
« Last Edit: May 27, 2019, 10:30:34 am by FantasticDorf »
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #2 on: May 27, 2019, 04:50:45 pm »

Sure. This is assuming that the new behaviour is mechanically possible to replicate without a ton of extra work. Something to play with during the Big Wait when zombie apocalypses and evil biome spread gets boring. If it's been made without any future proofing in mind and is specific to Tower sites, then of course, it's not worth it.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #3 on: May 28, 2019, 08:01:02 am »

I agree sphere influence spreading from various sites is a reasonable extension of the Evil spread by necros that's in the process of being introduced (as well as the various spreading sources that are going to be introduced with M&M), but I also agree it's more suitable to wait until the spheres and the framework they are going to use is in place unless the necro changes can be extended with a very limited effort (and I suspect RAW additions would fall outside of that restriction).
Logged

KittyTac

  • Bay Watcher
  • Impending Catsplosion. [PREFSTRING:aloofness]
    • View Profile
Re: Biome changing tag for entities
« Reply #4 on: May 28, 2019, 10:06:55 am »

+1.
Logged
Don't trust this toaster that much, it could be a villain in disguise.
Mostly phone-posting, sorry for any typos or autocorrect hijinks.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #5 on: May 29, 2019, 04:34:17 am »

There are a number of technical aspects to consider for such a venture:

- How to identify the source of the spread of an influence;
- How to "remember" the base point values that should be returned to once the external influence disappears;
- The rate at which the influence should spread;
- The spread profile, i.e. if the spread should be at the same rate throughout the area of influence, of if it should be faster closer to the source (e.g. flat rate, linear decrease with distance, [binary] logarithmic decrease with distance);
- The target value, i.e. should it push the parameter all the way to 100/0, or to some other cut-off limit (including towards 50 from both sides in analogy with value influencing books), and should the cut-off be the same throughout the influence area or vary with distance;
- Should the influence be a "wave", where a world tile acts as a new center with respect to influence area once a target value has been reached? E.g. once the Evilness is 100, distance should be counted from that tile rather than the original center if shorter, resulting in a continuous spread conquering the world unless stopped;
- Other parameters?

The next stage is to handle interference, i.e. what happens when two or more influence areas overlap. The simplistic approach is to just process the influence sources one after the other, but that leads to double the change in overlapping areas, and when opposing influences clash the result depends on the order in which influences are processed, as the resulting parameter value presumably will be cut off at 0 and 100 respectively. It's reasonably easy to handle if all influences and cut-offs are the same, but messier if they vary.

The third stage is handling of changes that affect the biome. Savagery and Evilness are fairly straight forward in that they don't actually change the biome itself, just add modifiers to it (Savagery differences in a region is already supported by DF, while the current logic doesn't check for Evilness matching if a plant/creature is DFhacked into a region's set, but that might be changed with the necro towers: if so, I'd guess all regions would be given Evil [and hopefully Good as well] flora/fauna in case some tile is changed, but prevented from appearing when the world tile's Evilness doesn't match that of the flora/fauna). If a parameter such as Temperature changes it usually just changes the particular biome, while leaving the biome type unchanged. If you don't do anything in particular, the result would be that the flora/fauna defined to be available to the region the tile belongs to gets restricted to the subset that's compatible with the new biome, which works fine if that biome already exists in the region, but gets limited otherwise. If the change is larger, such as e.g. a Temperature change into a Glacier biome, the world tile's biome no longer matches that of the Region it belongs to. This can be handled by creating a new region or shifting the world tile to belong to a matching neighboring region, but if a new region is created it would need to be given a set of flora and fauna according to some logic.

The trickiest stage is a Fortress. As far as I've seen from DFHacking, you can't add plants (apart from "grasses") to an active fortress (I haven't tried an inactive one: it's quite possible the availability structure is generated from the region/world tile data anew when the fortress is unpacked, rather than being stored with the fortress), so changing the flora and fauna available to an existing fortress may be a challenge (it was possible to replace one plant with another, but all biomes don't have the same number available to them).

I haven't touched on changes to Elevation, as it's a different level of complexity. Just turning "normal" terrain into Mountain or Ocean gets messy, and adding/removing/shifting Geo Biome layers in an active fortress would require a fair bit of thought.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #6 on: May 29, 2019, 09:17:24 am »

It might be as easy as flipping a boolean value to just affect the embark zone for things afflicting the fortress site presently. EI - Necromancer pops up, does a ritual/high concentration of ressurection magic and places a curse down upon the fortress which for some time after makes it become a evil ressurecting area.

Weather and spontaneous animals also can just be inserted over the map, mundane animals will just appear with fresh populations instantly, treating plants as mundane also would spontaneously cause new saplings etc to grow. Glumprong can't reproduce in vanilla but it would most likely spread into the new corrupted zones if they could.

I think you're overthinking literal and drastic terraforming effects when OP seems to be directed at sphere/good/evil parallels, a place can still be a biome even if it looks nothing like it, and elves terraforming nearby terrain into more forests for infinite elf sprawl simply probably means there's lots of trees there + current climate. Mountains and oceans would probably be hard-stopped to look for places where there are oceans/bodies of water already like lakes or hills rather than create fresh ones.
« Last Edit: May 29, 2019, 09:21:30 am by FantasticDorf »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #7 on: May 29, 2019, 09:23:22 am »

Point related but seperate, spreading a cavern biome *forcibly* over the surface would be interesting albiet i believe impossible because of the plant's aversion to sunlight, but cavern grass and mushroom trees don't exactly melt away when exposed to sunlight either, especially if there were sunlit adaptions to this. Cavern monsters living on the surface too.

« Last Edit: May 29, 2019, 09:25:44 am by FantasticDorf »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #8 on: May 29, 2019, 11:53:07 am »

We don't know how spheres will work in any detail after the M&M release. Sure, rituals are supposed to eventually be possible, but that's a long way before that, and if anyone comes to your fortress to perform a ritual outside, I'd expect you to know it's happening an getting the option to respond (which you may not be equipped to do, but that's a different issue). My post mostly concerns the current situation and the near future (Villains), with an eye to DFHacking the functionality.

Evil weather is currently tied to the Regions rather than to individual world tiles. I'd expect the ties to be shifted after the M&M map rewrite to either be to the world tiles or to the focus influencing the tiles (quite possibly with a reference to the influence(s) from the world tiles), as well as the effects being opened up for a broader range of effects.
Flora and fauna can be added to Regions, and with a minor change to the code to check for Evilness compatibility it ought to work to just add flora/fauna to Regions pre embark.
Adventure mode might be a bit odd, as this probably means the generated location will look different when returning to it after a biome shift. Either plants are placed in completely new places, or trees may be replaced by shrubs or other species of trees. This is something you probably wouldn't note, though (I wouldn't unless it was a "base", and those would likely be subject to issues of the same kind as Fortresses are).
I don't understand the statement about Glumprong reproduction, as I haven't had any problems with saplings appearing in the evil biome parts of my fortresses.

I'm not really overthinking the issue as much as trying to cover the the aspects beyond Evilness/Savagery. Changing terrain into forest means changing it from one biome type into the Jungle one, which means butting up against the Region logic used currently, and how the available flora/fauna set is tied to Regions rather than individual world tiles (with selection of what's actually present being drawn from the subset that matches to actual biome). Changing the biome is just a matter of changing the parameters that control it, with Rainfall being a very important one, together with Drainage: Increase the Rainfall on a Savanna type terrain world tile and it will turn into either a Jungle, Marsh, or Swamp (the wiki page on biomes covers most of it, with Temperature mostly excluded).
Hills is actually just a different Drainage version of the Savanna biome type (with exactly the same set of biomes in both versions), not proto mountains, and Lakes are their own biome type, quite separate from the Ocean one.

You can probably create raws for surface versions of "cavern" flora and fauna that are tied to no biomes, generate the world, and DFHack them to be tied to desired biomes and then DFHack the desired Region(s) to make those available to the Region (or generate the world with those raws, and then remove all the unwanted entries in Regions, but that's bound to be more work, even if it might be marginally safer). You'd still have the issue that they'd be available to all world tiles with matching biomes within the Region, though. As long as you don't have an existing fortress (such as before embarking), it probably shouldn't be difficult. When it comes to Adventure Mode I can only make the guess that it won't cause issues beyond what I've mentioned, but I don't have any experience of that mode.
Logged

UristMcVampire

  • Bay Watcher
  • [NOT_LIVING][BLOODSUCKER]
    • View Profile
Re: Biome changing tag for entities
« Reply #9 on: June 24, 2019, 04:03:00 pm »

If this becomes possible I want it available for lairs too so I can make a megabeast that spreads savagery from it's lair.
Logged
GENERATION 10: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.


 Naga/Lamia race

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #10 on: July 26, 2019, 01:09:46 pm »

Well recenty devlogs are pointing towards additional sphere effects within [EVIL] which is now to be named primordial evil, which appear to overlap rather than replace biomes as a compromise with creatures that live between the lines able to exist within it, like bogeymen attached to the nightmare sphere (possibly a few others if player modding doesnt extend its scope).

How much control we have over this will be seen, it would seem that Death Sphere demonic influence spreads identically to necromancers (without the actual tower offloading of zombies or drawing upon it), and sphere does have a drastic effect on flora, causing it to recede sometimes.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Biome changing tag for entities
« Reply #11 on: July 27, 2019, 01:19:11 am »

I don't share FantasticDorf's interpretation of what Toady has said: As far as I understand it "Primordial Evil" is the current evilness associated with regions, which Toady doesn't seem to change, and, if so, it will retain the current variability of level of vegetation and various effects (resurrection, evil weather, etc.). This evilness does not "decay" towards neutral, but is a local baseline (and in neutral and good regions, the baselines are neutral and good respectively).
The new "dynamic" evilness forms a layer on top of whatever the baseline is and pushes the evilness level and evilness effects in directions governed by the evilness subtype/sphere, but when the source is removed the effects and the evilness level slowly decays back to the baseline (which is the "Primordial Evilness" level, which may be very low, i.e. Good).
Given the descriptions Toady has provided, it seems it ought to be straight forward to implement negative evilness drivers (i.e. Good), although you'd normally see only the Evilness value decrease, but a vegetation impaired (evil) world tile it might actually allow for a reduction of the amount of dead vegetation.
Similarly, it seems it would be straightforward to implement drivers on the Savagery scale, although there are no other known values to push out of the ("Primordial") baseline than the Savagery level itself.
Logged