Aller au contenu

Photo

All About Corpses


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

#1
henesua

henesua
  • Members
  • 3 855 messages
I have some questions about the default bioware corpses.

Some background, I was curious if the standard Lootable Corpse object was the same object as the creature, and whether the creature's event scripts would run on it, specifically OnDisturbed. Since the OnDistrubed event did not execute on the corpse, I assume that the corpse object is not the same as the creature.
  • What is the corpse object? What kind of resource and what is its resref? I'd like to customize it, although I fear that this is a hardcoded thing.
  • How does the Resurrect Effect work on a corpse object? Is there data on the object that configures the resurrection of the NPC? Can we access this data via script? Is this also a hardcoded thing? Has anyone else replicated this for a different object than the default creature corpse?
  • How does the looting behavior work? Are there events and scripts that we have access to?


#2
henesua

henesua
  • Members
  • 3 855 messages
 Due to the questions I have I am looking at the following corpse systems:


#3
henesua

henesua
  • Members
  • 3 855 messages
Dug into NESS and discovered that its corpse system is Keron's. I'll see what I can do with that.
In addition to lootable I need these corpses to be skinable, raisable, and animatable.

#4
ShadowM

ShadowM
  • Members
  • 767 messages
I cannot remember which one I use, it been so long and I change so much of it with percentage drops and you must know about my next update to HR base I have add skinning for all sorts of stuff and meat. animatable? Hope you find the system that best work for you and/or easiest one to mod.

#5
Pattycake1

Pattycake1
  • Members
  • 49 messages
Look at axe murders killer death system http://nwvault.ign.c....Detail&id=2994

#6
Shadooow

Shadooow
  • Members
  • 4 465 messages

henesua wrote...

I have some questions about the default bioware corpses.

Some background, I was curious if the standard Lootable Corpse object was the same object as the creature, and whether the creature's event scripts would run on it, specifically OnDisturbed. Since the OnDistrubed event did not execute on the corpse, I assume that the corpse object is not the same as the creature.

  • What is the corpse object? What kind of resource and what is its resref? I'd like to customize it, although I fear that this is a hardcoded thing.
  • How does the Resurrect Effect work on a corpse object? Is there data on the object that configures the resurrection of the NPC? Can we access this data via script? Is this also a hardcoded thing? Has anyone else replicated this for a different object than the default creature corpse?
  • How does the looting behavior work? Are there events and scripts that we have access to?

i think that this is not known at all, there isnt any info about this written anywhere, if someone find answers to your questions, he never published them

I could give you some guesses, but for everyone's sake it would be better if you would do a research on this and tell us results, then we can write them into lexicon or wiki.:)

#7
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
Lootable corpses can be animated or raised just like a PC corpse can be, assuming the spell scripts themselves are set up to allow it.

This was how I handled them in my zombie mod. Since it was ravenloft based, it made more sense to have the undead have to be created as opposed to summoned, and the ability to have PCs raise/ressurect NPCs can be a useful one.

Unfortunately, there are conditions where even if they have items still in their inventories they can become unclickable making it impossible to target them with the spells to do so.

#8
henesua

henesua
  • Members
  • 3 855 messages
Thanks for the replies everyone. Since I don't have the energy to write my own system from scratch I'm modifying what comes with NESS, Keron's corpse system. Keron's system works because it places a pointer to the creature's corpse on the placeable "lootable corpse".

One bug which I caught was that if the creature's blueprint is set as lootable, then (1) its corpse doesn't drop any loot to the placeable corpse and (2) when destroyed it lingers indefinitely  (leaves a little unidentified glow on the ground when you hold down tab).

The solution is to add a line of code to the functions SetupSpawned  and SetupCampSpawned which ensures that the creature does not leave a lootable corpse: SetLootable(oSpawned, FALSE)

To enable the corpse to be raisable you change the line:
AssignCommand(oSpawned, SetIsDestroyable(FALSE, FALSE, FALSE));
to
AssignCommand(oSpawned, SetIsDestroyable(FALSE, TRUE, FALSE));

ShadowM wrote...
animatable?


I am modifying animate dead and similar spells to require the caster to target a corpse or an item with the write flags.

Pattycake1 wrote...
Look at axe murders killer death system http://nwvault.ign.c....Detail&id=2994


That is for a player's death. AFAIK, that set of scripts by Axe doesn't cover NPC corpses and the like.

ShaDoOoW wrote...
I could give you some guesses, but for everyone's sake it would be better if you would do a research on this and tell us results, then we can write them into lexicon or wiki.


I have neither the ability nor the inclination to go after this right now. If I discover anything I'll post it.

Failed.Bard wrote...
Lootable corpses can be animated or raised just like a PC corpse can be, assuming the spell scripts themselves are set up to allow it.
This was how I handled them in my zombie mod. Since it was ravenloft based, it made more sense to have the undead have to be created as opposed to summoned, and the ability to have PCs raise/ressurect NPCs can be a useful one.
Unfortunately, there are conditions where even if they have items still in their inventories they can become unclickable making it impossible to target them with the spells to do so.


Bard, by "lootable" corpse are you referring to the standard Bioware corpse system, or to the custom corpse scripts I linked above? And what was your workaround for the issues you noted above about being unable to target a corpse?

#9
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Just a few quick answers off the top of my head...

henesua wrote...

I have some questions about the default bioware corpses.

Some background, I was curious if the standard Lootable Corpse object was the same object as the creature, and whether the creature's event scripts would run on it, specifically OnDisturbed. Since the OnDistrubed event did not execute on the corpse, I assume that the corpse object is not the same as the creature.

  • What is the corpse object? What kind of resource and what is its resref? I'd like to customize it, although I fear that this is a hardcoded thing.
  • How does the Resurrect Effect work on a corpse object? Is there data on the object that configures the resurrection of the NPC? Can we access this data via script? Is this also a hardcoded thing? Has anyone else replicated this for a different object than the default creature corpse?
  • How does the looting behavior work? Are there events and scripts that we have access to?



Just a few quick answers off the top of my head with little or no research so feel free to shoot holes into any of the answers.
  • What is the corpse object?

    The corpse object is the same object as the creature that died. Being dead it has all event scripts disabled. This stops the corpse from doing things that it should not do, Things like waklking waypoints, shouting for help, Trying to react from a thief stealing from there backpack, ect...
  • How does the Resurrect Effect work on a corpse object?

    The 'dead flag' is reset.
    i.e. GetIsDead(oNpc)
  • How does the looting behavior work? Are there events and scripts that we have access to?

    Since the Events and event que is disabled on dead creatures there are no event that work.

The answers above all apply to creatures that leave a lootable corpse and creatures that have been set to be raisable via the SetIsDestroyable flag. It is inportant to note that the two systems do not play nice together. If you have a creature that you set to leave a lootable corpse and also set him to be raisable, The two systems will conflict. The Lootable Corpse system is set to destroy the creature once he has no loot left. When using the raisable creature system, the creature will not get destroyed due to the destroyable flag getting unset. There is however an error where the looting system still makes the creature unslectable once the creature has been looted. Making it impossiable for a PC to target the NPC to raise it.


Some of my testing in the past also showed that there my be some errors when a creature is killed a second time, Though I do not remember what they where.

#10
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
What I ended up doing was giving all the creatures undroppable (cursed) corpse items that were set to drop, so they always had an item left to be looted. Unfortunately, that didn't work all the time either, but since NPCs ignore encumbrance anyways it didn't hurt them to have it.

#11
Pattycake1

Pattycake1
  • Members
  • 49 messages
I suggested axe's system because on my old server we modified it a bit to work on our henchmen and on special npc's. But it was just a suggestion.

#12
henesua

henesua
  • Members
  • 3 855 messages
Thats interesting, Pattycake. How did that work? I wasn't dissing you, by the way, just pointing out my understanding of Axe's system.

Thanks for sharing your understanding, Lightfoot. That helps clarify things.

Interesting solution, Bard. I'm assuming from your comments that you are referring to a way you've worked with the standard lootable corpse system

Also... I got all I wanted working. Skinning, Raising, and Animate Dead will work while the corpse is around. I still need to work out a way to allow a corpse to be stored to a location should someone try to dig up the bones later for animating or raising. But I haven't worked that out yet. I've also created different rules for how Unique NPCs versus all other NPCs are handled. The bodies of Unique NPCs do not fade. During an event, the PCs may want to raise that Unique NPC or do something else.

Another thing I'd like to do is give players the ability to move the corpse to a grave, but I don't like the look of how Leto II handled moving corpses. They essentially get spawned and then killed again. I haven't figured out a clean way to hide the killing part. Perhaps a temporary but well timed silence and cutscene invis? Seems fiddly to me, but am open to what other's ideas are.

Modifié par henesua, 05 novembre 2012 - 02:06 .


#13
Pattycake1

Pattycake1
  • Members
  • 49 messages
 LoL I didnt think you was dissing me.

Yes Axe's system is designed for players. I wasnt the one that did it but one of my dever's did. They used how Axe's system makes a copy of the player and place it on the ground as a dead body.that can be picked up or rezed. We implemented that into our henchman system and I was moving it over to our important NPC's before I shut down the server. So basicly the henchman body never fades and could be moved to a safer area for a rez. It just made it a bit more interesting.

As far as storing a location, this topic a short while back was interesting. Padding a string - best practices?

Modifié par Pattycake1, 05 novembre 2012 - 04:47 .


#14
henesua

henesua
  • Members
  • 3 855 messages
Yeah... I started that thread. :)
I am using that for storing buried things in the database - when someone uses a shovel it accesses a DB location.

I think for a dead body, I'd just break down the location into its components, and store those. The area has to be stored as a tag instead of as an object, but otherwise it works.

Interesting use of Axe's system. That sounds like something I'd want to implement down the road. Only downside is the animation of a dying creature every time you place a corpse on the ground. That would have to be solved as it is an immersion breaker for me.

#15
Frimbleglim

Frimbleglim
  • Members
  • 25 messages
Stop me if I'm on the wrong track henesua, but why not create an item for npcs to carry and drop when killed that has the property of spawning the npc when resserection is cast on it or a skeleton when raise dead is cast on it? Just call it 'joe blogg's corpse' or whatever. It won't look like a corpse when placed on the ground but otherwise it should do the trick.

#16
henesua

henesua
  • Members
  • 3 855 messages
Frimble, that is a nice way to do this, but it would be in addition to the placeable corpse.

The problem however is how you handle putting the corpse back down. There are systems that do that, but from what I have seen, the scripter has to ensure that the creature is killed again when you put the corpse back down. I don't like the look or sound of the creature being killed once again everytime you drop a corpse.

Modifié par henesua, 05 novembre 2012 - 05:39 .


#17
Frimbleglim

Frimbleglim
  • Members
  • 25 messages
I think you missunderstand me henesua. I'm not suggesting letting the ressurection spell be targeted at actual corpses.

Items placed on the ground can be targeted by spells. you just get a line of text telling you they are not a valid target.

presumably you could write a script as follows:
1 is the spell ressurection?
if yes is there an item called corpse of Joe Bloggs within 10 feet?
if yes then delete that item and spawn Joe Bloggs at items location.
Remove all gear from Joe Bloggs
end

Alternitively you could use the corpse placable

#18
henesua

henesua
  • Members
  • 3 855 messages
no, i'm just thinking about how the item looks on the ground. :)
I'm being shallow and focusing on aesthetics. :)

I do use floor models that look like corpses for some corpse items, so in Arnhiem this could work for players. The corpse item is a pointer to the player (who is in limbo in the OOC lounge).

But for NPCs I don't have enough corpse models to cover all the bases. Since that is the case using the creatures actual model looks the best.

#19
WhiZard

WhiZard
  • Members
  • 1 204 messages
You could avoid the corpse all together, and have the creature remain alive but unable to move. Looting would be done through pick pocket and resurrection would be handled through the OnSpellCastAt event.

#20
henesua

henesua
  • Members
  • 3 855 messages
now that is thinking outside the box. :)

#21
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
Alive but unable to move will result in the creature only displaying right to people in the area when it's placed down though, won't it? The same way "statues" using frozen creature objects are almost never in the proper animation when you leave sight of them and come back.

Aside from the poor way NWN handles animations likely messing with it in implimentation, I do like the concept of the idea.

#22
Guest_Scrotok_*

Guest_Scrotok_*
  • Guests
Hey all! Haven't worked on my lootable corpses system in years (eventually I plan to make sure it works with 1.69). However, it does come with a "Raise Dead/Resurrection Plugin 1.0" that might meet your needs.

Henesua, when you say "I need these corpses to be skinable, raisable, and animatable", I assume "raisable" means "Raise Dead", but not sure what "skinnable" or "animatable" mean.

Hope this helps! Looking forward to getting back into the fray!
JP

#23
henesua

henesua
  • Members
  • 3 855 messages
That sounds great, Scrotok. Especially that you'll be involved with the community again. The more the merrier!

For the time being, I have a solution for my needs. I essentially modified the corpse system that comes with NESS to do what I want.

Explanation of what I wanted:
Raisable = can be targeted with raise dead
Skinnable = a character with an equipped knife collects the skin and meat from the body when clicking on the corpse
Animatable = a character casting a modified animate dead spell can raise the corpse as a zombie or skeleton.

#24
henesua

henesua
  • Members
  • 3 855 messages

Bumping this thread because I am revisiting these ideas for PC corpses where their spirit becomes separated from their corpse.



#25
SHOVA

SHOVA
  • Members
  • 522 messages

What are you after Henesua? Every creature in game including the PC to be able to be raised/resurrected, skinned, looted, and have a corpse item that can be picked up and taken to an NPC priest that can raise/resurrect? If so now that is a system I would want to.

I'm using the PC corpse system that is in the HCR-3.1, and NESS, with most of the corpse part disabled in favor of the HCR- it took some doing as with both systems everything wanted to drop 2 corpse objects.