[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
DruidVampire - adjusting costs and levels  XML
Forum Index -> Druids RPG
Author Message
OldGrandad



Joined: 08/06/2006 07:00:30
Messages: 16
Offline

Thanks to BotFodder I have managed a few things wih Druids but I am having a problem with Vampire. I am finding it a bit too powerful with WeaponsMasters and want to limit it a bit and to raise the costs to make it a little less atractive to buy first. I know now how to add a section in the RPG.ini that will limit its initial values but I really wanted to compile a new class to replace DruidsVampire so as to reflect my values in the RPG GUI. With my current section added as below;

Code:
[DruidsRPG200.DruidVampire]
 AdjustableMaxLevel=4
 AdjustableStartingDamage=300
 AdjustableStartingCost=100
 AdjustableCostAddPerLevel=50


I am obviously still getting the default values showing in the GUI.

I followed Druids tutorial regarding changing costs but all I got was errors, was I right in just changing the values in the defaultproperties as below?
Code:
defaultproperties
 {
      AdjustableStartingDamage=300
      Description="Whenever you damage an opponent, you are healed for 5% of the damage per level (up to your starting health amount + 50). You can't gain health from self-damage and you can't gain health from damage caused by the Retaliation ability. You must have a Damage Bonus of at least 300 to purchase this ability. (Max Level: 4) You must be a Weapons Master to purchase this skill.|Cost (per level): 100,150,200,250"
 }


I changed the header of the file to reflect my class;

Code:
class OGVampire extends DruidVampire
 	config(UT2004RPG) 
 	abstract;


On compiling I got errors, can someone point me in the right direction so I can reflect my chosen values?

Many thanks in advance.

OG
dip42

Unstoppable
[Avatar]
Joined: 04/25/2005 17:06:20
Messages: 344
Location: N.J.
Offline

I think that it shouldnt be rasied too high so some lower levels may be able to afford it

aim icon
Moof

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

Dip, that's not exactly an answer to his question.

Grandad, can you give us the specific errors you're encountering when you try to compile? That might make it easier to debug the code.

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

I haven't dug too much into this, but one thing you will note is that Dru's original class extends the one from the main RPG mod, so look at the defaults for that, too.

I must say that at first glance I'm not sure why your changes to the INI didn't result in some kind of results towards what you intended ...

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

Wicked Sick!

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

If I understand correctly, adding the section to the UT2004RPG.ini file made the changes you wanted. It was just the explanation in the menu that was wrong?

I haven't tried, but it may be possible to edit the DruidsRPG200.int system file, and just change the description there.
BotFodder

Wicked Sick!
[Avatar]

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

Szlat, look at the source and tell me if I'm wrong about how what you hint at might actually be happening because of the references to "default.".

EDIT: Ack NM it's because there's a "default" for "Description". OldGranddad, try changing your INI to have:

Code:
 [DruidsRPG200.DruidVampire]
 AdjustableMaxLevel=4
 AdjustableStartingDamage=300
 AdjustableStartingCost=100
 AdjustableCostAddPerLevel=50
 Description="the changed description you want"
 


EDIT II: I'm not sure that will work - it doesn't look like it will.

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

Wicked Sick!

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

BotFodder wrote:
EDIT II: I'm not sure that will work - it doesn't look like it will.  

I wouldn't expect it to work, but I am frequently wrong. Description is defined in RPGAbility as
Code:
var localized string Description; //Text shown when hit "Info" button for this ability

In order to change it in the ini file, it has to be defined as
Code:
var config string Description

So, yes the best bet is to modify the text in the defaultproperties section of the DruidVampire.uc code, but then Grandad has a mod to support. If it can be changed in just the int file, then great. He will still have to distribute the int file though.
Szlat

Wicked Sick!

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

Grandad, if you are going to make your own class, you will need a file called OGVampire.uc containing
Code:
class OGVampire extends DruidVampire
  	config(UT2004RPG)
  	abstract;
 
 defaultproperties
  {
      AdjustableMaxLevel=4
      AdjustableStartingDamage=300
      AdjustableStartingCost=100
      AdjustableCostAddPerLevel=50
      Description="Whenever you damage an opponent, you are healed for 5% of the damage per level (up to your starting health amount + 50). You can't gain health from self-damage and you can't gain health from damage caused by the Retaliation ability. You must have a Damage Bonus of at least 300 to purchase this ability. (Max Level: 4) You must be a Weapons Master to purchase this skill.|Cost (per level): 100,150,200,250"
  }


You will then need to build this as a separate module e.g. OGMod.u

You will then have to change everyone from the DruidsRPG200.DruidVampire ability to the OGMod.OGVampire ability (or remove it and let them spend the points again). So, you need to edit the UT2004RPG.ini file and replace all references to the DruidVampire ability.
( It's not really a good idea to rebuild the DruidsRPG200 and make it different from the Druid supplied one. It can cause all sorts of problems for people who might want to play on your server and on other servers )
And of course you will need to put the OGMod.u in the ServerPackages and EditPackages of your UT2004.ini file
OldGrandad



Joined: 08/06/2006 07:00:30
Messages: 16
Offline

Thanks for your replies. I did as Szlat said but using ucc make for some reason just threw up errors;

Code:
Warning: F:\UT2004\OGRPG\Classes\OGVampire.uc(5) : Warning, 'AdjustableStartingCost' obscures 'AdjustableStartingCost' defined in base class 'DruidVampire'.
 Warning: F:\UT2004\OGRPG\Classes\OGVampire.uc(5) : Warning, 'AdjustableCostAddPerLevel' obscures 'AdjustableCostAddPerLevel' defined in base class 'DruidVampire'.
 Warning: F:\UT2004\OGRPG\Classes\OGVampire.uc(5) : Warning, 'AdjustableMaxLevel' obscures 'AdjustableMaxLevel' defined in base class 'DruidVampire'.
 Warning: F:\UT2004\OGRPG\Classes\OGVampire.uc(5) : Warning, 'AdjustableStartingDamage' obscures 'AdjustableStartingDamage' defined in base class 'DruidVampire'.
 


I will try the description in the RPG ini, that will be good if that works.

Thanks again for helping.

[EDIT] The description in the ini file did not work. On a side note, I used a program called UMake and whilst it too threw up the same errors as ucc make it still produced a u file, with curiousity I used it and edited the RPG.ini to suit the changes and it worked! but why the errors if it has compiled?[/EDIT]

OG
Szlat

Wicked Sick!

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

You got the warnings because you added as line 5
Code:
var config int AdjustableStartingCost, AdjustableCostAddPerLevel, AdjustableMaxLevel, AdjustableStartingDamage;
 
which I didn't.
 
Forum Index -> Druids RPG
Go to: