[WIPz] New Vegas Script Extender (NVSE)

Post » Tue May 04, 2010 8:20 pm

Yes, that is what I meant by a "top-level exception handler". The real issue is that I don't know whether New Vegas already has one. If it does, then our exception handler might get in the way, or never be called. Ian and I can look into it. But even then we may not be able to tell what mod was making the call when the crash occurred (which is the real information requested.) Thanks.
A "top-level exception handler" would be the outer most structured exception handler (which you can find by using the current exception handler pointer from the TIB and work your way outwards).

"Vectored exception handlers" are totally different. They are not in any way specific to the current context. Instead the OS keeps a simple linear list for the whole process of all registered vectored exception handlers. When an exception is raised, _before_ the normal structured exception handling starts unwinding the stack, all vectored exception handlers are called.

No matter if FNV already registeres a VEH of it's own (highly unlikely) or not, if you register an VEH and make sure to return EXCEPTION_CONTINUE_SEARCH you will not in any way interfere with the exception handling as already implemented by FNV.

A VEH gives you a first chance exception handler which is called before any others, while a "top-level exception handler", being the outermost SEH, represents a last chance exception handler, right before the exception escapes back into the OS code which started the current thread (and which will terminate the process if it ever sees an exception).
User avatar
Tyler F
 
Posts: 3420
Joined: Mon Aug 27, 2007 8:07 pm

Post » Wed May 05, 2010 1:20 am

A "top-level exception handler" would be the outer most structured exception handler (which you can find by using the current exception handler pointer from the TIB and work your way outwards).

"Vectored exception handlers" are totally different. They are not in any way specific to the current context. Instead the OS keeps a simple linear list for the whole process of all registered vectored exception handlers. When an exception is raised, _before_ the normal structured exception handling starts unwinding the stack, all vectored exception handlers are called.

No matter if FNV already registeres a VEH of it's own (highly unlikely) or not, if you register an VEH and make sure to return EXCEPTION_CONTINUE_SEARCH you will not in any way interfere with the exception handling as already implemented by FNV.

A VEH gives you a first chance exception handler which is called before any others, while a "top-level exception handler", being the outermost SEH, represents a last chance exception handler, right before the exception escapes back into the OS code which started the current thread (and which will terminate the process if it ever sees an exception).

I think we are on the same page here. I understand how VEH works (it plays an important role in the memory management system of the very large commercial software product I work on for my day job.) From my experience using it, I know that other VEHs can interfere with ones we want to use. Windows will use various VEHs at times (which causes us all sorts of problems) and New Vegas could be using one and returning that it handled the exception. So yes, assuming our VEH gets called we ought to be able to make sure that we don't mess up New Vegas' handling. :D

Still - I am not sure how useful this will be or whether we'll be able to tell exactly what caused the crash. We'd have to dump the stack and investigate the current script handling (if script handling is even happening at all.) Certainly this isn't going to be high on our list for right now. We want to get the basic functionality up and working.

This has been an ultra-geek excursion to the depths of windows programming. Now back to our regularly scheduled program. :D
User avatar
Lil Miss
 
Posts: 3373
Joined: Thu Nov 23, 2006 12:57 pm

Post » Tue May 04, 2010 3:50 pm

This has been an ultra-geek excursion to the depths of windows programming. Now back to our regularly scheduled program. :D


Its fascinating stuff though. :) Kinda like John Carmac's tweets; sometimes I can understand exactly what he is saying and sometimes, no clue. ;)

This wasn't too-far off the beaten path, though I'm not a windows programmer so and deal in very different environments. I wish there were a better way to show thanks for all the work you folks do for the community. Endorsemants seem inadequate for the smarts that go into this.
User avatar
i grind hard
 
Posts: 3463
Joined: Sat Aug 18, 2007 2:58 am

Post » Tue May 04, 2010 6:29 pm

does anyone know what the eta is for fomm for nv?
User avatar
Averielle Garcia
 
Posts: 3491
Joined: Fri Aug 24, 2007 3:41 pm

Post » Tue May 04, 2010 6:02 pm

I'm curious about one thing though: how did you guys manage to run beta/alpha versions of NVSE if the exe is encrypted? Did you use "other exes" for your tests?

Note: I'm not judging you, just curious :)
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Post » Wed May 05, 2010 12:30 am

I just remembered another feature, and I don't see it on the OP's list. I'd like effect scripts to have access to the Duration, Magnitude and Area fields. I heard that had been done for OBSE, so I'm guessing it's possible (unfortunately it probably won't be available in time to save me from the task I'd need it for.)
User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Tue May 04, 2010 10:43 pm

does anyone know what the eta is for fomm for nv?

There is no ETA at this point. They need to wait for Bethesda to finish patching stuff. These things rely on knowing where stuff exists in the executable. Every time a new EXE is released, they have to redo a bunch of work. Even if Bethesda stops patching, they also need some cooperation from Steam. They need to provide them with a hook into the executable. If they don't get it, they'll have to implement a new method of hooking.

I'm curious about one thing though: how did you guys manage to run beta/alpha versions of NVSE if the exe is encrypted? Did you use "other exes" for your tests?

Trust me, people that are capable of writing a program like these script extenders are more than capable of getting around a little code obfuscation. Like most companies, you aren't allowed to discuss such topics on their forums.
User avatar
Ruben Bernal
 
Posts: 3364
Joined: Sun Nov 18, 2007 5:58 pm

Post » Tue May 04, 2010 10:35 pm

OK, very good news. I've just finished talking with an engineer at Valve, and we've worked out a way to make NVSE compatible with the Steam wrapper. This means that our main worry about releasing is gone.

Massive thanks to Valve on this, you guys rock. (not sure if the person I talked to wants to be individually named)

Now we just need to implement enough commands to make for a good first release, and hope Bethesda doesn't update the runtime while we aren't looking.
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Wed May 05, 2010 1:40 am

Can I get a Hell Yeah? :)

That's awesome news guys, thanks for the hard work on this. And I'd like to thank Valve also, you guys have always helped the modding community and rock.
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Wed May 05, 2010 1:14 am

OK, very good news. I've just finished talking with an engineer at Valve, and we've worked out a way to make NVSE compatible with the Steam wrapper. This means that our main worry about releasing is gone.

Massive thanks to Valve on this, you guys rock. (not sure if the person I talked to wants to be individually named)

Now we just need to implement enough commands to make for a good first release, and hope Bethesda doesn't update the runtime while we aren't looking.


Well, that answers that question. Time to rock some socks with some mods.
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Tue May 04, 2010 10:48 pm

@SkyRanger-1: please let us know what NVSE functionality you need for the NV Stutter Remover. We've gotten the support we need from Valve - so we just need to implement our functions and wait for Bethesda/Obsidian to settle on a build. Give us your requirements, and we'll try to get them in place for the first release.

First and foremost, getting my dll loaded. Dealing with those issues myself is no fun, particularly once Steam gets involved.
Beyond that (and really basic stuff like identifying the version of FalloutNV present) there's no hard and fast requirements. Stutter Remover likes to use OBSE to issue console commands, print messages to the console, basic things like that, but it doesn't strictly require anything beyond getting loaded so it can start modifying the executable image.

However, unrelated to Stutter Remover there is a feature I want to suggest - having your loader automatically enable (controlled by a command line option, but perhaps defaulting to enabled) the LAA flag in FalloutNV.exe. Oblivion didn't really need LAA, but it looked to me like Fallout was a lot closer to needing it, so probably a heavily modded New Vegas will be really getting close. I think that has to be done by the loader (though I'm not confident) and since presumably nvse_loader will handle the loading...
User avatar
Austin England
 
Posts: 3528
Joined: Thu Oct 11, 2007 7:16 pm

Post » Wed May 05, 2010 4:17 am

First and foremost, getting my dll loaded. Dealing with those issues myself is no fun, particularly once Steam gets involved.
Beyond that (and really basic stuff like identifying the version of FalloutNV present) there's no hard and fast requirements. Stutter Remover likes to use OBSE to issue console commands, print messages to the console, basic things like that, but it doesn't strictly require anything beyond getting loaded so it can start modifying the executable image.

Sounds good. I know Ian is working on bringing over the plugin API - so getting you loaded should be no problem.
However, unrelated to Stutter Remover there is a feature I want to suggest - having your loader automatically enable (controlled by a command line option, but perhaps defaulting to enabled) the LAA flag in FalloutNV.exe. Oblivion didn't really need LAA, but it looked to me like Fallout was a lot closer to needing it, so probably a heavily modded New Vegas will be really getting close. I think that has to be done by the loader (though I'm not confident) and since presumably nvse_loader will handle the loading...

Unfotunately, I don't think we're going to be able to do anything about that. Because this is a real steam app, we won't actually have a loader application. Instead we'll have a loader dll, and we'll be loaded after the exe is already running. So we don't have quite the control we used to over loading executables. We can patch things, but I think we may be too late to change the Large Address Aware flag. Ian would know for certain, however.
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Wed May 05, 2010 2:34 am

OK, very good news. I've just finished talking with an engineer at Valve, and we've worked out a way to make NVSE compatible with the Steam wrapper. This means that our main worry about releasing is gone.

Massive thanks to Valve on this, you guys rock. (not sure if the person I talked to wants to be individually named)

Now we just need to implement enough commands to make for a good first release, and hope Bethesda doesn't update the runtime while we aren't looking.

Awesome.
In less than a week, you have pulled off something that would have taken a team of developers and a private law firm a month or two to do.

I personally wish there were some other way to show my appreciation for what you put in to this project other than just saying "thanks".
If it weren't for you guys doing this, it wouldn't be getting done.
Thank you.
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Wed May 05, 2010 3:33 am

However, unrelated to Stutter Remover there is a feature I want to suggest - having your loader automatically enable (controlled by a command line option, but perhaps defaulting to enabled) the LAA flag in FalloutNV.exe. Oblivion didn't really need LAA, but it looked to me like Fallout was a lot closer to needing it, so probably a heavily modded New Vegas will be really getting close. I think that has to be done by the loader (though I'm not confident) and since presumably nvse_loader will handle the loading...

We will only need a loader executable for the editor, everything else will be automatically handled via Steam. This also means that the method posted in http://www.gamesas.com/index.php?/topic/1128540-req-remove-the-2-gig-memory-limit/page__st__40 will be compatible with us.
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm

Post » Tue May 04, 2010 4:09 pm

Gratz on the steam-compatible loader! Valve does it once again! And nice to see you back, behippo :)
User avatar
Richard Thompson
 
Posts: 3302
Joined: Mon Jun 04, 2007 3:49 am

Post » Tue May 04, 2010 6:55 pm

Gratz on the steam-compatible loader! Valve does it once again! And nice to see you back, behippo :)

It is good to be back. I'm recharged and ready to really get this done. Just added all of the GetWeaponXXX functions from FOSE. They were a straight port over, so went quite fast.
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Tue May 04, 2010 8:43 pm

:D behippo and Valve are credit to team!
User avatar
phil walsh
 
Posts: 3317
Joined: Wed May 16, 2007 8:46 pm

Post » Tue May 04, 2010 2:47 pm

As a player who cannot even think of Bethesda gaming experience without OBSE & FOSE, a huge thanks to Ian and behippo. Hats off to you.
The entire modding community owes you so much. Thanks.
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am

Post » Tue May 04, 2010 7:23 pm

Not enough :foodndrink: and :icecream: to express :mohawk:

Your guys' work is, not exaggerating, the single most important community contribution, in my estimation.
User avatar
djimi
 
Posts: 3519
Joined: Mon Oct 23, 2006 6:44 am

Post » Wed May 05, 2010 3:44 am

I've only recently started fiddling with FOSE scripts in the GECK in FO3 (I've been using FOSE/OBSE mods for quite some time) and it's a great tool. I have a few ideas for mods that I'd like to see in NV.

Anyway, wanted to say thanks for all your work, the modding community wouldn't be the same without these awesome script extenders.

And a request: I looked for a way of toggling the crosshair but wasn't very lucky. Is it possible to to implement something like GetShowCrosshair (returns 0 if the crosshair is off and 1 if it's on) and SetShowCrosshair (accepts values of 0 or 1 to deactivate or activate it)?
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Wed May 05, 2010 12:45 am

sounding good, glad to here valve is on board as well. Cant wait for the release to see what people start creating for NV
User avatar
Sharra Llenos
 
Posts: 3399
Joined: Wed Jan 17, 2007 1:09 pm

Post » Tue May 04, 2010 8:17 pm

Good to hear Valve is still as helpful as ever, they really are good guys :D Looking forward to what the community can do with with the extender :foodndrink:
User avatar
Bad News Rogers
 
Posts: 3356
Joined: Fri Sep 08, 2006 8:37 am

Post » Tue May 04, 2010 3:55 pm

great work behippo (and valve!)

i'm actually suprised valve is helping as i know most companies wouldn't.

*glares at GFWL*
User avatar
Jonathan Montero
 
Posts: 3487
Joined: Tue Aug 14, 2007 3:22 am

Post » Tue May 04, 2010 9:30 pm

i'm actually suprised valve is helping as i know most companies wouldn't.


Actually, Valve is very good to the modding community. They've hired modders to come work for them.

It is still awesome though seeing developers that "Get it". :)
User avatar
Maria Leon
 
Posts: 3413
Joined: Tue Aug 14, 2007 12:39 am

Post » Tue May 04, 2010 10:02 pm

Go NVSE team! Go Valve! :celebration:
User avatar
Arnold Wet
 
Posts: 3353
Joined: Fri Jul 07, 2006 10:32 am

PreviousNext

Return to Fallout: New Vegas