Jump to content

Photo

[BETA] New Vegas Script Extender (NVSE) v2


  • This topic is locked This topic is locked
203 replies to this topic

#1
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic
Previous thread: http://forums.bethso...xtender-nvse-v2

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.

Website: http://nvse.silverlock.org
Download (latest version 2b12): http://nvse.silverlo...vse_2_beta12.7z zip- compatible with runtime 1.4.0.525 and editor 1.4.0.518, plus the German "no gore" version.

This patch was released at a slightly awkward time, so some mods relying on the very strange behavior of the mouse functions may need to be updated.

2b1 whatsnew:
- MessageEx/MessageBoxEx
- SetNameEx
- IsClonedForm/TempCloneForm
- GetParentCellOwner/GetOwningFactionRequiredRank/GetParentCellOwningFactionRequiredRank
- fix loader misreporting when it can't find the editor
- GetLocalRefIndex/BuildRef

2b2 whatsnew:
- Menu*Key functions use buffered input like they should
- log printc to IDebugLog in _DEBUG builds
- SetUIStringEx
- fix %k format specifier
- fix DataHandler::DoAddForm (updated address then reverted it then fixed it again)
- enable kWeapType_OneHandThrown type

2b3 whatsnew:
- fix formlist params so they accept any form type
- fix SetUIStringEx
- document new vegas parameter types
- %c format type can print the different sub-names of ammo (0 = full name, 1 = short name, 2 = abbreviation)

2b4 whatsnew:
- full pass on all parameter types, fix lots of mistakes
- fixes ListAddForm and other formlist things that were using ExtractArgsEx

2b5 whatsnew:
- Get/SetWeaponLongBursts
- SetWeaponFireRate
- long strings should not crash the compiler any more
- overhaul dinput code
- added an optional integer parameter to IsKeyPressed (default behavior unchanged, see whatsnew.txt for details)

2b6 whatsnew:
- access to weapon flags: Get/SetWeaponFlags1/2
- math functions for setting individual bits (ClearBit/SetBit)
- Get/SetActorBaseFlagsLow/High
- improve IsControlDisabled, cache now keeps track of partially disabled keys
- ExtractArgsRaw, new internal function for getting detailed information about passed-in arguments (not a scripting command, only useful for C++ API stuff)

2b7 whatsnew:
- fix GetCrosshairRef, other things relying on InterfaceManager
- more helpful error message when using the updated CS

2b8 whatsnew:
- fix crash when iterating over invalid form lists (generally a sign that a mod needs to be updated, but crashing is bad)
- support for editor 1.4.0.518

2b9 whatsnew:
- document new method of getting to NiNode
- fix IsControlDisabled, tilde/escape

2b10 whatsnew:
- support for German "no gore" runtime
- optionally hook internal game error log
- fix crash in GetHotkeyItem, SetWeaponRequiredSkill
- Get/SetEquippedWeaponModFlags
- Get/SetWeaponItemModEffect/Value1/Value2

2b11 whatsnew:
- fixed Get/SetWeaponItemModValue2

2b12 whatsnew:
- made weapon mod indexing the same across all functions (1-based instead of 0-based for backwards compatibility)

Edited by ianpatt, 25 October 2011 - 12:14 AM.


#2
T-Millz

T-Millz
  • Members
  • Novice
  • Joined: 06-July 11
  • 10 posts
<3<3<3 LOL

#3
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic
Reverting the directinput changes was proving much more complex than expected, so given the timing of this patch I may need to break backwards compatibility a bit. Please let me know if any mods using the mouse buttons are acting weirdly after this update.

edit: Also it looks like there's a new version of the editor out, I'll need to update for that as well.

Awesome, thanks a lot. The only thing I did different from before (when my game was pretty stable) was merge some simple mods with FNVEdit. Maybe I did something wrong. I don't know. We'll see when you can send me that new DLL...

The patch release will delay this for a bit.

Edited by ianpatt, 06 July 2011 - 04:31 PM.


#4
TheOutlander

TheOutlander
  • Members
  • Pip
  • Curate
  • Joined: 26-December 08
  • 772 posts
  • Location:The Wastes
:goodjob:

#5
schlangster

schlangster
  • Members
  • PipPip
  • Disciple
  • Joined: 10-June 07
  • 1349 posts
  • Location:Germany

Reverting the directinput changes was proving much more complex than expected, so given the timing of this patch I may need to break backwards compatibility a bit. Please let me know if any mods using the mouse buttons are acting weirdly after this update.

I have a script here that used disableKey to disable the fire button, and isKeyPressed (without any parameters) to check if it has been pressed. That worked in 2.0 beta4, didn't work in beta5, and also doesn't seem to work in beta6 anymore.

#6
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic

I have a script here that used disableKey to disable the fire button, and isKeyPressed (without any parameters) to check if it has been pressed. That worked in 2.0 beta4, didn't work in beta5, and also doesn't seem to work in beta6 anymore.

After beta4 you will need to pass 2 as an extra parameter to get the raw input data for mouse buttons.

The rules for mouse button access before the rewrite were complex enough that expressing them via a series of flags get very awkward. This is without looking at my notes, but it was something like "raw user input delayed by one poll, or possibly not depending on devices you have plugged in, plus tapped keys, no matter whether or not the key is disabled".

Edited by ianpatt, 06 July 2011 - 04:57 PM.


#7
schlangster

schlangster
  • Members
  • PipPip
  • Disciple
  • Joined: 10-June 07
  • 1349 posts
  • Location:Germany
Alright, just thought I'd mention it since you asked for backwards compatibility :)

There's another issue with Project Nevada after the patch, which is an instant CTD when activating the inventory sorter. I can't insert debug code yet, so I don't really know what causes it (i.e. if it's related to NVSE, or just caused by the patch).

But I can give you the data from the crash report:
module: nvse_1_1.dll
exception code: c0000005
offset: 0003eb8b

#8
MadCat221

MadCat221
  • Members
  • PipPipPipPipPip
  • Patriarch
  • Joined: 07-April 06
  • 14982 posts
  • Location:A place
GECK updates that result in previous versions refusing to load updated master ESMs usually entail that new script commands were implemented. Are you able to determine what was added?

Edited by MadCat221, 06 July 2011 - 05:49 PM.


#9
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic

module: nvse_1_1.dll
exception code: c0000005
offset: 0003eb8b

edit: GetCrosshairRef is going boom, probably the offset in InterfaceManager changed

Please try out this DLL and let me know if it fixes anything.

GECK updates that result in previous versions refusing to load updated master ESMs usually entail that new script commands were implemented. Are you able to determine what was added?

Yes, posted them in the previous thread. Nothing too interesting:

PrintTrackedCells - Prints cell load and unload counts
ClearTrackedCells - Clears all cell tracking data
EnableCellTracking - Enables or disables cell tracking
GetInCharGen - A value of 1 will be in chargen.

The first three are stubbed out and won't work in release builds.


Edited by ianpatt, 06 July 2011 - 06:47 PM.


#10
schlangster

schlangster
  • Members
  • PipPip
  • Disciple
  • Joined: 10-June 07
  • 1349 posts
  • Location:Germany
Hehe, just had the same thought cause the crash popped up in a few other places that all used getCrosshairRef.

And the DLL fixes it. Functionality is still intact as far as I could tell. Thanks!

#11
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic

Hehe, just had the same thought cause the crash popped up in a few other places that all used getCrosshairRef.

And the DLL fixes it. Functionality is still intact as far as I could tell. Thanks!

Cool, will package up and push 2b7 quickly.

edit: http://nvse.silverlo...vse_2_beta7.zip

Edited by ianpatt, 06 July 2011 - 07:28 PM.


#12
seltaya

seltaya
  • Newbie
  • Layman
  • Joined: 22-October 10
  • 3 posts
Not sure why, but after needing to update for the patch, with 2b7 I can no longer click on anything in game. Menus, pipboy, pause, etc. I can post a list of mods being used if you want, but it's mostly just the nVamp compilation, plus a couple of HUD and pipboy mods.

#13
Gribbleshnibit8

Gribbleshnibit8
  • Members
  • Acolyte
  • Joined: 10-November 09
  • 154 posts
Ian, you're awesome for doing all this so quickly after the patch. Just a teeny tiny question.

Any idea when GECK version will be up? Got a house mod I'm dying to work on. I always get my best ideas when I can't do a single thing about them (at work, after a game update, etc).

#14
Queue

Queue
  • Members
  • Pip
  • Curate
  • Joined: 20-May 11
  • 477 posts
Crash testing a single mod, entirely script driven. Obviously not recompiled yet.

Offset: 0001a98f

Just in case that's useful.

Queue

#15
Malonn

Malonn
  • Members
  • PipPipPip
  • Diviner
  • Joined: 11-October 07
  • 2466 posts
  • Location:Why? PoopyPants
NVSE 2 Beta 7 causes a persistent crash on load for me. I can't load NV with the loader, or with the 4GB patch.

EDIT

As usual I typed before I tested. vanilla FNV crashes too. Sorry.

Edited by Malonn, 06 July 2011 - 09:31 PM.


#16
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic

Not sure why, but after needing to update for the patch, with 2b7 I can no longer click on anything in game. Menus, pipboy, pause, etc.

Strange, but I can't think of changes in this version that would cause the problem.

Any idea when GECK version will be up?

Later tonight unless I fall asleep first.

Offset: 0001a98f

That's a crash due to an invalid entry in a form list. I've added a check to the relevant code to prevent the crash, but my first guess is the .esm changed on you.

#17
Nukeknockout

Nukeknockout
  • Members
  • Pip
  • Curate
  • Joined: 02-July 11
  • 959 posts
Ian, you are awesome. I'm not a modder and I don't have any coding skills at all, but I like to play with mods, and a lot of the really good ones use NVSE. So, in summary, you are awesome for putting up a version compatible with the latest patch in...what? 4 hours? Whether it works perfectly or not, it's a lot more than any of us could ask. Great Job :thumbsup:

#18
Queue

Queue
  • Members
  • Pip
  • Curate
  • Joined: 20-May 11
  • 477 posts

That's a crash due to an invalid entry in a form list. I've added a check to the relevant code to prevent the crash, but my first guess is the .esm changed on you.

Bingo. A formlist's ID changed, and I haven't yet recompiled the script that accesses the formlist based on its old ID.

Queue

#19
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic
Here's 2b8, adding compatibility for the latest version of the editor (1.4.0.518): http://nvse.silverlo...vse_2_beta8.zip.

edit: hlp has updated the GECK PowerUp to work with 1.4 as well.

Edited by ianpatt, 07 July 2011 - 05:21 PM.


#20
MadCat221

MadCat221
  • Members
  • PipPipPipPipPip
  • Patriarch
  • Joined: 07-April 06
  • 14982 posts
  • Location:A place
Today's been Day of the Beta it seems... :blink:

#21
delamer

delamer
  • Members
  • PipPip
  • Disciple
  • Joined: 21-November 08
  • 1916 posts
  • Location:Moskow, Russia

Here's 2b8, adding compatibility for the latest version of the editor (1.4.0.518): http://nvse.silverlo...vse_2_beta8.zip. Note that DLL plugins like the GECK PowerUp will need to be updated as well.

You are Saint!

Edited by delamer, 07 July 2011 - 04:00 AM.


#22
seltaya

seltaya
  • Newbie
  • Layman
  • Joined: 22-October 10
  • 3 posts
Just tried 8 Ian, same problem. You did ask earlier if any mods using mouse buttons acted weirdly. I think Project Nevada, which is part of nVamp, fiddles with the mouse in several spots, and there could be other mods in that compilation that do the same. Of course, it is also possible that I'm upgrading wrong, I thought I just copypasta'd the new files over the old ones, right?

#23
bigcrazewolf

bigcrazewolf
  • Members
  • PipPip
  • Disciple
  • Joined: 20-May 08
  • 1884 posts
  • Location:Somewhere I don't remember
Thanks much for your work and being so quick with the update.

wolf

#24
Queue

Queue
  • Members
  • Pip
  • Curate
  • Joined: 20-May 11
  • 477 posts
Here's the gist of the mouse issue folks:
- Before the new keypress code, mouse buttons were treated differently than keyboard keys; you could still detect mouse clicks with IsKeyPressed even when they were disabled, while you couldn't for keyboard keys.
- Some mods took advantage of this; they are now broken. They can be fixed.
- The new keypress code can provide the same behavior, but it's standardized now (mouse and keyboard are treated the same), and requires a flag to be provided to the IsKeyPressed function.

With the new patch out that breaks plenty of mods, now would be a great time to make a clean break with the old convulted functionality, and just say ''update the mods that relied on the old screwy behavior, since many mods need to be updated for the new patch anyway.''

The alternative is for special case coding to be implemented to provide backwards compatibiltiy for a handful of mods, some (or all) of which may be broken by the new patch anyway.

Queue

Edited by Queue, 07 July 2011 - 11:14 AM.


#25
The 3rd Type

The 3rd Type
  • Members
  • PipPipPip
  • Diviner
  • Joined: 25-December 08
  • 2252 posts
  • Location:Terminal Station #T-37
Project Nevada isn't in nVamp. I don't want to believe it is, at least.

#26
ianpatt

ianpatt
  • Members
  • PipPip
  • Disciple
  • Joined: 09-March 05
  • 1066 posts
  • Location:Gregminster, Toran Republic
Apparently I forgot to remove the blacklisting of ~ and ESC from input modification before releasing the code. This means that mods providing an alternate means of accessing the console won't work until the next release.

Here's the gist of the mouse issue folks:

That's a good summary, thanks.

#27
hlp

hlp
  • Members
  • Adept
  • Joined: 21-July 09
  • 269 posts

Here's 2b8, adding compatibility for the latest version of the editor (1.4.0.518): http://nvse.silverlo...vse_2_beta8.zip. Note that DLL plugins like the GECK PowerUp will need to be updated as well.


Thanks for the update.
Updated version of the Geck PowerUp is available on Nexus.

#28
seltaya

seltaya
  • Newbie
  • Layman
  • Joined: 22-October 10
  • 3 posts
@3rd, it is, sorry. http://risegaming.co...amp/?page_id=19 Right thar between fook and weapon mods.

@Queue, thanks for the explanation, I'll just wait patiently then. ;)

#29
Malonn

Malonn
  • Members
  • PipPipPip
  • Diviner
  • Joined: 11-October 07
  • 2466 posts
  • Location:Why? PoopyPants
Ever since the new release of NVSE, some mod has broken the right mouse button aiming. I can't aim. Does anybody have an idea as to what mod could have caused this? I'll update the script if I can isolate which mod causes the problem.

Spoiler


#30
Antistar

Antistar
  • Members
  • PipPip
  • Disciple
  • Joined: 26-November 08
  • 1163 posts

Ever since the new release of NVSE, some mod has broken the right mouse button aiming. I can't aim. Does anybody have an idea as to what mod could have caused this? I'll update the script if I can isolate which mod causes the problem.

Spoiler


As I mentioned here, I was having the same issue and found that Powered Power Armor seems to be causing it.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users