Jump to content

Android: Highlighting containers in BG2


Baldurer

Recommended Posts

Posted

Is it supposed to be possible to highlight all containers like in the original BG2 (by pressing tab)? Am I just not using the right key (tried alt and tab), or is it a bug or missing feature?

Posted

It is linked to the 'Alt' key. But you have to keep it pressed to see the highlights.

The 'Tab' key shows hp overhead.

Later we'll make these configurable.

Posted

OK, I have tried mapping both ralt and lalt to an onscreen button, but neither of them do the highlighting.

When I hold alt however, a character is centered on the screen

Is this just me?

Posted

Mapping ALT to a key definitely does not work, even though that's what it should be in the game. Here's some information that might be helpful:

 

I have an Xperia Play, so I have extra hardware buttons to map. When I first loaded up BG2 on GemRB to make sure everything was running fine, before I remapped all the keys, I could highlight all containers by pressing the 'X' button on my phone's gamepad.

 

So I think that whatever was default mapped to the 'X' key on my gamepad would be the value corresponding to 'highlight all containers' in BG2.

 

Do any of you devs know what value would be mapped to the 'X' button on an Xperia Play gamepad for GemRB by default?

Posted

Illcrystals, thanks a lot! That helped me solve it. The key that highlights containers on android is appearently the c key.

I found this document:

http://developer.sonyericsson.com/wp/2011/02/13/xperia-play-game-keys/

and saw that the key code value for the x button on xperia play is 99.

" 99 KEYCODE_BUTTON_X Function is game specific.

"

I then looked up the source code for the sdl port that is used by gemrb to access hardware. The file in that repo

called KeyCodes.java contains the keycodes which are mapped to different keys. From there, I could see which key was

mapped to the keycode 99 in version 1.2 which is used on my version of android.

"public static final int SDLK_c = 99;"

The source code for the file is located here:

https://github.com/pelya/commandergenius/blob/sdl_android/project/java/Keycodes.java

 

Now I can finally enjoy the game again =)

Posted

Hehe, actually, in GemRB's code, i can read this:

		   case GEM_ALT: //alt key (shows containers)
#ifdef ANDROID
		    case 'c': // show containers in ANDROID, GEM_ALT is not possible to use
#endif
				    DebugFlags &= ~DEBUG_SHOW_CONTAINERS;
				    break;

Posted

this raises the question: if android has alt keys but GEM_ALT doesnt work why not have an #ifdef ANDROID assign the correct value to GEM_ALT for androids alt key instead of changing the key?

Posted

Probably not all Android are the same, but still, on those that have an alt key, it should be associated with GEM_ALT.

Posted

Highlighting hotkey is mapped to physical 'Search' key as default. But some devices does not have this key (s.a. Samsung phones and tablets). You may remap 'c' hotkey for these devices in SDL menu.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...