Conditional Scripts and Threading

Post » Tue Jun 19, 2012 7:51 pm

Anyone have any idea what impact making a script conditional has on threading? I've got a script that runs the main body of my mod. It has some variables that I'd like to make conditional, so that active magic effects can refer to them when deciding whether or not to be active. Would this slow down my mod's execution horribly, or do the effect condition checks not lock up your script since they're read only? Anyway, I'm expecting this to drop off the bottom of the subforum without a comment like most of my questions do...
User avatar
Laura Hicks
 
Posts: 3395
Joined: Wed Jun 06, 2007 9:21 am

Post » Tue Jun 19, 2012 3:31 pm

I don't know much on how Skyrim threads scripts but I figure my reply is better than no replies :)

My thoughts on performance impact on scripting in Skyrim is that compared to all the graphical processing, the processing caused by scripts is surely irrelevant?
Skyrim doesn't have that many scripts in it to begin with, and you adding a few more wouldn't impact things I reckon.

What I'm trying to say is that the whole Papyrus scripting part of Skyrim isn't that complex and probably won't slow down the game much. It's much more likely that the game will slow down due to something graphics related (a weapon with 50000 polygons for instance).
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Wed Jun 20, 2012 1:05 am

Well I'm at least the 16th to view this thread, and probably the 16th to think, "Good Q, but I've no idea either".

They may just be like a reverse of the 'hidden' flag. ie. just there as an indicator to the CK to list them in a dropdown box.
That theory is based on nothing more than the note that you're not allowed to add 2 scripts marked as conditional to an object.
That's my hunch (or hope) anyway.

Guess: Probably the worst that would happen is that it also marks the related object as persistent.
I'm guessing this is a quest script though, there'd be zero effect there. We can do that via script on any property now as it is.
We can even set the values, and there's no slowdown as no automatic locks are performed.

Theories aside, I liked how we had good facts to back up the theories in prior games.
The threading throws a spanner in the works to get any definitive answer from user made speed tests.
There's always that unknown variable.

BUT...
I did notice that there are undocumented Profiling functions in Debug.psc .
Would be good to know if they are included in the game version, and how to turn them on if so.

Edit: re quests. I'm still thinking of the fnv engine. Now that they need to be in a property to refer to in a script, the engine can clear them from memory.
User avatar
Brian LeHury
 
Posts: 3416
Joined: Tue May 22, 2007 6:54 am

Post » Tue Jun 19, 2012 6:42 pm

The conditional flag just informs the CK and game which script to use when looking for conditional variables, it shouldn’t have any effect on threading.

The profiling functions should still be available and http://www.creationkit.com/Debug_Script (like http://www.creationkit.com/StartStackProfiling_-_Debug), just make sure you turn on profiling in the http://www.creationkit.com/INI_Settings_%28Papyrus%29#bEnableProfiling, and you’ll probably want to make some sort of tool to anolyze the results (as they aren’t exactly the easiest to read by hand).
User avatar
Lance Vannortwick
 
Posts: 3479
Joined: Thu Sep 27, 2007 5:30 pm

Post » Tue Jun 19, 2012 1:53 pm

Thanks SmkViper, indeed the profiling functions are there lol.

It's the memory budget functions in Debug that aren't on the wiki.
I did wonder what the budgets were, but the INI page you linked sheds more light on those.
User avatar
Ash
 
Posts: 3392
Joined: Tue Jun 13, 2006 8:59 am

Post » Tue Jun 19, 2012 2:22 pm

Interesting, thank you very much for the response. Sounds like I'll be able to add this in, which should make my mod a lot more user friendly.
User avatar
claire ley
 
Posts: 3454
Joined: Fri Aug 04, 2006 7:48 pm


Return to V - Skyrim