Aller au contenu

Photo

Need a Bleed System


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

#1
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
I'll throw another one out there for you scripting gurus...

So far I've incorporated the following systems into my PW - Screwtape's Simple XP v2.07, The Krits Alternate Horse Scripts, and Axe Murderer's Killer Death System 1 v2.2. Integration was pretty smooth and everything seems to be working nicely together...

Now I need a persistent Bleed / Dying System that will work with the above configuration. I'm currently looking at the Bleed System - http://nwvault.ign.c....Detail&id=2610 - that Tom Banjo designed based on Scott Thorne's script. This is also the system that LoW adapted for Arbor Falls. Before I merge it in, are there any other systems I should know about or look over?

Modifié par Pstemarie, 11 août 2012 - 12:30 .


#2
lordofworms

lordofworms
  • Members
  • 252 messages
that one was the easiest to setup, merge and maintain IMO. I checked out a few during my need for bleed scripts..

#3
henesua

henesua
  • Members
  • 3 878 messages
LoW, don't your bleed scripts also have spurting gore as the PC succumbs to their wounds? Is that something you did on your own or is that from a package on the vault?

#4
lordofworms

lordofworms
  • Members
  • 252 messages
that was something I did on my own, easily enough too since the blood spurt is already part of default bioware, I just added it as a usable effect in my 2da.

if your interested I can post the script here.. its not all that difficult :)

#5
henesua

henesua
  • Members
  • 3 878 messages
That would be great if you did, and whatever 2da changes needed to be made. Thanks.

That effect is dramatic and I'd love to have that in my mod.

Modifié par henesua, 11 août 2012 - 04:16 .


#6
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
Ditto to what Henesua said...

#7
henesua

henesua
  • Members
  • 3 878 messages
Pstemarie - although my bleed scripts are little different than Tom Banjo's, you might want to check them out.

Death Customizable System

I added some hooks that allow you to customize death behavior based on killer or area that you died in.
I also created dynamic pools of blood while the PC is bleeding to death.

The customizabilty is useful for converting PCs to undead when killed by ghouls or wraiths etc....  Otherwise I've used it primarly in single player to launch cut scenes, and last minute rescues etc.. when certain enemies defeat you.

Modifié par henesua, 11 août 2012 - 05:40 .


#8
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
Thanks, I'll be sure to look them over. I've already got Tom's set up, but it wouldn't be too hard to swap it out if I like yours (or LoW's) system better.

#9
ffbj

ffbj
  • Members
  • 593 messages
That's cool as far as the conversion to undead goes. I have seen that in a few places. I have bleed down of course too, and fatigue. One thing I do is if a PC is killed in certain areas, and you try to respawn you wind up in jail, or held for ransom. You can be bailed out or ransomed by another PC or the DM if needs be. So you learn to be cautious when attacking bosses or certain civilized/controlled areas. Good luck with your PW. I think you are going at it in a systematic and thoughful way.

#10
henesua

henesua
  • Members
  • 3 878 messages
ffbj - the system I have uploaded only has the framework for custom behavior specific to a killer or area. I did not include the custom scripts for undeath conversion etc..., just the framework so that builders can do whatever they like.

#11
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
Okay I've taken Tom Banjo's script and modified to use EffectHitPointChangeWhenDying() and removed the bleed damage from the recursive timer in the original script. Anyone care to look it over and see what you think?

http://pastebin.com/8LZigJHX

Modifié par Pstemarie, 12 août 2012 - 02:38 .


#12
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
I've culled the script down to its bare essentials and switched back to dealing damage through the bleed timer (since it had to be there anywhere to track the 10% chance of self-stabilization). Now to look at the AI and see what I can do with the other functionality Tom provided (starting with Henesua's package)...

#13
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
OK - I'm stuck again...

I want to modify the default AI so that enemies will ignore a dying creature if another enemy is in perception range, but I'm not sure which creature event I need to modify. Do I change OnCombatRoundEnd or OnPerception?

Then I also want to modify it further so that if no living enemies are in perception range, the PC might get looted. Tom Banjo already provided the function; I just want to move it into the AI and use a variable - or maybe a racial check - that will flag certain creatures as "Looters". Again, I'm not sure which event I'd need to modify...

#14
henesua

henesua
  • Members
  • 3 878 messages
Pstemarie, I'm not completely clear on what you mean by ignoring a dying creature.

Do you want a creature that beat the dying creature to a pulp to then move on? this is likely DetermineCombatRound in Generic.

or do you mean that if a creature came across a dying enemy that it would ignore them? This is likely the perception event.

I modified the Perception Event. It makes more sense as a framework. I recommend you try something like it. You could add a check prior to Aggressive Response for whether the seen enemy is dead or dying. And decide at that point to loot them instead of attacking them.

Modifié par henesua, 12 août 2012 - 03:03 .


#15
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
I would handle it in a  Special AI script.   You can set a special AI script on the creature using:
 
//------------------------------------------------------------------------------
// * Define a replacement script for DetermineCombatRound
// * See x2_ai_demo for details
//------------------------------------------------------------------------------
void SetCreatureOverrideAIScript(object oCreature, string sScriptName)

You will need have  x2_inc_switches included for the function.

...
Then your AI script would look something like this. 


#include "x2_inc_switches"
#include "NW_i0_generic"
void main()
{
   object oTarget = GetCreatureOverrideAIScriptTarget();

   if (  GetCurrentHitPoints(oTarget)< 0)
   {
      // Attacking a dying target. check for one still moving.

      //I hope this will not return a dying target
      oTarget =  GetNearestCreature(CREATURE_TYPE_REPUTATION,
                         REPUTATION_TYPE_ENEMY,
                         OBJECT_SELF,
                         1,
                         CREATURE_TYPE_PERCEPTION,
                         PERCEPTION_SEEN,
                         CREATURE_TYPE_IS_ALIVE,
                         TRUE);
      // Check oTarget to see if we have a new valid target
      if (GetIsObjectValid(oTarget))
      {
         // There is a new valid target. run the AI with the new target.
         DetermineCombatRound(oTarget);

         // Since we have just ran DetermineCombatRound from within
         // DetermineCombatRound We need to stop the original run of the function.
         // Without this the first itteration would continue to run. in effect
         // reseting the target back to the original.
         SetCreatureOverrideAIScriptFinished();
      }
   }
}

#16
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
@ henesua: I think he is looking for some that will make the creature change targets. i.e. stop beating the downwd guy to a pulp is another enemy is still running around or beatting his friends to a pulp. Attack the guy who is a threat, not the one on the ground. It will also give party members a chance to give first aid to the guy on the ground before he bleeds to death.

#17
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
I'm looking to do the following...

1. If Hostile's current enemy goes down (dying), stop pulping him
2. If another enemy is in perception range of OR in combat with Hostile, then attack that enemy
3. If no enemies remaining, Hostile loots nearest dying PC

#18
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
Got it working - thanks for the input guys...

Its basically Tom's system but with some fundamental changes:

1. The bleed damage no longer heals once you stabilize - you remain at whatever hp you were at when stabilization occurred.

2. I changed the method used to determine if a dying PC stabilized - the chance of stabilization is now a fixed 10% chance per round (as per the PHB).

3. Enemies will now loot either gold or a random inventory item (including items that are not equipped). Items in the creature inventory slots are ignored. Looters will loot gold 50% of the time and an item the remaining 50% of the time. Looters will not loot a cursed or plot item. Only creatures flagged with the variable NWR_FLAG_LOOTER, humans, humanoids, or rogues will loot a dying PC.

The code is here for anyone that wants to see it...

http://pastebin.com/V9jVydu9

The next step will be to exclude certain creatures like ghouls, ghasts, etc. from the loop that prevents a creature dealing the coup-de-grace. These creatures will continue to attack a dying creature even if enemy threats are nearby.

:devil:

Modifié par Pstemarie, 13 août 2012 - 01:05 .


#19
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
I have my flesh eating undead set to start eating a PC at both death and dying events. Obviously, that doesn't fit every server, but it's something to keep in mind for them, even if you just have it do an extra point of damage per "bite" to the bleeding character.