[BETA] New Vegas Script Extender (NVSE) v1

Post » Sun Sep 26, 2010 11:14 pm

Previous Threads: http://www.gamesas.com/index.php?/topic/1127320-wipz-new-vegas-script-extender-nvse/


The NVSE team is proud to release the third beta of the New Vegas Script Extender.

Website: http://nvse.silverlock.org/
Download: http://nvse.silverlock.org/beta/nvse_1_beta3.zip

New Vegas Script Extender v1.0 beta 2
by Ian Patterson, Stephen Abel and Paul Connelly
(ianpatt, behippo and scruggsywuggsy the ferret)

The New Vegas Script Extender, or NVSE for short, is a modder's resource that expands the scripting capabilities of Fallout: NV. It does so without
modifying the executable files on disk, so there are no permanent side effects.

Contributions from: Timeslip, Elminster EU

Compatibility:
NVSE will support the latest version of Fallout available on Steam, and _only_ this version (currently 1.1.1.271). When a new version is released,
we will update as soon as possible; please be patient. We also support the 1.1.0.262 version of the NV GECK.

Incompatibilities:
* None, as far as we know. If you are using an old version, you will be prompted to update when launching NV.

This initial release should be treated as a beta, and should not be used in "final released" mods. Mods may be released for testing purposes,
but please make sure that you let your users know that they may need to re-download the mod once the beta period is complete. Functionality
may be changed or removed before the final release, scripts may need to be recompiled, etc.

Installation
  • Copy the .dll and .exe files to your Fallout NV directory. This is usually in your Program Files folder under Steam\SteamApps\common\fallout new vegas\.
    If you see files named FalloutNV.exe and FalloutNVLauncher.exe, this is the correct folder. Do not copy these files to the Data folder as with a normal mod.
  • Launch NV as you normally would via Steam. Note that the "Enable Steam Community In-Game" option must be enabled in the "In-Game" tab of the Steam
    options for NVSE to work correctly.


Scripts written with these new commands must be created via the G.E.C.K. after it is launched via nvse_loader. Open a command prompt window,
navigate to your NV install direcory, and type "nvse_loader -editor". Alternately you can create a shortcut to nvse_loader.exe, open the properties window
and add "-editor" to the Target field. The normal editor can open plugins with these extended scripts, but it cannot recompile them and will give errors if you try.

Requested Functionality intended for v1 but Currently Not Implemented:
  • Add/RemoveWeaponMod
  • Magic Effect/ Effect Item functions
  • Active Effect functions
  • Inventory walking functions
  • String vars
  • RemoveAllTypedItems variations



Implemented for v1 beta 3 (Available)
  • IsFormValid
  • IsReference
  • IsScripted, GetScript, RemoveScript, SetScript
  • GetNVSEVersion, GetNVSERevision, GetNVSEBeta
  • GetBaseObject
  • Get/SetWeight
  • Get/SetHealth
  • Get/SetValue
  • GetType
  • Get/SetRepairList
  • GetEquipType
  • Get/SetAttackDamage
  • GetWeapon
    • Ammo
    • ClipRounds
    • Type
    • MinSpread/Spread
    • Projectile
    • SightFOV
    • Min/MaxRange
    • Ammo Use
    • Action Points
    • CritDamage/Chance/Effect
    • FireRate
    • AnimAttackMult
    • RumbleLeft/RightMotor/Duration/Wavelength
    • AnimShotsPerSec
    • AnimMult
    • Reach
    • IsAutomatic
    • HandGrip
    • ReloadAnm
    • BaseVATSChance
    • AttackAnimation
    • NumProjectiles
    • AimArc
    • LimbDamageMult
    • SightUsage
    • HasScope

  • SetWeapon
    • Ammo
    • ClipRounds
    • Type
    • MinSpread/Spread
    • Projectile
    • SightFOV
    • Min/MaxRange
    • Ammo Use
    • Action Points
    • CritDamage/Chance/Effect
    • AnimAttackMult
    • AnimMult
    • Reach
    • IsAutomatic
    • HandGrip
    • ReloadAnm
    • BaseVATSChance
    • AttackAnimation
    • NumProjectiles
    • AimArc
    • LimbDamageMult
    • SightUsage

  • con_SetGameSetting
  • con_SetINISetting
  • con_GetINISetting
  • con_RefreshINI
  • con_Save
  • con_SaveINI
  • con_QuitGame
  • con_LoadGame
  • con_CloseAllMenus
  • con_SetVel
  • Form list functions
  • GetEquippedObject
  • CompareNames, SetName
  • GetHotkeyItem
  • GetNumItems, GetInventoryObject
  • Get/SetCurrentHealth
  • Get/SetEquippedCurrentHealth
  • InputFunctions
    • IsKeyPressed
    • Tap/Hold/Release/Enable/DisableKey
    • GetNumKeysPressed
    • GetKeyPress
    • GetNumMouseButtonsPressed
    • GetMouseButtonPress
    • GetControl, GetAltControl
    • MenuTap/Hold/ReleaseKey
    • Enable/DisableControl
    • TapControl
    • SetControl, SetAltControl
    • SetIsControl
    • IsControl
    • IsKeyDisabled
    • IsControlPressed

  • Plugin support
  • IsPersitent
  • GetParentCell/Worldspace
  • GetTeleportCell, GetLinkedDoor
  • Get/SetRefCount
  • Ref Walking
    • GetFirstRef, GetNumRefs
    • GetFirstRefInCell, GetNumRefsInCell
    • GetNextRef

  • GetObjectEffect
  • Set/IsQuestItem
  • Get/SetNumericGameSetting
  • Get/SetNumericIniSetting
  • Loops (Label/Goto)
  • PrintC, DebugPrint, Get/SetDebugMode
  • IsPowerArmor
  • Get/SetArmorAR
  • UI Functions (Get/SetUIFloat, GetUIString)
  • GetCrosshairRef
  • GetGameRestarted/Loaded
  • con_ToggleMenus, con_ToggleFreeCamera, con_ToggleCollision
  • GetWeaponItemMod
  • Mod functions (IsModLoaded, GetModIndex, GetNumLoadedMods, GetSourceModIndex)
  • GetDebugSelection
  • Get/SetArmorDT

User avatar
Tiffany Castillo
 
Posts: 3429
Joined: Mon Oct 22, 2007 7:09 am

Post » Mon Sep 27, 2010 1:12 am

Please try to break loops and other functionality like that. If you find a problem, providing a small test script will be extremely helpful in assisting us track down the problem.

Also, taking a look at my settings right now, the beta version of the Steam overlay appears to have been pushed out to everyone. If NVSE isn't launching (no nvse.log file being created), then try restarting the Steam client and seeing if it wants you to update. If that doesn't work, go to the settings window, pick the Account tab, then under "Beta participation:" make sure that you have opted in to the latest Steam client beta.
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am

Post » Sun Sep 26, 2010 6:41 pm

With the beta of NVSE out the door, I know everyone wants to get started working on their mods. However, I would like to ask that you all take a little time to try and test a bunch of the functions we've made available. While most of them are ports from FOSE the underlying data has shifted and we've not tested every function.

I appreciate your help with this.
User avatar
Rhiannon Jones
 
Posts: 3423
Joined: Thu Sep 21, 2006 3:18 pm

Post » Mon Sep 27, 2010 2:04 am

This is truly excellent news. Question, though: You say that you need to use the beta version of Steam to use this in-game, but... there doesn't appear to be a beta version of Steam at the moment. Steam was updated just a few hours ago - maybe it's no longer in beta?

Also, does the GECK loader include the script debug errors that are lacking in the current release of the NV GECK but added via a few third-party GECK loaders?

(also, a SetHotkeyItem function would be useful)
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am

Post » Mon Sep 27, 2010 4:04 am

This is truly excellent news. Question, though: You say that you need to use the beta version of Steam to use this in-game, but... there doesn't appear to be a beta version of Steam at the moment. Steam was updated just a few hours ago - maybe it's no longer in beta?

Also, does the GECK loader include the script debug errors that are lacking in the current release of the NV GECK but added via a few third-party GECK loaders?

I think the update a few hours ago pushed the beta out to everyone, but some people may not have it yet. To use the script error fix, place http://www.gamesas.com/index.php?/topic/1123864-no-debug-info/page__view__findpost__p__16559744 in the Fallout folder and add -serr to the nvse_loader command line. I need to contact the person who wrote that DLL up and ask if we can integrate it; the change is pretty simple to do.
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

Post » Sun Sep 26, 2010 1:45 pm

yeah... thanks a lot guys :)
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Sun Sep 26, 2010 1:53 pm

@DarN - I am going to apologize to you right off the bat. I've started tackling the UI decoding 3 times now. There are a few addresses we need to find that I haven't tracked down yet. It is next on the list and we'll be rolling out beta 2 as soon as we get the basic UI functions down.
User avatar
Rowena
 
Posts: 3471
Joined: Sun Nov 05, 2006 11:40 am

Post » Sun Sep 26, 2010 5:29 pm

So by launching through Steam, I guess you mean that we have to use the craptacular launcher provided with the game?

If so, will there ever be a way to launch NVSE without initiating the launcher?
User avatar
Ridhwan Hemsome
 
Posts: 3501
Joined: Sun May 06, 2007 2:13 pm

Post » Sun Sep 26, 2010 9:58 pm

So by launching through Steam, I guess you mean that we have to use the craptacular launcher provided with the game?

If so, will there ever be a way to launch NVSE without initiating the launcher?

Yes - you are stuck using the launcher because Steam uses the launcher. And I don't envision a way around this. The game executable is encrypted. Breaking the encryption is illegal for us, and we simply won't do it. Valve has been kind enough to assist us with getting the NVSE loaded into the game (which they can do because they control the timing of the decryption in memory.)

Unless Valve and Steam decide to drop the exe encryption in the future, we're stuck with this world.
User avatar
Javaun Thompson
 
Posts: 3397
Joined: Fri Sep 21, 2007 10:28 am

Post » Sun Sep 26, 2010 4:24 pm

Yay! Thanks guys! Now I can really start modding. (I may not sleep for a few months now... :bonk:)

I do have something productive to report, though. There's a bug with the "Conditions" not using NVSE functions. (They show up but can't be selected in the list.)
User avatar
Nicole Mark
 
Posts: 3384
Joined: Wed Apr 25, 2007 7:33 pm

Post » Sun Sep 26, 2010 2:50 pm

Yes - you are stuck using the launcher because Steam uses the launcher. And I don't envision a way around this. The game executable is encrypted. Breaking the encryption is illegal for us, and we simply won't do it. Valve has been kind enough to assist us with getting the NVSE loaded into the game (which they can do because they control the timing of the decryption in memory.)

Unless Valve and Steam decide to drop the exe encryption in the future, we're stuck with this world.

Understandable. I just wanted to check.

In that case, I may just make a copy of my current fallout_default.ini and copy my current fallout.ini to the root directory and rename it to fallout_default.ini just so I don't keep losing my settings by initiating the launcher.
User avatar
stephanie eastwood
 
Posts: 3526
Joined: Thu Jun 08, 2006 1:25 pm

Post » Sun Sep 26, 2010 10:59 pm

YES! The saviour returns!
User avatar
elliot mudd
 
Posts: 3426
Joined: Wed May 09, 2007 8:56 am

Post » Sun Sep 26, 2010 9:37 pm

FPS Style Grenade Hotkey, Expanded Hotkeys, Arwen's Realism Tweaks, Bullet Time, Darn's UI... With NVSE the NV modding future is looking bright! :D
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Sun Sep 26, 2010 4:27 pm

Thanks so much for the beta, guys!

... I'm having a problem though (hopefully it's just me being stupid and missing something obvious). For my http://www.gamesas.com/index.php?/topic/1136277-wip-armour-repair-kits/ mod, I wrote the effect script the other day and tested it in FO3 using FOSE. It seemed to be working just fine.

When I tried it just now in FNV using NVSE, however, it didn't work - at first. Then it did work (and I don't know what changed - seemingly nothing) - and then it didn't again. Now it's just not working.

Entering 'GetNVSEVersion' into the console returned 'NVSE version: 1' as expected. Here's the effect script in question:

Spoiler
scn ARKArmourRepairKitEffectSCRIPT;Script adapted from Weapon Repair Kitfloat AugmentAmountfloat HeadHealthref HeadREFfloat UpperBodyHealthref UpperBodyREFfloat HatHealthref HatREFBEGIN ScriptEffectStart	;// get the current health percent values for each armour slot	set HeadREF to player.GetEquippedObject 0	set HeadHealth to player.GetEquippedCurrentHealth 0	set HeadHealth to HeadHealth / GetHealth HeadREF		set UpperBodyREF to player.GetEquippedObject 2	set UpperBodyHealth to player.GetEquippedCurrentHealth 2	set UpperBodyHealth to UpperBodyHealth / GetHealth UpperBodyREF		set HatREF to player.GetEquippedObject 10	set HatHealth to player.GetEquippedCurrentHealth 10	set HatHealth to HatHealth / GetHealth HatREF	;// run through the player's repair skill and define augmentation amount appropriately	IF ( player.getAV Repair < 25 )		set AugmentAmount to 0.1	ELSEIF ( player.getAV Repair >= 25 && player.getAV Repair < 50 )		set AugmentAmount to 0.15	ELSEIF ( player.getAV Repair >= 50 && player.getAV Repair < 75 )		set AugmentAmount to 0.2	ELSEIF ( player.getAV Repair >= 75 && player.getAV Repair < 100 )		set AugmentAmount to 0.25	ELSEIF ( player.getAV Repair >= 100 )		set AugmentAmount to 0.3	ENDIF		;// set the Head slot's new health	set HeadHealth to HeadHealth + AugmentAmount	set HeadHealth to HeadHealth * GetHealth HeadREF	player.SetEquippedCurrentHealth HeadHealth 0	;// set the UpperBody slot's new health	set UpperBodyHealth to UpperBodyHealth + AugmentAmount	set UpperBodyHealth to UpperBodyHealth * GetHealth UpperBodyREF	player.SetEquippedCurrentHealth UpperBodyHealth 2	;// set the Hat slot's new health	set HatHealth to HatHealth + AugmentAmount	set HatHealth to HatHealth * GetHealth HatREF	player.SetEquippedCurrentHealth HatHealth 10END

User avatar
Miragel Ginza
 
Posts: 3502
Joined: Thu Dec 21, 2006 6:19 am

Post » Sun Sep 26, 2010 9:32 pm

*fap fap fap*
Finally, awesome mods time!
User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Mon Sep 27, 2010 1:55 am

Thanks guys! :celebration:

I am very concerned about the Steam issues:
From NVSE ReadMe:
2. Launch NV as you normally would via Steam. Note that the "Enable Steam Community In-Game" option must be enabled in the "In-Game" tab of the Steam options for NVSE to work correctly.
IMPORTANT: For now you must use the Beta version of Steam to use NVSE in game.

Does this mean that you have to be online and connected to Steam to use a mod that requires NVSE?
(Sorry for my ignorance, but I'm not that up to speed on Steam, so I don't understand what the above actually means).

Once I release v.1.3 of my Tweaks (in a day or so), I'll start working on my NVSE scripts to make sure that there are no problems.
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

Post » Mon Sep 27, 2010 3:02 am

You don't need to be online/connected - just have that option enabled. As far as I know, the Steam version of OBSE doesn't break itself if you aren't connected to Steam, so yeah.
User avatar
Austin England
 
Posts: 3528
Joined: Thu Oct 11, 2007 7:16 pm

Post » Sun Sep 26, 2010 1:54 pm

Edit: Nevermind.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Sun Sep 26, 2010 5:17 pm

@DarN - I am going to apologize to you right off the bat. I've started tackling the UI decoding 3 times now. There are a few addresses we need to find that I haven't tracked down yet. It is next on the list and we'll be rolling out beta 2 as soon as we get the basic UI functions down.

Think I got it working. Might push another build later today.
User avatar
Gemma Archer
 
Posts: 3492
Joined: Sun Jul 16, 2006 12:02 am

Post » Mon Sep 27, 2010 2:14 am

this is probably a stupid question. since NVSE adds scripts to the existing exe file, is it in any way possible to adjust the memory address upwards like the 4GB exe version does? i dont necessarily mind going through the launcher but i did like having more than just 2 gigs available for the game.
User avatar
He got the
 
Posts: 3399
Joined: Sat Nov 17, 2007 12:19 pm

Post » Sun Sep 26, 2010 9:31 pm

Thanks for the release!

Just a quick question as I'm not familiar with any of the Script Extenders. I wanted to use GetCrosshairRef to show a message if a certain object is under the crosshairs of the player.

So, would I structure it like this?

if (GetCrosshairRef ObjectRef == 1)    ShowMessage MyMessageendif


I'm guessing some other way as that isn't working.
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am

Post » Mon Sep 27, 2010 1:30 am

Hell yeah! I was waiting for it a long time, really big thanks and kudos guys :)
User avatar
victoria johnstone
 
Posts: 3424
Joined: Sat Oct 14, 2006 9:56 am

Post » Sun Sep 26, 2010 6:55 pm

Yay! Thanks guys! Now I can really start modding. (I may not sleep for a few months now... :bonk:)

I do have something productive to report, though. There's a bug with the "Conditions" not using NVSE functions. (They show up but can't be selected in the list.)

This was never tested. We'll have to look into this. Thanks for the report.

Thanks so much for the beta, guys!

... I'm having a problem though (hopefully it's just me being stupid and missing something obvious). For my http://www.gamesas.com/index.php?/topic/1136277-wip-armour-repair-kits/ mod, I wrote the effect script the other day and tested it in FO3 using FOSE. It seemed to be working just fine.

When I tried it just now in FNV using NVSE, however, it didn't work - at first. Then it did work (and I don't know what changed - seemingly nothing) - and then it didn't again. Now it's just not working.

Entering 'GetNVSEVersion' into the console returned 'NVSE version: 1' as expected. Here's the effect script in question:

Spoiler
scn ARKArmourRepairKitEffectSCRIPT;Script adapted from Weapon Repair Kitfloat AugmentAmountfloat HeadHealthref HeadREFfloat UpperBodyHealthref UpperBodyREFfloat HatHealthref HatREFBEGIN ScriptEffectStart	;// get the current health percent values for each armour slot	set HeadREF to player.GetEquippedObject 0	set HeadHealth to player.GetEquippedCurrentHealth 0	set HeadHealth to HeadHealth / GetHealth HeadREF		set UpperBodyREF to player.GetEquippedObject 2	set UpperBodyHealth to player.GetEquippedCurrentHealth 2	set UpperBodyHealth to UpperBodyHealth / GetHealth UpperBodyREF		set HatREF to player.GetEquippedObject 10	set HatHealth to player.GetEquippedCurrentHealth 10	set HatHealth to HatHealth / GetHealth HatREF	;// run through the player's repair skill and define augmentation amount appropriately	IF ( player.getAV Repair < 25 )		set AugmentAmount to 0.1	ELSEIF ( player.getAV Repair >= 25 && player.getAV Repair < 50 )		set AugmentAmount to 0.15	ELSEIF ( player.getAV Repair >= 50 && player.getAV Repair < 75 )		set AugmentAmount to 0.2	ELSEIF ( player.getAV Repair >= 75 && player.getAV Repair < 100 )		set AugmentAmount to 0.25	ELSEIF ( player.getAV Repair >= 100 )		set AugmentAmount to 0.3	ENDIF		;// set the Head slot's new health	set HeadHealth to HeadHealth + AugmentAmount	set HeadHealth to HeadHealth * GetHealth HeadREF	player.SetEquippedCurrentHealth HeadHealth 0	;// set the UpperBody slot's new health	set UpperBodyHealth to UpperBodyHealth + AugmentAmount	set UpperBodyHealth to UpperBodyHealth * GetHealth UpperBodyREF	player.SetEquippedCurrentHealth UpperBodyHealth 2	;// set the Hat slot's new health	set HatHealth to HatHealth + AugmentAmount	set HatHealth to HatHealth * GetHealth HatREF	player.SetEquippedCurrentHealth HatHealth 10END


So I can think of several things that could be going wrong. Most if these functions are untested with this version. It would be quite helpful if after each step you did a printc to dump the results. Dump the object health, the current health, the current health percent, the augment amount, etc. Then after setting the health for that object, go ahead and get it again to see if it applied. That should tell us which (if any) of the functions isn't working properly. If this were me, I would also just stash the object health for each area, rather than fetching it again. Add a HatBaseHealth for example and call GetHealth HatREF once and stash the value. You could also try just multiplying the AugmentAmount by the HatBaseHealth and adding it directly to the CurrentHealth rather than figuring out the percent health that it currently has. Finally you may want to cap the health of the object at 100% (which we don't do behind the scenes).

Think I got it working. Might push another build later today.

Don't you ever sleep Ian? Thanks - I was having a heck of a time tracking some of that info down.

this is probably a stupid question. since NVSE adds scripts to the existing exe file, is it in any way possible to adjust the memory address upwards like the 4GB exe version does? i dont necessarily mind going through the launcher but i did like having more than just 2 gigs available for the game.

We patch addresses in memory - but I am not sure that is something which can be done in memory only, and not on disk. In any case, by the time we're invoked I believe it is too late to adjust that. But Ian is the expert on that sort of thing. I will discuss it with him offline.

Thanks for the release!

Just a quick question as I'm not familiar with any of the Script Extenders. I wanted to use GetCrosshairRef to show a message if a certain object is under the crosshairs of the player.

So, would I structure it like this?

if (GetCrosshairRef ObjectRef == 1)    ShowMessage MyMessageendif


I'm guessing some other way as that isn't working.

It isn't working because GetCrosshairRef hasn't been implemented for NVSE yet. This is one of the downsides of getting this out and pointing folks to the FOSE documentation. You don't hear about it because the GECK isn't currently reporting Script Errors. For the types of we have implemented, please look at our first post. Before v1 goes out the door we'll have a real list of functions. Sorry.
User avatar
Adriana Lenzo
 
Posts: 3446
Joined: Tue Apr 03, 2007 1:32 am

Post » Mon Sep 27, 2010 12:09 am

sorry for barging in:

there is a version of an NVMM on the nexus, that works fine.
it does not circumvent (sp?) the launcher, it mainly sorts/re-sorts the esp-files.

that should work with NVSE, right?
User avatar
Sanctum
 
Posts: 3524
Joined: Sun Aug 20, 2006 8:29 am

Post » Sun Sep 26, 2010 9:58 pm

Hey, I have small problem with writing a script with NVSE, I don't know if that's NVSE or GECK fault, but GECK doesn't want to save my script, it asks me and asks again if I want to save script, even if I press "yes" it still asks me and if I choose "no" then it closes the script with out saving...

Here's the script:

scn SkilledScriptbegin MenuMode 1027	if player.hasperk Skilled	if GetUIFloat "LevelUpMenu\_EndPage" && Player.GetLevel % 3		SetUIFloat "LevelUpMenu\_EndPage" 0	endif	endifend


It is meant to give me perk every 3 levels instead of 2 when I have Skilled trait.



EDIT: I did as exoromeo said, thanks for help man :)
@DarN looks like it :P
User avatar
Becky Palmer
 
Posts: 3387
Joined: Wed Oct 04, 2006 4:43 am

Next

Return to Fallout: New Vegas