Jump to content

GECK Scripting Help - New Leveling System


Alexofxen

Recommended Posts

Hi, I'm new to the Nexus Forums (I've been downloading mods but never really chatted about 'em) and I'm working on my first major mod for New Vegas. I am trying to implement a new leveling system where you gain a small amount of each skill when you level in relation to your starting SPECIAL statistic. This is to make your starting SPECIAL choices carry more weight (and to lessen the influence of Intelligence on combat minded players). However, the script I've created never seems to trigger, I've been trying to figure my way around this for over a week now and I have nada to show for it. Here's an example of the latest script I've tried using charisma.

 

It's an Quest script so it will be always running in the background.

 

scn 000LevelingScript

 

Begin MenuMode 1027; this is the closest thing I've figured to being "the level up event"

 

if ( Player.GetPermanentActorValue Charisma <= 3 )

Player.ModAv Barter 1

Player.ModAv Speech 1

endif

 

End

 

And so on for all the different values. It lets me save it so it should be a correct script but it never triggers. Does anyone have any suggestions on what the problem is? Any help would be greatly appreciated.

 

Edit: When switched to an object OnAdd script it worked alright. Which leads me to believe the problem is with the MenuMode 1027 trigger never actually happens. Does anyone know anything else about figuring out what the Level Up Event actually is?

Edited by Alexofxen
Link to comment
Share on other sites

 http://www.newvegasnexus.com/downloads/file.php?id=41642

 

Not much of a scripter myself but if you are not using this mod in your GECK you need to get it. It adds debug error messages etc to the GECK and is especially useful when trying to write a script. Considering that your script does save it may or may not trigger an error but still this mod is very much worth having.

Link to comment
Share on other sites

 http://www.newvegasnexus.com/downloads/file.php?id=41642

 

Not much of a scripter myself but if you are not using this mod in your GECK you need to get it. It adds debug error messages etc to the GECK and is especially useful when trying to write a script. Considering that your script does save it may or may not trigger an error but still this mod is very much worth having.

 

Thanks for the link. Hopefully this will do the trick.

Link to comment
Share on other sites

Is the quest set to 'start enabled'?

I've used menumode 1027 to capture the event before.

 

You may need to guard the modAV's - they may run repeatedly as long as you are in the menumode

 

Also, using numbers in front of your object names can cause problems with scripts.

Link to comment
Share on other sites

Is the quest set to 'start enabled'?

I've used menumode 1027 to capture the event before.

 

You may need to guard the modAV's - they may run repeatedly as long as you are in the menumode

 

Also, using numbers in front of your object names can cause problems with scripts.

 

Thanks for responding! It wasn't set to start enabled. That was a pretty rookie mistake I'd imagine. You're also correct about the unguarded ModAv's causing the skillpoints to tallying up. How would I guard them to prevent that from happening though?

Link to comment
Share on other sites

IIRC, by the time you are in this menu mode, the player level has been bumped, so you could do it this way:

 

scn My000LevelingScript

short iCurrentLevel
short iPreviousLevel

Begin MenuMode 1027; this is the closest thing I've figured to being "the level up event"

set iCurrentLevel to Player.GetLevel

if (iCurrentLevel == iPreviousLevel)
return
endif

if ( Player.GetPermanentActorValue Charisma <= 3 )
Player.ModAv Barter 1
Player.ModAv Speech 1
endif

set iPreviousLevel to iCurrentLevel

End

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...