{"id":324,"date":"2009-01-15T22:49:27","date_gmt":"2009-01-15T21:49:27","guid":{"rendered":"http:\/\/mattiesworld.gotdns.org\/weblog\/2009\/01\/15\/fine-tuning-urban-terror-configuration-on-linux\/"},"modified":"2009-01-15T22:50:15","modified_gmt":"2009-01-15T21:50:15","slug":"fine-tuning-urban-terror-configuration-on-linux","status":"publish","type":"post","link":"https:\/\/mattiesworld.gotdns.org\/weblog\/2009\/01\/15\/fine-tuning-urban-terror-configuration-on-linux\/","title":{"rendered":"Fine-tuning Urban Terror configuration on linux"},"content":{"rendered":"<p>This has actually been too long ago, but I&#8217;ll to reproduce accurately. \ud83d\ude42<\/p>\n<p>First of all, why would you need to configure your urban terror install on linux? Can&#8217;t you just extract &#038; play like on windows? Yeah, you could. Except when:<\/p>\n<ol>\n<li>You&#8217;re using a recent <a href=\"http:\/\/en.wikipedia.org\/wiki\/Libcurl\">libcurl<\/a> (which is used for downloading new maps through HTTP).<\/li>\n<li>You&#8217;re using an azerty keyboard (or a keyboard map which contains keys that are unknown to <a href=\"http:\/\/www.ioquake3.org\/\">ioq3<\/a>).<\/li>\n<\/ol>\n<p>Which is quite a lot of people, at least, in Europe. \ud83d\ude09<br \/>\n<!--more--><br \/>\nThe first problem is very easy to solve. You could argue why the devs had to use the libcurl.so.3 hardcoded, instead of libcurl.so. Trust me, I did, and I rest my case. It actually doesn&#8217;t make much more sense or difference. The best way to solve this, is adding:<\/p>\n<p><code>seta cl_cURLLib \"libcurl.so.4\"<\/code><\/p>\n<p>to your autoexec.cfg in the q3ut4 dir.<\/p>\n<p>The second problem is more complicated to understand the reasoning behind it because it has grown historically and mutated quite a bit. Originally, ioq3 used its own input handling methods. It contained a few hacks. Later on, ioq3 got ported to SDL. Which is fine by itself, but not if you need to translate to the legacy input system. Combined with a few hardcoded hacks for both console and non us layouts, it really became a mess. Which is the current state. \ud83d\ude42 On top of that, IIRC, sdl receives different key strokes on windows when using the same non-us keyboard layout. So it &#8220;magically&#8221; works there. I guess this has something to do with windows being a game OS. \ud83d\ude09<\/p>\n<p>Now, let me explain the symptoms.<\/p>\n<p>The first thing you do after launching UrT, is reconfiguring your keys. Except, that doesn&#8217;t seem to work well. For example, &#8221; does not get recognized, as such, my side arm is not available (unless you use the scroll button on your mouse of course). The console key is recognized as WORLD_18, but still, it doesn&#8217;t work. You can read a <a href=\"http:\/\/forums.urbanterror.net\/index.php\/topic,11071.0.html\">detailed progress report<\/a> on how I solved this on Urban Terror forum, especially <a href=\"http:\/\/forums.urbanterror.net\/index.php\/topic,11071.msg146456.html#msg146456\">this particular post<\/a>, revealing some interesting findings. \ud83d\ude42<\/p>\n<p>So all solved, right? No. Apparently, I didn&#8217;t think ahead enough. I managed to rebind all my movement and weapon keys, but what about radio commands? Those are not configurable! So again, I started digging in the UrT source. Unfortunately, loose end. But eventually, I realised configurable radio keys wouldn&#8217;t work since that would clash with the weapon buttons, unless some context could be given, which would require ioq3 modding.<\/p>\n<p>So in the end, I reverted to the solution I liked less because it is more a workaround than a solution: just use a modified keymap when launching UrT. This can be easily automated like this (for a French azerty layout):<br \/>\n<code><br \/>\n#!\/bin\/bash<br \/>\nxmodmap -pke > xmodmap_backup<br \/>\nxmodmap -e \"keycode 49 = asciitilde\" -e \"keycode 10 = 1\" -e \"keycode 11 = 2\" -e \"keycode 12 = 3\" -e \"keycode 13 = 4\" -e \"keycode 14 = 5\" -e \"keycode 15 = 6\" -e \"keycode 16 = 7\" -e \"keycode 17 = 8\" -e \"keycode 18 = 9\" -e \"keycode 19 = 0\"<br \/>\n.\/ioUrbanTerror.i386<br \/>\nxmodmap xmodmap_backup<br \/>\n<\/code><\/p>\n<p>For a detailed progress report and explanation of the solution, you can once more <a href=\"http:\/\/forums.urbanterror.net\/index.php\/topic,11170.0.html\">read up on a thread on the Urt forum<\/a>. The obvious disadvantage of this solution, is that you can&#8217;t use the mapped keys properly when alt-tabbing (which works better than on windows, btw), neither when chatting. Also, when Urt would happen to crash (didn&#8217;t occur yet), the unmapping wouldn&#8217;t be executed (but you can still do that manually).<\/p>\n<p>Note that this solution also applies to other ioq3 based games like <a href=\"http:\/\/tremulous.net\/\">Tremulous<\/a> or <a href=\"http:\/\/www.worldofpadman.com\/\">World of padman<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This has actually been too long ago, but I&#8217;ll to reproduce accurately. \ud83d\ude42 First of all, why would you need to configure your urban terror install on linux? Can&#8217;t you just extract &#038; play like on windows? Yeah, you could. Except when: You&#8217;re using a recent libcurl (which is used for downloading new maps through &hellip; <a href=\"https:\/\/mattiesworld.gotdns.org\/weblog\/2009\/01\/15\/fine-tuning-urban-terror-configuration-on-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Fine-tuning Urban Terror configuration on linux<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,4],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-games","category-linux"],"_links":{"self":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":0,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"wp:attachment":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}