Scripting skill advancement

Post » Wed Jul 28, 2010 10:47 am

I'm working on a mod that's dependent on enchanting, armorer, and alchemy skills; and I'd like to be able to give the player a little experience in the relevant skill when they're using my equipment. Is there a script command to give a player, say, 2 points of experience towards their next armorer level, rather than just setting their level? I was thinking that there was a necro mod a while back that did this with conjuration, but I haven't been able to find any references to such a command.

I can probably still make this work in a rather roundabout way with (lots of) custom skillbooks, but it'd be so much cleaner to have a simple command that did this!
User avatar
Teghan Harris
 
Posts: 3370
Joined: Mon Mar 05, 2007 1:31 pm

Post » Wed Jul 28, 2010 10:09 am

I'm not a scripter, but would the command "modskillname, x" work?
User avatar
sas
 
Posts: 3435
Joined: Thu Aug 03, 2006 8:40 am

Post » Wed Jul 28, 2010 9:20 am

Unfortunately, modskill increases the skill level outright. I'm trying to just add a little bit to the experience needed to get to the next level.

I could just track the experience on the scripted equipment separately, and level up the skill when necessary; but that still doesn't get the character their attribute bonuses when they level up. Plus that adds a lot more complexity to the script, rather than just saying "player -> modArmorerProgress 3" or whatever :P
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Wed Jul 28, 2010 2:05 pm

modarmorer 0.02
User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Wed Jul 28, 2010 9:49 pm

Didn't know you could do that... but it also doesn't seem to be connected at all with the progress of the skill. I had a progress of 19 points toward armorer skill level 31 on my character, and keyed in player->modarmorer 0.80. This didn't change the progress bar. I then banged on some damaged equipment, until progress showed up as 22. This should have pushed my character over the level limit, but it didn't seem to have any effect.

It does show a difference on player -> getarmorer; but that command doesn't seem to see changes in progression, only skill level.
User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Wed Jul 28, 2010 9:33 pm

Okay... so it looks like skill progress is something else we're locked out of, so I need a way to add a level to the skill in a way that the leveling system can see. As far as I know, the only other ways to do this are through skillbooks and trainers. Does anybody know if there's a way to reuse a skillbook, or do I need to step through a bunch of one-use skillbooks and force activation by the player? Using a trainer would also be bulky - I could swap the player's money and do some skill manipulation to limit their options, but that seems like it'd be awkward for the player as well.
User avatar
Jodie Bardgett
 
Posts: 3491
Joined: Sat Jul 29, 2006 9:38 pm

Post » Wed Jul 28, 2010 10:43 am

IIRC you can do what you want with one (or both) of the script extenders. I forget whether it's MWSE or MWE. It can't be done with vanilla scripting. The best you can do with vanilla scripting is to use tricks with books/trainers as you suggested. There are already mods that do this e.g. for magic-skill-progression (one's called Magicka-Based-Skill-Progression I think). You might want to look that up if you have trouble getting the book approach working smoothly.

I vaguely remember that there was some issue even with the script-extender approach - perhaps that you could increase the experience of the skill towards the next skill level up to 100%, but not actually get it to rise without some conventional skill use. That might well be nonsense though.
User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am

Post » Wed Jul 28, 2010 11:42 am

I've been avoiding the script extenders, because I'm running Morrowind through Wine and glad it works as well as it does :P But I may end up having to look into that... I did find a mod called magicka based skill progression that uses MWE, were you talking about examples using the extenders?

The skillbooks thing should work; the only annoyance there is that to allow full levelling, I'll need 95 books of possibly 4 skills, since I know of no way to reuse a skillbook. I expect I can autogenerate the script, I just need to define the books :P

I was also looking at temporarily setting the experience gained from repairing armor/weapons high enough to gain a full level of experience, but it doesn't look like we can access that from the scripts, either!
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Wed Jul 28, 2010 9:52 pm

The script extenders do not work at all with Wine. Unless you have Windows, MWE and MWSE will not be an option for you.
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm

Post » Wed Jul 28, 2010 1:41 pm

Yeah, I'm pretty sure that the books method is the only one available (script extenders aside). At least no-one I know of has found a better method, and quite a few have tried. There are a load of settings in GMSTs and elsewhere that'd be hugely useful to have script access to, but there's just no way to get at them.

The mod I was thinking of earlier was probably "Improved Skilled Magicka" (by Piratelord) - it does broadly the same thing as MBSP, but I don't think it uses script extenders. Perhaps there's nothing you don't already know used in it, but it's probably worth a look to be sure. One problem with it that I suppose you'll have as well is that the skill increases won't count towards level gains. That's probably not too big a deal, so long as the player isn't getting most of his skill gains this way.
User avatar
Jynx Anthropic
 
Posts: 3352
Joined: Fri Sep 08, 2006 9:36 pm

Post » Wed Jul 28, 2010 5:49 pm

I figured the extenders wouldn't work in wine - don't they work by accessing the memory of the running Morrowind instance?

I did look at Improved Skilled Magicka, but it looks like he's using modLevel on the skills, and possibly on the character's level. The problem is that I'd like for the player to be able to gain significant levels using this mod, but I really don't want to break the existing leveling system - that's a long way from what this mod was intended to do! I think I'm going to just reward the player with "notes" their character might have taken for each level gain the mod calculates, make them a scroll set to be a skillbook. I may try to do some add/equip/remove tricks later, but I'm losing focus with this whole mess :P Am I correct in assuming that there's no way to reuse a skillbook, so I'll need a seperate one for each level gain I allow?
User avatar
Elisabete Gaspar
 
Posts: 3558
Joined: Thu Aug 31, 2006 1:15 pm

Post » Wed Jul 28, 2010 6:40 am

I think you do need separate books for each increase, but I've never personally tried it, so I'm not 100% sure. The "notes" approach sounds a good idea to me - it's a nice opportunity to add some flavour without needing to mess around with scripting tricks (though I'm pretty sure the add/equip/remove trick can be made to work, if you end up wanting to go that way).
User avatar
Brandon Wilson
 
Posts: 3487
Joined: Sat Oct 13, 2007 1:31 am

Post » Wed Jul 28, 2010 11:01 am

Didn't find a way to reuse a skillbook, but I had forgotten how easy it is to duplicate an object by changing its ID. And I can auto-generate the script for kicking out each book, so as long as I don't hit the character limit, I should be golden!

I'll have to see what people think about having all these notes to keep track of (once read) - if they want to store them in a chest, or leave them strewn about their lab, or sell them for a few extra coins... or if they find it all a hassle that needs removed :P Thanks for the help, everyone!
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am


Return to III - Morrowind