ant7735 Posted March 3 Share Posted March 3 Looking through consolescreen.lua, you can find things like: self.console_edit:EnableWordPrediction({width = 1000, mode=Profile:GetConsoleAutocompleteMode()}) self.console_edit:AddWordPredictionDictionary({words = prefab_names, delim = '"', postfix='"', skip_pre_delim_check=true}) self.console_edit:AddWordPredictionDictionary({words = prefab_names, delim = "'", postfix="'", skip_pre_delim_check=true}) In modmain, how would I be able to create a custom console command, and then add it to the Dictionary ? Link to comment Share on other sites More sharing options...
_zwb Posted March 4 Share Posted March 4 13 hours ago, ant7735 said: In modmain, how would I be able to create a custom console command, and then add it to the Dictionary ? You just need to define a global function starting with "c_", it will be imported automatically. You can set your environment to global by calling GLOBAL.setfenv(1, GLOBAL) at the start of modmain. Link to comment Share on other sites More sharing options...
ant7735 Posted March 14 Author Share Posted March 14 Does it have to start with "c_" ? Link to comment Share on other sites More sharing options...
The Starver Posted March 14 Share Posted March 14 31 minutes ago, ant7735 said: Does it have to start with "c_" ? I think so, since "c_" (If I'm right) means a call to "console" (or something like that). Link to comment Share on other sites More sharing options...
ant7735 Posted March 14 Author Share Posted March 14 48 minutes ago, The Starver said: I think so, since "c_" (If I'm right) means a call to "console" (or something like that). Thanks Link to comment Share on other sites More sharing options...
The Starver Posted March 14 Share Posted March 14 (edited) 47 minutes ago, ant7735 said: Thanks I'm not entirely sure, since I'm not a developer or an expert modder. Definitely get a second opinion to check first. Edited March 14 by The Starver Link to comment Share on other sites More sharing options...
ant7735 Posted March 14 Author Share Posted March 14 1 hour ago, The Starver said: I'm not entirely sure, since I'm not a developer or an expert modder. Definitely get a second opinion to check first. Yep, after a bit of messing around the only other thing that 'cloud' work, is d_, It seems d_ and c_ are the only scanned prefixes inside of the consolecommandscreen.lua. 1 Link to comment Share on other sites More sharing options...
_zwb Posted March 15 Share Posted March 15 15 hours ago, ant7735 said: Does it have to start with "c_" ? Yes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now