Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Mar 29, 2024 2:26 am
All times are UTC + 0
How to use the new mod hotkeys
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Kushan
Vehicle Driver


Joined: 02 Sep 2007

PostPosted: Sat Sep 19, 2020 1:21 pm    Post subject:  How to use the new mod hotkeys Reply with quote  Mark this post and the followings unread

Yo,

I just spent an hour trying to figure this out and there doesn't seem to be much info on it, so I figured I'd write something down to make it useful to others.

In the latest/last patch, mods now get access to 4 hotkeys.

In the source code, these are defined in DLLInterface.h as
Code:
INPUT_REQUEST_MOD_GAME_COMMAND_1_AT_POSITION
,
Code:
INPUT_REQUEST_MOD_GAME_COMMAND_2_AT_POSITION
,
Code:
INPUT_REQUEST_MOD_GAME_COMMAND_3_AT_POSITION
and
Code:
INPUT_REQUEST_MOD_GAME_COMMAND_4_AT_POSITION
. You can Ctrl+F to find them.

However, you also need to enable them within the game. To do this you need to add a
Code:
GAMECONSTANTS_Mod.XML
file to your mod's DATA/XML folder. The contents of this file need to contain
Code:
<CNCEnableModHotKeyGameCommands network="client"> True </CNCEnableModHotKeyGameCommands>


Here's the entirity of the file, you can just copy/paste this if it's easier:

Code:
<?xml version="1.0"?>
<GameConstants>
   <GameConstantsClass>
      <!-- MBL 09.08.2020: Community-requested Mod option so that players can have customized mod hotkey commands -->
      <!-- If True, also need to set GAME_COMMAND_CNC_MOD_COMMAND_1 -> GAME_COMMAND_CNC_MOD_COMMAND_4 entries in InputTranslatorConfigurations.xml -->
      <CNCEnableModHotKeyGameCommands network="client"> True </CNCEnableModHotKeyGameCommands> <!-- Default is always False -->
</GameConstantsClass>
</GameConstants>


It's worth notinbg that I don't think you have to set the entries in InputTranslatorConfigurations.xml if you just want to bind some commands in the bindings screen, they'll be sent through as INPUT_REQUEST_MOD_GAME_COMMAND_x_AT_POSITION.

Doing this enables them in the bindings screen:



I haven't figured out if there's a way to rename them from Mod Command x to something more specific.

That's about it really.



20200919140858_1.jpg
 Description:
Bindings in game
 Filesize:  331.57 KB
 Viewed:  1827 Time(s)

20200919140858_1.jpg



Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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 can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1563s ][ Queries: 14 (0.0103s) ][ Debug on ]