[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Key Bindings  XML
Forum Index -> Druids RPG Development Go to Page: Previous  1, 2, 3
Author Message
Szlat

Wicked Sick!

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

Well, I learn something new everyday! I thought the client-side UT2004RPG.ini was never accessed.

Initially, I had all items hard coded like the triple is. But that would have meant editing the code each time the package version number changed. So I put the configuration in the UT2004RPG.ini file so it could be easily updated.

Also, it means that Admins can remove any artifacts from the list that they don't want a shortcut to, or even put their own artifact class in instead - which seemed a lot more useful. I suppose I could even add a couple of spare key bindings just for others to bind their own artifacts into?

I knew the SelectGlobe would not work until the configuration was in the server-side UT2004RPG - but unfortunately it is a long time since I have had a client side UT2004RPG.ini without it. The problems of trying to test network games on a single PC!

The problem with Interactions is that they are client side. You cannot put a replication statement in them. So we can't replicate the ArtifactKeyConfigs array from the server.

Perhaps the easiest way to get it to work would be to get a server-side inventory item (like the GiveItemsInv class) to read the array in, so it is guaranteed to be server side. Then get the Interaction (clientside) to ask the GiveItemsInv to work out the value.

I'll chase it up tomorrow while I am looking at the AddInteraction class string for Druid.
Szlat

Wicked Sick!

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

Ok, so I have updated the key binding stuff in cvs.

a) I couldn't find an easy way of stopping the Interaction looking at the client side UT2004RPG.ini. So, for the time being I have put the class names in the defaultproperties section of the DruidsRPGKeysInteraction class. We need to discuss this. I would prefer to have it configurable, but this method puts least loading on the system, so it might do. So, do not need any client side mods.

b) I have removed the hard coded DruidsRPG200. and used code similar to that in MonsterMasterInteraction and MonsterPointsInv.

I have tested both changes using two PCs and they seem to work. So, perhaps worth another try.
Szlat

Wicked Sick!

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

So, the new Step by Step Guide to get DruidsRPGcvs running:

1) Put the DruidsRPGcvs folder and all files under the UT2004 folder.

2) Edit the System UT2004.ini file, and replace the two references to DruidsRPG200 to DruidsRPGcvs (ServerPackages and EditPackages)

3) Compile the DruidsRPGcvs class. I use
Code:
 del DruidsRPGcvs.u
 ucc make
 ucc dumpint DruidsRPGcvs.u
 ucc exportcache DruidsRPGcvs.u

4) In the system folder, you should now have DruidsRPGcvs.u, a DruidsRPGcvs.ucl (with 4 lines for 3 mutators and scorefix), and a DruidsRPGcvs.int containing all the text messages.

5) Edit the .int file, and add the following lines at the top
Code:
 [Public]
 Object=(Class=Class,MetaClass=Engine.Mutator,Name=DruidsRPGcvs.DruidsRPGKeysMut,Description="Adds ability to directly select artifacts with keys")
 Object=(Class=class,MetaClass=Xinterface.GUIUserKeyBinding,Name=DruidsRPGcvs.DruidsRPGKeyBinding)

6) Edit the UT2004RPG.ini, and change all references of DruidsRPG200 to DruidsRPGcvs

7) Start UT2004. Select Host Game and Invasion. Click on Mutators, and add the package "Key Bindings for RPG Artifacts".
(Note there should be only one of these. If you have more, you probably need to tidy up the DruidsRPGExperimental int and ucl files)
Start a Dedicated server.

8 ) Start a client UT2004 and join.

9) SelectGlobe typed into the console should now work. Also, if you go to Settings, Input, Configure Controls, the select artifact commands should be listed so you can set you key bindings.

Hope this helps.
Szlat

Wicked Sick!

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

Szlat wrote:
... So, for the time being I have put the class names in the defaultproperties section of the DruidsRPGKeysInteraction class. We need to discuss this. I would prefer to have it configurable, but this method puts least loading on the system, so it might do. So, do not need any client side mods. 

So, Druid, BotFoddder - what do you think? Should I try to get it configurable in the server side UT2004RPG.ini file, or is the current defaultproperties configuration adequate?

Code:
defaultproperties
 {
     ArtifactKeyConfigs(0)=(Alias="SelectTriple",ArtifactClass=Class'DruidArtifactTripleDamage')
     ArtifactKeyConfigs(1)=(Alias="SelectGlobe",ArtifactClass=Class'ArtifactInvulnerability')
     ArtifactKeyConfigs(2)=(Alias="SelectMWM",ArtifactClass=Class'DruidArtifactMakeMagicWeapon')
     ArtifactKeyConfigs(3)=(Alias="SelectDouble",ArtifactClass=Class'DruidDoubleModifier')
     ArtifactKeyConfigs(4)=(Alias="SelectMax",ArtifactClass=Class'DruidMaxModifier')
     ArtifactKeyConfigs(5)=(Alias="SelectPlusOne",ArtifactClass=Class'DruidPlusOneModifier')
     ArtifactKeyConfigs(6)=(Alias="SelectMedic",ArtifactClass=Class'ArtifactMakeSuperHealer')
     ArtifactKeyConfigs(7)=(Alias="SelectFlight",ArtifactClass=Class'ArtifactFlight')
     ArtifactKeyConfigs(8)=(Alias="SelectMagnet",ArtifactClass=Class'DruidArtifactSpider')
     ArtifactKeyConfigs(9)=(Alias="SelectTeleport",ArtifactClass=Class'ArtifactTeleport')
     ArtifactKeyConfigs(10)=(Alias="SelectRod",ArtifactClass=Class'DruidArtifactLightningRod')
 }
BotFodder

Wicked Sick!
[Avatar]

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

I'll test it this afternoon, but I figure that, at the very least, anything that doesn't require a "mod." prefix is fine (Dru won't have to go in and tweak it every version). Making it configurable would be nice, but doesn't appear to be the easiest thing to do.

I don't think it's a big deal if an extender writes additional artifacts, they'll just have to extend your code to include the new artifacts as well.

If you haven't already, I would put a comment somewhere near the keyconfigs list as to why you couldn't make it INI configurable ... something like:

Code:
 // Aliases for artifact switching placed here, because there's no easy way to
 // replicate the ArtifactKeyConfigs array to the client in an Interaction.  If
 // additional artifacts are desired, it is suggested that the class be rewritten
 // and recompiled, or extended appropriately.
 

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

Agreed.
BotFodder

Wicked Sick!
[Avatar]

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

BTW - CVS definitely compiles and this part runs as desired, near as I can tell.

Yay!

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

Excellent. Thanks for your help BotFodder.
BotFodder

Wicked Sick!
[Avatar]

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

Hey Szlat: for clues as to how to get the configuration pulled in from a server based INI, then replicated to the client, get the UT2004RPG source and look at how the RPGStatsInv object is created and initialized (with appropriate replication) in MutUT2004RPG.ModifyPlayer - you're looking at figuring out exactly how MutUT2004RPG.Abilities becomes RPGStatsInv.AllAbilities ...

It involves replicating a "SendClient" function ...

Now that I think about it, gimme a couple of seconds and I'll attach BotsCombos.u and you can decompile it to source and look at a more clear cut case.

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

Here - decompile this and look at:

MutBotsCombos.ModifyPlayer and how it spawns the BotsCombosReplication object, sets itself to a variable in the object, calls Initialize, and then how BotsCombosReplication calls SendClientCombos (or some such function) to actually get the combo list to the client.

Note that I haven't actually tested the reading in of a configuration file yet, but I have seen the replication work as desired ...

Now when you'd exactly go about doing your replication, I'm not sure - I think you have a Keybindings Mutator that you could put a ModifyPlayer in and do the Spawn and Initialize ...

PostBeginPlay was how it was done in NoInvis but that's only called on the server for the server itself, not for the individual players, as far as I can tell.

Now, I could do this all for you, but I think you'll get more out of it if you work it all out yourself, and I'm sick of replication right now.

NOTE TO THE SNEAKY: this version of BotsCombos doesn't yet contain a Berserk replacement, and in the default configuration is essentially identical in function to the BotBooster mod.
 Filename BotsCombos.u [Disk] Download
 Description
 Filesize 9 Kbytes
 Downloaded:  199 time(s)


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]
 
Forum Index -> Druids RPG Development Go to Page: Previous  1, 2, 3
Go to: