PDA

View Full Version : Is it possible to use keypad attacks?


UDM
07-27-2006, 08:48 AM
Have you guys played Die by the Sword? I was thinking if it's possible to set up jampconfig.cfg such that we can use the keypad to execute attacks without moving. For example, to do a right slash, you press 6; to slash forward and right, you press 9 and so on

I tried binding keys like bind kp_pgup "+moveright; +forward; +attack; wait 2; +moveleft; +back;" and it works, but not always ie. sometimes it slashes forward depending on the direction you run in. Also, you can't chain attacks using this kind of binding

So is there a way to fight with the keypad? It'd be cool for those movie-like trailers without all the running about ie. walking backwards while swinging the saber like dooku does

ensiform
07-27-2006, 03:07 PM
sadly, raven fubared the keyboard input for the keypad, and those keys only work with numlock off. its supposed to work with it on as it does in singleplayer, and all other quake 3 engine-based games.

UDM
07-27-2006, 04:13 PM
Yeah, but I'm not just referring to the keypad alone. In general, is it possible to do this on any keys ie. bind a specific attack direction and being able to combo just as smoothly as using the mouse?

ensiform
07-27-2006, 11:12 PM
no idea. and i do not use mouse for attacking so would be better if you said "attack button"

razorace
07-28-2006, 03:16 PM
Yeah, but I'm not just referring to the keypad alone. In general, is it possible to do this on any keys ie. bind a specific attack direction and being able to combo just as smoothly as using the mouse?
I think it is. I'm pretty sure that's how people use "scripting cheat moves".

ensiform
07-28-2006, 04:08 PM
well you could move debugsetsabermove to its own seperate function and tweak it so its like the players are really using the moves, etc so you cant exploit it, and so that it costs force, etc.

Vruki Salet
08-09-2006, 04:43 PM
I have done this a few different ways: debugsetsabermove, making new console commands and making them work with bg_saber.c, and by using 9 attack buttons and setting one each for the keypad keys 1-9. I've played with it like that for many many hours, along with a way of locking my facing to my opponent so I could let go of the mouse and keep one hand on the movement keys and the other hand on the sabering keypad. And my conclusion so far is: I can't tell if it's fun or not. It's a "cool" system in that it offers more saber control but there's something sort of static feeling about it.

Oh these all required coding changes though I guess you can use debugsetsabermove fairly well without coding as long as you have cheats on and I think your game has to be compiled with debugging on doesn't it?

ensiform
08-09-2006, 04:45 PM
not if u remove the ifndef's.

JRHockney*
08-09-2006, 05:37 PM
This has been sort of brought up before, but I'd still like to see a reversal key that if you hold it down, it reverses the direction of what ever the swing would be to the opposite side. For us enhanced players, it could also work in parrying. Otherall, I think it would be a relatively simple way to have alot more control over which way we swing, however it would require some coding.

I like the key pad idea, but that would be alot of buttons to press for us mouse users, and how would we move exactly during combat? I suppose that if we wanted to just have standing fights, we could also just have a button that while held down, stops all wlking movement but allows for swings with the movement keys. It might be simplier than using the keypad.

Vruki Salet
08-09-2006, 08:18 PM
not if u remove the ifndef's.

OK sure that too.

Vruki Salet
08-09-2006, 08:31 PM
how would we move exactly during combat?

Like I said, you have your view locked to look at your opponent while you are duelling. Then you don't need to worry about using the mouse to turn toward him. You use your movement keys to move toward, away from, and left or right but your movement in those directions is always relative to your oppenent. If you hold the right- or left-move key down, for instance, you would circle him. Moving forward moves towards your opponent and moving back moves away.

It's useful but like I said feels static. It looks great from the outside, watching other people duel that way, but doing it yourself it feels like you're not moving around very much even if you're all over the map. I guess it's cause you always see your opponent in front of you.

Lately I've experimented with a different approach. I made it so your view is locked on to your opponent only when you get within a certain distance of him and if you face him initially. I'm going to try a system of mouse clicks and double-clicks instead of the keypad so you can keep hold of the mouse. That way when you get a bit away from your opponent your view gets unlocked and you can move naturally pointing around with the mouse.

UDM
08-09-2006, 10:02 PM
Wow thanks for taking my idea so seriously :D

Will you be releasing this?

Vruki Salet
08-09-2006, 11:53 PM
I've been very shy about releasing anything. Partly because what I have is just a bunch of experiments of this-and-that, that I've made while I've been learning to code the stuff. Partly because I have a hard time polishing anything into good enough shape to want to show anyone...damn attention deficit. :(

I've only been able to do things once in a while lately, though I always want to go back and spend more time at it. I've tried to use my kid to be my human tester but he hasn't been as interested in helping as I hoped. If you want I'll see if I can scrounge up some version that works good enough for you to try and give you a link to it. Are you around consistently or regularly at certain times of day? You could help me test stuff. Got to warn you though I'm not aiming at anything like OJP-E. It's OJP-Basic based.

Sushi_CW
08-10-2006, 12:18 AM
That's pretty cool, Vruki. I've wondered myself a few times how JA would be with a locking view and hard-coded swings. Have fun with it. :)

JRHockney*
08-10-2006, 03:16 AM
View locking would be cool as long as it isn't too hard to fight two people at once. Good luck with that.

Vruki Salet
08-10-2006, 03:26 AM
Figuring out how to do it to enable a fight against 2 opponents has stumped me so far, outside of giving someone special attacks that quickly get rid of an opponent who's not right in front. Not kill him I mean but disable him temporarily or push him away so they can dealt with one at a time.

UDM
08-10-2006, 08:19 AM
Vruki so the mod works only with OJP basic?

Vruki Salet
08-10-2006, 10:47 AM
It's built on Basic, Basic code is what I'm using as a starting point.The sabering changes in Enhanced are too much for me too work with. I can't follow the saber system code in there at all, too complicated for me even with all the nice comment tags and stuff. :p

UDM
08-10-2006, 12:11 PM
Right, can't wait for your release :)

Greiver
08-10-2006, 12:34 PM
for the multiple enemys you could make it focus on the point beteen them the closer one gets to you the more it focus on them but you should make it so that they have to be facing you so that it lock on to them other wise you'd get your view mangeled by passers by

Vruki Salet
08-10-2006, 12:53 PM
UDM, if you'd like to try something would you rather try a keypad system with total locked view*, or a new mouse system with locked view only when you're close up?

I could do a combination where it's only locked up close yet still uses keypad, but I think it would make you have to switch between mouse and keyboard too frequently.


(*except when your'e jumping high, or pressing "use" button, & a few other situations where it gets turned off)

Vruki Salet
08-10-2006, 01:23 PM
for the multiple enemys you could make it focus on the point beteen them the closer one gets to you the more it focus on them but you should make it so that they have to be facing you so that it lock on to them other wise you'd get your view mangeled by passers by

I thought of maybe doing that focus on the point between them thing but it could get weird if they get too much one on either side of you.

As far as facing you, that's how it was originally. Not so much for the shorter lasting view locks I'm doing now but maybe... Definately you've got to have things that filter out anyone but your real opponent. At first I didn't do it for NPCs, but recently I included them but forget a crucial test and it was funny when all these NPC corpses on the floor (victims of tests) started spinning to face me when I walked by, like compass needles.

UDM
08-10-2006, 01:25 PM
I'd prefer a keypad system with total locked view. Just for the heck of it :P

Vruki Salet
08-10-2006, 01:30 PM
Hang for a few then, brb.

Vruki Salet
08-10-2006, 01:46 PM
UDM do you some way i can im you? AIM or MSN?

UDM
08-10-2006, 02:07 PM
sent pm

Vruki Salet
08-10-2006, 02:19 PM
k i'm on it so pick up your msn phone, so to speak

JRHockney*
08-10-2006, 02:45 PM
Is the view lock toggleable? I think that would be ideal. Its a shame we can't try this for enhanced (although backhits would become almost impossible). Are you sure you cant just add the code to Enhance without changing much? I mean most of this just sounds like key reassiginment for the most part.

UDM
08-10-2006, 06:40 PM
I will offer myself as a ritual sacrifice to whoever does it

Sushi_CW
08-10-2006, 06:50 PM
That would probably work... add a "lock on" key that would lock on to the enemy in your reticle to enable the viewlocking. Hitting it again (or killing the opponent) could disengage the lock.

Vruki Salet
08-10-2006, 08:15 PM
I have it so there's a button that disengages it while it's pressed, so you can run free when you want to. Typically I use the "use" or "use holdable item" buttons. It's not a toggle. You have to hold it. A toggle is possible though. I think other circumstances that make it off are you or your opponent having your/his saber off, you or your opponent jumping higher than a person's height, certain acrobatic moves, katas.

About putting it into Enhanced, the view lock (actually I shouldn't call it that cause Razor already put a different feature called "view lock" into OJP so how about "duelling view" or something) is easy to put into Enhanced and I guess the keypad thing isn't too hard either. I used to use the Enhanced code. I didn't mean that I don't use it because I can't get these things in, it's cause I don't want the autododge and parrying and fatigue & mishap system and the other new things. I want to do it differently and it's a lot of trouble for me to get rid of those things to put my own in. Not to criticize those things, I just had my own ideas already. While I was fiddling and learning the Enhanced saber system just kind of blossomed until the code got to be more than I can deal with.

Sacrifice yourself UDM? God help us! If you're gonna do that I will surely never put it in. Besides, I prefer to test my sabering out on Jan, stormtroopers, Darth Malak and Jolee Bindo. Old habits...

UDM
08-11-2006, 12:46 AM
Hey vruki im online now, we can do some testing. I'm having issues with the mod. And please send me the Enhanced version too!!!1111onetwo2!11! :D

Vruki Salet
08-11-2006, 12:48 AM
Hi I was just checking here one more time fore i went to bed. So, can you meet me at my server or can you not get there?

JRHockney*
08-11-2006, 01:56 AM
I have it so there's a button that disengages it while it's pressed, so you can run free when you want to. Typically I use the "use" or "use holdable item" buttons. It's not a toggle. You have to hold it. A toggle is possible though. I think other circumstances that make it off are you or your opponent having your/his saber off, you or your opponent jumping higher than a person's height, certain acrobatic moves, katas.


Hmm, Thats probably just as good. If the default settings work while the while its pressed and you can saber in default, I would almost rather have this feature be the one that you have to hold down the button for or make it an option of either/or.

And please send me the Enhanced version too!!!1111onetwo2!11!

Oh the one that doesn't exist yet? Yeah send me it too! LOL :p That would be a heck of an experiment though. Although it could end up being too hard to port, it may actually help with the movie likeness of enhanced and make the combat a little less figity.

What would really be cool would be to make it so you have to hold down 0 or another number on the number pad in order to swing with whatever direction your going for and when you dont hold it down, it parries in that direction. This way you could have toe to toe saber fights without even moving like in episode 3. Anyways just random brain storming here. I would like to see your code for this sometime though.

Vruki Salet
08-11-2006, 04:09 PM
I'm working on it but got to stop now to do other stuff. If all goes well I'll finish tonight.

Vruki Salet
08-12-2006, 01:03 AM
OK I've run into a problem. I wanted to do it without having to hijack the game's buttons, and I wanted it to use the existing saber code from bg_saber.c so it would do all the right transitions and stuff that would be an extra helping of pain in the a** to do via debugsetsabermove instead. So I tied in commands I put in g_cmds.c to bg_saber.c. It worked good - if I was in a non-dedeicated server. In a non-dedicated server it works fine for all clients, the hosting client and a client joining from the network. We can each swing and chain swings with the numpad keys as much as we like. If it's a dedicated server though, all clients can only swing once using the numpad, then they have to pause for a second or so, then they can do it again. Numpad keys (which are bound to send a console command btw) pressed before the 1-second or so time is up are ignored. It turns out that the wait is just about long enough for the saber to go back to ready pose but testing reveals no particular relationship between torso times or weapon times and when the numpad key will work again.

Does anyone have any idea what's going on? Is there a way to change this dedicated server behavior?

Sushi_CW
08-12-2006, 11:04 AM
Is there some sort of spam-guard on the server to prevent players from flooding commands?

Vruki Salet
08-12-2006, 11:14 AM
Both the dedicated and non-dedicated server use the same cfg file so it's nothing i've set for it, but I wonder if there's an automatic thing. You might be on to something.

razorace
08-12-2006, 11:16 AM
There is a command spam protection. I'm guessing that's the problem.

Vruki Salet
08-12-2006, 11:21 AM
There you go, it was it. Well that's a pickle then. It looks like the sv_floodprotect code isn't available for modification. It's just on or off. So I can do this without using the game's buttons but it's got to be just for fun and testing cause it won't be safe to release in the wild.

Oh, unless I could make an alternate form of spam control, then set sv_floodprotect to 0...hmmm....

Razor, what else does sv_floodprotect do besides limit console command input to once per second or so?

Vruki Salet
08-12-2006, 12:12 PM
It works now with sv_floodprotect off. It could use a few tweaks, e.g. it's got a version of the MB2 sabers that's still broken when it comes to metal swords; with unlimited chaining you can spam swing with the numpad ridiculously easy; and when you lose your saber in numpad mode you melee punch out of control sometimes :p. Good enough for a test if anyone wants. I'll put up some instructions for anyone who wants to try it out when I get back from the laundromat.

razorace
08-12-2006, 07:13 PM
I honestly don't know.

Vruki Salet
08-12-2006, 08:39 PM
I wonder if commandtime has some influence on it's behavior. I haven't looked to far into it, just did my own thing.