[MOD]CLUAConsole Cheats without keyboard (any device).
Theok
Member Posts: 2
Hello there,
I've been searching frantically for a way to enable cheats in the android version of the game but I could never do it. Finally I decided to create my own solution for this problem. I edited the ui.menu file from each game (Baldur's Gate, Baldur's Gate 2, Icewind Dale, Planescape torment) and I've changed the function of the help key (The ? symbol) to open the cluaconsole and the menu that has explore,godbow, travel etc. functions. You don't even have to edit baldur.ini for this to work. I used versions 2.5 of the games (latest versions as of now). Downlload the zip file and then put the override folder of the respective game to android-data-com.beamdog.(game)-files and then run the game. when you are playing press the ? and then the console will come up. to dissable it either press the done button or the enter key when you write a code on the console. Hope it helps you put cheats on android. If you need more help or guidelines, please tell me.
The code that I changed is this (for opening console):
button
{
area 3 56 73 55
enabled "worldScreen == e:GetActiveEngine()"
bam GUILS10
sequence 16
tooltip lua "Infinity_FetchString(31827)" --"getTooltipWithHotkey(16,31827)"
tooltip force lua "sidebarForceTooltips == 1"
tooltip force top
clickable lua "sidebarsGreyed ~= 1"
action
"
Infinity_PushMenu('HELP')
Infinity_PushMenu('cheatConsole')
Infinity_PushMenu('cheatMenu', 0, 0)
"
}
and this for closing the console
button
{
area 306 164 300 40
bam GUIBUTWT
text "DONE_BUTTON"
text style "button"
action
"
Infinity_PopMenu('HELP')
Infinity_PopMenu('cheatConsole')
Infinity_PopMenu('cheatMenu', 0, 0)
"
}
}
I've been searching frantically for a way to enable cheats in the android version of the game but I could never do it. Finally I decided to create my own solution for this problem. I edited the ui.menu file from each game (Baldur's Gate, Baldur's Gate 2, Icewind Dale, Planescape torment) and I've changed the function of the help key (The ? symbol) to open the cluaconsole and the menu that has explore,godbow, travel etc. functions. You don't even have to edit baldur.ini for this to work. I used versions 2.5 of the games (latest versions as of now). Downlload the zip file and then put the override folder of the respective game to android-data-com.beamdog.(game)-files and then run the game. when you are playing press the ? and then the console will come up. to dissable it either press the done button or the enter key when you write a code on the console. Hope it helps you put cheats on android. If you need more help or guidelines, please tell me.
The code that I changed is this (for opening console):
button
{
area 3 56 73 55
enabled "worldScreen == e:GetActiveEngine()"
bam GUILS10
sequence 16
tooltip lua "Infinity_FetchString(31827)" --"getTooltipWithHotkey(16,31827)"
tooltip force lua "sidebarForceTooltips == 1"
tooltip force top
clickable lua "sidebarsGreyed ~= 1"
action
"
Infinity_PushMenu('HELP')
Infinity_PushMenu('cheatConsole')
Infinity_PushMenu('cheatMenu', 0, 0)
"
}
and this for closing the console
button
{
area 306 164 300 40
bam GUIBUTWT
text "DONE_BUTTON"
text style "button"
action
"
Infinity_PopMenu('HELP')
Infinity_PopMenu('cheatConsole')
Infinity_PopMenu('cheatMenu', 0, 0)
"
}
}
Post edited by Theok on
8
Comments
tooltip lua "Infinity_FetchString(31827)" --"getTooltipWithHotkey(16,31827)"
which will crash the game on start. Once the extra space [between the 31827)" and --"] is removed it operates OK. Should look like:
tooltip lua "Infinity_FetchString(31827)" --"getTooltipWithHotkey(16,31827)"
Had to change my 'Like' to 'Insightful'... When I was finding and fixing the space, I have had a look around the code and would like to change the mod if there are no problems with you. I would publish it back here. In it's current form, it misbehaves with some other mods (particularly Transparent Sides). I would like to give it it's own icon (leaving the Help icon do it's job) on the right hand panel and give it a proper way to exit the console without using another button. Also, when activated, it overwrites the WORLD ACTION BAR instead of clearing it, making it difficult to read on a mobile phone (I use a Note 4), so I would like to fix that as well...
Consider changing the heading for this topic, perhaps 'MOD = CLUAConsole Cheats without Keyboard!!!!' or something similar. In my tiny mind, this would work on any of the platforms, not just Android. It certainly works on the PC (tested) so my guess is that there would be no problems of being able to put this into IOS which seems to be the more difficult environments. Not having any IOS device, I am just not sure whether once the console is open and text box focussed, IOS allows for the keyboard to come up. Might be able to get someone to test it who already knows how to add mods. If the keyboard doesn't come up, then they would certainly be able to use any history in baldur.lua, so adding entries (up to 10) first before starting the game would be a way to get around it. If you aren't aware of how to bring up the baldur.lua history, then click on the red button beside the console text box on the bottom of the screen.
Once complete, give some thought to allowing the mod to be part of a suite of small mods called EEUITweaks. If the managers of that mod allow it in, then it makes it easier for others to install...
I will start on the modifying the code today in anticipation that all be okay with you.
Thanks in advance
Gus
Thank you again for doing this !
Firstly, thanks goes to @Theok who showed the pathway the console.
The mod contained within permits opening the cheat console without the use of a hardware keyboard. This has been a hit and miss event for most Android users and I am sure for IOS users well. The documentation is included in the .zip file attached.
With the permission of the original author, I have taken this mod and adapted it to activate from it's own button. Also as mentioned, this can operate without having to insert any lines into baldur.lua.
Although the topic has been titled 'any device', testing has yet to be done for the Apple MAC, IOS and Linux platforms, so if some kind person out there can give it a try and report back, then we would be grateful. @Luke93, @StummvonBordwehr, care to give it a go? Thanks
--------------------------------------------------------------------------
What does it do:
Adds a button to the RIGHT HAND panel that opens the Cheat Console for Beamdog Infinity EE Games. It is actually located beside the panel at the bottom of the screen but its behaviour is that of the right hand panel. If you were to hide the panel, it disappears as well etc. It's location beside the panel is due to the lack of screen real estate when playing on mobile devices or when the Scale User Interface is activated.
Testing environment:
Samsung Note 4
Generic Windows 10 Gaming PC
Hybrid Touch screen Notebook
In all devices, I was able to open the console. For the PC, the keyboard was focussed directly into the text dialog box. For the android mobile device, once the console text box is selected, the software keyboard opens. For the Hybrid notebook, the keyboard would not open in full screen mode, so the game had to be run in Windowed mode and the touch keyboard icon selected from the Taskbar. In all, the lua history (red diamond beside console text box) was able to be opened and lines selected. I am yet unaware of what happens in an IOS, Apple or Linux environment.
For the ICON, I used the 'Journal Icon' for all the games. If you don't want to use the Journal ICON, then in BG1EE, SOD, BG2EE and IWDEE, just change the sequence number for other ingame sidebar ICONs, or identify another BAM of the right size and change the line:
bam GUILS10
sequence 2
For PSTEE, you will need to change the line:
bam "FOOT5"
If you want to use a different button, then you can also any of the other in game buttons. They are called FOOTn.BAM (where n = number) for the Left hand panel and TABn.BAM for the right hand panel. There are also a number of other buttons in the game that can be used which can be examined with Near Infinity (usually named xxxBUTT.BAM).
'If' I can get the artistic side of me to operate, then I will try and create one, but that hasn't happened on nigh on 60 years so I wouldn't wait...
How to use:
To operate in game, use the Left Mouse Button or Single Press (touch screen) to activate. To Exit, use Right Mouse Button or Long Press (touch screen).
Quirks:
You can still use the normal method of accessing the Cheats Console (CTRL-Space and ESC to exit), however, I couldn't capture the ESCAPE key sequence to exit out of the mod version, so the Right Mouse button or Long press is required.
To Install:
The UI.MENU files attached have been drawn and modified from the following games:
Baldur's Gate: Enhanced Edition v2.5.17.0
Siege of Dragonspear v2.5.17.0
Baldur's Gate II: Enhanced Edition v2.5.16.6
Icewind Dale: Enhanced Edition v2.5.17.0
Planescape: Torment: Enhanced Edition v3.1.3.0
If you have either an unmodded (vanilla) game or have a modded game where the UI has not be touched (check the override folder for UI.MENU, if it exists then it is likely that it has been modified), copy the appropriate UI.MENU from the attached .zip file to the game's override folder. If the override folder does not exist, it can be created manually or copied from the .zip file.
To use with mods that copy a new UI.MENU to override (mostly likely all the UI replacement mods), or UI.MENU already exists in your override folder, the code will need to be added manually to the UI.MENU. Below are the cut and paste text for each of the games and where to paste it to.
I can't cover all of the mods, so if the UI replacement mod your are using removes the RIGHT and LEFT hand panels, then you will need to adjust the code to make it fit it in...
BG1EE without SOD, BG1EE with SOD, BG2EE & IWDEE Changes:
--------------------------------------------------------
To Manually add the button,
- Make a backup of your UI.MENU (only for safe keeping)
- Find the following text/section in UI.MENU using the search feature of yor editor.
name 'RIGHT_SIDEBAR_BOTTOM'
Copy and paste the following text at the end of the section, then save and test (just prior to the last }:
----SNIP----
-- Add Button to Open-Close Cheats Console
button
{
area -77 149 71 48
enabled "worldScreen == e:GetActiveEngine()"
-- toggle highlightSidebarButton
tooltip lua "'Cheat Console'"
bam GUILS10
sequence 2
clickable lua "sidebarsGreyed ~= 1"
action
"
Infinity_PushMenu('cheatConsole')
Infinity_PopMenu('WORLD_ACTIONBAR')
"
actionAlt
"
Infinity_PopMenu('cheatConsole')
Infinity_PushMenu('WORLD_ACTIONBAR')
"
}
----SNIP----
If you want to adjust the postion of the button, then the line to adjust is:
area -77 149 71 48
The only parts that need to change are -77 (which throws it ot to the left/right) and 149 (which will take it up and down). If your 'scale user interface' is off and you are playing on a PC etc, then you could try changing the line to:
area 6 -6 71 48
which should place the ICON above the 'Reveal Deatils' (Magnifying Glass) on the right hand panel itself. If you are on a mobile device and do this, you will lose your "rubber band" feature where can you select multiple characters.
PSTEE changes:
-------------
To Manually add the button,
- Make a backup of your UI.MENU
- Find the following text/section in UI.MENU
name "WORLD_SIDEBAR_RIGHT"
Copy and paste the following text at the end of the section, then save and test:
----SNIP----
-- Add Button to Open-Close Cheats Console on RIGHT_SIDEBAR_BOTTOM
button
{
area 6 -50 52 52
bam "FOOT5"
tooltip "Cheat Console"
action
"
Infinity_PushMenu('cheatConsole')
"
actionalt
"
Infinity_PopMenu('cheatConsole')
"
}
----SNIP----
If you want to adjust the postion of the button, then the line to adjust is:
area 6 -50 52 52
The only part of that needed to be changed is the Y postion (-50). To move it higher, change the -50 to something greater (-100 as an example), to go lower, change the -50 to a postive number (100 as an example) until it is the postion you want.
--------------------------------------------------------------------------
That is it. You should now have a button on screen which will open the cheat console.
If you have any questions or improvements, then please use the discussion and let everyone benefit.
Thanks
Gus
Edit: For those people playing standalone BGSOD on mobile devices, the UI.MENU to use is the 'BG1EE 2.5.17.0 with SOD'...
Edit: Updated to v1.2 - receiving error when trying to upload.
Will try again later.Updated.Nice work
Off course I will give it a go. RL is a bit hectic at the moment, but I will get to it.
Good job, I'll give it a go as soon as possible (tagging also @subtledoctor ......)
Separately, @JuliusBorisov ---> Any official word about when the console comes to mobile?
It seems to work fine on iOS......
Do you know how to resize the button (e.g., I'd like to make it smaller....)?
As far as the resizing goes. I think if you wanted to use the current button, you would need to extract it and resize in an editor. However, you could try any of the other BAMs that are in the game. As an example, if you were to use a spell (in this case Burning Hands - SPWI103 is used), then you could try changing the following lines:
area -77 149 71 48
bam GUILS10
sequence 2
to
area -38 159 32 32
bam SPWI103C
That would get the discreet pic of the spell and place it in a similar spot. You could change SPWI103C to SPWI103A to get the scroll version of the pic. You just need to find out which spell / BAM you would like to use...
Hope that helps
Gus
If, for example, the game was BG1EE, then the folder you should be looking at is:
Android/data/com.beamdog.baldursgateenhancededition/Files
If you didn't have any override folder previously, then the end result would be:
Android/data/com.beamdog.baldursgateenhancededition/Files/override/UI.MENU
Hope that helps
Gus
Gus
Edit: Im using a Samsung J7 Pro if it matters.
Gus
Gus
Hi @JuliusBorisov, is there a problem with being able to upload files at the moment? When attempting to, I receive a message that says "You are not allowed to upload files in this category". Was able to upload previously.
Thanks
Hi @JuliusBorisov, has there been any restrictions place on the category for uploading files, or just this thread? Do I need to start a new thread for the upload? Thanks
Hi @mlnevese, are you still a forum moderator? If you are, could you help? I have been trying to upload a file but get the message "You are not allowed to upload files in this category".
While this is being sorted, if anyone wants this, let me know and I will PM you, or you can also make the changes manually.
File is updated in the post.
Is this true regardless of 'scale user interface'?
Also for the record, look at the attached screenshot => that spot is vacancy both on desktop and mobile, right? What if I'd like to put the button there?
EDIT: OK, I probably found out the answer by myself – Could you confirm?
As far as I am aware, the location where you suggest is available on all resolutions. I have put together a seperate UI.MENU that places an 'Open Shop' icon there but it shouldn't matter for the general player.
For the area you have in your code, it replaced my clock (on PC and the code added at the end of the LEFT_SIDEBAR_BOTTOM section). For me, to get the icon in the vacant location, I just needed to add a negative value in front of 54. So the line looked like:
area 3 -54 73 55
Hope that helps
Gus
Yes, you're right, it should be "-54", that's a typo.
I guess I'll use the left sidebar on mobile so as to avoid overlapping some existing button....
Gus
CreateItem("<string>",<int1>)
where <string> is the item code and <int> is the quantity.
Below is an example to create a Bag of Holding:
C:CreateItem("BAG31")
The UI.MENU for BG2 is in the post above. Just place it in the same spot.
@kamakazcasanova, I haven't played around with the back end of NWNEE so not sure if/how it could be done. Sorry.
Gus
This tweak is now part of EEUITweaks. It's been slightly edited though: now you need to right-click / long press the 'Return to game' button ("GUILS10.BAM", sequence 0) to open/close the Console (in so doing, you don’t need to add additional buttons to the UI).
What do you think?
Thanks
Gus
Gus
You might want to install component ~CLUAConsole for mobile~ from this mod.