Bay 12 Games Forum

Please login or register.

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

Author Topic: Would this fix the blood FPS problem?  (Read 15186 times)

Leonidas

  • Bay Watcher
    • View Profile
Would this fix the blood FPS problem?
« on: September 18, 2010, 02:08:21 pm »

I've been thinking about the extreme frustration of FPS loss due to blood.  What would happen if you deleted blood from the game entirely? 

It's a single line in the Raws.  Even creatures with goo or ichor in their veins have a line that starts with "[BLOOD:"  For someone who knew what he was doing, it would be a pretty easy task to automate a search through the raws to rip out all those lines.

This would change the game balance some.  Bloodless creatures are harder to kill because they can't bleed to death.  But your dwarves also wouldn't have any blood, so it would probably balance out.
Logged

Gearheart

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #1 on: September 18, 2010, 02:09:40 pm »

Are you sure that would not just automatically kill everything in the entire world that has blood?

Because killing everything in the entire world is probably bad.
Logged

Leonidas

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #2 on: September 18, 2010, 02:20:42 pm »

Are you sure that would not just automatically kill everything in the entire world that has blood?
The game already has lots of bloodless creatures.  That's what gave me the idea.  Essentially, every creature would become undead.  The major balance change would be that bloodless creatures would become relatively less difficult.

But I'm no modder.  I'm just floating the idea.
Logged

ledgekindred

  • Bay Watcher
  • Oh Boy, Microcline
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #3 on: September 18, 2010, 02:22:07 pm »

I did this on accident to a cat mod.  I forgot to give it blood, and wound up with "smear of cat n/a" all over the place when cats would get wounded.

It's possible that if you modded the basic body type definitions you could get rid of blood being present in any form, doing the same for goo and the other types of liquids some animals contain.  But as Gearheart implied, a lot of the combat system relies blood loss.  Either everything would immediately die, or nothing would ever die, I'm not entirely sure which.  The cat thing implies that they would never bleed out on account of not having blood.

A better solution would be to mod the blood template in the save raws to have a very low boiling point.  Any exposed blood would immediately boil away and evaporate into nothing.  On the other hand I've noticed that doing this also sometimes seem to cause any creature with bleeding wounds to also have all their blood boil and evaporate into nothing.

Play with the boiling point of blood in arena mode.  Throw a bunch of dwarves, goblins and cats in.  Let 'em beat the crap out of each other and bleed everywhere and see what happens to all the leftover blood once combat ends. If you can wind up with bleeding but alive critters, even better coz you can see if all their blood boils out and they keel over dead.
Logged
I don't understand, though that is about right with anything DF related.
I just hope he dies the same death that all dwarfs deserve: liver disease.
The legend of Reg: http://www.bay12forums.com/smf/index.php?topic=65866.0
Atir Stigildegel, Legless Hero of Diamondrelic: http://www.bay12forums.com/smf/index.php?topic=83136.0

Hamster Man

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #4 on: September 18, 2010, 04:20:15 pm »

I'm fairly certain it will not kill creatures. I recall at one point back in 40d, I was sick of blood smears everywhere and did exactly that - removed the "Blood" line on all the creatures in the raws.

I seem to recall it actually worked too, but I picked up the "dfclean" not too much later, and went back to letting them bleed everywhere.

You'll have to test for yourself, though. My memory isn't what it used to be (and 2010 changed quite a few things too).
Logged
So there's that, as well. It looks like the only chronic problems that water can't cure are nausea and cave spider bites.
Which, coincidentally enough, can be cured by magma.

oso

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #5 on: September 18, 2010, 07:49:48 pm »

Something seriously needs to be done about this, complete game breaker. I just encountered it for the first time and my >50 fps fort dropped to <40 fps after my first siege despite running DFcleanmap immediately after fighting ended. For all previous ambushes I just trapped everything in cages which had no effect on FPS, this one was a blood bath and now my fortress is becoming unplayable :(
Logged

Leonidas

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #6 on: September 19, 2010, 02:01:34 am »

Changing the boiling temperature of blood is a partial solution.  It made arena battle much less bloody, at least with most creatures.

In your raws>objects folder, open material_template_default.txt.  Find blood_template.  Change boiling_point to 10069.  And if you want this to apply to your current game, you'll need to do this to the raws under data>save>region.  You probably also want to change the boiling point of ichor, goo, slime and pus in the same file.

I don't recommend setting the boiling point any lower than 10069.  That would cause blood to boil in spectacular sprays on most hits, coating everyone nearby and spamming your combat log. 

I don't think that this'll hurt your current game, but I don't really know.  So backup and edit at your own risk.

This only seems to help with creatures who have the standard homeotherm of 10067.  It didn't help against dragons, who have a lower homeotherm.

This is only a partial solution because creatures and corpses are still coated in blood, and I'm not sure how much that hurts the FPS.  Dumping water on the corpses just washes the blood onto the floor and walls, where it does NOT boil away.  Still, for those discouraged with FPS loss due to blood, this along with DFClean may make the game playable again.
Logged

MaDeR Levap

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #7 on: September 19, 2010, 04:32:48 am »

This is only a partial solution because creatures and corpses are still coated in blood, and I'm not sure how much that hurts the FPS.
In Dwarf Fortress, EVERYTHING rape CPU.
Logged

pushy

  • Bay Watcher
  • [MEANDERER]
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #8 on: September 19, 2010, 06:58:48 am »

[BLOOD:LOCAL_CREATURE_MAT:BLOOD:SOLID]

[BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS]

Choose whichever. The problem with blood spatter is that it's a liquid which is being spread all over the place. If blood is a gas, you see clouds of boiling blood when arms get lopped off and stuff, but after combat there's no trace of blood at all. If blood is a solid there's no cloud of boiling blood, there are no pools of blood on the ground or anything...but for some reason, despite there being no blood on the ground, looking at inventory will reveal that dwarves still have blood spatter all over them. Either way, it cleans up the mess :)
Note, though, that I've only tried this out in the testing arena and not in fortress mode or anything, so I'm not sure of long-term implications of making either change (except presumably not being able to embark with or trade for buckets of blood...if you'd actually want to do that :-\)
Logged
Quote from: Tim Edwards, PC Gamer UK
There are three things I know about dwarves:
1. They've got beards. Even the women.
2. They're short. Especially the women.
3. They're Scottish.

jei

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #9 on: September 19, 2010, 08:15:43 am »

Changing the boiling temperature of blood is a partial solution.  It made arena battle much less bloody, at least with most creatures.

In your raws>objects folder, open material_template_default.txt.  Find blood_template.  Change boiling_point to 10069.  And if you want this to apply to your current game, you'll need to do this to the raws under data>save>region.  You probably also want to change the boiling point of ichor, goo, slime and pus in the same file.

I don't recommend setting the boiling point any lower than 10069.  That would cause blood to boil in spectacular sprays on most hits, coating everyone nearby and spamming your combat log. 

I don't think that this'll hurt your current game, but I don't really know.  So backup and edit at your own risk.

This only seems to help with creatures who have the standard homeotherm of 10067.  It didn't help against dragons, who have a lower homeotherm.

This is only a partial solution because creatures and corpses are still coated in blood, and I'm not sure how much that hurts the FPS.  Dumping water on the corpses just washes the blood onto the floor and walls, where it does NOT boil away.  Still, for those discouraged with FPS loss due to blood, this along with DFClean may make the game playable again.

I did this in my currently 1-2 FPS running game and thusfar no performance improvements. If I understand correctly, this would mainly work and help against further and future performance degradation?
Logged
Engraved on the monitor is an exceptionally designed image of FPS in Dwarf Fortress and it's multicore support by Toady. Toady is raising the multicore. The artwork relates to the masterful multicore support by Toady for the Dwarf Fortress in midwinter of 2010. Toady is surrounded by dwarves. The dwarves are rejoicing.

jei

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #10 on: September 19, 2010, 08:20:36 am »

[BLOOD:LOCAL_CREATURE_MAT:BLOOD:SOLID]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS]

Choose whichever. The problem with blood spatter is that it's a liquid which is being spread all over the place. If blood is a gas, you see clouds of boiling blood when arms get lopped off and stuff, but after combat there's no trace of blood at all. If blood is a solid there's no cloud of boiling blood, there are no pools of blood on the ground or anything...but for some reason, despite there being no blood on the ground, looking at inventory will reveal that dwarves still have blood spatter all over them. Either way, it cleans up the mess :)
Note, though, that I've only tried this out in the testing arena and not in fortress mode or anything, so I'm not sure of long-term implications of making either change (except presumably not being able to embark with or trade for buckets of blood...if you'd actually want to do that :-\)

And this would need to be done to regionX/raw/objects/ with any occurrences in files:

creature_subterranean.txt
creature_standard.txt:
creature_small_riverlake.txt
creature_small_ocean.txt:
creature_small_mammals.txt:
creature_savage_tropical.txt:
creature_other.txt:
creature_next_underground.txt:
creature_large_tundra.txt:
creature_large_tropical.txt:
creature_large_temperate.txt:
creature_large_riverlake.txt:
creature_large_ocean.txt:
creature_large_mountain.txt:
creature_domestic.txt:
creature_birds.txt:

I take it. A piece of cake with perl to do. But you also probably need to do it to ichor, goo, slime and pus too to have a significant effect.
Hope this doesn't give my creatures too severe gas problems. Also, probably doesn't work to help in FPS-loss that has already happened,
but should work against future loss I suppose... Not that FPS 1 can go down all that much more anyway... I hope.
« Last Edit: September 19, 2010, 08:27:59 am by jei »
Logged
Engraved on the monitor is an exceptionally designed image of FPS in Dwarf Fortress and it's multicore support by Toady. Toady is raising the multicore. The artwork relates to the masterful multicore support by Toady for the Dwarf Fortress in midwinter of 2010. Toady is surrounded by dwarves. The dwarves are rejoicing.

jei

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #11 on: September 19, 2010, 10:39:00 am »

This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.
Logged
Engraved on the monitor is an exceptionally designed image of FPS in Dwarf Fortress and it's multicore support by Toady. Toady is raising the multicore. The artwork relates to the masterful multicore support by Toady for the Dwarf Fortress in midwinter of 2010. Toady is surrounded by dwarves. The dwarves are rejoicing.

jei

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #12 on: September 19, 2010, 11:23:55 am »

This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.

Wonder if you could easily mod dwarves to get nice feelings out of blood spray mists as they do from water mist. ;D

Logged
Engraved on the monitor is an exceptionally designed image of FPS in Dwarf Fortress and it's multicore support by Toady. Toady is raising the multicore. The artwork relates to the masterful multicore support by Toady for the Dwarf Fortress in midwinter of 2010. Toady is surrounded by dwarves. The dwarves are rejoicing.

jei

  • Bay Watcher
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #13 on: September 19, 2010, 12:02:25 pm »

So I did:
perl -pi -e "s/BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID/BLOOD:LOCAL_CREATURE_MAT:BLOOD:GAS/g" *
perl -pi -e "s/BLOOD:LOCAL_CREATURE_MAT:ICHOR:LIQUID/BLOOD:LOCAL_CREATURE_MAT:ICHOR:GAS/g" *
perl -pi -e "s/BLOOD:LOCAL_CREATURE_MAT:GOO:LIQUID/BLOOD:LOCAL_CREATURE_MAT:GOO:GAS/g" *
perl -pi -e "s/PUS:LOCAL_CREATURE_MAT:PUS:LIQUID/PUS:LOCAL_CREATURE_MAT:PUS:GAS/g" *

in regionX/raw/objects/ folder.

and I've noted no obvious problems so far. However, also no real fix for the FPS 1-3 problem. Although, I think I see now more of FPS 3 than prior to fixing attempt, when it was rather steadily in 1-2, and I suspect this will stop things from getting much worse (not that they can).
I'll update here if performance changes for better or worse when more in-game time passes.

Also, I suspect cleaning the map of blood might help a lot, for which I have no working tool (.13) right now.

Also note: Adamantine is still minable when playing .12 -generated fortress with .13.
Logged
Engraved on the monitor is an exceptionally designed image of FPS in Dwarf Fortress and it's multicore support by Toady. Toady is raising the multicore. The artwork relates to the masterful multicore support by Toady for the Dwarf Fortress in midwinter of 2010. Toady is surrounded by dwarves. The dwarves are rejoicing.

ledgekindred

  • Bay Watcher
  • Oh Boy, Microcline
    • View Profile
Re: Would this fix the blood FPS problem?
« Reply #14 on: September 19, 2010, 12:42:20 pm »

This is actually pretty stylish as you get boiling blood clouds from severe wounds, Makes it easier to follow battles. And makes them somewhat cooler looking.

In the interest of Science I was screwing around experimenting in a scummed save from my existing fort which is absolutely soaked in blood and ichor.  I changed the boiling point of blood, ichor and goo in the materials_template file to 10001.  As soon as the fort loaded, every creature and item with blood on them was surrounded by a lovely - and huge - cloud of boiling blood and ichor, until it all boiled away and dissipated.  That surprisingly (but obviously in hindsight) included a whole lot of the skeletons and crap on the ground sitting in blood-soaked squares.  Quite pretty.  However it didn't affect any blood smears, spatters or stains on ground, floors, walls, etc. 

Watching my dwarves walk through the bathtub which was still full of pools of blood and ichor was fun.  They would walk in clean, walk out with their shoes all covered in guck, and it would immediately boil away in a puff.  Dogs were the best since they would always come out entirely covered so they made a big ole cloud.  I agree that it's a neat effect and possibly worth leaving in just for the looks of things. 

If you spend the time time messing around with the BOILING_POINT and SPEC_HEAT tokens you can get it to where the blood will remain for a short period of time before evaporating.  I messed with this in arena mode with my cat mod and eventually managed to make it work, but it's really titchy in terms of the values you want to use and probably not worth it.

I then used dfhack (still on .12 for now) to get rid of the rest of the blood.  Saved fort, set blood et al back to original temps and reloaded fort.  At that point I didn't see blood stuck to any surface, item or creature on the things I looked at.

Before cleaning everything up I was getting solid 20-21fps.  After cleaning everything up I was getting ... dun duh dunnn... solid 20-21fps.  No noticeable difference.
Logged
I don't understand, though that is about right with anything DF related.
I just hope he dies the same death that all dwarfs deserve: liver disease.
The legend of Reg: http://www.bay12forums.com/smf/index.php?topic=65866.0
Atir Stigildegel, Legless Hero of Diamondrelic: http://www.bay12forums.com/smf/index.php?topic=83136.0
Pages: [1] 2 3