Experience points

Post » Fri Feb 11, 2011 12:46 pm

[quote name='NMZmaster' date='07 October 2010 - 04:08 PM' timestamp='1286482117' post='16458831']
Wouldn't you need to define a separate script for each actor in that case, though? Targeted global scripts can only be attached to one reference at a time. And while you could conceivably come up with a local script equivalent so that a copy could be attached to each actor in the CS manually, it would preclude attachment to those actors who already have scripts.
[quote name='NMZmaster' date='07 October 2010 - 04:21 PM' timestamp='1286482879' post='16458873']
Just to clarify, it isn't all scripts that have such limitation. A local script can be attached to as many references in the CS as you want. But if you have a global targeted script, it can only be running on one reference at a time.
[/quote]

Mm... not sure. I could've sworn I've used ref->StartScript with the same script more than once and had it work, but I'd have to check, it's been a while since I played with that.

[quote]Not to mention, anything added by another mod would be an "incompatibility" which wouldn't provide experience points. The MWSE cycling script wouldn't necessarily be efficient, but it would be plausible.
[/quote]
No it wouldn't? By starting the script on references when they are first encountered (a single MWSE cycle OnCellChanged), it should work just fine with modded stuff. Assuming it works at all.

Using MWSE to cycle through all NPCs and creatures every frame would be next to useless, speed-wise. You'd have to test if either is fast enough to work.

[quote name='The Greatness' date='07 October 2010 - 04:15 PM' timestamp='1286482550' post='16458853']
I like this idea. You could put this at the beginning:

And then underneath you could have a full XP value calculation. I might have a go at this. There's only one problem I can think of, and that's that any loaded creature that dies while add XP, but you could add a distance check.[/quote]
That would work, in general. Whether the PC killed them or not would be somewhat hit-or-miss, but it would be better than nothing. Using a distance check (an un-sqrt-ed version, especially) for each OnDeath with have a minimal FPS hit.


[quote]EDIT2: ninja'd by NMZmaster. I didn't realise you could only attach a script to one creature, but I have a work arround. When scanning for creatures you scan for the players target, and attach it to that. Then you'd need to run that script every frame though, but it could be kept short.
[/quote]
If it's not possible to attach it to all NPCs, then that would be a better idea. Either occasionally scanning and attaching to any in combat and near the PC, or the PC's combat target. It might not play nice with AoE spells and such, definitely not scripted spells, but it would be better than nothing.
You could even have a small set, set 16 or so, scripts set up and use globals to keep track of whether they've been used. If a free slot is available, start that script on the next combat target. It wouldn't work for huge battles, but Morrowind doesn't have battles with more than 8/16 enemies all that often anyway.
User avatar
Flesh Tunnel
 
Posts: 3409
Joined: Mon Sep 18, 2006 7:43 pm

Post » Fri Feb 11, 2011 1:42 pm

No it wouldn't? By starting the script on references when they are first encountered (a single MWSE cycle OnCellChanged), it should work just fine with modded stuff. Assuming it works at all.


I believe I misunderstood part of what you were proposing, apologies. I've tried the ref -> StartScript thing in the past for other types of scripts, though, and I never got the results I was looking for. If you can make sure it is only being used on one reference at a time, that would be different. Or if you wanted to have several of the script so that you could allocate whichever ones were available, that too could be a solution.

One resource on the subject I had bookmarked was http://mwmodders.com/scriptingnotes.html, in the "Targeted Scripts" section, if you were interested.
User avatar
Melissa De Thomasis
 
Posts: 3412
Joined: Tue Feb 27, 2007 6:52 pm

Post » Fri Feb 11, 2011 8:51 pm

The nice thing about skill based systems is that if you just play naturally, you have to use your skills to do the things you like doing, and your leveling becomes very natural. So if you like stealth and sneak around a lot, your sneak skill goes up and you level up. How would this stealthy character level up in an XP system? You'd have to give XP for successful robberies, pickpocketings, and completion of stealthy quests. Sounds to me like it would be a very difficult system to implement in order to support all play styles and all kinds of character classes in a fair manner.

Some people think that skill based systems promote spamming, but the way I see it, XP systems have exactly the same problem with grinding for XP. Someone is going to want to level up quickly, and they will say: "Boy what a chore, I have to go kill some mudcrabs again just to level up", and then complain about the grind.

I do think that a better leveling system could be created, but I think it would be much easier to build a fair leveling system that accommodates all kinds of characters on skill advancement rather than collecting XP.
User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am

Post » Fri Feb 11, 2011 8:41 am

The nice thing about skill based systems is that if you just play naturally, you have to use your skills to do the things you like doing, and your leveling becomes very natural. So if you like stealth and sneak around a lot, your sneak skill goes up and you level up. How would this stealthy character level up in an XP system? You'd have to give XP for successful robberies, pickpocketings, and completion of stealthy quests. Sounds to me like it would be a very difficult system to implement in order to support all play styles and all kinds of character classes in a fair manner.

Some people think that skill based systems promote spamming, but the way I see it, XP systems have exactly the same problem with grinding for XP. Someone is going to want to level up quickly, and they will say: "Boy what a chore, I have to go kill some mudcrabs again just to level up", and then complain about the grind.

I do think that a better leveling system could be created, but I think it would be much easier to build a fair leveling system that accommodates all kinds of characters on skill advancement rather than collecting XP.

I imagine it's not too difficult. Oblivion XP's system works wonders and is fairly well balanced towards all characters. I'd recommend giving a look through of the features of that mod to see a sort of system I'd like to see implemented.

And once again, if implemented properly, this can all but be alleviated. Oblivion XP actually encourages players to find NPCs and creatures to kill that are either their level or higher. Killing a mudcrab at level 1 yields way less experience than killing one at say level 5. Lower the level, the less experience you get. And by the time you reach level 5, mudcrab killing is all but worthless.

And the funny thing about XP systems is that they are rather balanced when it comes to all characters and classes etc. Not one class can be overpowered because you actually have to make choices in what you want to level up instead of just spamming a skill over and over again until it levels up and doing this for all skills. It helps to make the game challenging but fair at the same time. Not like the current system in which you can make yourself a god by level 15 or so.

I'm not saying the current system is horrible, I'm just saying that it has some current flaws that most properly implemented XP systems seem to fix.
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Fri Feb 11, 2011 10:02 am

And the funny thing about XP systems is that they are rather balanced when it comes to all characters and classes etc. Not one class can be overpowered because you actually have to make choices in what you want to level up instead of just spamming a skill over and over again until it levels up and doing this for all skills. It helps to make the game challenging but fair at the same time. Not like the current system in which you can make yourself a god by level 15 or so.



I don't spam skills to level up, I simply play, but I can see the flaws apparent in each system. If this is something that any of you want to develop, though, I genuinely wish you luck -- it could be an interesting project to work on and balance out between stealth/melee/magic and combat/noncombat abilities and I'd be curious to see what approach would be taken.
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Fri Feb 11, 2011 4:02 pm

I don't spam skills to level up, I simply play

Yes, this goes for me too.

Every game system encourages certain behaviors. Oblivion's nGCD and Realistic Leveling do it and Oblivion XP is no different. Where GCD, nGCD, Realistic Leveling, et al, encourages the spamming of skills in some players, Oblivion XP encourages the spamming of activities like book reading, POI visiting and "farming" Renown in some players. It all comes down to which form of encouragement one feels most comfortable with.

The critically important word here is encourage. Encourage is not the same thing as force. Supporters of Oblivion XP tell us, "But I don't have to read every book in the game or visit every POI on the map," and this is true. It is equally true of skill-based systems that you are not forced to spam skills. It is the player's choice to spam skills in a skill-based system or to spam experience-gaining activities like pickpocketing when using Oblivion XP.

There are two reason why I do not like experience-based leveling systems. First, it is a met-game mechanic. When I play an experienced-based system I, the player, choose the stats for my character. I can choose stats that have nothing at all to do with my character or what my character has done so far. As such, I feel it is not a good system for roleplaying. When I roleplay I want to feel that everything my character has done up to this point has an impact on who my character is and what my character can do. Experience-based systems divorce the character's actions from the character's progression. I want to feel it is my character's actions that determine who my character is.

The second reason I object is that they require the use of menus. In a roleplaying game the use of menus should be avoided as much as possible. As a roleplayer I try to immerse myself in my character and my character's story. Anything that takes me "out of the moment," that forces me out of the game, that asks me to concern myself with meta-game procedures like navigating through menus helps to destroy a little bit of my immersion in my character's story. Having to fiddle with menus is like having someone talk to me while I'm watching a movie.

For myself, I usually use http://planetelderscrolls.gamespy.com/View.php?view=Mods.Detail&id=2699 It not only allows me to ignore menus and meta-game number crunching, it also has one feature not found in any leveling mod for Morrowind or Oblivion that I'm aware of: skill degradation. Stop using a skill and you will slowly begin to forget it or your muscles will atrophy. This feature not only adds realism, I find it also adds a nice little strategic aspect to leveling.
User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Fri Feb 11, 2011 9:33 am

I believe I misunderstood part of what you were proposing, apologies. I've tried the ref -> StartScript thing in the past for other types of scripts, though, and I never got the results I was looking for. If you can make sure it is only being used on one reference at a time, that would be different. Or if you wanted to have several of the script so that you could allocate whichever ones were available, that too could be a solution.

One resource on the subject I had bookmarked was http://mwmodders.com/scriptingnotes.html, in the "Targeted Scripts" section, if you were interested.

It's very likely you're right, I haven't used that function in a year or so, so I really couldn't tell you anything positive. Assuming you are right, then having a selection of scripts available should be a relatively simple work-around. 16 scripts and global state-tracking variables isn't much memory or strain, so it should be pretty easy to set up and use. The OnDeath block could StopScript and reset the global variable, so the scripts will be self cleaning.

Have you ever seen problems with re-using a script that's been previously used and stopped?

The nice thing about skill based systems is that if you just play naturally, you have to use your skills to do the things you like doing, and your leveling becomes very natural. So if you like stealth and sneak around a lot, your sneak skill goes up and you level up. How would this stealthy character level up in an XP system? You'd have to give XP for successful robberies, pickpocketings, and completion of stealthy quests. Sounds to me like it would be a very difficult system to implement in order to support all play styles and all kinds of character classes in a fair manner.

Obviously it would take some work to integrate it into the game, probably a massive integration patch for each ESM assigning XP to events. It would be possible, although it'd prolly conflict with a few things.

Some people think that skill based systems promote spamming, but the way I see it, XP systems have exactly the same problem with grinding for XP. Someone is going to want to level up quickly, and they will say: "Boy what a chore, I have to go kill some mudcrabs again just to level up", and then complain about the grind.

I do think that a better leveling system could be created, but I think it would be much easier to build a fair leveling system that accommodates all kinds of characters on skill advancement rather than collecting XP.

There's no such thing as a better leveling system, someone will complain no matter what. I'm happy with the vanilla one and I actually like D&D 3.x, as well as FO2/3, GURPS and a few others. An XP system just seems like it could be fun in Morrowind, so... We can't stop people from grinding levels any more than we can stop script kiddies from abusing PHP and Java.


Yes, this goes for me too.

Same here. I play till I get bored, then do something else. The only gave I've actually found myself level grinding in is Borderlands, and that game is pretty much based around the concept (plus, higher levels get awesome loot, like submachine guns with bullets that go in spirals).
User avatar
Angelina Mayo
 
Posts: 3427
Joined: Wed Jan 24, 2007 4:58 am

Post » Fri Feb 11, 2011 2:59 pm

Bah, piece of cake...in theory. Well, for getting points from killing targets. It can be done with a single script. And it will cause unexplained CTDs and/or slowness for some people, but work flawlessly for others. This is essentially the same thing I've had running in Census and Excise to track the number of kills.

Avoid starting scripts on other references where possible, that is the biggest cause of CTDs upon save reload with MWE/MWSE scripts.

This will definitely need some tweaking and some error checking, but this is how you would do it:

begin fl_cne_monitor_kills    long pcref    long pctarg    long targtype    long ltemp    long targid    long xp    long targref1    long targref2    long targref3    long targref4    long targref5    long targref6    long targref7    long targref8    long targref9    long targref10    short stemp    short stemp2    short reset    short health    short level    short rand    short go    short delay    short doonce    float timer    ;global long char_xp    if ( MenuMode == 1 )        Return    endif    if ( reset == 1 )        set reset to 0        set delay to 0        set timer to 0        set targref1 to 0        set targref2 to 0        set targref3 to 0        set targref4 to 0        set targref5 to 0        set targref6 to 0        set targref7 to 0        set targref8 to 0        set targref9 to 0        set targref10 to 0        Return    endif    if ( delay == 1 )        set timer to ( timer + GetSecondsPassed )        if ( timer < 1 )            Return        endif        set timer to 0        set delay to 0    endif    setx pcref to xGetRef "player"    xSetRef pcref    set stemp to GetWeaponDrawn    xSetRef pcref    set stemp2 to GetSpellReadied    if ( stemp == 0 )        if ( stemp2 == 0 )            set reset to 1            Return ;not ready for combat at all, don't bother checking        endif    endif        ;monitor for targets dying before we get new targets    ifx ( targref1 );this target is set        xSetRef targref1        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref1            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref1 to 0            set delay to 1        endif    endif    ifx ( targref2 )        xSetRef targref2        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref2            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref2 to 0            set delay to 1        endif    endif    ifx ( targref3 )        xSetRef targref3        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref3            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref3 to 0            set delay to 1        endif    endif    ifx ( targref4 )        xSetRef targref4        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref4            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref4 to 0            set delay to 1        endif    endif    ifx ( targref5 )        xSetRef targref5        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref5            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref5 to 0            set delay to 1        endif    endif    ifx ( targref6 )        xSetRef targref6        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref6            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref6 to 0            set delay to 1        endif    endif    ifx ( targref7 )        xSetRef targref7        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref7            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref7 to 0            set delay to 1        endif    endif    ifx ( targref8 )        xSetRef targref8        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref8            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref8 to 0            set delay to 1        endif    endif    ifx ( targref9 )        xSetRef targref9        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref9            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref9 to 0            set delay to 1        endif    endif    ifx ( targref10 )        xSetRef targref10        set health to GetHealth        ifx ( health )        else            ;figure out the amount of experience to give for this one            ;VERY rudimentary calulation here            xSetRef targref10            set level to GetLevel            set rand to Random, 10            set xp to ( level * rand )            set ltemp to char_xp            set ltemp to ( ltemp + xp )            set char_xp to ltemp            set targref10 to 0            set delay to 1        endif    endif    setx pctarg to pcref->xGetCombat    if ( pctarg )        if ( go == 0 )            set go to 1        endif    else        set go to 0        Return    endif    ifx ( go )        set go to 0 ;only run this once each time pctarg is set            ;first check to see if it's already flagged        if ( targref1 == pctarg )            Return        endif        if ( targref2 == pctarg )            Return        endif        if ( targref3 == pctarg )            Return        endif        if ( targref4 == pctarg )            Return        endif        if ( targref5 == pctarg )            Return        endif        if ( targref6 == pctarg )            Return        endif        if ( targref7 == pctarg )            Return        endif        if ( targref8 == pctarg )            Return        endif        if ( targref9 == pctarg )            Return        endif        if ( targref10 == pctarg )            Return        endif        if ( targref1 )            if ( targref1 == pctarg ) ;the same                Return            endif        else            set targref1 to pctarg            Return        endif        if ( targref2 )            if ( targref2 == pctarg ) ;the same                Return            endif        else            set targref2 to pctarg            Return        endif        if ( targref3 )            if ( targref3 == pctarg ) ;the same                Return            endif        else            set targref3 to pctarg            Return        endif        if ( targref4 )            if ( targref4 == pctarg ) ;the same                Return            endif        else            set targref4 to pctarg            Return        endif        if ( targref5 )            if ( targref5 == pctarg ) ;the same                Return            endif        else            set targref5 to pctarg            Return        endif        if ( targref6 )            if ( targref6 == pctarg ) ;the same                Return            endif        else            set targref6 to pctarg            Return        endif        if ( targref7 )            if ( targref7 == pctarg ) ;the same                Return            endif        else            set targref7 to pctarg            Return        endif        if ( targref8 )            if ( targref8 == pctarg ) ;the same                Return            endif        else            set targref8 to pctarg            Return        endif        if ( targref9 )            if ( targref9 == pctarg ) ;the same                Return            endif        else            set targref9 to pctarg            Return        endif        if ( targref10 )            if ( targref10 == pctarg ) ;the same                Return            endif        else            set targref10 to pctarg            Return        endif    endifend


As far as determining the amount of experience, it just takes the target's level and multiplies it by a random number between 1 and 10. So of course it would need to be tweaked and refine. And this doesn't take into account a reduction of experience for killing the same sort of target multiple times.

This will work for up to ten targets at any given time.

It also doesn't actually handle any of the leveling. That will be up to whoever takes the torch from here and actually makes a mod out of this. :hehe:
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Fri Feb 11, 2011 3:09 pm

Okay. I've had a really good look at your script Fligg, but I don't see the need for 10 refs, so I've tried to make a version that only checks your target by stealing bits from yours. For now I've put a message box where the XP calculation would go. Here's my best shot:

begin XPtargetscriptlong PCTargetlong CheckTargetlong PCRefshort healthsetx PCRef to xGetRef "player"setx PCTarget to PCRef->xGetCombatif ( CheckTarget != 0 )	xSetRef CheckTarget	set health to getHealth	ifx ( health )	else		set CheckTarget to 0		MessageBox, "you killed something"	endifendifif ( PCTarget == 0 )	returnendifset CheckTarget to PCTargetend

However, upon loading it CTDs. I've tried all sorts of variations. Some trigger the message box constantly, some do nothing, but most just crash. I've never used or seen ifx or setx before, so I'm going on guess work for what they do. Can anyone help?
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Previous

Return to III - Morrowind