|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
0o0o0
Joined: 06 Mar 2011 Posts: 87 on topic

|
Posted: Sat, 23. Jun 12, 05:00 Post subject: Losing Hotkeys |
|
|
Now that I'm a fair way into my game I noticed that my hotkeys for the cheats instant brake and instant accel are missing. A few days later (I probably installed another script somewhere during this time) I'm missing the reload shields hotkey. Anyone know of a simple fix- maybe using the hotkey manager- for this?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
kurush
 
Joined: 07 Nov 2005 Posts: 3853 on topic

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
apricotslice
Joined: 16 May 2004 Posts: 13374 on topic Location: Mapping beyond the Unknown Regions.

|
Posted: Sat, 23. Jun 12, 13:07 Post subject: |
|
|
It happens when you add new hotkeys and somehow they overwrite old ones.
There is no real fix.
If you catch it immediately, you can abort the game, shut down the computer, cold restart the computer, load game, load save from before adding the new hotkey. That should load the new hotkey correctly. Then save again to be sure you keep it.
But if you add a hotkey after already starting the game, it buggers your list up. No fix if you progress to a new save with it wrong.
At this point, Egosoft are aware of it, have put it to the person who can fix it, but nothing so far has been done. Given that it only happens in a modded game (so far), they dont give it any priority.
Scripting wise, I'm now avoiding using hotkeys and going back to commands.
I dont hold any hope of this being fixed in the mid to long term, if ever. Its a case of them fixing a TC bug by breaking something different in AP and until they do a Bonus Pack update that introduces a new hotkey, they wont care about the bug because it wont affect vanilla players until then. If they never update the Bonus pack with a new hotkey, they will never trigger a need to get it fixed.
Btw, its the hotkey manager thats broken. It was completely rewritten at the command level for AP, and they c*cked it up badly. Obviously no one tested it at all before the game was released.
If your lost hotkeys are a game breaker, you may as well start a new game, as thats the only way to get them all back. BUT, do the game start after a cold start of the computer. Even shutting down and restarting doesnt clear the problem, only power off works. First thing you do is check they are all listed, and reassign all of them to the keys you want them on.
_________________ Apricot Mapping Services HQ
CLICK HERE for : X3R/TC Handbook; X3R, TC and AP Guides, Mods, & Scripts; X3R, TC and AP Downloads
Apricot X3 Forum |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19863 on topic Location: London

|
Posted: Sat, 23. Jun 12, 14:09 Post subject: |
|
|
| apricotslice wrote: |
Btw, its the hotkey manager thats broken. It was completely rewritten at the command level for AP, and they c*cked it up badly. Obviously no one tested it at all before the game was released.
|
actually thats incorrect, the hotkey manager and the AP hotkeys are 2 different things.
the problem is actually due to a bug that has existed since X3R but only started showing up due to the better hotkey handling in AP.
if you dont call the unregister hotkey command, you shoudl be able to avoid the problem. It happens because the old system used the amount of registered hotkeys as the next available id.
So if you add 10 hotkeys, the next id will be 11. If you remove a hotkey the next id will then goto 10. But as 10 is already assigned to a hotkey, it just ends up getting overwritten. The problem appeared because in AP it checks if a hotkey is already registered first, if it exists it changes the existing entry instead of simply adding another.
Its not such a major problem that there needs to be a hotfix specifically for it. If theres ever a new patch then a fix can be included then
_________________ My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
apricotslice
Joined: 16 May 2004 Posts: 13374 on topic Location: Mapping beyond the Unknown Regions.

|
Posted: Sat, 23. Jun 12, 14:21 Post subject: |
|
|
@Cycrow
Did you modify the hotkey manager for AP ? If so, whats the link to its download ?
There are no unregister calls in my scripts, only in the hotkey manager add script (that I can find), and I frankly dont understand that code.
So if you didnt update hotkey manager for AP, I'd want to see some code for what needs changing.
I dont like the idea of me changing your code without knowing what I'm doing.
_________________ Apricot Mapping Services HQ
CLICK HERE for : X3R/TC Handbook; X3R, TC and AP Guides, Mods, & Scripts; X3R, TC and AP Downloads
Apricot X3 Forum |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19863 on topic Location: London

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
apricotslice
Joined: 16 May 2004 Posts: 13374 on topic Location: Mapping beyond the Unknown Regions.

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
DrBullwinkle

Joined: 17 Dec 2011 Posts: 3398 on topic Location: Boston, USA

|
Posted: Sat, 23. Jun 12, 15:53 Post subject: |
|
|
| Cycrow wrote: |
| if you add 10 hotkeys, the next id will be 11. If you remove a hotkey the next id will then goto 10. But as 10 is already assigned to a hotkey, it just ends up getting overwritten. |
I stumbled across a workaround a couple of days ago. I did not know why it worked until your explanation. It is a one-minute fix for an already-corrupted saved game:
Create a new hotkey (for the overwritten script) with a new name.
1) Open the setup script in the Script Editor.
2) Change the name of the hotkey (not the script that it calls).
3) Save and reload.
_________________ Peace through superior firepower
Bullwinkle's List | Marine Repairs and Training | Mobile Mining Mk2 | Drone Carrier Software (DCS) | Ship Tricks: Mini-Guides (with Video) |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
kurush
 
Joined: 07 Nov 2005 Posts: 3853 on topic

|
Posted: Sat, 23. Jun 12, 22:31 Post subject: |
|
|
| Cycrow wrote: |
| i've not modified yet, but ill upload a version where it removes the unregistered command completly |
Isn't it already the case due to borked synchronization logic in the purge script? I found lots of orphan hotkeys in the hotkey manager collection when investigating this issue.
One thing I am wondering about: would it be possible to trick the system by registering enough "dummy" hotkeys to make it actually allocate a new one? i.e. create 100 "return null" script files called
my.crappy.script.001.xml through 099.xml and then keep registering them until you get a different hotkey handle number? I was able to make some hotkeys to show up after unregistering some hotkeys I do not use via an ad-hoc script.
_________________
Overtuning assistance in Albion Prelude
Want to run any script or mod without ***modified***? Click here |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19863 on topic Location: London

|
Posted: Sat, 23. Jun 12, 22:35 Post subject: |
|
|
not sure what registering 100's of scripts would achive other than having 100's of extra scripts/hotkey
if you call unregister hotkey on the last added hotkey, then it'll work.
also, unregistered all hotkeys will also fix it as it'll reset the id back to 0 and allow new ones to be added
_________________ My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
kurush
 
Joined: 07 Nov 2005 Posts: 3853 on topic

|
Posted: Sat, 23. Jun 12, 22:39 Post subject: |
|
|
| Cycrow wrote: |
also, unregistered all hotkeys will also fix it as it'll reset the id back to 0 and allow new ones to be added |
Awesome, exactly what we need. It should be fairly easy to write a script that unregisters all hotkeys and resets whatever global variables are used by scripts not using hotkey manager.
_________________
Overtuning assistance in Albion Prelude
Want to run any script or mod without ***modified***? Click here |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19863 on topic Location: London

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
apricotslice
Joined: 16 May 2004 Posts: 13374 on topic Location: Mapping beyond the Unknown Regions.

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Cycrow Moderator (Script&Mod)


Joined: 15 Nov 2004 Posts: 19863 on topic Location: London

|
Posted: Sun, 24. Jun 12, 13:08 Post subject: |
|
|
im only suggesting the fix in a broken game. to you dont have to start a new game to get the hotkeys back
not something u should do every time you load the game.
if you avoid using unregister then it should be avoided.
as i said, it cant be fix without needed a patch, so until theres a patch, the only thing to do is use work arounds
_________________ My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
apricotslice
Joined: 16 May 2004 Posts: 13374 on topic Location: Mapping beyond the Unknown Regions.

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|