Hello everyone,
I'm don't really like cheating in games, but i love spending time building tools to improve things.
Since Fallout 4 is a solo game, and all cheats codes are given, i feel more confident trying to build a trainer that for that game.
I think a understood the basis of AHK scripting, and i'm sure i miss so many features.
Anyway, i'm getting on my way, but still face to some problems.
what i want to do:
A trainer with a GUI, where you select items you want to spawn in your inventory or other stuff.
At start the script should activate the game window, open the console and type all the commands inside.
Hmmm, pretty easy for a first script, the wiki and forums are here, and i found nearly all i needed for my acheivment.
But, first problem : i can't open the console with AHK.
Nevermind, my workaround : i open a Msgbox and write the instruction inside : " In game, press ~ to open console, then F12 to send the instructions".
It's ok, i open manually the console, press F12, but now second problem, only a part of my text send from the script is present.
I tried the script in the notepad instead of the game and there, all is ok, the text is full written.
I'm pretty sure there is a workaround for that too, i tried to search the forums but without succes.
If you need my code i can paste it here, but since this is working in the notepad i don't really understand where is my mistake.
It look likes the game delete a random number of characters befrore whriting it in console.
Any help is welcome.
(Fallout4) need some help GUI / console / Send
Re: (Fallout4) need some help GUI / console / Send
Try:
Open the console
Wait for the game to finish opening the console [ Sleep-command ]
Send instructions
I hope that gets you startet.
Open the console
Wait for the game to finish opening the console [ Sleep-command ]
Send instructions
I hope that gets you startet.
Last edited by wolf_II on 19 Nov 2015, 06:58, edited 1 time in total.
Re: (Fallout4) need some help GUI / console / Send
No, it still doesn't work.
When i try
it works !
but if i add another full sentence, the game still delete some characters at the en
so i think it's a problem of Send mode, or Keydelays, something like that - not really sure of the terms
When i try
Code: Select all
F12::
{
Send, t
Sleep, 100
Send, e
Sleep, 100
Send, s
Sleep, 100
Send, t
Sleep, 100
Send, {SPACE}
Sleep, 100
Send, o
Sleep, 100
Send, n
Sleep, 100
Send, e
Sleep, 100
Send {ENTER}
}
but if i add another full sentence, the game still delete some characters at the en
Code: Select all
F12::
{
Send, o
Sleep, 100
Send, n
Sleep, 100
Send, e
Sleep, 100
Send {SPACE}
Sleep, 100
Send, last test ;line added that the game delete patially
}
Re: (Fallout4) need some help GUI / console / Send
This is very interesting, letters get deleted at the end of the string ... I don't know any tips for that scenario, sorry.
Re: (Fallout4) need some help GUI / console / Send
It might be that you are sending the keys too fast, you might want to check out:
https://autohotkey.com/docs/commands/SetKeyDelay.htm
EDIT yes, end of the string seems a bit odd I assumed that it was because he sent it as a single send command with no delays.
https://autohotkey.com/docs/commands/SetKeyDelay.htm
Code: Select all
F12::
setkeydelay, 100
Send, last test
setkeydelay, 0
return
Re: (Fallout4) need some help GUI / console / Send
I thought you were my savior, but i'm affraid to announce you that it doesn't work.
Still some characters at the start (and not the end) are deleted.
the result is "t test" .
For a simple code who should looks like :
F12 ::
Send player.additem 0001F66B 1000; (or something like this cause there are specials caracters in it)
i have to write
Funny :/ I'm the workaround guy ^^ but it will take ages to write
Still some characters at the start (and not the end) are deleted.
the result is "t test" .
For a simple code who should looks like :
F12 ::
Send player.additem 0001F66B 1000; (or something like this cause there are specials caracters in it)
i have to write
Code: Select all
F12::
{
Sleep, 50
Send,p
Sleep, 50
Send, l
Sleep, 50
Send, a
Sleep, 50
Send, y
Sleep, 50
Send, e
Sleep, 50
Send, r
Sleep, 50
Send, .
Sleep, 50
Send, a
Sleep, 50
Send, d
Sleep, 50
Send, d
Sleep, 50
Send, i
Sleep, 50
Send, t
Sleep, 50
Send,e
Sleep, 50
Send, m
Sleep, 50
Send, {SPACE}
Sleep, 50
Send, 0
Sleep, 50
Send, 0
Sleep, 50
Send, 0
Sleep, 50
Send, 1
Sleep, 50
Send, F
Sleep, 50
Send, 6
Sleep, 50
Send, 6
Sleep, 50
Send, B
Sleep, 50
Send, {SPACE}
Sleep, 50
Send, 1
Sleep, 50
Send, 0
Sleep, 50
Send, 0
Sleep, 50
Send, 0
Sleep, 50
Send, {;}
Sleep, 50
Send, {ENTER}
}
Re: (Fallout4) need some help GUI / console / Send
You can use functions to shorten that a bit, especially when you start adding more additions.
You also might want to test out adding a delay to hold the key down for a bit, the game may be missing some of the really fast inputs.
anyway, look at the PM I sent you, you might find some help in the examples.
You also might want to test out adding a delay to hold the key down for a bit, the game may be missing some of the really fast inputs.
anyway, look at the PM I sent you, you might find some help in the examples.
Re: (Fallout4) need some help GUI / console / Send
Thanks a lot for this PM Grant, i'm checking it - some interesting stuff to save me some time
This post to say that when i open the window with Script lines most recently executed, the script is waiting after:
----edit :
first step OK thanks to Grant for his tip. The script finally open the console. I had to delete the WinWaitActive command and change the code to
I think this tip can help me for my second problem.
So... next step
Later
This post to say that when i open the window with Script lines most recently executed, the script is waiting after:
The game windows lloks like not activated but pop up on my screen. Weird. And the hotkeys in the next part of the script are working well.045: WinActivate,Fallout4 ahk_class Fallout4 ahk_exe Fallout4.exe (0.25)
047: WinWaitActive (24.26)
I play in windowed mode like i saw in some threads, execute the script with admin privileges, script is in UTF8, i modified the name with a dummy one, and i try after compiled it too......
...
...
117: Send,0
118: Sleep,50 (0.05)
119: Send,{;}
120: Sleep,50 (0.05)
122: }
123: Return (4.04)
047: STILL WAITING (586.95): WinWaitActive
----edit :
first step OK thanks to Grant for his tip. The script finally open the console. I had to delete the WinWaitActive command and change the code to
Code: Select all
WinActivate, Fallout4 ahk_class Fallout4 ahk_exe Fallout4.exe
;Run Notepad ;for tests
;WinWaitActive ; line deleted!!
sleep, 500
Send {ù down}
sleep, 20
Send {ù up}
sleep, 50
So... next step
Later
Re: (Fallout4) need some help GUI / console / Send
The setkeydelay command you are looking for is probably SetKeyDelay, 0, 50
The most common problem with games is that they need the key to be *held* for a certain amount of time, and that is the 2nd parameter in SetKeyDelay, not the first.
The most common problem with games is that they need the key to be *held* for a certain amount of time, and that is the 2nd parameter in SetKeyDelay, not the first.
Re: (Fallout4) need some help GUI / console / Send
Thank you ! (not so) evilC. I will check that when my headache will stop and maybe update that in the next version^^
When the full version will be ok, i will upload the full ahk script in the appropriate section of this board if needed.
If some of you have this game and want to try the trainer, you can download it there http://www.nexusmods.com/fallout4/mods/1554/?
When the full version will be ok, i will upload the full ahk script in the appropriate section of this board if needed.
If some of you have this game and want to try the trainer, you can download it there http://www.nexusmods.com/fallout4/mods/1554/?
Re: (Fallout4) need some help GUI / console / Send
Here is a simple AutoHotKey script to send the "tcl" (enables flying) console command real quickly
Remember to always call BlockInput before or after immitating the console in case the AHK macro is running WHILE the user is pressing a key...
Remember to always call BlockInput before or after immitating the console in case the AHK macro is running WHILE the user is pressing a key...
Code: Select all
Process,Priority,,High
NumpadAdd::
BlockInput On
SetKeyDelay,100
Send,{Blind}{`` DownTemp}
Send,{Blind}{`` Up}
SetKeyDelay,-1
Send,{Blind}tcl ; this is the console command
SetKeyDelay,100
Send,{Blind}{Enter DownTemp}
Send,{Blind}{Enter Up}
SetKeyDelay,100
Send,{Blind}{`` DownTemp}
Send,{Blind}{`` Up}
BlockInput Off
return
Re: (Fallout4) need some help GUI / console / Send
Oh! and ALWAYS run AutoHotKey Scripts as Administrator
Re: (Fallout4) need some help GUI / console / Send
If you need a script to run as admin, use RunAsTask
That way, the script will auto-elevate, and you do not need to accept the UAC prompt each time.
That way, the script will auto-elevate, and you do not need to accept the UAC prompt each time.
Who is online
Users browsing this forum: jameswrightesq and 143 guests