Jump to content

Define new "action=_____"


Recommended Posts

I took one c++ course in college and that was a while ago, so my code understanding is minimal. I'm very interested in learning about modding, so I've read the tutorials, watched gopher's video and downloaded a bunch of mods to pick at their inner workings.

 

One thing I'm having a heck of a time finding, is how to define an "action". For example, W3EE has a nightsight action that is bound to a hotkey, which I think decreases saturation and increases brightness. I've found the mapping in input.xml, and the add to input.settings, but where can I find the actual code that tells the game to adjust the color settings?

 

If I want to create a new "action" like the other mods that reset random encounter seeds or auto loot, where can I look at the logic?

Edited by ArchieFromSyracuse
Link to comment
Share on other sites

Check Quick Load mod code for example :smile:
http://www.nexusmods.com/witcher3/mods/332/

 

You have to add key press event listener and then implement corresponding event.

 

So that mods register new listener in playerInput.ws (which is a common place for adding new hotkeys):

theInput.RegisterListener( this, 'OnQuickLoad', 'QuickLoad' );

for QuickLoad hotkey mapped via input.settings and implements quick load feature in OnQuickLoad event.

 

 

As for EE, it dynamicaly registers Nightsight listener in playerWitcher.ws (its useful if you don't want to clutter up playerInput.ws with all your new stuff) and implements OnToggleNightsight event with that feature.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...