Skip to content

[MOD]CLUAConsole Cheats without keyboard (any device).

TheokTheok Member Posts: 2
edited November 2018 in UI Modding
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)
"
}
}


Post edited by Theok on
«1

Comments

  • GusindaGusinda Member Posts: 1,917
    @Theok, thank you for finding a way to bring up the console in Android without it being a hit and miss affair. For info, the BGEE UI.MENU in the .zipped file has an error. There is a extra space in this line

    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
  • TheokTheok Member Posts: 2
    As i told you on the pm, I am extremely glad and excited that you will create a seperate button! I tried the BGEE version with the downloaded ui.menu and it worked fine in both my laptops and in my android phone. But I will upload it again with your fix either way.

    Thank you again for doing this !
  • StummvonBordwehrStummvonBordwehr Member, Mobile Tester Posts: 1,385
    @Gusinda
    Nice work
    Off course I will give it a go. RL is a bit hectic at the moment, but I will get to it.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @Gusinda

    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?
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,758
    No word yet.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018
    @Gusinda

    It seems to work fine on iOS......

    Do you know how to resize the button (e.g., I'd like to make it smaller....)?
    Post edited by _Luke_ on
  • GusindaGusinda Member Posts: 1,917
    @Luke93, that is good to hear...

    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
  • niisandreniisandre Member Posts: 3
    Im on android and I gave this a shot, for some reason it didnt work. All I had to do was to copy and paste the right override folder with the UI.MENU file in it to the game's files right? I dont really see any difference when I open up the game. No new button of sorts at all. There was no override folder that already existed aswell so I didnt do the whole manual thing either.
  • GusindaGusinda Member Posts: 1,917
    Hi @niisandre and welcome to the forum. Correct, that is all you should need to do. What game and version are you looking at?
    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
  • niisandreniisandre Member Posts: 3
    @Gusinda Thank you, but yes that was also my end result. When I opened up the game there was no button or anything, I dont think i've done anything wrong either considering it's just a simple copy and paste. I'll give it a few more tries and i'll let you know how it goes. If you have any other suggestions on how I could possibly make it work it would help a ton, thanks.
  • GusindaGusinda Member Posts: 1,917
    @niisandre, what game and version are you modding?

    Gus
  • niisandreniisandre Member Posts: 3
    edited February 2019
    @Gusinda BGEE1 2.5.17.0

    Edit: Im using a Samsung J7 Pro if it matters.
  • GusindaGusinda Member Posts: 1,917
    @niisandre, give this a go. Updated to v1.2

    Gus
  • GusindaGusinda Member Posts: 1,917
    edited February 2019
    @niisandre, it seems I can't upload any new files at the moment. I will try to send you the update to you via PM and update this thread when I can. Let me know if it works for you.

    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.
    Post edited by Gusinda on
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited June 2019
    Gusinda wrote: »
    If you are on a mobile device and do this, you will lose your "rubber band" feature where can you select multiple characters.

    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?
    --	Add Button to Open-Close Cheats Console => Add this piece of code at the end of the section named 'LEFT_SIDEBAR_BOTTOM'
    button
    {
    area 3 -54 73 55
    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')
    "
    }
    
    Post edited by _Luke_ on
  • GusindaGusinda Member Posts: 1,917
    Hi @Luke93, the losing of the 'rubber band' icon does depend on the scale setting and resolution of the screen. I have no problems on 1920x1200 to add it onto the sidebar.

    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
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @Gusinda

    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....
  • PhycoantoPhycoanto Member Posts: 72
    Ok, its probably my bad luck going into play or this as wrong info or bgee has been updated to prevent this from working, either way, it's not working
  • GusindaGusinda Member Posts: 1,917
    @Phycoanto, attached is the file specifically for BGEE 2.5.17.0. Unpack this into your override folder and see how that goes.

    Gus
    UI.zip 72.5K
  • PhycoantoPhycoanto Member Posts: 72
    Hey all, I've now got the button thing up now comes the questions, how do I create items and teleport from 1 part of the map to the other.?
  • PhycoantoPhycoanto Member Posts: 72
    edited August 2019
    Gus nice, I'm just about to play bg2 thank you
  • kamakazcasanovakamakazcasanova Member Posts: 1
    Thank you soo much this is awesome. Is there any way that you can do this for NWN:EE if you could that would be amazing
  • GusindaGusinda Member Posts: 1,917
    @Phycoanto, without an external keyboard, CTRL-J isn't supported by Android. As far as creating items goes, if you press in the dialogue box in the centre bottom of the screen, the keyboard willl show. It is then just a case of typing in the normal console commands. The syntax is:
    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
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @Gusinda

    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?
  • GusindaGusinda Member Posts: 1,917
    @Luke93, I think that sounds great! Better than taking up precious gaming screen realestate...

    Thanks
    Gus
  • NaberiusNaberius Member Posts: 1
    Hi does it not work for v1.3.2053? i tried a couple of times.
  • GusindaGusinda Member Posts: 1,917
    Hi @Naberius, and welcome to the forum. Sorry I didn't back sooner but as you may have guess, the answer is no, it doesn't work for 1.3. Using Hacker's Keyboard (free from Google Play), I was able to use the console when playing 1.3... Once the console line is added to your baldur.ini, is was either 'Shift-Enter' or CTRL-Enter' from memory. I would have to try it again... You wont get the 'dolled' up version of the console though, it was introduced in 2.x.

    Gus
  • signupforsignupfor Member Posts: 4
    Please help me it won't work in my device i did everything is written can anyone help please
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited June 2021
    signupfor wrote: »
    Please help me it won't work in my device i did everything is written can anyone help please

    You might want to install component ~CLUAConsole for mobile~ from this mod.
Sign In or Register to comment.