h38fh2mf Posted May 25, 2015 Share Posted May 25, 2015 View File 1. Description2. Requirements3. Installing4. Uninstalling5. Compatibility & issues6. How to use7. FAQ8. Changelog 1. Description A modder resource that implements few papyrus functions related to console. You can execute console commands, change selected reference and some other things. 2. Requirements SKSE 1.7.1 or higher: http://skse.silverlock.org/ 3. Installing Exctract Data folder over your Skyrim Data folder or use a mod manager to install. 4. Uninstalling Remove files you added when installing or use a mod manager. Any mod that requires this mod will not work properly (at least the console parts). 5. Compatibility & issues Don't think there are any. 6. How to use Once installed, open Data/Scripts/Source/ConsoleUtil.psc. You will see which commands are available and how to use. Examples: Change field of view to 90. ConsoleUtil.ExecuteCommand("fov 90") Open actorRef inventory to allow taking items. ConsoleUtil.SetSelectedReference(actorRef)ConsoleUtil.ExecuteCommand("openactorcontainer 1") Print message to console. ConsoleUtil.PrintMessage("Hello") Check installed version of mod. int version = ConsoleUtil.GetVersion()if(version == 0); not installedendif 7. FAQ Why make this?Some commands were not available from papyrus but are from console. Can I include this with my mod?I would rather you didn't, if there's an update and multiple mods include this then the versioning becomes confusing and would cause problems. Include link here as requirement or write your mod with optional support ConsoleUtil.GetVersion will return 0 if mod isn't installed. I screwed up my gameConsole commands are powerful and can cause a lot of problems if misused. Make sure you (or mod author) knows what they are doing. It doesn't workCreate a text file in Skyrim's directory called "ConsolePlugin.txt", start Skyrim and get to the part where it doesn't work, then open the file and see if any errors were written. If no errors then your script is incorrect or plugin wasn't loaded in SKSE. 8. Changelog 3 - 14/10/2015 Added a command to read last line that was written to console. Fixed bug where sometimes SetSelectedReference would not work immediately. Thanks to Kerberus14 for that. 2 - 26/05/2015 Fixed bug that would crash game if printing message longer than 1024 characters. Fixed bug where printing from multiple threads may cause weirdness. Fixed bug where printing % symbol could cause weirdness. 1 - 25/05/2015Initial release Submitter h38fh2mf Submitted 05/25/2015 Category Modders Resources Requires SKSE Special Edition Compatible 2 Link to comment
Groovtama Posted May 25, 2015 Share Posted May 25, 2015 Sounds way better than using notfications. Link to comment
DeepBlueFrog Posted May 25, 2015 Share Posted May 25, 2015 Thanks for creating this! The future bimbos of Hormones will thank you Link to comment
zaira Posted May 25, 2015 Share Posted May 25, 2015 Sounds nice - but I still don't find a reason to use this. Which useful commands are not available via SKSE / Papyrus? Any examples? The container of references are completely accessible in Papyrus. Link to comment
DeepBlueFrog Posted May 25, 2015 Share Posted May 25, 2015 Sounds nice - but I still don't find a reason to use this. Which useful commands are not available via SKSE / Papyrus? Any examples? The container of references are completely accessible in Papyrus. sexchange is not available from Papyrus. I am happy to see consoleUtil to unlock that roadblock for gender change content in Hormones. And from the example, can you change fov from papyrus? I am sure there are others. Link to comment
zaira Posted May 25, 2015 Share Posted May 25, 2015 Those are - well lets say - very special use cases. Link to comment
DeepBlueFrog Posted May 25, 2015 Share Posted May 25, 2015 Those are - well lets say - very special use cases. SKSE already covers most functions. It would make sense that this kind of tool would be useful for only fringe cases not covered by SKSE Link to comment
Groovtama Posted May 25, 2015 Share Posted May 25, 2015 PrintMessages sometimes loses the last letter in a String or puts a string between the end of the last making a one free line with just a linefeed and the line before with the 2 strings. Instead of: "SomeString1\n SomeString2\n" it does: "SomeString1SomeString2\n \n" I don't see a pattern it also only happens when a lot of stuff runs, loading a new game for example. The console print is a lot better than spaming the notification tab full with Init this and Execute that messages. Link to comment
h38fh2mf Posted May 25, 2015 Author Share Posted May 25, 2015 Did you enter: ConsoleUtil.PrintMessage("SomeString1") ConsoleUtil.PrintMessage("SomeString2") or ConsoleUtil.PrintMessage("SomeString1\nSomeString2\n") ? Link to comment
Ashal Posted May 25, 2015 Share Posted May 25, 2015 Did you enter: ConsoleUtil.PrintMessage("SomeString1") ConsoleUtil.PrintMessage("SomeString2") or ConsoleUtil.PrintMessage("SomeString1\nSomeString2\n") ? Not sure if you've ended up rolling this in or not, but a major related bug I ended up fixing in PapyrusUtil's PrintConsole function; if the string is over 1024 characters than printing it to console crashes the game. void PrintConsole(StaticFunctionTag* base, BSFixedString text) { if (!text.data) return; else if (strlen(text.data) < 1024) Console_Print(text.data); else { // Large strings printed to console crash the game - truncate it std::string msg = text.data; msg.resize(1020); msg.append("..."); Console_Print(msg.c_str()); } } Link to comment
h38fh2mf Posted May 25, 2015 Author Share Posted May 25, 2015 Ok thanks I'll make the same correction. Also forgot to mention that % symbol in string may cause weirdness or crash because of vsprintf is done by game. Link to comment
Groovtama Posted May 25, 2015 Share Posted May 25, 2015 Did you enter: ConsoleUtil.PrintMessage("SomeString1") ConsoleUtil.PrintMessage("SomeString2") or ConsoleUtil.PrintMessage("SomeString1\nSomeString2\n") ? The 1 and 2 are just for visualization. I call one function from two or more scripts (nearly at the same time) with this in it ConsoleUtil.PrintMessage("SomeString") And I get most of the time SomeString SomeString SomeString in the console as it should be But sometimes (really really rare) I get SomeStringSomeString SomeString Also really really rare SomeString SomeStrin SomeString I call always the same function Link to comment
h38fh2mf Posted May 25, 2015 Author Share Posted May 25, 2015 Ok now I understand and I will fix it soon, probably not today but it's easy fix. Also that string 1024 length helps a lot, now I understand ConsoleManager structure Also I'll fix the % symbol. Link to comment
Heromaster Posted May 26, 2015 Share Posted May 26, 2015 Very useful little tool. Now we can do more advanced features which were hardly possible before, thank you. Link to comment
DeepBlueFrog Posted May 31, 2015 Share Posted May 31, 2015 I have a potential regression to report. Since I updated to the last version, calling SexChange from the console using this tool is not working anymore. Did anything change that would break it? I am using: ConsoleUtil.ExecuteCommand("sexchange") Link to comment
h38fh2mf Posted May 31, 2015 Author Share Posted May 31, 2015 No I don't think so, only print message stuff changed. Try 2 things: 1. Create new file called ConsolePlugin.txt in Skyrim folder (TESV.exe), go in game, command don't work, then check the text file. 2. Try if previous version works. Link to comment
DeepBlueFrog Posted May 31, 2015 Share Posted May 31, 2015 Ok. I tried it. 1. Creating a new ConsolePlugin.txt file in the top folder didn't go anywhere. The file remains empty. 2. Installing version 1 of the plugin made the command work again in my script, so something seems to be up with version 2. Link to comment
h38fh2mf Posted May 31, 2015 Author Share Posted May 31, 2015 Ok and you know that sexchange is targeted command, so you used SetSelectedRef or player.sexchange? Link to comment
DeepBlueFrog Posted May 31, 2015 Share Posted May 31, 2015 Ok and you know that sexchange is targeted command, so you used SetSelectedRef or player.sexchange? No.. I didn't. It was working fine without target in version 1. I will try it targeted with version 2. Edit: That was it.. thanks. Version 2 works fine after I added the target. Link to comment
darkconsole Posted August 15, 2015 Share Posted August 15, 2015 rather than throw an error about undefined ConsoleUtil.GetVersion() when it is not installed, i would like to SKSE.GetPluginVersion() instead - the thing is i need to know what you named it internally, as that doesn't have to match the dll file. ConsolePlugin? ConsolePlugin2? ConsoleUtil? etc etc. the SKSE Plugin Name. Link to comment
h38fh2mf Posted August 15, 2015 Author Share Posted August 15, 2015 info->name = "console plugin"; info->version = 1; Link to comment
darkconsole Posted August 15, 2015 Share Posted August 15, 2015 cheers. unfortunately, im not sure ill be able to stick with this anyway. i was using it to execute `fov` but for some reason when fov is executed from consoleutil sometimes the screen ends up stretched weird, even though it never happens when i manually fov from the console. the stretch corrects itself when opening the character menus. Link to comment
h38fh2mf Posted August 15, 2015 Author Share Posted August 15, 2015 I think changing FOV relies on menu being open, I had the same problem with earlier versions of IFPV and had to hack some kind of weird update to get it working properly. You can achieve the same thing without using console util if all you want to do is change FOV: Utility.SetINIFloat("fDefaultWorldFOV:Display", 80) Also requires menu to open / close before changes. Link to comment
darkconsole Posted August 15, 2015 Share Posted August 15, 2015 yeah i already tried that, i had found it in the "customizable camera" mod - the problem is i am trying to change the fov when engaging the uiextensions wheel menu, which does not trigger the required update for the fov. i got the position working so the character appears off to the side of the wheel, but not the fov for zooming sadly. i wonder if there is anything expired can do in skse to provide an fov kicker. Link to comment
Slagblah Posted May 8, 2016 Share Posted May 8, 2016 I have a script that's trying to use this mod, but it's not working. I created the ConsolePlugin.txt file and after running, it reported the following errors: 07 May 14:14:50 Console initialize timed out. 07 May 14:16:10 Failed to get console pointer! Any idea what's causing these and/or how to fix it? Thanks. Update: Apparently this only happens sometimes. It does load correctly occasionally, and when it does the script in question works. Link to comment
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