Go Back   Champions of Regnum > English > Technical Support > Linux

Linux Technical issues under Linux platform

Reply
 
Thread Tools Display Modes
Old 08-30-2009, 01:19 PM   #1
Eli2
Apprentice
 
Eli2's Avatar
 
Join Date: Jun 2007
Posts: 73
Eli2 is on a distinguished road
Default Fix for key binding annoyances.

I was fed up with the non working arrow keys and the premium menu key.
So ... i fixed it.

The arrow keys are mapped to WASD and the x,k keys are switched.

HOWTO:

Download & Unpack:
http://xcb.freedesktop.org/dist/libxcb-1.4.tar.gz

Apply diff:
Download the attachment to the src folder
patch -p0 < xcb_in.c.txt

Compile:
./configure
make
DO NOT make install !!!!!!!!

If you have problems, look here:
http://xcb.freedesktop.org/DevelopersGuide/

Run game with:
LD_PRELOAD=<folder you unpacked it in>/src/.libs/libxcb.so.1.1.0 ./rolauncher

Edit:
Maybe i will add a patch for not being able to select enemies later. DONE, see next post.

Edit:
DO NOT make install !!!!!!!!
It will mess up your linux.
Attached Files
File Type: txt xcb_in.c.txt (2.1 KB, 54 views)
__________________
Regnum: It's Highly Addictive!

Last edited by Eli2; 08-30-2009 at 03:53 PM.
Eli2 no ha iniciado sesión   Reply With Quote
Old 08-30-2009, 03:34 PM   #2
Eli2
Apprentice
 
Eli2's Avatar
 
Join Date: Jun 2007
Posts: 73
Eli2 is on a distinguished road
Default

Here it is, as you wished.
A fix for the "not sticking" bug when selecting Objects.



Edit:
After some testing i found out 10 pixels is not perfect.

look for those lines
+ (ev->event_x < mouseX + 10 && ev->event_x > mouseX -10) &&
+ (ev->event_y < mouseY + 10 && ev->event_y > mouseY -10) ) {

and replace them with

+ (ev->event_x < mouseX + 20 && ev->event_x > mouseX -20) &&
+ (ev->event_y < mouseY + 20 && ev->event_y > mouseY -20) ) {
Attached Files
File Type: txt xcb_in.c.patch.txt (3.9 KB, 38 views)
__________________
Regnum: It's Highly Addictive!

Last edited by Eli2; 08-30-2009 at 07:30 PM.
Eli2 no ha iniciado sesión   Reply With Quote
Old 08-30-2009, 06:17 PM   #3
Zas_
Count
 
Zas_'s Avatar
 
Join Date: Jun 2009
Location: France
Posts: 1,024
Zas_ is on a distinguished road
Default

Fantastic

I use a slightly modified version of it to map keypad 0-9 to 0-9 on a french keyboard (since those require shift to be pressed on such keyboard).

I use ZQSD with QD = strafe, AE=rotate, but it was mandatory to use 0-9 on keypad for me, and since the left hand is on ZQSD, the right one on mouse, it's rather difficult in action.

I hope NGD will fix this in the game, here is my suggestions:
- allow to map any action to any key combo
- chat mode should be different from character control mode, allowing to map space bar to some spell.
- all mouse buttons should be useable (next/prev buttons on some mouses)

Thanks
__________________
Annavilya / War-Luck (Haven)
Zas_ no ha iniciado sesión   Reply With Quote
Old 08-31-2009, 02:53 PM   #4
Zordak
Master
 
Zordak's Avatar
 
Join Date: Jun 2007
Posts: 451
Zordak will become famous soon enough
Default

Hi,

Great work, I had a problem induced by own stupidity though:
Preloading the patched library when starting the launcher works fine - i noticed since my password contained an x...
However, when the games executable was started i got the following terminal output:
Code:
ERROR: ld.so: object './libxcb.so.1.1.0' from LD_PRELOAD cannot be preloaded: ignored.
Stupid relative paths...the game executable is in a different folder...
Z.

ps: each time i see someone talk about azerty keymaps it seems more awful to me - you have to press shift to access numbers???
__________________
Based on facts, as I choose to see them.
Zordak no ha iniciado sesión   Reply With Quote
Old 08-31-2009, 06:15 PM   #5
Zas_
Count
 
Zas_'s Avatar
 
Join Date: Jun 2009
Location: France
Posts: 1,024
Zas_ is on a distinguished road
Default

Quote:
Originally Posted by Zordak View Post
ps: each time i see someone talk about azerty keymaps it seems more awful to me - you have to press shift to access numbers???
Yes. Because some often-used accentuated characters are on the same keys.
But for entering numbers there is the numpad too.

BTW, i add to drop the k/x swap since it affects chat dialog and other text entries (tekt and xeys ... ). And i configured only 1-3 (instead of 0-9) on top row, since 4 key is simple quote too .... so needed.

If NGD implement fully configurable controls, i would love to be able to use spacebar to cast a spell, in WASD mode you can hit the spacebar with thumb
__________________
Annavilya / War-Luck (Haven)
Zas_ no ha iniciado sesión   Reply With Quote
Old 08-31-2009, 08:09 PM   #6
Eli2
Apprentice
 
Eli2's Avatar
 
Join Date: Jun 2007
Posts: 73
Eli2 is on a distinguished road
Default

V 0.2 is out, now with chat Mode
Attached Files
File Type: txt xcb_in.c.patchV0.2.txt (4.6 KB, 51 views)
__________________
Regnum: It's Highly Addictive!
Eli2 no ha iniciado sesión   Reply With Quote
Old 09-01-2009, 03:46 AM   #7
Arafails
Baron
 
Arafails's Avatar
 
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
Arafails will become famous soon enough
Default

Heheh. Static variables should be declared for the function only. I promise, they'll still stay in the same place in memory if you move them there.
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'gerSoul Taker, Imperial Guard of Ignis
Arafails no ha iniciado sesión   Reply With Quote
Old 09-01-2009, 09:53 AM   #8
onemyndseye
Master
 
onemyndseye's Avatar
 
Join Date: Jul 2008
Location: South Central USA
Posts: 260
onemyndseye is on a distinguished road
Default

Very nice work my friend

With your permission and without further objection from the users here I will include a patched lib in the RO package (with the option to use it or not set in /etc/default/regnum-online).

Forgive perhaps a silly question.. what happens with you minimize RO? Do these key changes stick in other apps? If not then I think this would be a excellent option for people to have.
__________________
RA/Syrtis Hunter LVL50: Elusis
RA/Syrtis Barba LVL50: Artemisia
RA/Syrtis Conju Lvl45: Nellas Miriel
onemyndseye no ha iniciado sesión   Reply With Quote
Old 09-01-2009, 11:09 AM   #9
_dracus_
Count
 
_dracus_'s Avatar
 
Join Date: Jul 2007
Location: Toulouse
Posts: 1,335
_dracus_ is on a distinguished road
Default

Quote:
Originally Posted by onemyndseye View Post
Forgive perhaps a silly question.. what happens with you minimize RO? Do these key changes stick in other apps? If not then I think this would be a excellent option for people to have.
It should only work for RO according to the run command, but I may be wrong.
__________________
« Thanks all, you are right I'm great with the barbarian ... for killing mobs. » -- Athena Stillwater
_dracus_ no ha iniciado sesión   Reply With Quote
Old 09-01-2009, 01:50 PM   #10
tauc
Pledge
 
tauc's Avatar
 
Join Date: Jan 2009
Location: Sochi, Russia
Posts: 12
tauc is on a distinguished road
Default

Very nice solution!

I use nostromo speedpad for RO and bind all actions as i want, but it will be good if NGD realize free keys bind mapping and separate floating shotcuts pannels.
__________________
Horus/Alsius taucuu/barb as easy frag
tauc no ha iniciado sesión   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:36 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved