[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
General Implementation  XML
Forum Index -> UT3 RPG
Author Message
Szlat

Wicked Sick!

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

The core part of the RPG is the RPGRules.NetDamage function. This is where the damage calculations occur using Damage Bonus and Damage Reduction, where different weapon properties are applied and different abilities can influence damage, and where experience is given.

This RPGRules.NetDamage function is called from GameInfo.ReduceDamage, which is called from Pawn.TakeDamage. So, when the Pawn gets hit, the UTRPG NetDamage code gets called.

(The invasion gameinfo did not call NetDamage if it was a monster being hit, which is the reason for the FakeMonsterWeapon.AdjustPlayerDamage calling NetDamage. We will need to check if this is required after Invasion is implemented)

This call path is still in UT3. So we could add a GameRules with a NetDamage and do it the same way.

However, it may be simpler. GameInfo.ReduceDamage also calls a ModifyDamage function on the InventoryManager of the injured pawn. So we may be able to just give each pawn an inventory item that does the same as the old NetDamage used to. (Assuming the InventoryManager passes it on to the inventory items - I haven't had chance to chase it through yet). So, we might be able to include it in something like the RPGStatsInv class.

So, it looks like it could be done in a number of ways. We need to evaluate which works best.

We will need to add structures like the RPGPlayerDataObject, and decide exactly what data we want replicated.
(DC)DEMONSLAYER

Wicked Sick!
[Avatar]

Joined: 03/18/2006 12:10:27
Messages: 2151
Location: Colorful Colorado
Offline

Forgive me if I sound stupid or ignorant (since I'm not a programer).

But wouldn't it make more sense to print and layout the original UT2004 programing (as loaded from the cd/dvd), the modified UT2004 programing that we currently use, and UT3 programing side-by-side and annotate/highlite the similarity/differences in the 3 programs.

This might tell you what modifications done on UT2004 will or will not work on UT3 and would serve as the starting point for any porting and program modifications necessary to create the effect(s) we want.

This might also give us a head start on what current UT2003/4 maps could be used with minor modifications.

Let us not fool ourselves into thinking we went to the Moon because we are pioneers, or discoverers, or adventurers. We went to the Moon because it was the militaristically expedient thing to do. Neil deGrasse Tyson

Every job is a self-portrait of the person who did it....Autograph your work with excellence. Author Unknown

UT2004
LW-DEMONSLAYER-ACTIVE
LM-DEMONMEDIC-ACTIVE
LA-DEMONMAGIC-ACTIVE
LE-DEMONEER-ACTIVE
LG-DEMONJACK-ACTIVE

UT3
LW-DEMONSLAYERII
LM-KNIGHTMAGIC

My skin is Graah, a reincarnation of an ancient African warrior mixed with the soul of a lion,
download: http://www.disastrousconsequences.com/dcforum/posts/list/2843.page
[Email] [Yahoo!] [MSN]
Continuum

Wicked Sick!
[Avatar]

Joined: 03/09/2005 05:20:36
Messages: 479
Location: Indianapolis, Indiana
Offline

Using the inventory / ModifyDamage sounds like a better point to be changing damage and iirc there were some issues with the way some default powerups not stacking correctly? Maybe this would fix some of those issues. They also have changed the Actor state stack to be able to return to the previous (modified/altered) state after stateX finishes so that may be something to look at too.

Personally I am in favor of making a lot of changes to the core RPG to make it more extensible.





Current WIP:
Skins:
[Email]
Szlat

Wicked Sick!

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

Szlat wrote:
However, it may be simpler. GameInfo.ReduceDamage also calls a ModifyDamage function on the InventoryManager of the injured pawn. So we may be able to just give each pawn an inventory item that does the same as the old NetDamage used to. (Assuming the InventoryManager passes it on to the inventory items - I haven't had chance to chase it through yet). So, we might be able to include it in something like the RPGStatsInv class. 
Unfortunately, InventoryManager does not do anything in the ModifyDamage function, so the only way of achieving it is to subclass the UTInventoryManager, and set the Pawn to use our class. Unfortunately, this would mean that the RPG mod would be incompatible with any other mod that replaced InventoryManager. So, it looks like a RPGRules after all.
Continuum

Wicked Sick!
[Avatar]

Joined: 03/09/2005 05:20:36
Messages: 479
Location: Indianapolis, Indiana
Offline

May as well bring it up now but imo we should replace all the calls to the RpgPlayer.saveData (probably wrong name but it's the function that writes out the player stats/data to the ini) just creating a new function to call (saveData() is inherited object I beleive) would allow us to either call the default object.saveData() from within that function or be able to at some point save to a database instead of the .ini I spent some time looking at doing it for UTk4 but the RPGCore is full of calls to saveData() and it is also called in several other places also.




Current WIP:
Skins:
[Email]
 
Forum Index -> UT3 RPG
Go to: