Death by cold magmaEndless temperature calculations and single threading are a bad mix. But magma's just too dwarfy to pass up! Could we make it deadly without the CPU-intensive temperature system?
Oh, yes we can.Results: - A very dead miner. (No more cheaty benefits to disabling temperature, as long as you embark in a non-seasonally-freezing biome)
- FPS (calculations per second) can DOUBLE in old forts - test the gain yourself before installing by switching TEMPERATURE:YES to :NO in d_init.txt
- Lame items that the creatures were wearing still disintegrate, so automatic goblinite sorting is on the table
Created with major help from:Meph (who may be integrating it into Accelerated DF!)
Roses
Deon
celem
Without further ado, here are the raws:The interaction (copy & paste into any interaction_*.txt file in raw/objects, just below [OBJECT:INTERACTION])
[INTERACTION:COLD_MAGMA_VULNERABILITY]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_LOCATION:IN_MAGMA]
[SYNDROME]
[CE_BLEEDING:SEV:5000:PROB:100:BP:BY_CATEGORY:ALL:ALL:START:0:END:1000]
[CE_PAIN:SEV:5000:PROB:100:BP:BY_CATEGORY:ALL:ALL:START:0:END:1000]
[CE_FLASH_TILE:TILE:19:6:4:1:FREQUENCY:200:200:START:0]
And paste the following into every creature that you want to be affected by magma (read: invaders, hippies, and unwanted
pets pests) just under their [CREATURE:*] tag in creature_*.txt:
[CAN_DO_INTERACTION:COLD_MAGMA_VULNERABILITY]
[CDI:VERB:is bathed in magma:is bathed in magma:NA]
[CDI:TARGET:A:SELF_ONLY]
[CDI:FREE_ACTION]
Okay, you can actually put it just about anywhere if you know what you're doing.
Last step (
don't forget!): Disable temperature in d_init.txt, or via the Lazy Newb Pack.
Note: Briefness of immersion time, unconsciousness, and preoccupation with swimming are all possible reasons that a creature won't die. They also may take a little while (on the order of seconds). But they will, in the end, be immolated.
~ Enjoy your faster game! ~
Original post:
If there's already a mod out there for this one, please let me know! (Nothing turned up in my preliminary Google/forum searches.)
Background:
I've recently been toying with the idea of disabling temperature to increase my calculations per second. However, just using the init option to disable temperature creates various cheat-y side effects. I tried DFHack's various temperature tweaks/fixes, and they only boosted my calculations per second by ~10 (with tweak fast-heat 1) - which is appreciable, but not the full extent of what can be achieved. Fully disabling always shoots me straight to 100.
There's no seasonal freezing in my current embark. The only major downside to disabling temperature here would be non-deadly magma. I don't want to give up lava entirely, but I don't want dwarves to be able to swim through it either.
The only experience I have in this realm was a custom civ I tried to mod in once, although I do program as a hobby.
Can anyone help me out with the following (with temperature disabled):
Option 1 (hopefully easy):
Making lava instantly lethal to every (or most) creature(s)?
Option 2 (more realistic):
Making lava inflict an eventually-lethal syndrome?
Bonus points if 1) the timer is based on body mass, 2) the syndrome also causes the afflicted creature to burn, 3) sustained contact with the lava is required for death, or 4) lava-dwelling creatures, very hot clowns, and other naturally !!fun!! critters remain unaffected.
I'm not necessarily asking for straight-up code (although it would be appreciated if you have it!), but for advice on how this could be accomplished.
Thanks!