Author |
Message |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 01:15:13
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
greg11 wrote:
I keep seeing the configuration, and I keep thinking that there must be a better way.
At +76k, the subclass code is about 10% of all of the code. Although it should compress well.
I know what you mean. It is quite cumbersome, and quite easy to make mistakes in Fortunately it doesn't have to be modified very frequently. However, if you add an ability in and want to keep it grouped by subclass, there are a whole lot of index numbers to change.
I agree - there must be a better way. I thought about configuring it per ability, by giving a list of subclasses each ability could be used by, and storing it in the ability config - but then the subclass config is distributed all over the place, and would be more difficult for others to modify in the ini file.
greg11 wrote:
Can a string be used as an array:
Code:
AbilityConfigs(0)=(AvailableSubClasses="0,3,6,12",AvailableAbility=Class'DruidsRPG221.DruidSomeAbility',MaxLevel="5,15,15,10")
"0,3,6,12" are the indexes for the subclasses array with the corresponding maxlevels.
I just don't know if parsing strings like this would be possible.
It is possible to parse strings - you have a number of functions including the good old left function.
But then you have to keep remembering the subclass numbers. You could even slice it the other way, and have
Code:
SubClass(0)=(SubClass="AM/WM Hybrid",ClassesAvailable="1,2,4",MinClassLevel="80,80,80",AbilitiesAvailable="1,2,7,9,15,26,29",MaxAbilityLevel="5,15,15,10,1,5,3")
// numbers and abilities I just made up - it doesn't match the real configuration
and so configure the whole subclass in one line. But I am not sure how maintainable it would be since you use numbers for the classes and abilities.
EDIT: Perhaps it might be best to go for a very compact configuration like this, but then have a program or excel spreadsheet that would generate the config?
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 03:35:19
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
I can work on a script to convert a human readable config to this format.
No matter which format it is in, I don't see a server admin having an easy time making their own configuration unless there is a program/script to assist.
What I can do is have it convert the human readable form to all three ways. (and convert it from the current format too)
I think I can make the human readable format something like:
Code:
Class: DruidsRPG221.ClassAdrenalineMaster
Available Subclasses:
AM/WM hybrid, 80
AM/MM hybrid, 80
AM/Eng hybrid, 80
Extreme AM, 100
Available Abilities:
DruidsRPG221.DruidArtifactLoaded, 4
DruidsRPG221.AbilityEnhancedReduction
Class: DruidsRPG221.ClassWeaponsMaster
Available Subclasses:
AM/WM hybrid, 80
WM/MM hybrid, 80
WM/Eng hybrid, 80
Extreme WM, 100
Available Abilities:
DruidsRPG221.DruidRegen, 5
DruidsRPG221.DruidVampire, 10
SubClass: AM/WM hybrid
Available Abilities:
DruidsRPG221.DruidAmmoRegen, 4
DruidsRPG221.DruidAwareness, 2
DruidsRPG221.DruidNoWeaponDrop
SubClass: AM/MM hybrid
Available Abilities:
DruidsRPG221.DruidArtifactLoaded
DruidsRPG221.DruidArtifactLoadedHybrid
DruidsRPG221.DruidAdrenalineSurge
DruidsRPG221.DruidEnergyVampire
DruidsRPG221.AbilityEnergyShield
# DruidsRPG221.DruidLoaded
# DruidsRPG221.DruidVampire
# DruidsRPG221.AbilityEnhancedDamage
# DruidsRPG221.AbilityLoadedEngineer
# DruidsRPG221.DruidShieldRegen
# DruidsRPG221.AbilityShieldHealing
# DruidsRPG221.DruidArmorRegen
# DruidsRPG221.DruidArmorVampire
# DruidsRPG221.AbilityConstructionHealthBonus
# DruidsRPG221.AbilityEngineerAwareness
# DruidsRPG221.AbilityRapidBuild
# DruidsRPG221.AbilityLoadedHealing
DruidsRPG221.AbilityExpHealing
DruidsRPG221.AbilityMedicAwareness
DruidsRPG221.AbilityLoadedMonsters, 5
DruidsRPG221.AbilityMonsterHealthBonus, 4
DruidsRPG221.AbilityMonsterPoints, 5
DruidsRPG221.AbilityMonsterSkill, 3
DruidsRPG221.AbilityMonsterDamage
DruidsRPG221.AbilityEnhancedReduction
DruidsRPG221.DruidAmmoRegen
DruidsRPG221.DruidAwareness
DruidsRPG221.DruidNoWeaponDrop
# DruidsRPG221.DruidRegen
DruidsRPG221.DruidAdrenalineRegen
DruidsRPG221.AbilityVehicleEject
# DruidsRPG221.AbilityWheeledVehicleStunts
# DruidsRPG221.AbilityBerserkerDamage
The last ability list shows how abilities could be commented out to show what abilities are removed.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 04:09:12
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
Looks good.
I wouldn't do all 3 ways though.
There may be two options required - one for us to type the stuff into the subclass.uc file. The second for server admins to put in their UT2004RPG.ini. (I wonder if we should use a different config file for the subclass stuff?)
Although the two should be basically the same, one has index numbers in, which are a pain to maintain.
Only problem with using python is that it means every server admin will need a copy. I know its free, but it is one extra hassle.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 08:25:57
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
Szlat wrote:
Only problem with using python is that it means every server admin will need a copy. I know its free, but it is one extra hassle.
If the server is running linux, it shouldn't be a problem.
There is also a way to compile python programs into windows executables so python is not needed.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 09:28:39
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
greg11 wrote:
Can a string be used as an array:
Code:
AbilityConfigs(0)=(AvailableSubClasses="0,3,6,12",AvailableAbility=Class'DruidsRPG221.DruidSomeAbility',MaxLevel="5,15,15,10")
"0,3,6,12" are the indexes for the subclasses array with the corresponding maxlevels.
I just don't know if parsing strings like this would be possible.
I think I'll knock up a test this way, and see if it looks better. For the short term, I'll just use it to populate existing data structures since I don't want to recode the replication.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 09:59:39
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
Szlat wrote:
......I think I'll knock up a test this way, and see if it looks better. For the short term, I'll just use it to populate existing data structures since I don't want to recode the replication.
Actually, it is a bit easier than that. If I create the structure
Code:
struct AbilityConfig
{
var class<RPGAbility> AvailableAbility;
var Array<int> AvailableSubClasses;
var Array<int> MaxLevels;
};
var config Array<AbilityConfig> AbilityConfigs;
then I can configure as
Code:
AbilityConfigs(0)=(AvailableAbility=Class'DruidsRPGcvs.DruidRegen',AvailableSubClasses=(0,3,6,12),MaxLevels=(5,15,15,10))
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/11/2009 12:00:19
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
Actualyy, I am wondering if we shouldn't just list the maxlevl for every subclass, rather than specifying the subclass and maxlevel as a pair. So something more like
AbilityConfigs(0)=(AvailableAbility=Class'DruidsRPGcvs.DruidRegen',MaxLevels=(5,0,0,15,0,0,15,10,0,0,0,4,0))
Might be a lot easier to understand, and easier to generate with scripts.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/12/2009 02:40:31
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
So, with the one big list of levels, I can configure the whole thing as:
Code:
// N, AW,AM,AE,WM,WE,ME, XA,XW,XM,XP,XE, B, A, W, M, E, G
AbilityConfigs( 0)=(AvailableAbility=Class'DruidsRPGcvs.DruidArtifactLoaded', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0))
AbilityConfigs( 1)=(AvailableAbility=Class'DruidsRPGcvs.DruidArtifactLoadedHybrid', MaxLevels=( 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1))
AbilityConfigs( 2)=(AvailableAbility=Class'DruidsRPGcvs.DruidAdrenalineSurge', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0))
AbilityConfigs( 3)=(AvailableAbility=Class'DruidsRPGcvs.DruidEnergyVampire', MaxLevels=( 0, 5, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 3))
AbilityConfigs( 4)=(AvailableAbility=Class'DruidsRPGcvs.AbilityEnergyShield', MaxLevels=( 0, 0, 1, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0))
AbilityConfigs( 5)=(AvailableAbility=Class'DruidsRPGcvs.DruidLoaded', MaxLevels=( 0, 2, 0, 0, 2, 2, 0, 0, 6, 0, 0, 0, 5, 0, 5, 0, 0, 1))
AbilityConfigs( 6)=(AvailableAbility=Class'DruidsRPGcvs.DruidVampire', MaxLevels=( 0, 3, 0, 0, 0, 3, 0, 0,15, 0, 0, 0,10, 0,10, 0, 0, 2))
AbilityConfigs( 7)=(AvailableAbility=Class'DruidsRPGcvs.AbilityEnhancedDamage', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0,10, 0, 0, 2))
AbilityConfigs( 8)=(AvailableAbility=Class'DruidsRPGcvs.AbilityBerserkerDamage', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20, 0, 0, 0, 0, 0))
AbilityConfigs( 9)=(AvailableAbility=Class'DruidsRPGcvs.AbilityLoadedHealing', MaxLevels=( 0, 0, 2, 0, 2, 0, 2, 0, 0, 4, 2, 0, 0, 0, 0, 3, 0, 2))
AbilityConfigs(10)=(AvailableAbility=Class'DruidsRPGcvs.AbilityExpHealing', MaxLevels=( 0, 0, 2, 0, 2, 0, 2, 0, 0,15, 0, 0, 0, 0, 0, 9, 0, 0))
AbilityConfigs(11)=(AvailableAbility=Class'DruidsRPGcvs.AbilityMedicAwareness', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 0, 0))
AbilityConfigs(12)=(AvailableAbility=Class'DruidsRPGcvs.AbilityLoadedMonsters', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20, 0, 0, 0, 0,15, 0, 0))
AbilityConfigs(13)=(AvailableAbility=Class'DruidsRPGcvs.AbilityMonsterHealthBonus', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0,10, 0, 0))
AbilityConfigs(14)=(AvailableAbility=Class'DruidsRPGcvs.AbilityMonsterPoints', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,30, 0, 0, 0, 0,20, 0, 0))
AbilityConfigs(15)=(AvailableAbility=Class'DruidsRPGcvs.AbilityMonsterSkill', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 0, 0))
AbilityConfigs(16)=(AvailableAbility=Class'DruidsRPGcvs.AbilityMonsterDamage', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20, 0, 0, 0, 0, 0, 0, 0))
AbilityConfigs(17)=(AvailableAbility=Class'DruidsRPGcvs.AbilityEnhancedReduction', MaxLevels=( 0, 0, 0, 0, 0, 0, 5, 0, 0,10,10, 0, 0, 0, 0,10, 0, 2))
AbilityConfigs(18)=(AvailableAbility=Class'DruidsRPGcvs.AbilityLoadedEngineer', MaxLevels=( 0, 0, 0, 8, 0, 8, 8, 0, 0, 0, 0,20, 0, 0, 0, 0,15, 5))
AbilityConfigs(19)=(AvailableAbility=Class'DruidsRPGcvs.DruidShieldRegen', MaxLevels=( 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,15, 0))
AbilityConfigs(20)=(AvailableAbility=Class'DruidsRPGcvs.AbilityShieldHealing', MaxLevels=( 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0))
AbilityConfigs(21)=(AvailableAbility=Class'DruidsRPGcvs.DruidArmorRegen', MaxLevels=( 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0))
AbilityConfigs(22)=(AvailableAbility=Class'DruidsRPGcvs.DruidArmorVampire', MaxLevels=( 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0,15, 0, 0, 0, 0,10, 0))
AbilityConfigs(23)=(AvailableAbility=Class'DruidsRPGcvs.AbilityConstructionHealthBonus', MaxLevels=( 0, 0, 0, 6, 0, 6, 6, 0, 0, 0, 0,10, 0, 0, 0, 0,10, 3))
AbilityConfigs(24)=(AvailableAbility=Class'DruidsRPGcvs.AbilityEngineerAwareness', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0))
AbilityConfigs(25)=(AvailableAbility=Class'DruidsRPGcvs.AbilityRapidBuild', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 5, 0))
AbilityConfigs(26)=(AvailableAbility=Class'DruidsRPGcvs.DruidAmmoRegen', MaxLevels=( 0, 4, 2, 2, 2, 2, 0, 1, 4, 0, 0, 0, 4, 4, 4, 0, 0, 2))
AbilityConfigs(27)=(AvailableAbility=Class'DruidsRPGcvs.DruidAwareness', MaxLevels=( 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 2, 2, 0, 0, 2))
AbilityConfigs(28)=(AvailableAbility=Class'DruidsRPGcvs.DruidNoWeaponDrop', MaxLevels=( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0))
AbilityConfigs(29)=(AvailableAbility=Class'DruidsRPGcvs.DruidRegen', MaxLevels=( 0, 3, 3, 0, 5, 3, 3, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 3))
AbilityConfigs(30)=(AvailableAbility=Class'DruidsRPGcvs.DruidAdrenalineRegen', MaxLevels=( 0, 0, 3, 3, 1, 0, 1, 4, 0, 2, 2, 0, 0, 3, 0, 3, 0, 3))
AbilityConfigs(31)=(AvailableAbility=Class'DruidsRPGcvs.AbilityVehicleEject', MaxLevels=( 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 4, 0, 1, 1, 1, 4, 1))
AbilityConfigs(32)=(AvailableAbility=Class'DruidsRPGcvs.AbilityWheeledVehicleStunts', MaxLevels=( 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 3, 0, 1, 1, 1, 3, 1))
AbilityConfigs(33)=(AvailableAbility=Class'DruidsRPGcvs.DruidGhost', MaxLevels=( 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3))
AbilityConfigs(34)=(AvailableAbility=Class'DruidsRPGcvs.DruidUltima', MaxLevels=( 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2))
AbilityConfigs(35)=(AvailableAbility=Class'DruidsRPGcvs.DruidCounterShove', MaxLevels=( 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5))
AbilityConfigs(36)=(AvailableAbility=Class'DruidsRPGcvs.DruidRetaliate', MaxLevels=(10, 10,10,10,10,10,10, 10,10,10,10,10,10, 10,10,10,10,10))
AbilityConfigs(37)=(AvailableAbility=Class'UT2004RPG.AbilityJumpZ', MaxLevels=( 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3))
AbilityConfigs(38)=(AvailableAbility=Class'UT2004RPG.AbilityReduceFallDamage', MaxLevels=( 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4))
AbilityConfigs(39)=(AvailableAbility=Class'UT2004RPG.AbilitySpeed', MaxLevels=( 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5))
AbilityConfigs(40)=(AvailableAbility=Class'UT2004RPG.AbilityShieldStrength', MaxLevels=( 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4))
AbilityConfigs(41)=(AvailableAbility=Class'UT2004RPG.AbilityReduceSelfDamage', MaxLevels=( 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5))
AbilityConfigs(42)=(AvailableAbility=Class'UT2004RPG.AbilitySmartHealing', MaxLevels=( 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4))
AbilityConfigs(43)=(AvailableAbility=Class'UT2004RPG.AbilityAirControl', MaxLevels=( 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4))
AbilityConfigs(44)=(AvailableAbility=Class'UT2004RPG.AbilityFastWeaponSwitch', MaxLevels=( 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2))
which is a lot smaller, and is easy to read
EDIT: Except of course you can't have spaces in the config. Grrr
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/12/2009 09:03:32
|
greg11
Wicked Sick!
Joined: 02/10/2008 20:00:40
Messages: 526
Location: Hood River, OR
Offline
|
It's beautiful.
Requiring all MaxLevels to be set could be good for error checking. If an ability doesn't have the correct length output it to the log.
The spaces issue should be minor since a find&replace could be used to remove all the spaces. Just keep a text file with the spaces. This should be even easier to export from a spreadsheet too.
I am assuming the order still depends on the index of the subclasses array.
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 12/12/2009 13:07:19
|
Szlat
Wicked Sick!
Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline
|
greg11 wrote:
I am assuming the order still depends on the index of the subclasses array.
Agreed
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 02/16/2010 08:11:56
|
TON80
Rampage
![[Avatar]](/dcforum/images/avatar/5c04925674920eb58467fb52ce4ef728.jpg)
Joined: 06/25/2006 01:02:22
Messages: 116
Location: ARIZONA
Offline
|
I'm seeing Counter Shove and Retaliation listed twice on the menu. (Medic subclasses)
|
It’s hard being a Medic and a drunk, but I try to keep my XP near my BAC |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 02/16/2010 09:49:42
|
RoadKill v3.4
Wicked Sick!
![[Avatar]](/dcforum/images/avatar/92fb0c6d1758261f10d052e6e2c1123c.jpg)
Joined: 06/03/2007 18:43:42
Messages: 1085
Location: Resurrection Hub orbiting Canada searching for More Beer
Offline
|
TON80 wrote:
I'm seeing Counter Shove and Retaliation listed twice on the menu. (Medic subclasses)
this occurs with all sub-classes I believe the second set is the newer versions
|
http://www.unrealcentral.com/download.php?view.167 < -- Click for my skin/model |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 02/16/2010 09:58:06
|
cribbage
Killing Spree
![[Avatar]](/dcforum/images/avatar/cc1aa436277138f61cda703991069eaf.jpg)
Joined: 03/07/2008 11:38:57
Messages: 55
Location: Oregon
Offline
|
And I am very happy that I learned my lesson about countershove and shun them like the plague.
|
---------
31 for 2 |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 02/16/2010 17:14:03
|
HighwratH
Rampage
![[Avatar]](/dcforum/images/avatar/fccb3cdc9acc14a6e70a12f74560c026.jpg)
Joined: 07/01/2006 13:01:46
Messages: 163
Location: AZ
Offline
|
Counter shove has it's place: romramoonstation, spacenoxx, megawoot, otherwise it's a pain.
|
You better call Kenny Loggins. 'Cause you're in the danger zone!
Desert_Wrath: de-zert_rath
Desert:arid land with usually sparse vegetation
Wrath:strong vengeful anger or indignation
My Skin: Homer 2009 |
|
 |
|
|
|