Aller au contenu

Photo

Corpses and Memory


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
Darin

Darin
  • Members
  • 282 messages
 Just wondering: do selectable dead bodies that do not decay take up memory?  If so, is there any way to script them away so that a module can open that is erroring out due to memory issues?

#2
Tchos

Tchos
  • Members
  • 5 080 messages
I imagine that they do, though I don't know that for sure.  There are area clean-up scripts here and there which get rid of dead bodies and other undesirables when you exit an area.  Maybe take a look at this one?

http://nwvault.ign.c...s.Detail&id=216

#3
diophant

diophant
  • Members
  • 116 messages
To avoid misunderstandings: I never measured it, so the following is pure speculation, but I would be really surprised if it is not correct.

They surely will, but not that much. The main memory consumption is due to outdoor areas, which use megabytes of memory. A dead body cannot but much more than a kilobyte. So if there aren't hundreds of dead bodies, it shouldn't matter.

In my mod, I marked everything in an outdoor area that is not reachable as non-walkable. This reduces the memory consumption of the area. Maybe this might help you, too.

#4
Darin

Darin
  • Members
  • 282 messages

diophant wrote...
...if there aren't hundreds of dead bodies, it shouldn't matter.


The combination could be the issue; seeing as I have lots of dead kobolds, and this as the outdoor area: http://nwvault.ign.c...s.Detail&id=397



Modifié par EpicFetus, 03 juillet 2013 - 02:23 .


#5
Tchos

Tchos
  • Members
  • 5 080 messages
Is the issue that they're not decaying normally, and you want them to, or you specifically want the bodies to stay around until the player leaves the area?

#6
Darin

Darin
  • Members
  • 282 messages
The issue is a player is getting error messages and can't load the area...I'm wondering if the corpses, which I set to NOT decay, are the issue. There are a LOT of corpses (lots of spawning 20 kobolds for ambushes, all have their corpses stick around)...so 9 areas of multiple ambushes, 1 area with only 12-14 corpses in it, plus a town...yeah, it was a lot, I made the area over a year ago and would do things VERY differently if I did it now (and am for my haunted Halls campaign).

#7
Tchos

Tchos
  • Members
  • 5 080 messages
Well, I don't know if that's the issue, but if it's something that needs to work on a game in progress, then I can write a script that the user can run to destroy all dead kobolds in that area, without being in the area. I'd just need to know the tag of the area, or if there is no tag on the area, then the unique tag of a waypoint in that area, or at least some unique non-static placeable in the area (unique meaning there are no other objects in the module with that tag). Also, the tag of the kobolds.

#8
Darin

Darin
  • Members
  • 282 messages
I could do that as well, and the area has a tag (since otherwise the portable hole would fail). Just wondering if that IS the issue...

#9
Tchos

Tchos
  • Members
  • 5 080 messages
I'd expect any answers here would just be (as Diophant said) speculation until it's tested. You should try it, and post the results of the experiment.

#10
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
It is just common sense

A memory leak is just not disposing of variables, even if each is one byte it can get bad. I'd say this is more akin to a kobold leak. No it's not an issue of just corpses, but everything done is cumulative and every object has to sit in memory. I would wonder if using the NWN2 client extender would make a difference, or if you are using that.

20 spawns at once is just a lot, probably really hitting the official AI hard ( hint early exit on perceived helps a lot on this ), I would probably adjust the blueprints so they have a pretty long decay at least. But that being said, this is speculation, you'd probably want to just set them to decay fast ( which is really easy to implement and test ), see if that changes things and if it does, figure out how to clean them up better. ( or add in some ghouls or the like which go and eat the corpses if you want more realism)

Modifié par painofdungeoneternal, 03 juillet 2013 - 06:21 .