[WIPz] New Vegas Script Extender (NVSE)

Post » Wed May 05, 2010 7:55 am

IsInAir
IsPlayerMovingForward/Backward/Left/Right
IsKeypressed functions
Tap/Hold/HammerKey functions
Tap/Hold/HammerControl functions
GetFirstRef/GetNextRef
While/Loop
GetEquippedItem

I've implemented the input functions (IsKey/ControlPressed, Tap/Hold/ReleaseKey/Control) alrieady, although the Hammer functions aren't implemented as no one really used them in OBSE (so we didn't port them to FOSE.) I've also implemented GetEquippedObject already.

The looping and ref walking functions are already in the list in the OP (as were the functions I implemented you list above).

The IsInAir and IsPlayerMovingXXX functions are not something we've ever implemented (to my knowledge). As such I can pretty much guarantee they will not be in the first version. We'll have to figure out how to implement them.
User avatar
Jonny
 
Posts: 3508
Joined: Wed Jul 18, 2007 9:04 am

Post » Wed May 05, 2010 12:25 pm

Not sure if this was asked yet, but since weapons often utilize formlists as ammo now, how will that affect the usage of GetWeaponAmmo?
And actually it would be kind of important to know if the returned value is in fact a formlist or an ammo.

Or would it perhaps simply display the currently selected ammo?
User avatar
Kortniie Dumont
 
Posts: 3428
Joined: Wed Jan 10, 2007 7:50 pm

Post » Wed May 05, 2010 2:58 am

Not sure if this was asked yet, but since weapons often utilize formlists as ammo now, how will that affect the usage of GetWeaponAmmo?
And actually it would be kind of important to know if the returned value is in fact a formlist or an ammo.

Or would it perhaps simply display the currently selected ammo?

Good question. I did a quick port (untested as of now). I will try and decode things some more and return the most appropriate form. Thanks for the info.
User avatar
Rodney C
 
Posts: 3520
Joined: Sat Aug 18, 2007 12:54 am

Post » Tue May 04, 2010 9:47 pm

I've implemented the input functions (IsKey/ControlPressed, Tap/Hold/ReleaseKey/Control) alrieady, although the Hammer functions aren't implemented as no one really used them in OBSE (so we didn't port them to FOSE.) I've also implemented GetEquippedObject already.

The looping and ref walking functions are already in the list in the OP (as were the functions I implemented you list above).

The IsInAir and IsPlayerMovingXXX functions are not something we've ever implemented (to my knowledge). As such I can pretty much guarantee they will not be in the first version. We'll have to figure out how to implement them.


http://cs.elderscrolls.com/constwiki/index.php/IsInAir

As for the IsMovingForward functions, nevermind, I just wasn't using IsMoving properly.
User avatar
Jaylene Brower
 
Posts: 3347
Joined: Tue Aug 15, 2006 12:24 pm

Post » Wed May 05, 2010 6:46 am

http://cs.elderscrolls.com/constwiki/index.php/IsInAir

As for the IsMovingForward functions, nevermind, I just wasn't using IsMoving properly.

Hmm. I didn't remember that. :shrug: I can take a look and see how that was implemented in OBSE and see how easily it can get ported.
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Tue May 04, 2010 10:07 pm

SetForceSneak 1 does not appear to work on the player, though it does for NPCs. I've tested this in scripts and from the console, the player is not sneaking and IsSneaking returns false. I guess this will be made possible with TapControl , but I think the wiki should be updated.
User avatar
Charles Mckinna
 
Posts: 3511
Joined: Mon Nov 12, 2007 6:51 am

Post » Tue May 04, 2010 10:25 pm

Not sure if this was asked yet, but since weapons often utilize formlists as ammo now, how will that affect the usage of GetWeaponAmmo?
And actually it would be kind of important to know if the returned value is in fact a formlist or an ammo.

Or would it perhaps simply display the currently selected ammo?

The GetWeaponAmmo function will now return the FormList of ammo types for that weapon.

I've also located most of the Mod information and can expose Get functions on those at least. A bunch of the values seem interrelated, so I am not sure that setters are the best thing, unless I find the actual function that New Vegas uses.
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Wed May 05, 2010 9:13 am

...
Read/Write of a text file (for variable storage between save games)

I have a mod I made for FO3 that I want to port over. The FO3 mod is only half finished, because some functionality I needed never made it in to FOSE.

My issue was, when I did SetWeight on a base item, the modified weight didn't persist between game loads.
The weight of the base item is .1. If I changed the weight to 12, it would revert to .1 when the game was restarted.

I was able to hack my way around it using a quest script that used GetGameRestarted to modify the weight at start up, but it has some issues still.

Behippo and I discussed this in the FO3:GECK forum quite a while back. If I remember correctly, I was told that there were plans to add the saving of such data in a "ghost save" (like the *.obse file for Oblivion saves) in version 2 of FOSE.

Is this possibility even on the radar yet for NVSE? Any idea on how soon it might get implemented?
User avatar
Kelly Osbourne Kelly
 
Posts: 3426
Joined: Sun Nov 05, 2006 6:56 pm

Post » Wed May 05, 2010 7:07 am

I have a mod I made for FO3 that I want to port over. The FO3 mod is only half finished, because some functionality I needed never made it in to FOSE.

My issue was, when I did SetWeight on a base item, the modified weight didn't persist between game loads.
The weight of the base item is .1. If I changed the weight to 12, it would revert to .1 when the game was restarted.

I was able to hack my way around it using a quest script that used GetGameRestarted to modify the weight at start up, but it has some issues still.

Behippo and I discussed this in the FO3:GECK forum quite a while back. If I remember correctly, I was told that there were plans to add the saving of such data in a "ghost save" (like the *.obse file for Oblivion saves) in version 2 of FOSE.

Is this possibility even on the radar yet for NVSE? Any idea on how soon it might get implemented?

The co-save files, arrays, strings, maps and tracking changes to items are all (I believe) up and functional in OBSE v0019. We have the technology, we would just need to port it over. When last we talked this was somewhat experimental for OBSE and we wanted all of the kinks knocked out there.

So yes, this is on the radar. I am looking at the implementation and we'll see what makes it into v1 this time. It is under active consideration for the first release. Furthermore, I expect we'll see NVSE get more of the OBSE functionality rolled out that FOSE did. I also expect that as I roll the functionality from OBSE into NVSE, I'll also bring it to FOSE as well.
User avatar
Taylah Illies
 
Posts: 3369
Joined: Fri Feb 09, 2007 7:13 am

Post » Wed May 05, 2010 10:19 am

I also expect that as I roll the functionality from OBSE into NVSE, I'll also bring it to FOSE as well.

You, sir, are a scholar and a gentleman. Hail!
User avatar
Lily
 
Posts: 3357
Joined: Mon Aug 28, 2006 10:32 am

Post » Wed May 05, 2010 12:03 pm

You, sir, are a scholar and a gentleman. Hail!

Well, I feel bad I disappeared and general functionality improvements in FOSE slowed to a trickle. My only concern about bringing the code to FOSE is trying to support all 8 versions of Fallout 3 we supported. I might require the latest stable patch for the new functionality to work.

But first thing is first, I need to get most if not all of the important functionality from FOSE into NVSE.
User avatar
Charlotte X
 
Posts: 3318
Joined: Thu Dec 07, 2006 2:53 am

Post » Tue May 04, 2010 9:13 pm

Well, I feel bad I disappeared and general functionality improvements in FOSE slowed to a trickle. My only concern about bringing the code to FOSE is trying to support all 8 versions of Fallout 3 we supported. I might require the latest stable patch for the new functionality to work.

But first thing is first, I need to get most if not all of the important functionality from FOSE into NVSE.

Don't feel bad - I do that at least once a year. :P We come back and try again when our batteries are full again.

Like I said before, if you match FOSE, the UI gets bling bling. :D
User avatar
Kelly Upshall
 
Posts: 3475
Joined: Sat Oct 28, 2006 6:26 pm

Post » Wed May 05, 2010 9:03 am

It's only a little command I wish for in NVSE and it was ported to FOSE too: 'IsPersistent'. It would help a lot to find out which NPCs are safely enslaveable for FNNCQ2 in advance.
User avatar
Robert Garcia
 
Posts: 3323
Joined: Thu Oct 11, 2007 5:26 pm

Post » Tue May 04, 2010 11:04 pm

The GetWeaponAmmo function will now return the FormList of ammo types for that weapon.

I've also located most of the Mod information and can expose Get functions on those at least. A bunch of the values seem interrelated, so I am not sure that setters are the best thing, unless I find the actual function that New Vegas uses.

Hm well my issue is this:
There are weapons that return formlists, but some weapons also return only an ammo type. Now if it was always a formlist or always ammo, this wouldnt be a problem, but since it can return either, it is hard to do something like count the ammo the player's weapon is using, since I would use ListGetCount for formlists and GetItemCount for counting ammo types.


Also something more important, the functionality of GetControl and GetAltControl:
GetAltControl doesnt return DX scancodes, but instead will return 0,1,2... depending on the mousebutton
GetControl returns the primary key of an action. But if that action is only bound to a mousekey, it will instead return a mousekey. Which would be fine, but the problem is that it doesnt return a DX scancode either, but also 0, 1, 2 etc for the mousebuttons, but those values are also DX scancodes for keyboard keys.
So these issues make it very difficult to use those function reliably if players have heavily modified controls.
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Wed May 05, 2010 10:34 am

It's only a little command I wish for in NVSE and it was ported to FOSE too: 'IsPersistent'. It would help a lot to find out which NPCs are safely enslaveable for FNNCQ2 in advance.

I need to double-check the flags, but this ported straight from OBSE as well, so it should not be a problem.

Hm well my issue is this:
There are weapons that return formlists, but some weapons also return only an ammo type. Now if it was always a formlist or always ammo, this wouldnt be a problem, but since it can return either, it is hard to do something like count the ammo the player's weapon is using, since I would use ListGetCount for formlists and GetItemCount for counting ammo types.

Can you give me an example of a weapon with only one Ammo and an example with more than one? (If the examples include the formID that would be excellent.) The TESObjectWEAP class has a BGSAmmoForm. In Fallout3 the sole member of this ammo form was a pointer to a TESAmmo (at least according to our code). In New Vegas the BGSAmmoForm has (I believe) a pointer to a BGSListForm in it. If a given BGSAmmoForm could have either of those (a list form or a sole ammo) then we'll have to add some additional functions so you can tell the difference. I am hoping that internally even those weapons with a single ammo form can actually take a list instead. But examples will let me figure it out for certain.

Also something more important, the functionality of GetControl and GetAltControl:
GetAltControl doesnt return DX scancodes, but instead will return 0,1,2... depending on the mousebutton
GetControl returns the primary key of an action. But if that action is only bound to a mousekey, it will instead return a mousekey. Which would be fine, but the problem is that it doesnt return a DX scancode either, but also 0, 1, 2 etc for the mousebuttons, but those values are also DX scancodes for keyboard keys.
So these issues make it very difficult to use those function reliably if players have heavily modified controls.

Right now these functions are a direct port from FOSE (and OBSE before hand). How would you like this to behave? What sort of values should be returned for the mouse keys, in your opinion?
User avatar
Wayne W
 
Posts: 3482
Joined: Sun Jun 17, 2007 5:49 am

Post » Wed May 05, 2010 11:44 am

Can you give me an example of a weapon with only one Ammo and an example with more than one? (If the examples include the formID that would be excellent.) The TESObjectWEAP class has a BGSAmmoForm. In Fallout3 the sole member of this ammo form was a pointer to a TESAmmo (at least according to our code). In New Vegas the BGSAmmoForm has (I believe) a pointer to a BGSListForm in it. If a given BGSAmmoForm could have either of those (a list form or a sole ammo) then we'll have to add some additional functions so you can tell the difference. I am hoping that internally even those weapons with a single ammo form can actually take a list instead. But examples will let me figure it out for certain.

Uses Ammo:
WeapAlienBlaster "Alien Blaster" [WEAP:00004322]
AmmoAlienPowerCell "Alien Power Cell" [AMMO:00029364]

Uses a Formlist:
WeapNV9mmPistol "9mm Pistol" [WEAP:000E3778]
AmmoList9mm [FLST:001537E7]

Basically both Formlists and Ammos can be used in the ammo field now. Now it's not a huge problem, since it's only a small handful of weapons that dont utilize formlists. But of course it's possible players could add weapons via mods that only use Ammo. And well like said it would simply pose a problem for scripts that try to count the players ammo for his current weapon in some situations.

Right now these functions are a direct port from FOSE (and OBSE before hand). How would you like this to behave? What sort of values should be returned for the mouse keys, in your opinion?

Optimally they should just return the correct scancodes, since the mousebuttons do have their own scancodes (256, 257, 258, etc).
For example as it stands right now, if I use GetControl for an action that has only the right mouse key bound, the returned value is 1, but that's not actually the scancode (since 1 is the scancode of the escape key), what I would need returned is 257.
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Wed May 05, 2010 12:29 pm

@behippo
Thanks for looking into it.
User avatar
Isabell Hoffmann
 
Posts: 3463
Joined: Wed Apr 18, 2007 11:34 pm

Post » Tue May 04, 2010 9:42 pm

Uses Ammo:
WeapAlienBlaster "Alien Blaster" [WEAP:00004322]
AmmoAlienPowerCell "Alien Power Cell" [AMMO:00029364]

Uses a Formlist:
WeapNV9mmPistol "9mm Pistol" [WEAP:000E3778]
AmmoList9mm [FLST:001537E7]

Basically both Formlists and Ammos can be used in the ammo field now. Now it's not a huge problem, since it's only a small handful of weapons that dont utilize formlists. But of course it's possible players could add weapons via mods that only use Ammo. And well like said it would simply pose a problem for scripts that try to count the players ammo for his current weapon in some situations.

Thanks. I will check these out and see what is used behind the scenes in the class where I collect the data. If they are different, we can either add different functions, or (more likely) the modder will have to use GetType or an IsType to figure out whether a form list of ammos or an ammo was returned.
Optimally they should just return the correct scancodes, since the mousebuttons do have their own scancodes (256, 257, 258, etc).
For example as it stands right now, if I use GetControl for an action that has only the right mouse key bound, the returned value is 1, but that's not actually the scancode (since 1 is the scancode of the escape key), what I would need returned is 257.

Hmm. The code looks like it adds 0x100 if the device is the mouse. Not sure why we wouldn't detect that difference in FOSE. I will have to experiment and see. This might be something we tackle in the beta next week.

Thanks for your input.
User avatar
Guinevere Wood
 
Posts: 3368
Joined: Mon Dec 04, 2006 3:06 pm

Post » Wed May 05, 2010 10:38 am

Ok, one more request, though I feel like I'm getting greedy. When you set up a base effect, there's a "Show Name Only" checkbox. If you're setting up a value modifier effect, i.e. a non-script effect, I'm pretty sure it controls whether the name, magnitude, and duration, or just the name, are displayed on mouseover of the ingestible carrying the effect in the pipboy inventory tab (in other words it will display "HP +5(3s)" if the box is unchecked, versus just "HP" if the box is checked). For a script type effect though, checking it causes the name of the effect to be displayed, while unchecking it will hide the name entirely. Since it's possible to hide the name by just not specifying a name, it would be great if the checkbox functioned the same way for script effects as it did for non-script effects - leaving it unchecked caused both the name of the effect plus the magnitude and duration to be displayed in the pipboy. It might be a tall order, but I'd feel dumb if it ended up being something easy and I didn't ask for it early on. There's definitely no rush for it, but it would be nice if it were included somewhere down the line.


Shortly after writing this I realized it was pretty well outside of the scope of FOSE/NVSE, but I thought of another possible solution. If I'm remembering right, if you add items to the HUD via xml you have to actually take steps to prevent them from being visible all the time, meaning if I wanted to I could make some hud elements that were only visible while you were in the inventory tab of your pipboy. Since the Pipboy displays effect and item information on mouseover of an item, would it be possible to create a function that returned the base object of whatever item the player was currently mousing over? From there I might be able to put together my own readout of the information I wanted to display, without totally overwhelming the Pipboy's built in effect information box.
User avatar
Baby K(:
 
Posts: 3395
Joined: Thu Nov 09, 2006 9:07 pm

Post » Wed May 05, 2010 2:49 am

The co-save files, arrays, strings, maps and tracking changes to items are all (I believe) up and functional in OBSE v0019. We have the technology, we would just need to port it over. When last we talked this was somewhat experimental for OBSE and we wanted all of the kinks knocked out there.

So yes, this is on the radar. I am looking at the implementation and we'll see what makes it into v1 this time. It is under active consideration for the first release. Furthermore, I expect we'll see NVSE get more of the OBSE functionality rolled out that FOSE did. I also expect that as I roll the functionality from OBSE into NVSE, I'll also bring it to FOSE as well.

This is better news than I expected.
It would be great to see FOSE moving forward again!

Well, I feel bad I disappeared and general functionality improvements in FOSE slowed to a trickle. My only concern about bringing the code to FOSE is trying to support all 8 versions of Fallout 3 we supported. I might require the latest stable patch for the new functionality to work.

But first thing is first, I need to get most if not all of the important functionality from FOSE into NVSE.

Don't feel bad. Real lfe takes precedence, this is just a game. I know we pester the dikeens out of you for stuff, but I doubt there is anyone here that honestly believes you are obligated to do what you do. We're all just here to have fun.
User avatar
Robert
 
Posts: 3394
Joined: Sun Sep 02, 2007 5:58 am

Post » Wed May 05, 2010 12:49 am

I would very much like arc-trigonometry functions, asin, atan, etc. I'm working on a hoverboard atm and this would greatly improve collision detection.

EDIT: Oh nevermind, I can use sin(x) / cos(x) for atan(x). Where is my head today.
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Wed May 05, 2010 6:13 am

Another request, would it be possible for a function that returns the players total gun spread value? As in not the weapon's spread, but the actual final spread (which includes factors like the players skill, crouching bonus etc).
User avatar
:)Colleenn
 
Posts: 3461
Joined: Thu Aug 31, 2006 9:03 am

Post » Wed May 05, 2010 12:15 pm

I would very much like arc-trigonometry functions, asin, atan, etc. I'm working on a hoverboard atm and this would greatly improve collision detection.

EDIT: Oh nevermind, I can use sin(x) / cos(x) for atan(x). Where is my head today.


"tan x 1" will return the arctangent - the 1 is an optional parameter, if its 0 in a trig function its sin, cos, tan, if 1 its arcsin, arccos, arctan.
User avatar
courtnay
 
Posts: 3412
Joined: Sun Nov 05, 2006 8:49 pm

Post » Wed May 05, 2010 3:47 am

Another request, would it be possible for a function that returns the players total gun spread value? As in not the weapon's spread, but the actual final spread (which includes factors like the players skill, crouching bonus etc).

I'll see what I can find.
User avatar
Ladymorphine
 
Posts: 3441
Joined: Wed Nov 08, 2006 2:22 pm

Post » Wed May 05, 2010 7:23 am

I'll see what I can find.

Thanks for taking the time.

And another (hopefully) minor request:

Would it be possible to implement HoldControl and ReleaseControl functions, similar to the key variants? Here's hoping this might be a simple one, since tapcontrol, enablecontrol etc functions are already in place anyhows :)
User avatar
ashleigh bryden
 
Posts: 3446
Joined: Thu Jun 29, 2006 5:43 am

PreviousNext

Return to Fallout: New Vegas