[X3AP] Maximum number of hotkey expansions?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

edwardecl
Posts: 93
Joined: Mon, 8. Dec 08, 16:06
x3tc

[X3AP] Maximum number of hotkey expansions?

Post by edwardecl »

I'm having a problem with getting Factory Complex Constructor working on X3AP....

I currently have a few mods installed taking up about 11 other hotkey slots

FCC has an additional 21 hotkeys but the problem I'm having is only 16 of them are being added to the controls interface setting...

I have edited the hotkey script for the mod to add the hotkeys one at a time and numbering them so I can see what's going on, then running the script.

adding hotkey 1-17 hotkey 1 is not displayed...
adding hotkey 1-18 hotkey 1 and 17 is not displayed...
adding hotkey 1-19 hotkey 1,17 and 18 is not displayed...
which makes a nice bizarre pattern :/, no other hotkey from any other mod is affected though...

what the hell is going on? is this some new bug added in X3AP?, If I start a new game all the hotkeys are there so it's not a script problem, I don't really know how to fix this in my current game.

I've tried removing hotkeys using another script and it didn't help.

Anyone got any ideas? or Am I out of luck on this one?
User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 »

This happened to me when i tried to install manual trade extention into TC and the only way i could find arouund this problem was starting a new game
edwardecl
Posts: 93
Joined: Mon, 8. Dec 08, 16:06
x3tc

Post by edwardecl »

Well at least I'm not the only one I suppose :(.

I was going to try and add the hotkeys using Cycrow's hotkey manager to see if that made a difference, but I can't work out how it works.

Have no idea how to call a script using the script editor.

Also FCC is one of the mods that I don't seem to be able to find using grax's remove hotkey script.

Perhaps the hotkeys are not registering the proper way.

Anyone know how to list all hotkeys, used or not? I have no idea if some other mod like FCC has left behind hotkeys that you can't find in the hotkey remover or controls that is conflicting somehow (guess).

Some things make me want to headbut the corner of the table sometimes :(
edwardecl
Posts: 93
Joined: Mon, 8. Dec 08, 16:06
x3tc

Post by edwardecl »

Messing about with it more...

If I start a new game, deregister the hotkeys then register them again I only get 13/21 hotkeys come back.

This must be a common problem, someone must know how to fix it? It's not just a problem with FCC it's a problem with all added hotkeys :(,

If I remove them all, save then reload only some of the hotkeys come back not all. But if I look at the hotkey remover by grax the hotkeys show up as being registered when they are not in the controls?!?

I don't remember ever having this problem with TC, but then again I don't think I ever disabled FCC and added it again (there was a problem with it).
h1a2p3p4y5
Posts: 1
Joined: Sun, 6. Apr 08, 12:41

Post by h1a2p3p4y5 »

I have the same problem with AP too. My hotkey list is of limited number (<10).
I tried FCC, only showed up one.
But I believe this is not only FCC problem...
qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie »

i suspect and also read somewhere that the TC way of adding hotkeys doesnt work in X3 AP, now only hotkeys that are going through the Plugin Manager will be regnoniced. The latest stable Plugin Manager supports this but only if its linked to it... i think.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22437
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

qwizzie wrote:i suspect and also read somewhere that the TC way of adding hotkeys doesnt work in X3 AP, now only hotkeys that are going through the Plugin Manager will be regnoniced. The latest stable Plugin Manager supports this but only if its linked to it... i think.
not sure where you heard that, but its not even close to true.

The plugin manager doesn't actually do anything with hotkeys. There is the hotkey manager, but this is just a wrapper for the hotkey system allowing it to auto remove hotkeys for scripts no longer registered

the hotkey system was improved in AP. It no longer allows you to assign multiple hotkeys to the same script. If if the script tries to register the same hotkey multiple times

in X3TC u end up with duplicate hotkeys, in AP it overrights the existing one, so you only ever get the 1 hotkey

the other change is that you can now specify a text page id instead of a string for the hotkey name
Drockt1
Posts: 235
Joined: Fri, 27. May 11, 03:47
x4

Post by Drockt1 »

Im having the same hotkey problem.. my main game only about 4 mod hotkeys show up. If i start a new game i believe i get all my mods hotkeys(its like 13 or 14 hotkeys in a new game). So the mods themselves seemed installed fine(not to mention the mods(like cyrows cheat package work, i can get to them through the command tab on ships, but there is no hotkey setting for it), they just do not show up in my current save game. Heck sometimes one of the hotkeys becomes something else.. it seems to be switching the bonus packs stop firing turret hotkey, that sometimes becomes a hotkey from another mod, randomly on save load.
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

Anyone else with a lot of scripts that add hotkeys have this issue? I just recently added another script with hotkeys and a few of my "hotkeyed" hotkeys were removed and replaced by the new ones. Is this an AP thing or a plugin manager thing?
qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie »

5 users experiencing the same problem should be worth investigating.
If you dont get a reply from one of the more experienced scripters then i suggest you turn to the technical forum and check there if its an AP related bug or not. If not then it looks like only the hotkey manager for AP could be responsible as i suspect you all five are using that....
Coruskane
Posts: 851
Joined: Fri, 13. Jun 08, 13:14
x4

Post by Coruskane »

I just had the same problem too. :(

All of MARS' hotkeys have gone except for launch goblin at target. And a couple of other hotkeys have gone too - except I cannot remember which! I just know something is missing :D

What on earth can I do? I really hope there is a solution to this frustrating and unnecessary problem.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

I've been having problems as well.

They did change things for AP, fixing a few bugs in TC, but seemingly causing some for AP.

I've found that going back to basics with 1 hotkey install for 1 setup script seems to be working.

Apparently, the problem in TC of multiple same hotkey installs, has been fixed, and no hotkey can be installed more than once.

But the missing hotkeys could be linked to multiple games being played. I know I was having major problems doing multiple new games quickly for testing purposes. Only after a computer restart would all hotkeys return to the game.

But as I said, going back to 1 setup with 1 hotkey, seems to have fixed the problem for me.
Egrath
Posts: 2
Joined: Sat, 31. Mar 12, 00:11
x4

Post by Egrath »

While there isn't a hotkey limit per say, 'unregister hotkey' creates an artifical one. Every time its used ( or most times ) it limits the number of possible hotkeys to the current number of hotkeys ... or something like that.
As long as it hasn't been called you can add em at will.

So for instance lets say you start with a fresh install and run this....

Code: Select all


  write to log file #100  append=[FALSE]  value='Values'
  
  $cnt = 0
  while $cnt < 80
    inc $cnt = 
    $key = 'Hotkey' + $cnt
    $name = 'a' + $cnt
    
    write to log file #100  append=[TRUE]  value=$name
    
    $prev = get hotkey index, script name: $name
    $text = 'Previous: ' + $prev
    write to log file #100  append=[TRUE]  value=$text
    
    
    $idx = register hotkey $key to call script name $name
    set global variable: name=$key value=$idx
    
    write to log file #100  append=[TRUE]  value=$idx

  end
  
  return null
You'd end up with 80 hotkeys
Oh, and you'd need 80 dummy scripts too, named a1->a80

If you then ran this a few times .... lets say 10

Code: Select all

  write to log file #100  append=[FALSE]  value='Values'
  
  $cnt = 0
  
  inc $cnt = 
  $key = 'Hotkey' + $cnt
  $name = 'a' + $cnt
  
  write to log file #100  append=[TRUE]  value=$name
  $prev = get hotkey index, script name: $name
  $text = 'Previous: ' + $prev
  write to log file #100  append=[TRUE]  value=$text
  
  $idx = register hotkey $key to call script name $name
  write to log file #100  append=[TRUE]  value=$idx
  unregister hotkey $idx
  
  
  inc $cnt = 
  $key = 'Hotkey' + $cnt
  $name = 'a' + $cnt
  
  write to log file #100  append=[TRUE]  value=$name
  $prev = get hotkey index, script name: $name
  $text = 'Previous: ' + $prev
  write to log file #100  append=[TRUE]  value=$text
  
  $idx = register hotkey $key to call script name $name
  write to log file #100  append=[TRUE]  value=$idx
  unregister hotkey $idx
  
  
  inc $cnt = 
  $key = 'Hotkey' + $cnt
  $name = 'a' + $cnt
  
  write to log file #100  append=[TRUE]  value=$name
  $prev = get hotkey index, script name: $name
  $text = 'Previous: ' + $prev
  write to log file #100  append=[TRUE]  value=$text
  
  $idx = register hotkey $key to call script name $name
  write to log file #100  append=[TRUE]  value=$idx
  unregister hotkey $idx
  
  
  return null

You'd loose some of the original hotkeys every time it was used. Now if you run the first one again you can't get all of the 80 back, cause there's an 'artifical' hotkeylimit in place ( the last ones get overwritten by the next one depending on how many times you ran the second script )

Is it a bug? Id say so. I can't imagine why they'd make the command work as it does on purpose. Ive yet to find way around it in already started games. In new games I guess you could create a bazillion dummy hotkeys before anything else loads or in case you want to add new ones later, it ain't pritty but it should work.
User avatar
apricotslice
Posts: 14163
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice »

The odd thing about this bug, is that a cold start of the computer, then a game start, fixes it.

If you load all hotkeys the first time, its no problem.

I've had a couple added recently that didnt cause a problem. And I added Bounce and had major problems and ended up removing the hotkey completely. Go figure.

Oddly, its forced me to go back to using normal commands. :)

They did fix the setup script problem, so number of setup scripts isnt an issue any more. Although you can still bugger up a game start if you run too many intense things at the same time (like activating bounce on game start, thats a killer !).

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”