[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
DruidRPGGameRules fix  XML
Forum Index -> Druids RPG Development
Author Message
Moof

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

Dru, there is a compile error in this file on lines 41 and 52. AbilityLevel, the 5th parameter, is undefined. It should be located in DeathAbility's parent class, RPGAbility, but I don't know how to access a super property of a class in UnrealScript. (Why doesn't it work like C++, where it's just available? *annoyed*)

Moof, Scholar of Ni

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

Wicked Sick!
[Avatar]

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

You sir, are incorrect. But then Dru probably is, too somewhere along the line.

I think anyway.

I don't have access to code right this second - I'm at work - but something clicked ...

An ability class does not have direct access to its AbilityLevel, IIRC. In fact, a lot of that info is usually passed to it, IE, in RPGRule's ModifyPawn or PreventDeath routines, it pulls AbilityLevel from the AbilityLevel array (remember, there are effectively two arrays, Ability and AbilityLevel, where the index value of each indicates what level goes with what ability) and passes AbilityLevel as a ... well, passed variable.

So the compile error in DruidRPGGameRules is probably because either Dru forgot about Ability and AbilityLevel actually being quite separate (object wise - only being paired through common array index values), or AbilityLevel is being incorrectly referenced.

In code terms, it's not: Ability.AbilityLevel == <the level for Ability>

It's actually:

Code:
 Ability[x] == <the object representing the ability in an array of abilities>
 AbilityLevel[x] == <the level of the ability Ability[x] in an array of levels - or more primitively, integers>
 


Note that I can easily be way off base here because I'm going stream of concious without any access to code whatsoever.

I plan on looking at this when I get home this afternoon and seeing what Dru destroyed with his mucking about. Once I see that it's working properly, I'll start with DruidArtifactLoaded and make an effort at converting stuff to the new death system.

Mind you, DAL will be easy. I think DruidNoWeaponDrop is going to be a PITA and DruidGhost is going to be worse. Mainly because of vehicles; I don't think I quite have a handle on when I can refer to certain things, and when, say, Killed.Health is the health of the Vehicle or the health of the Player.

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]
TheDruidXpawX

Wicked Sick!
[Avatar]

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

if(Killed.isA('Vehicle'))
Killed = Vehicle(Killed).driver();
if(Killed == None)
return; //or some such

You may want to check for it almost anywhere.

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
TheDruidXpawX

Wicked Sick!
[Avatar]

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

Moof wrote:
Dru, there is a compile error in this file on lines 41 and 52. AbilityLevel, the 5th parameter, is undefined. It should be located in DeathAbility's parent class, RPGAbility, but I don't know how to access a super property of a class in UnrealScript. (Why doesn't it work like C++, where it's just available? *annoyed*) 


I fix.

The AbilityLevel isn't available from anywhere because it's not actually available anywhere. I was supposed to be StatsInv.DataObject.AbilitiyLevels[x]

If you need access to a default config variable value from a static context you use default.Variable, or class'someclass'.default.Variable

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:
if(Killed.isA('Vehicle'))
Killed = Vehicle(Killed).driver(); 

Yeah but I'd swear I came across a situation to where after this line, Killed.Health was still operating on the Vehicle's health. I'll have to play with it some day.

TheDruidXpawX wrote:
if(Killed == None)
return; //or some such

You may want to check for it almost anywhere. 

Having run into that while using some debugging lines, I wholeheartedly agree.

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

Thanks guys

Was just tryin to help!

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

BotFodder wrote:
Yeah but I'd swear I came across a situation to where after this line, Killed.Health was still operating on the Vehicle's health. I'll have to play with it some day. 


It really shouldn't...

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:
It really shouldn't... 

Ah okay I figured out what I saw and why I was confused. Everywhere else we have:
Code:
 if(Killed.isA('Vehicle'))
 Killed = Vehicle(Killed).driver(); 
 

But that snippet isn't actually in Ghost (it's done differently and there's never any actual reassignment of Killed). So when Killed.Health is referenced, it is appropriately referring to the Vehicle at that point, not the driver.

So you're right. So far, it doesn't.

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]
BotFodder

Wicked Sick!
[Avatar]

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

Okay - CVS at this point compiles, and a perfunctory test of things like Ultima, Pinata, Ghost ... all seem to work as before, but now with RPGDeathAbility.

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]
TheDruidXpawX

Wicked Sick!
[Avatar]

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

BotFodder wrote:
Okay - CVS at this point compiles, and a perfunctory test of things like Ultima, Pinata, Ghost ... all seem to work as before, but now with RPGDeathAbility.  


Excellent! Thanks for the assist!

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
 
Forum Index -> Druids RPG Development
Go to: