Console Command Questions

Discuss modding questions and implementation details.
Post Reply
l3lessed
Posts: 248
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Console Command Questions

Post by l3lessed » Fri Mar 20, 2020 10:37 pm

I'm working on Combat overhaul, and one of the things slowing me down is having to change a script value, save the script, and relaunch the game.

Is there a built in console command to change player attack speed or attribute tied to it?

Also, is there a way to make a public variable changeable via console? I have public vars for the animation system within the fpsweapon script, and it would speed up work on it if I could change the values via console command and not have to relaunch the game every time I need to.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
pango
Posts: 2164
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Console Command Questions

Post by pango » Fri Mar 20, 2020 10:54 pm

Hi,
l3lessed wrote:
Fri Mar 20, 2020 10:37 pm
is there a way to make a public variable changeable via console? I have public vars for the animation system within the fpsweapon script, and it would speed up work on it if I could change the values via console command and not have to relaunch the game every time I need to.
What you could do is have your mod register new commands; If you look at say Real Grass as an example:
https://github.com/TheLacus/realgrass-d ... ommands.cs
... called from the Start() method of the module: https://github.com/TheLacus/realgrass-d ... ss.cs#L123

With that you can change variables, or trigger just about anything really...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

l3lessed
Posts: 248
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Console Command Questions

Post by l3lessed » Fri Mar 20, 2020 10:57 pm

Thank you for pointing me in the right direction. I figured there was a method.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 248
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Console Command Questions

Post by l3lessed » Sat Mar 21, 2020 3:14 am

Thanks so much. Took me a little but I got the object code setup. I setup a console command script file specifically for the FPSWeapon script, dropped the new console commands script under the same engine namespace, and then connected the console command vars to the FPSWeapon script vars. Also was able to put in a nice trigger to turn on default animations or improved animations.

This should help with further development and debugging.
My Skyrim Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

Post Reply