[BETA] New Vegas Script Extender (NVSE) v1

Post » Sun Sep 26, 2010 6:02 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.


You could use NVSE's command to change/set the Game Setting since perk rate is now a game setting.
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Mon Sep 27, 2010 2:23 am

Great news on the release! :goodjob:

I'll try my elevators this weekend and see if any of the looping breaks with repeated actions, I also have a few mob respawn scripts that use the loops and reference walking functions. If it works/doesn't work I'll report back.

Cheers and thanks!

Miax
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Sun Sep 26, 2010 7:32 pm

No rush on the RemoveAllTypedItems variations on my account. I wasn't thinking that through. The existing function can easily be used in an inclusive manner. I am though eagerly awaiting GetCrosshairRef. :)
User avatar
Ashley Tamen
 
Posts: 3477
Joined: Sun Apr 08, 2007 6:17 am

Post » Mon Sep 27, 2010 3:59 am

@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.

No worries. :)

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

If this one includes GetGameLoaded/Restarted, I might just have what I need. :)

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.

Could be the calls to the non-existent UI functions?
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Mon Sep 27, 2010 12:25 am

Pardon me if this is a stupid question, but will this still work for those of us who usually run Steam in offline mode for single player games?
User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Post » Sun Sep 26, 2010 10:49 pm

Can I bind console commands to a key via script with "IsKeyPressed" ?

In particular I try to make a small mod that lets me enable the "ToggleCollision" command with the F1 key and the comands "ToggleFreeCamera"/"ToggleMenu" with the F2 key so I can easily make screenshots in free camera mode and easily get out of stucked postions.

Edit: Oh I see, this doesn't work right now. Could you implement "Con ToggleMenu", "Con ToggleFreeCamera" and "Con ToggleCollision" for next version? Or maybe a variable that lets me execute bat files.
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Mon Sep 27, 2010 4:50 am

One request, would GetEquippedAmmo be possible? It doesn't seem to respond to GetEquippedObject.
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am

Post » Sun Sep 26, 2010 11:15 pm

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?

Anything that just sets the mod order shouldn't be affected by NVSE. While I haven't tested it, it should work fine.

If this one includes GetGameLoaded/Restarted, I might just have what I need. :)

I still hadn't implemented those yet, and I don't see them listed with Ian's changes. We'll need to look into them some more today. If the UI functions aren't of much use to you without those functions, we'll hold off on the next release until we've got them nailed down.

Pardon me if this is a stupid question, but will this still work for those of us who usually run Steam in offline mode for single player games?

Should work just fine.

Can I bind console commands to a key via script with "IsKeyPressed" ?

In particular I try to make a small mod that lets me enable the "ToggleCollision" command with the F1 key and the comands "ToggleFreeCamera"/"ToggleMenu" with the F2 key so I can easily make screenshots in free camera mode and easily get out of stucked postions.

You could use IsKeyPressed in a script to figure out when a key is pressed. You can then invoke any available functions in that time. If vanilla NV doesn't enable calling ToggleFreeCamera, ToggleCollision or ToggleMenu then we would have to import those console commands to make them available from scripts (like we did with con_Save for example).
User avatar
Sweet Blighty
 
Posts: 3423
Joined: Wed Jun 21, 2006 6:39 am

Post » Mon Sep 27, 2010 4:26 am

I still hadn't implemented those yet, and I don't see them listed with Ian's changes. We'll need to look into them some more today. If the UI functions aren't of much use to you without those functions, we'll hold off on the next release until we've got them nailed down.

I use these for a lot of init stuff, so take your time with it. :)
User avatar
Mike Plumley
 
Posts: 3392
Joined: Wed Sep 05, 2007 10:45 pm

Post » Mon Sep 27, 2010 1:06 am

Edit: Oh I see, this doesn't work right now. Could you implement "Con ToggleMenu", "Con ToggleFreeCamera" and "Con ToggleCollision" for next version? Or maybe a variable that lets me execute bat files.

I can easily import the ToggleXXX functions. In OBSE we had RunBatchScript. We can also look at how easy it would be to bring that across.

One request, would GetEquippedAmmo be possible? It doesn't seem to respond to GetEquippedObject.

What exactly are you looking for Talkie? Are you wanting to know which Ammo is currently loaded in the weapon? Or are you wanting to get the ammo (or ammos) available for the weapon? As it stands GetEquippedObject 5 should return the base object for the weapon. GetWeaponAmmo Weapon should return the available ammo (either a TESAmmo or a FormList of TESAmmos). But neither will tell you what ammo is being currently used.

A GetCurrentEquippedAmmo function to return the ammo loaded into your equipped weapon would be useful. I can add that to the list of things to figure out. This may be a similar chase to figuring out what the number of shots left in the current clip is. But I can look. The data is somewhere (and having a keypress to cycle through the various ammo types is a good place to start looking).
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm

Post » Sun Sep 26, 2010 7:01 pm

Congrats on the fast release and thanks for all your hard work. :foodndrink:
User avatar
Chris Guerin
 
Posts: 3395
Joined: Thu May 10, 2007 2:44 pm

Post » Mon Sep 27, 2010 12:13 am

Good work on the Release!!! Gonna start playing with it right away.
User avatar
Brooke Turner
 
Posts: 3319
Joined: Wed Nov 01, 2006 11:13 am

Post » Mon Sep 27, 2010 5:47 am

I can easily import the ToggleXXX functions. In OBSE we had RunBatchScript. We can also look at how easy it would be to bring that across.


Thanks a bunch friend. I'm looking forward to it.

Oh, and btw. congrats on the first release.
User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Sun Sep 26, 2010 4:22 pm

A GetCurrentEquippedAmmo function to return the ammo loaded into your equipped weapon would be useful. I can add that to the list of things to figure out. This may be a similar chase to figuring out what the number of shots left in the current clip is. But I can look. The data is somewhere (and having a keypress to cycle through the various ammo types is a good place to start looking).
Yup, that's what I was looking for, thanks. I meant to say it doesn't respond to getEquipped, rather than getEquippedObject- I was attempting to make a mod for the recharger rifle that let you toggle between laser & plasma with different rates of fire for each, but getEquipped AmmoID wouldn't return anything.
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm

Post » Sun Sep 26, 2010 11:09 pm

Awesome! :) Thanks for all your hard work. Your script extenders truly are the life of the party.
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Mon Sep 27, 2010 6:45 am

Yup, that's what I was looking for, thanks. I meant to say it doesn't respond to getEquipped, rather than getEquippedObject- I was attempting to make a mod for the recharger rifle that let you toggle between laser & plasma with different rates of fire for each, but getEquipped AmmoID wouldn't return anything.

What - there are functions available other than what we provide?!? My mistake/misunderstanding. I'll try and implement GetCurrentEquippedAmmo.
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Mon Sep 27, 2010 4:17 am

Thanks guys! :celebration:

I am very concerned about the Steam issues:
From NVSE ReadMe:
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.

It's on by default, so unless you've disabled it you don't have to do anything. It means the in-game steam menu (accessible with shift-tab) is enabled.
User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Mon Sep 27, 2010 5:52 am

GetGameRestarted and GetCrosshairRef have been added for beta 2. I've included a new list in the OP which shows what is implemented for the next beta.
User avatar
Calum Campbell
 
Posts: 3574
Joined: Tue Jul 10, 2007 7:55 am

Post » Mon Sep 27, 2010 12:30 am

GetGameRestarted and GetCrosshairRef have been added for beta 2. I've included a new list in the OP which shows what is implemented for the next beta.


Oooh! Thanks so much. Now I can vastly improve the power of my Atomizer. :thumbsup:
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Mon Sep 27, 2010 2:15 am

I've been testing this a bit and noticed a few bugs. First, Con_CloseAllMenus results in all of the player controls aside from the movement controls being disabled - EnablePlayerControls doesn't help.

Second, SetWeight doesn't work and, when used in a script, results in the entire script never being fired again. Not sure what's up with that.
User avatar
Adam
 
Posts: 3446
Joined: Sat Jun 02, 2007 2:56 pm

Post » Mon Sep 27, 2010 12:11 am

You might want to update the OP to be a little more specific as to the version of Steam people need:

When they open Steam and go to Help->About..., they should see the following information:

Steam client application info:
* Built: Nov 3, 2010 @ 14:20:13
* Steam API: v010

If they don't, they should go to the "Steam" menu, and select Check for Steam Client Updates...
User avatar
Danii Brown
 
Posts: 3337
Joined: Tue Aug 22, 2006 7:13 am

Post » Mon Sep 27, 2010 8:23 am

I've been testing this a bit and noticed a few bugs. First, Con_CloseAllMenus results in all of the player controls aside from the movement controls being disabled - EnablePlayerControls doesn't help.

Thanks for the report. CloseAllMenus may behave differently now. It may assume that it is in console mode when it is called and not behave properly called elsewhere. It is possible that it is simply unusable in NV outside of the console. This will require more investigation.

Second, SetWeight doesn't work and, when used in a script, results in the entire script never being fired again. Not sure what's up with that.

I can look at SetWeight and see what happens. It was also untested. A script running once and never again usually is the result of a problem in the script: an unknown variable or function is in the compiled script and the script running engine decides it is no longer safe to run. I'll see what the behavior is on my machine.
User avatar
Jason King
 
Posts: 3382
Joined: Tue Jul 17, 2007 2:05 pm

Post » Sun Sep 26, 2010 11:12 pm

YES!
Finally I can get my good old PipBoy Readius back! ^^

Thank you so much for this!
User avatar
Alexis Acevedo
 
Posts: 3330
Joined: Sat Oct 27, 2007 8:58 pm

Post » Mon Sep 27, 2010 3:26 am

I'm happy to report that the conversion of my mod from FO3 to NV works fine. I'm not using any of the more advanced functionality, just:

GetNumericGameSetting
GetControl
GetNumKeysPressed
TapKey
SetNumericGameSetting
IsKeyPressed
HoldKey
ReleaseKey
User avatar
Strawberry
 
Posts: 3446
Joined: Thu Jul 05, 2007 11:08 am

Post » Sun Sep 26, 2010 5:26 pm

I'm happy to report that the conversion of my mod from FO3 to NV works fine. I'm not using any of the more advanced functionality, just:

GetNumericGameSetting
GetControl
GetNumKeysPressed
TapKey
SetNumericGameSetting
IsKeyPressed
HoldKey
ReleaseKey

Excellent.
User avatar
Brandon Bernardi
 
Posts: 3481
Joined: Tue Sep 25, 2007 9:06 am

PreviousNext

Return to Fallout: New Vegas