Forged Alliance Forever Forged Alliance Forever Forums 2017-05-21T09:20:04+02:00 /feed.php?f=41&t=14600 2017-05-20T15:34:16+02:00 2017-05-20T15:34:16+02:00 /viewtopic.php?t=14600&p=149272#p149272 <![CDATA[Re: custom hotbuild hotkey]]> unfortunately it also causes a crash in combination with some other mod (probably notify) so i need to fix that

edit: ok now it just crashes... not sure why it worked the first few times when it tested it
edit2: i did use that file cause it was the only file with the SetUserKeyAction function in it that i could find

Statistics: Posted by PhilipJFry — 20 May 2017, 15:34


]]>
2017-05-20T15:18:31+02:00 2017-05-20T15:18:31+02:00 /viewtopic.php?t=14600&p=149270#p149270 <![CDATA[Re: custom hotbuild hotkey]]> and what did it accomplish?

Statistics: Posted by KeyBlue — 20 May 2017, 15:18


]]>
2017-05-21T09:20:04+02:00 2017-05-20T15:11:45+02:00 /viewtopic.php?t=14600&p=149269#p149269 <![CDATA[Re: custom hotbuild hotkey]]> i just put the entire keymapper.lua file into the mod.
edit: deleted the attachement cause keyblue made a working mod

Statistics: Posted by PhilipJFry — 20 May 2017, 15:11


]]>
2017-05-19T17:31:13+02:00 2017-05-19T17:31:13+02:00 /viewtopic.php?t=14600&p=149201#p149201 <![CDATA[Re: custom hotbuild hotkey]]> Apparantly you need to have new keybinds set in your game.prefs since keybinds gets loaded before any mods come into play.
So the game gives an error that it doesn't know what action "Specialkey" is. But it knows what it is when you go into keybinding menu since the mod is loaded then.
To add the key to game.prefs you need to have something like this somewhere in your mod (i've seen it put in gamemain.lua ):
Code:
KeyMapper.SetUserKeyAction('SpecialKey', {action = "UI_Lua import('/lua/keymap/hotbuild.lua').buildAction('PgenNoStorage')", category = 'hotbuilding', order = 1101})

This will add it to your game.prefs and in the next game it'll be work.

2) Looks like hotkey labels can't handle multiple groups containing the same unit. So it just takes whichever comes last in the code.
And tries to get a hotkey for that. But i assume you unbound it and used that key for your new hotbuild group.
So now it tries to show it for the original one but because its not bound it stays empty.

Since you'll probably not want to use the original one anyway, you could try to remove "Pgen" unitkeygroup by setting it to nil.

Statistics: Posted by KeyBlue — 19 May 2017, 17:31


]]>
2017-05-21T09:19:33+02:00 2017-05-19T16:39:07+02:00 /viewtopic.php?t=14600&p=149192#p149192 <![CDATA[custom hotbuild hotkey]]> I have basically 0 coding experience and just took hotbuildex as a template mod and managed to create the key but i have two issues:
1) the key isn't bound at the start of the game and i have to open the keybinding menu to make the game map the key
2) the hotkey label isn't showing for the key

if someone who knows stuff would be so kind to tell me what i have to do to fix these two issues that would be amazing
edit: deleted the file cause it didn't work and keyblue made a working mod

Statistics: Posted by PhilipJFry — 19 May 2017, 16:39


]]>