Creating new skills

Post » Fri Jun 24, 2011 11:49 am

Although this has probably been asked before, is there a way either through the construction set itself or through crazy jury-rigging to create a new skill, or something that keeps track of a certain value? I wanted to try my hand at creating a mod that simulated the PC's transformation into the new sheogorath over time based on how much time they spent in the isles, eventually gaining new abilities (Like the execution drop) and even a handful of rewards that work outside of the isles. If there's no way to pull off creating a new skill and there's an alternative method to record time spent in the isles after the completion of the main SI quest and give lesser and greater powers based thereupon, I'd like to know. Thanks!
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Fri Jun 24, 2011 9:02 am

You cannot create new skills directly, but it is fairly simple to do what you want with a quest script. Make a new quest and attach a script like this. I've commented it heavily to explain what does what, but you will need to alter it somewhat to suit your particular preferences.

I do hope you go the direction of making this a proper quest rather than just an invisible script, but that's just because I like your idea and hope to see it implemented well.

Spoiler

;This is where you store the player's current skillshort SkillLevel;This is where we'll store the current global variable, Timescaleshort CurrentTimescale;This is where we'll temporarily store how much game time the player has spent in the Islesshort TimeSpentInTheIsles;This is where we'll store the real-time seconds the player spends in the Isles between skill-upsfloat Timer;We need some variables to act as flags so that the benefits;of skilling up are only given out once.short Skill01DoOnceshort Skill02DoOnceBegin GameMode	;We need to record the Timescale,	;which is a global variable the game uses to determine	;how much game time passes for how much real time.	;The default is 1 real day = 30 game days,	;but many players change this value	;via console commands, mods, or the Bashed Patch,	;so we're going to store it in a variable	;Without conditions, this will constantly update,	;which we want, in case it changes.	Set CurrentTimescale to Timescale	;We're going to track time spend in the Isles	;in real-life seconds, because that's the most	;accurate way	If GetPlayerInSEWorld == 1		Set Timer to ( Timer + GetSecondsPassed )	EndIf		;We'll need to convert real seconds to values we can work with	;86400 seconds per day in real life	;So say, for example, you want the player to "skill up"	;after 3 days spend in the Isles	;3 real days is 259000 seconds,	;but we need to divide that by the CurrentTimescale to get a usable value	Set TimeSpentInTheIsles to ( Timer / CurrentTimescale )	;and compare that against what 3 days should be with the CurrentTimescale	If TimeSpentInTheIsles >= ( 259200 / Timescale )		;Now we skill up!		Set SkillLevel to ( SkillLevel + 1 )		;and reset the other variables, so we can start clean		set Timer to 0		set TimeSpendInTheIsles to 0	EndIf	;Here, you can do stuff based on the SkillLevel, so	;I'll just toss in a couple examples as a template.	;You can do this with quest stages instead, if you're making	;a proper quest anyway, and give the player the benefits	;in the stage result scripts without conditions or DoOnce flags.	If SkillLevel == 1 && Skill01DoOnce == 0		Player.AddItem YourRewardItemIDGoesHere 1		Set Skill01DoOnce to 1	EndIf	If SkillLevel == 2 && Skill02DoOnce == 0		Player.AddSpell YourRewardSpellIDGoesHere 1		Set Skill02DoOnce to 1	EndIf	;When the player has attained your desired maximum Skill,	;you can stop this script from running by stopping	;the quest.  This is a good way to conserve system	;resources.	;For the sake of example, let's say you want SkillLevel	;10 to be the max.	If SkillLevel == 10		StopQuest YourQuestIDGoesHere	EndIfEnd



For more ideas and techniques to work out the particulars, check out the http://cs.elderscrolls.com/constwiki/index.php/Category:Scripting_Tutorials and the http://cs.elderscrolls.com/constwiki/index.php/Category:Quest_Tutorials at the CS Wiki.
User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am


Return to IV - Oblivion