[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Proposal: Vamp patch  XML
Forum Index -> Druids RPG Development Go to Page: 1, 2 Next 
Author Message
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Okay, I had been working on two patches. I'll discuss Ghost separately.

This is for the Vampirism ability. Recap:

Here's how it works now.

1) I vamp health from someone or something.
2) My health is immediately increased by the raw amount of vamped damage, regardless of cap.
3) The vamp ability 'informs' a marker spawned on me of the health increased.
4) Next tick, the marker checks my current health vs. my health cap and, if necessary, makes an adjustment.

So, with numbers:
My vamp cap is 350. I currently have 345 health.
1) I damage something for 100 and receive 10 health back (10% vamp).
2) My health is now 355.
3) VampMarker.HealthRaised = 10.
4) VampMarker notes that I have HealthRaised and that I am over vamp cap, so it sets me to vamp cap.

The reasoning for this is to disallow retaliation from countering vampirism. However, it also spawns a bajillion markers and does the whole thing in four code operations.

Dru and I discussed it, and he decided that we'd be just fine the "old fashioned way:" damage something, receive health up to your cap. End of story, no frills, no markers, no tick()s.

From my post in t'other forum:

Moof wrote:
Okay, here's the new code. It doesn't use Mysterial's patch for retaliation and, therefore, doesn't use a marker. Overall, it's FAR smoother and looks much better than the marker-based system. I tested it in a 75 point deathmatch with two stupid bots (winning without dying r fun.) It works with both vamp weapons and the skill.

Oh, while I was in there, I also patched AdjustableStartingDamage to work with an .ini file, as this was brought up as a bug a couple weeks ago. 

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

So, I'm confused... what happens in the case of retaliation?

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

TheDruidXpawX wrote:
So, I'm confused... what happens in the case of retaliation? 

With this patch:

You have Vamp 2 and a "Vamp max" of 350 (or as a second example, 345), shoot a guy (as far as I know, it'd have to be another player) who has Retaliation 2. You do 100pts of damage, but if you're already at your 350, you get no Vamp (or are bumped up to your 350). Opponent's Retaliation kicks in and does it's damage, dropping you from your 350 to 340 (in both cases).

Old style:

You do the damage (marker spawned and checks current health), temporarily are given over your Vamp max of 350 to 360 (which might actually occur in such a way that the replication shows it on your health; example 2 - you go from 345 to 355). Opponent's Retaliation kicks in, does it's 10 points of damage, nothing happens - you stay at 350 (or 345). If Opponent did not have Retaliation, Vamp marker would eventually check your health to see if it was over your Vamp max, and if it was drop you back down.

Note that I'm not sure what happens if you're like at 450 (or for that matter, 351) - I would guess that you don't get your vamp at all, retaliation kicks in, drops you to 440 (341). At the very least, the marker *is* smart enough to where if it *did* give you Vamp, it would drop you back to what you started at before the Vamp/Retaliation sequence, if you were somehow over your pre-sequence health.

Note that I haven't looked at the code - I'm just guessing from personal experience what "can" happen.

Dru: I think the stumbling block you might be having is that this is a case that occurs strictly during PvP - unless we start making monsters with Retaliation.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

You're correct, Bot. I presented Dru with both cases, and he elected to go sans marker, retaliation > vamp.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Ready to commit.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Additional patch, as discussed in the other forum: now includes patch to prevent vamp with vehicles and turrets.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

Moof wrote:
Additional patch, as discussed in the other forum: now includes patch to prevent vamp with vehicles and turrets. 

Are you just returning if Vehicle(Instigator) != None, or are you applying the vampire bonus to the health of Vehicle(Instigator).Driver instead of Instigator? If we are not putting the armor up, then we probably ought to knock the player's own health up.
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Szlat wrote:
Are you just returning if Vehicle(Instigator) != None, or are you applying the vampire bonus to the health of Vehicle(Instigator).Driver instead of Instigator? If we are not putting the armor up, then we probably ought to knock the player's own health up. 


Ionno how to do that. I looked...Instigator is a Pawn. But It's NOT an SVehicle, at least that the code can see. So Instigator.Driver doesn't work. And something like Instigator.Controller.Pawn.Driver just maps back to the vehicle itself, in essence reenabling Vamp for the vehicle.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

Try something like
Code:
 static function LocalHandleDamage(int Damage, Pawn Injured, Pawn Instigator, out vector Momentum, class<DamageType> DamageType, bool bOwnedByInstigator, Float AbilityLevel)
 {
 	local int Health;
 	local VampireMarker Marker;
 	local Pawn P;
 
 	if (!bOwnedByInstigator || DamageType == class'DamTypeRetaliation' || Injured == Instigator || Instigator == None)
 		return;
 
 	if (Vehicle(Instigator) == None)
 	{
 		P = Instigator;
 	}
 	else
 	{
 		P = Vehicle(Instigator).Driver;
 		if (P == None)
 			return;
 	}
 
 	Health = int(float(Damage) * 0.05 * AbilityLevel);
 	if (Health == 0 && Damage > 0)
 	{
 		Health = 1;
 	}
 	if (P.Controller != None)
 	{
 		Marker = GetMarkerFor(P.Controller, class'MutUT2004RPG'.static.GetRPGMutator(P.Level.Game));
 		if (Marker == None)
 		{
 			//cease log spam
 			//Warn("Failed to find VampireMarker for" @ P.Controller.GetHumanReadableName());
 		}
 	}
 	if (Marker != None)
 	{
 		// give the pawn the health outright and let the marker cap it in its Tick()
 		P.Health += Health;
 		Marker.HealthRestored += Health;
 	}
 	else
 	{
 		// fall back to old way
 		P.GiveHealth(Health, P.HealthMax + 50);
 	}
 }
 

for the original version of DruidVampire - I haven't got a copy of your latest version.

(I wonder if you are always the driver of the vehicle? )
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

We've had no word from Dru...do you think it's okay to commit so we can move forward with this vehicle/turret patch?

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

He is sometimes very busy.

I understand Druid has told you to go ahead with the getting rid of the vampire marker bit. Druid has also stated that the way vampire works in vehicles is a bug. So I think it is safe to commit both those.

Druid wont actually get to see the code until it is commited. With any code we submit, he may decide he doesn't like it, and so may roll it back to a previous version. So we don't lose anything by committing stuff - we just give Druid more options.

The only problem it could cause is if he is busy trying to get a release out, and just when he has everything nearly tested and ready to go - we corrupt it. I say take the risk.
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

Okay, committed.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

Hey Moof, will you change the vamp so that while in a vehicle, the vamp applies to the player, not the vehicle (instead of neither?)

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
Moof

Wicked Sick!
[Avatar]
Joined: 06/24/2006 19:42:44
Messages: 433
Location: College Park, MD
Offline

TheDruidXpawX wrote:
Hey Moof, will you change the vamp so that while in a vehicle, the vamp applies to the player, not the vehicle (instead of neither?) 


As of right now, while in a vehicle, vamp simply doesn't work. Szlat and I (more likely, Szlat The Coding Macheen) will figure out how to make that happen.

Moof, Scholar of Ni

Moof (W); Dr. Moof (M); Engimoof (E); Moofgineer (E beta)
[Yahoo!] aim icon [ICQ]
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

OK I'll fix.
 
Forum Index -> Druids RPG Development Go to Page: 1, 2 Next 
Go to: