[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: 1, 2, 3 Next 
Author Message
Szlat

Wicked Sick!

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

Ok, so I knocked up some extra artifacts, then found I was spending forever scrolling through the artifacts to find the one I wanted. So, I knocked up a mutator that would allow me to bind keys to individual artifacts. I sent it to Druid, and he has suggested I post here for feedback.

At the moment it is a separate mutator, but it could be incorporated into existing Druid Mutators and Interactions.

Basically, we need to code in a list of the artifacts we want to be key accessible. It is easy for the standard artifacts - triple, double, globe, max, max +1 etc. I haven't tried modifying it to select different pet artifacts yet. Each artifact will need a unique name for selecting it setting up in the code (e.g. SelectTriple). This could then be typed in on a console line to select the triple damage. This will allow it to be specified in macros.

Since I didn't want to have to recompile the RPGKeys everytime Druid changed a version of the RPG, I made the artifact class name configurable in the ini file. You can't add extra artifacts here, but you can change the class.

The list I currently have implemented is:
  • ArtifactKeyConfigs=(Alias="SelectTriple",ArtifactClass=Class'DruidsRPG200.DruidArtifactTripleDamage')
  • ArtifactKeyConfigs=(Alias="SelectGlobe",ArtifactClass=Class'UT2004RPG.ArtifactInvulnerability')
  • ArtifactKeyConfigs=(Alias="SelectMWM",ArtifactClass=Class'DruidsRPG200.DruidArtifactMakeMagicWeapon')
  • ArtifactKeyConfigs=(Alias="SelectDouble",ArtifactClass=Class'DruidsRPG200.DruidDoubleModifier')
  • ArtifactKeyConfigs=(Alias="SelectMax",ArtifactClass=Class'DruidsRPG200.DruidMaxModifier')
  • ArtifactKeyConfigs=(Alias="SelectPlusOne",ArtifactClass=Class'DruidsRPG200.DruidPlusOneModifier')
  • ArtifactKeyConfigs=(Alias="SelectBolt",ArtifactClass=Class'Extras109.ArtifactLightningBolt')
  • ArtifactKeyConfigs=(Alias="SelectRepulsion",ArtifactClass=Class'Extras109.ArtifactRepulsion')
  • ArtifactKeyConfigs=(Alias="SelectFreezeBomb",ArtifactClass=Class'Extras109.ArtifactFreezeBomb')
  • ArtifactKeyConfigs=(Alias="SelectPoisonBlast",ArtifactClass=Class'Extras109.ArtifactPoisonBlast')
  • ArtifactKeyConfigs=(Alias="SelectMegaBlast",ArtifactClass=Class'Extras109.ArtifactMegaBlast')
  • ArtifactKeyConfigs=(Alias="SelectMedic",ArtifactClass=Class'DruidsRPG200.ArtifactMakeSuperHealer')
  • ArtifactKeyConfigs=(Alias="SelectFlight",ArtifactClass=Class'UT2004RPG.ArtifactFlight')
  • ArtifactKeyConfigs=(Alias="SelectMagnet",ArtifactClass=Class'DruidsRPG200.DruidArtifactSpider')
  • ArtifactKeyConfigs=(Alias="SelectTeleport",ArtifactClass=Class'UT2004RPG.ArtifactTeleport')
  • ArtifactKeyConfigs=(Alias="SelectBeam",ArtifactClass=Class'Extras109.ArtifactLightningBeam')
  • ArtifactKeyConfigs=(Alias="SelectRod",ArtifactClass=Class'Extras109.ArtifactLightningRod')
  • ArtifactKeyConfigs=(Alias="SelectSphereInv",ArtifactClass=Class'Extras109.ArtifactSphereInvulnerability')
  • ArtifactKeyConfigs=(Alias="SelectSphereHeal",ArtifactClass=Class'Extras109.ArtifactSphereHealing')
  • ArtifactKeyConfigs=(Alias="SelectSphereDamage",ArtifactClass=Class'Extras109.ArtifactSphereDamage')
    where the Extras109 is a package I used to test the extra artifacts.

    I used to find as a LA I would always throw the boots, electromagnet, teleporter etc when I spawned as they got in the way. With key binding, I find it a lot better to leave them there. Fall off a cliff, press the boots of flight key, and live. I remember falling off the towers in Morpheus3, and whilst repeatedly translocating to try and get back up, trying to scroll through my artifacts to find the right one. No more.

    So, is key binding a good idea? I know players want it but....

    Also, which artifacts should be bindable? And which should be allowable in macros?

    Oh, and as an added extra in the mutator, I added keys to allow the player to throw 25 health or 25 adrenaline. It means a LW with high vampire can throw health at his sickly LA colleagues, and players can throw adrenaline at players running team artifacts. You get no xp benefit (too exploitable), but it may make you feel better.
  • BotFodder

    Wicked Sick!
    [Avatar]

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

    Macros, as we've seen, can make it easier for players to do things that are unintended (IE, using the Triple and the Doubler on something). However, a few folks have expressed the desire to have direct keybindings for artifacts. Other than the Macro issues (which the absence of your changes don't resolve, only make more difficult).

    I can say while it would be interesting to have, I'm more of a weapons man myself and my extra keys around my movement keys are set up to scroll artifacts and switch to weapons beyond the link. So I wouldn't find it useful - but I'm sure there are those out there that would. I don't see a humongus downside yet.

    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

    Code added to DruidsRPGExperimental in cvs.
    TheDruidXpawX

    Wicked Sick!
    [Avatar]

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

    It would help me a bunch to be able to bind the LR, Tripple, Double, and Globe to buttons. I think it would substantially help the class as a whole.

    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

    How does this work in a networked game? Does the config get replicated from the server to the client, or is it somewhat more hardcoded than that?

    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

    I'd like to get this in for the next build. I just want to understand the inner workings better.

    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
    Szlat

    Wicked Sick!

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

    TheDruidXpawX wrote:
    How does this work in a networked game? Does the config get replicated from the server to the client, or is it somewhat more hardcoded than that? 
    The code is in a Mutator, which adds an Interaction. This interaction traps the client input, and processes the keywords it recognises.

    The list of configured artifacts will be read in server side from the UT2004RPG.

    The actual selection of which key selects which of the configured artifacts is configured client side in the Settings/Input/Configure Controls menu, where all the other key bindings are done.

    I have network tested, and it worked ok. However, I have developed this over time on my PCs, so none of them can be considered a 'clean' install of the keybinding code. Plus, I do not have a full list of all the addons and settings used on the DC server, and it is possible one of the other Interactions may interfere with it. It would be best for someone else with 2 machines to do a test first, before rolling it out.

    In particular, I have no idea if we will encounter anything like the Hud problems Druid encountered with the Monster Points.
    BotFodder

    Wicked Sick!
    [Avatar]

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

    Szlat wrote:
    It would be best for someone else with 2 machines to do a test first, before rolling it out. 

    I might be able to help with this a little - I've got a bit of company this weekend, but perhaps next weekend I can get a full blown mod from you (Szlat) and a readme, and implement it on my test box.

    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:
    I might be able to help with this a little - I've got a bit of company this weekend, but perhaps next weekend I can get a full blown mod from you (Szlat) and a readme, and implement it on my test box. 
    Ok Thanks. I put all the code in cvs, and there is a readme there as well. The .u file isn't there - either you can build or I can supply. It's basically a question of sticking the files in the right places, editing the .ini files and going.

    Unfortunately, I am not around next weekend (9-11th), so if it all doesn't go smoothly, it might have to wait a few days before I can help out. Sorry.
    TheDruidXpawX

    Wicked Sick!
    [Avatar]

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

    Szlat wrote:

    BotFodder wrote:
    I might be able to help with this a little - I've got a bit of company this weekend, but perhaps next weekend I can get a full blown mod from you (Szlat) and a readme, and implement it on my test box. 
    Ok Thanks. I put all the code in cvs, and there is a readme there as well. The .u file isn't there - either you can build or I can supply. It's basically a question of sticking the files in the right places, editing the .ini files and going.

    Unfortunately, I am not around next weekend (9-11th), so if it all doesn't go smoothly, it might have to wait a few days before I can help out. Sorry. 


    I think we're going to make a go of it. Will you commit it to the DruidsRPGcvs module and we'll just plan on making it go

    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
    Szlat

    Wicked Sick!

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

    Ok, so I'll remove from DruidsRPGExperimental, and put into the main cvs instead. I should be able to get that done tomorrow as well.

    That will just leave the artifacts in DruidsRPGExperimental.
    Szlat

    Wicked Sick!

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

    Ok, key binding stuff is in DruidsRPGcvs, and removed from DruidsRPGExperimental.

    Note that once you build DruidsRPG200 with the new key binding stuff in, you have to edit the .int file and add the following lines at the top.
    Code:
    [Public]
     Object=(Class=Class,MetaClass=Engine.Mutator,Name=DruidsRPG200.DruidsRPGKeysMut,Description="Adds ability to directly select artifacts with keys")
     Object=(Class=class,MetaClass=Xinterface.GUIUserKeyBinding,Name=DruidsRPG200.DruidsRPGKeyBinding)  
     
     

    KeysReadme.txt also added to clarify things.
    BotFodder

    Wicked Sick!
    [Avatar]

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

    A quick test in a server/client configuration with a dedicated server doesn't result in success. If I understand properly, I should be able to type into the console:

    SelectGlobe

    And, if I have a globe, it should switch to my globe. Instead, I get "Unrecognized Command".

    I had to create a "DruidsRPGcvs.int" file as the compiler did not spit out one.

    There could be issues with the code now being fully integrated into the CVS that I didn't account for - I don't know. I don't get any errors in compiling or the system log so it looks like things are at least compiling correctly and configured properly, and I'm 100% sure I'm actually running the mutator (it's on the command line for the server, and the server doesn't puke).

    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

    Thanks for doing a test.
    Did you put the section in the UT2004RPG.ini file? Try the SelectTriple command, as that is the only one specified in the default properties.
    Szlat

    Wicked Sick!

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

    BotFodder wrote:
    I had to create a "DruidsRPGcvs.int" file as the compiler did not spit out one. 

    I think one of the files - I think the mutator - has the package name hard-coded - I couldn't find a way around that. So it says something like "DruidsRPG200.DruidsRPGKeysInteraction" - I can't get at the exact code from here. If you are building it all called DruidsRPGcvs, then that needs changing.

    You should have had an "unable to load" error in the server.log?
     
    Forum Index -> Druids RPG Development Go to Page: 1, 2, 3 Next 
    Go to: