Dynamic Weather Tool

Discussion in 'Creators Club' started by geloxo, Feb 28, 2021.

  1. doublefine7

    doublefine7 Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    635
    Likes Received:
    1,179
    The problem with this is that somehow the tool fails to open the console and insert the commands to change the weather. I have the same problem since the UE upgrade for TSW 2 that I cannot choose a custom console key for Unreal Unlocker too.
     
  2. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    I can select a custom key fine (I have it set to the # key) and I can open the console fine using this key and I use it for the mod mentioned in another thread to make the nights darker. I have changed the weather.ini file to also use the # key but I still just get the rear wipers constantly turning on when using dynamic weather.
     
  3. doublefine7

    doublefine7 Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    635
    Likes Received:
    1,179
    Yes, I can select a custom key too BUT there is a tab within UUU which says "doesnt allow custom key bindings"
     
  4. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    Ah I thought you meant you couldn’t use UUU at all with a custom key to open the console. That’s why I was saying I could use UUU fine with a custom key for opening the console when using it for anything other than the dynamic weather tool.

    (I use it to open the console and enter the required string to make the night darker when driving at night rather than it being permanent in the .ini file).
     
  5. PegasusLeosRailwayFanatix

    PegasusLeosRailwayFanatix Well-Known Member

    Joined:
    Jul 7, 2020
    Messages:
    1,473
    Likes Received:
    1,010
    yeah i am also experiencing this too. I also use this because of the dynamic weather, but its a problem, especially when you hit something and while in-game your whole window becomes smaller which throws off the experience because now you have to fix it. I hate that when you press a key that is not the same as what you put,its still somehow activate the console command which also cause you to not be able to slow down the train or do anything, it just really kill the whole experience. Also when you activate the dynamic weather the bottom of the screen would glitch and use a small window popping on the bottom, which is really annoyuing. Don't get me wrong, i love this tool, but it's just so annoying, maybe I will wait until there's a fix for it, before coming back to using this tool. So far my experience is not good with this tool. As of right now i will stop using it. :|
     
  6. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    The wippers issue is caused because unreal unlocker did not hook its DLL to game exe file properly. Then when the paste action (ctrl-v) is triggered by my tool to paste all variables into the console the game just sees a V key pressing because the console was not open and that turns on the wippers instead. If DTG just enables a way to inject variables in game natively or via scripting all this mess would not be needed ;)

    To avoid the problem of unreal console not being active you need to execute the unreal unlocker when you are at the game main menu and hook the DLL to game there. You can also do all of this while in the cab but I found that in such case unlocker fails more frequently while hooking and eventually can also produce game crashes. Some releases of the unlocker performed better than others. If you find issues with latest you can also use one of the older versions, as stated by the author in the web page. My tool will work always provided that unreal unlocker is able to activate the console and the console key binding is properly set, because it does not do anything else than opening the console, pasting the variables and closing the console again.

    Also remember that inside my tool directory there´s a weather.ini file. You must place in the variable "KeyConsole" exactly the same key that is mapped into unreal unlocker application to show/hide the console. In my spanish keyboard the default tilde key is indeed " º ", which is the one on top of the TAB key, so maybe that´s also your problem if you are using a non english keyboard layout.

    Cheers
     
    Last edited: Jan 18, 2022
  7. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    Doesn't matter whether I start UUU in the TSW2 menu or in the cab your mod still does nothing other than set the wipers going. The "KeyConsole" variable has been entered as you say to in the weather.ini to be the same key as it is entered in the input.ini file (For me on a UK keyboard this is set to #) and I can use UUU within the game and open the console (using the # key) perfectly fine that is not a problem at all as I use it all the time to make the nights darker within the game (As per this thread..... [guide] How To Make All Tsw 2 Routes Dark At Night | Dovetail Games Forums ). The only thing not working with the UUU console is the dynamic weather app.
     
  8. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    Can you try using the following for the weather.ini file?

    KeyConsole = `

    Just replace that line (paste what I put above). In the past that console key definition produced problems to some users too. This is my default setting and should match with an UK keyboard layout and with the tilde definition for UUU.

    Cheers
     
    Last edited: Jan 20, 2022
  9. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    But I don’t use the tilde key to open the UUU console.

    As I posted previously I have it set to be the # key and this is what I have edited the weather.ini and the input.ini to and it works fine and I can open the UUU console manually for other purposes using the # key the only thing that can’t open the console is the dynamic weather app so do you still want me to change the variable in the weather.ini as you posted above so that it is the incorrect key on my setup?


    ***EDIT***

    Just to add what my weather.ini and game input.ini both look like at present. (Again note I have no problems running UUU and then opening and using the UUU Console manually to enter specific commands I use to change how nights look within the game as I linked to previously).



    This is everything that my weather.ini contains (Copied & pasted from the file to here).....

    [Config]
    RefreshInterval = 30
    GameWinTitle = Train Sim World
    ConsoleAppPath = C:\Program Files (x86)\UUU3021\UuuClient.exe
    KeyConsole = #




    And as per the UUU ReadMe this is everything the TSW2 Input.ini files contains (Copied & pasted from the file to here).....


    [/Script/Engine.InputSettings]
    ConsoleKey=#




    Now as you can see the only difference between the two is that in the UUU Readme they say to enter the text as "ConsoleKey" but in the weather.ini you have said to enter it as "KeyConsole" so the opposite way round? That is the only difference I can see between your instructions and the instructions given by the UUU creators.
     
    Last edited: Jan 20, 2022
  10. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    My ini file is just for the tool so the variables names are not relevant because they are just used by my tool.

    I think I know what may be happening. You don't need to define nor use any input.ini in game for this to work. The injected DLL from unlocker app handles all by itself. So where you need to define the custom keybinding for console is at the app keyboard shortcuts menu (see first post images). That one is the one that has to match with my variable in weather.ini. The approach of using input.ini is a workaround and does not always work, as they describe in the unlocker readme.

    So just remove that content inside input.ini and simply use unlocker. Leave both keys as their default values (you will need KeyConsole = ` in weather.ini as I said). Default console key (tilde) is the one on top of your TAB key.

    If you still want to use a custom key other than the default tilde key (for instance the # you used) then define it in the unlocker app options, not elsewhere, and update my weather.ini in accordance so that both keys match.

    Cheers
     
    Last edited: Jan 20, 2022
  11. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    That alteration to the input.ini is indeed required though as per the readme instructions for UUU itself..... Which is why I use it as I use a key to open the console that is not given as an option by UUU (The # key). ;)

    If I remove that from the input.ini file of TSW2 then I cannot open the console (Which, as per the UUU ReadMe file, is why I have entered it). The question seems to me to be why is the dynamic weather app not taking any notice of the line telling it which key to use to open the console in it's .ini file? As the UUU app itself is using the new key perfectly fine as per the input.ini file.


    This is the section of the UUU ReadMe that I am referring to.......

    "In-game console doesn't open
    ---------------------------------
    If the console doesn't open when pressing ~, but all AOBs are found, please do the following:
    In the UuuClient, go to the Configuration tab. In there you can select the key to open the in-game console.
    By default the key is '~' or 'Tilde'. Please select a key you don't use in-game and which is available on your
    keyboard without using Shift. E.g. if you have a French keyboard (Azerty), you can choose 'Dollar ($)', which means you can
    press the $ key to open the console, which is right above the Enter key on most Azerty keyboards.

    Alternatively, you can choose a US-en keyboard layout, or add a custom key to the ini file of your game, but this might not
    always work:

    Go to:
    c:\users\<your username>\AppData\Local\gamename\Saved\Config\WindowsNoEditor
    open Input.ini

    Add (pay attention to the empty line!):
    [/Script/Engine.InputSettings]
    ConsoleKey=Tilde

    Save and set to readonly. You can also set it to another key, e.g. K."
     
    Last edited: Jan 23, 2022
  12. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    My tool does not need any notice about this custom definition because this is not required. I don´t use it for instance, and I have a non-english keyboard. All you need to do is setting the same key in both sides (unlocker and my tool). If tilde is creating problems just use another key (Numpad 0, Intro, F11, etc).

    But did you try what I suggested? I mean: using the default settings, not using input.ini and opening console with the key on top of your TAB key?

    958ffab28a443140daf5c234de620c74a2d75c9a.png

    Cheers
     
    Last edited: Jan 24, 2022
  13. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    Yes I tried that weeks ago when I first installed UUU and is why I am now using a custom key to open the console. (As per the UUU ReadMe).

    As I keep saying UUU let’s me open the console with my custom key perfectly fine so that is not the issue the issue is that it is only your app that does not open the console even though I have set it to the same key as is set in UUU. (As I have already shown you from the ini files I pasted earlier).
     
  14. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    Ok, if you don't want to use any other key like F11 or something easier to open console then there's nothing else to do other than finding which character is linked to your custom key (we know that # didn't work) and put that character in my weather.ini. My tool does nothing else than sending that as a key pressing to game, so there's not so much I can do about it.

    My suggestion is that you avoid special keys and just take any standard key which is not used in game. Best candidates are the F9 to F12 that I think are not used, but any other key is fine. Put that in the config files (unlocker and my tool) and just forget about the tilde case.

    Cheers
     
    Last edited: Jan 24, 2022
  15. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    But it’s not a special key it is just the standard UK keyboard # key surely if UUU recognises that key and lets me use it to open the console then your app should too?

    I guess I’ll just live without the dynamic weather as the app is obviously unable to work with anything other than the default key to open the console. :(
     
  16. doublefine7

    doublefine7 Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    635
    Likes Received:
    1,179
    The problem I had with this is that UUU didnt got the custom keybinding to work. So I was able to set . as custom key in UUU and the weather.ini, but ingame the UUU still only used Tilde as console opener. So the problem lays on the side of the UUU app not being able to establish custom keybindings in its actual version for TSW 2.
     
  17. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348
    But my issue is the opposite way around..... I can open the console in UUU using my own custom key binding (The # key) but the weather app cannot open the console using this same custom key.
     
  18. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    Don´t get confused by the labels which are physically printed on the keyboard itself because they are just valid for your language and many of them need a combination of Alt or Shift to be reproduced. All you need to use is the key on top of your TAB (see the keyboard pic I posted above) and no other key than that.

    Open an empty txt file in notepad and press that key once. If no character is printed to the notepad then press Space after pressing that key. That will reveal which is the tilde character for your keyboard, whatever the resulting symbol or the language are. Then simply copy and paste that character on my weather.ini.

    I have just changed keyboard in windows to both UK and US layout and using the following in weather.ini the tool works and the console also works:

    KeyConsole = `

    For French keyboard you would need to use the following (a small 2 exponent):

    KeyConsole = ²

    In the french case you have to set the Dollar symbol ($) in unlocker for the console to be recognized. But in the UK and US cases just the standard Tilde is required in unlocker. The same will be valid for any language you want to use. Sorry but I can´t test all possible languages here. I just implemented the method which is supported by the unlocker itself.

    French.jpg

    So, simply use the key on top of TAB in any case to reveal the special character that is used by that language to mimic the tilde key. If I change language back to spanish or any other language after having assigned that variable the tool and the console do not work (as the key binding is incorrect for that language). So the key assigment is working well in both unlocker and in my tool.

    Please remove all content you may have in input.ini, close my tool from the windows tray icon to be sure the tool is not just minimized but closed completely, edit the keyconsole variable in weather.ini, save file and that´s it. If you changed the default key in unlocker remember that you need to restart game and hook unlocker again to game for changes to be applied.

    If you try to use the input.ini method the things won't match so please forget about that, even if this workaround is included in the readme. Unlocker already supports the usage of alternative tilde keys for that purpose (as in the case of the french keyboard).

    Cheers
     
    Last edited: Jan 24, 2022
  19. doublefine7

    doublefine7 Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    635
    Likes Received:
    1,179
    YES I GOT IT TO WORK FOR ME AGAIN.

    So my solution was this: So I cant use the custom keybindings via the UUU (for whatever reasons) so I had to find how I can use the key above TAB which is ^/°. And there geloxo inspired me: First I tried KeyConsole = ^ which obviously didnt work but then I tried KeyConsole= ° and that made it work again. So nice. :D
     
    • Like Like x 1
  20. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,694
    Nice... :D I know it´s an horrible process but unfortunatelly this is the way unlocker works so far.

    Tilde and console are always a pain in many games due to those localization problems with languages and the usage of such exotic key. I updated the first post with some extra information. Hopefully this helps for the future.

    Cheers
     
  21. doublefine7

    doublefine7 Well-Known Member

    Joined:
    Mar 30, 2020
    Messages:
    635
    Likes Received:
    1,179
    You might add the German Keyboard to the information too (ES and GE are the same there but still prevents questions :D )
     
    • Like Like x 1
  22. WaveyDavey

    WaveyDavey Well-Known Member

    Joined:
    Mar 31, 2020
    Messages:
    891
    Likes Received:
    1,348

    I know how keyboard mapping and kayboard layouts work as I've been using keyboards and software with various layouts for the last 35 years....... But I have just tried what you said again....... I deleted everything from input.ini of the game and the weather.ini files.

    The result???? The same as when I originally tried using UUU absolutely nothing when trying to open the UUU console. Nothing happens when pressing the key that you say (The one above TAB). And your weather app also still doesn't open the console so I am left with no console whatsoever rather than a working console for other things I use within the game but no dynamic weather.


    As per my previous posts and as per the UUU ReadMe the only way I can get UUU console to open is to change the required key from the default key above TAB to another key not used by the game (Which for me is the # key and is located directly above the right shift key and directly to the left of the enter key).


    I have reverted back to the edited input.ini file so that I can again use the UUU console to make adjustments to night lighting when required and have removed the dynamic weather app as it is obviously not going to work.
     
    • Like Like x 1
  23. JustRight

    JustRight New Member

    Joined:
    Dec 12, 2016
    Messages:
    6
    Likes Received:
    4
    Hi Geloxo,

    I have been playing with your excellent little tool and it seems to be working well. However every time I click on the 'Send' button TSW2 changes to windowed mode and I have to press ALT+Enter to go back to full screen. Once back in Full Screen mode and with Dynamic Weather running I can see the console command line appear very quickly and the game remains in Full Screen mode. The change to Windowed mode only seems to occur when your weather tool has focus, ie when clicking the Send button.

    Is this possibly something that your weather tools is causing and perhaps can be changed?

    Cheers, and well done!

    *EDIT*
    Ooops, I have just seen earlier posts of others reporting this very issue, and your response that you have not seen it. Very strange as when I ALT-Tab to your Weather tool and make any changes, if I press the 'Send' button, then TSW2 immediately changes to Windowed mode. It is not a deal breaker, just a nuisance.
     
    Last edited: Feb 13, 2022
  24. transport_2

    transport_2 New Member

    Joined:
    Dec 31, 2021
    Messages:
    1
    Likes Received:
    0
    hey im trying to do this dynamic weather setup but every time i attach the processes and get everything set up, clicking the send button on the weather console never sends any command or changes any weather, the key i use for the weather console is `, while UUU has its default key, ~, is it broken or am i missing a step or doing something wrong? Do i have to touch the weather.ini at all or move it anywhere? thanks
     

Share This Page