[BETA] New Vegas Script Extender (NVSE) v1

Post » Sun Sep 26, 2010 11:56 pm

Version functions are all working perfectly (http://www.newvegasnexus.com/downloads/images/36600-1-1288988925.jpg) so http://www.gamesas.com/index.php?/topic/1137419-relz-the-chicken-and-the-egg/ has been ported.

Tried a few other functions as well and everything's worked. Thanks again! :) Now to uncomment all of FOOK's KeyPress stuff for v0.03b...
User avatar
Katie Louise Ingram
 
Posts: 3437
Joined: Sat Nov 18, 2006 2:10 am

Post » Sun Sep 26, 2010 7:19 pm

my first NVSE mod http://www.gamesas.com/index.php?/topic/1137501-relz-alexscorpions-animated-nvgs/

thanks
:D
User avatar
Manuel rivera
 
Posts: 3395
Joined: Mon Sep 10, 2007 4:12 pm

Post » Sun Sep 26, 2010 5:42 pm

my first NVSE mod http://www.gamesas.com/index.php?/topic/1137501-relz-alexscorpions-animated-nvgs/

thanks
:D

Alex - can you please get your mod marked as beta? NVSE is in beta currently and will undergo changes. Folks consuming your mod should be prepared for new versions of NVSE to come out and perhaps for new drops of your mod.

In general while NVSE is in beta we only want beta testers using it. Introducing folks just wanting to play the game (and not beta test) to NVSE before it is in that state could be bad for the mod and for that user's willingness to use NVSE-based mods in the future.
User avatar
Laurenn Doylee
 
Posts: 3427
Joined: Sun Dec 03, 2006 11:48 am

Post » Mon Sep 27, 2010 12:45 am

I'd like to port over my Powered Power Armor mod from FO3, it'd be a great chance for me to test out a lot of NVSE functions. It's heavily reliant upon the IsPowerArmor function though. I'd like to be able to copy/paste as many of the scripts as possible - it's a big mod, so having to go through and edit a ton of stuff is something I'd like to avoid. Are there any plans to include that function in the next beta?
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Sun Sep 26, 2010 9:14 pm

I'd like to port over my Powered Power Armor mod from FO3, it'd be a great chance for me to test out a lot of NVSE functions. It's heavily reliant upon the IsPowerArmor function though. I'd like to be able to copy/paste as many of the scripts as possible - it's a big mod, so having to go through and edit a ton of stuff is something I'd like to avoid. Are there any plans to include that function in the next beta?

IsPowerArmor is part of beta 1. Sorry if I didn't have that listed in the available functionality.

Edit: listed now
User avatar
Siidney
 
Posts: 3378
Joined: Fri Mar 23, 2007 11:54 pm

Post » Mon Sep 27, 2010 5:31 am

Alex - can you please get your mod marked as beta? NVSE is in beta currently and will undergo changes. Folks consuming your mod should be prepared for new versions of NVSE to come out and perhaps for new drops of your mod.

In general while NVSE is in beta we only want beta testers using it. Introducing folks just wanting to play the game (and not beta test) to NVSE before it is in that state could be bad for the mod and for that user's willingness to use NVSE-based mods in the future.



ok NP :thumbsup:
User avatar
stevie trent
 
Posts: 3460
Joined: Thu Oct 11, 2007 3:33 pm

Post » Mon Sep 27, 2010 6:22 am

Does version 1 support the functionality for me to scan the players inventory to tell me how many 1 and 2 hand weapons he has?
User avatar
Jamie Moysey
 
Posts: 3452
Joined: Sun May 13, 2007 6:31 am

Post » Mon Sep 27, 2010 5:29 am

Does version 1 support the functionality for me to scan the players inventory to tell me how many 1 and 2 hand weapons he has?

Per the OP no. Inventory walking functions aren't in yet.
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Mon Sep 27, 2010 12:17 am

Per the OP no. Inventory walking functions aren't in yet.


Thanks :)

So far so good, I am glad to see progress so far. Ill be looking forward to inventory walking functions when they come online.
Keep up the good work peeps this is really good for the community. :)
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Sun Sep 26, 2010 8:31 pm

Thanks for the help, behippo. :) I followed most of your suggestions and it seems to be working again now; but I'm definitely going to be doing some more testing before calling it fixed...

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.


This is the one thing I didn't try; I was leaving it until last in case the other things worked, mainly because I don't actually yet know how to use PrintToConsole/printc. :whistling: Also because the other things were pretty quick to try out.


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.


I actually did exactly that in an earlier draft (right down to the same naming convention for HatBaseHealth, UpperBodyBaseHealth, etc), and only changed it because declaring less variables seemed... neater. Or something. Admittedly this was not exactly based on a concrete understanding of which method would be more efficient; a lot of scripting is really seat-of-the-pants type stuff for me. Anyway, it's back in now.


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.


This was the last thing I tried, and it seems to be the thing that fixed it. It started working directly after implementing it, anyway.


Finally you may want to cap the health of the object at 100% (which we don't do behind the scenes).


Good to know - I was wondering about that.


Here's the new version of the now apparently working script:

Spoiler
scn ARKArmourRepairKitEffectSCRIPT;Script adapted from Weapon Repair Kitfloat AugmentAmountfloat HeadHealthfloat HeadBaseHealthref HeadREFfloat UpperBodyHealthfloat UpperBodyBaseHealthref UpperBodyREFfloat HatHealthfloat HatBaseHealthref HatREFBEGIN ScriptEffectStart	;// get the current health values for each armour slot	set HeadREF to player.GetEquippedObject 0	set HeadHealth to player.GetEquippedCurrentHealth 0	set HeadBaseHealth to GetHealth HeadREF		set UpperBodyREF to player.GetEquippedObject 2	set UpperBodyHealth to player.GetEquippedCurrentHealth 2	set UpperBodyBaseHealth to GetHealth UpperBodyREF		set HatREF to player.GetEquippedObject 10	set HatHealth to player.GetEquippedCurrentHealth 10	set HatBaseHealth to 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 * HeadBaseHealth )	if HeadHealth > HeadBaseHealth		set HeadHealth to HeadBaseHealth	endif	player.SetEquippedCurrentHealth HeadHealth 0	;// set the UpperBody slot's new health	set UpperBodyHealth to UpperBodyHealth + ( AugmentAmount * UpperBodyBaseHealth )	if UpperBodyHealth > UpperBodyBaseHealth		set UpperBodyHealth to UpperBodyBaseHealth	endif	player.SetEquippedCurrentHealth UpperBodyHealth 2	;// set the Hat slot's new health	set HatHealth to HatHealth + ( AugmentAmount * HatBaseHealth )	if HatHealth > HatBaseHealth		set HatHealth to HatBaseHealth	endif	player.SetEquippedCurrentHealth HatHealth 10END

User avatar
Lucky Girl
 
Posts: 3486
Joined: Wed Jun 06, 2007 4:14 pm

Post » Mon Sep 27, 2010 8:11 am

Per the OP no. Inventory walking functions aren't in yet.


GetNumItems and GetInventoryObject are in, though. If GetWeaponHandGrip works you can do it.

(Inventory Walking refers to getting references to the inventory objects inside a container, not to getting the base object IDs, as those functions are in)

I can confirm that GetNumItems, GetInventoryObject, ListGetCount, and ListRemoveNthForm all work fine as far as I can tell. Also, I don't think GetWeight works at all - it seems to be returning 0 no matter the weight of the item in question.
User avatar
A Dardzz
 
Posts: 3370
Joined: Sat Jan 27, 2007 6:26 pm

Post » Mon Sep 27, 2010 7:44 am

Does version 1 support the functionality for me to scan the players inventory to tell me how many 1 and 2 hand weapons he has?

Per the OP no. Inventory walking functions aren't in yet.

Thanks :)

So far so good, I am glad to see progress so far. Ill be looking forward to inventory walking functions when they come online.
Keep up the good work peeps this is really good for the community. :)


Actually the Inventory walking function in the OP mean the functions to get actual refs out of the inventory, rather than just the base objects. I think that TheCastle can write the script with the functionality in beta 1.

You'll want to use something like this completely untested function:
int nref itemint numItemsint handsint weaponTypeset numItems to player.GetNumItemsLabel 10set item to player.GetNthObject nif (GetType item = 40)    set weaponType to GetWeaponType item    if (weaponType = 1 || weaponType = 3 || weaponType = 4)        set hands to hands + 1    elseif (weaponType = 2 || weaponType = 5 || weaponType = 6 || weaponType = 7 || weaponType = 8 || weaponType = 9)        set hands to hands + 2    endifendifif (n < numItems)     set n to n + 1    Goto 10endifif (hands > 6)    printc "weapons hands found: %.0f" handsendif

User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Mon Sep 27, 2010 9:12 am

GetNumItems and GetInventoryObject are in, though. If GetWeaponHandGrip works you can do it.
(Inventory Walking refers to getting references to the inventory objects inside a container, not to getting the base object IDs, as those functions are in)

Ninja'd! Thanks. I don't think he wants GetWeaponHandGrip, though. I think handgrip means how the weapon is held (what postion for the hands, not necessarily the number of hands.) He wants to know the type of weapon and do some math.
I can confirm that GetNumItems, GetInventoryObject, ListGetCount, and ListRemoveNthForm all work fine as far as I can tell. Also, I don't think GetWeight works at all - it seems to be returning 0 no matter the weight of the item in question.

Well if GetWeight isn't working that would explain why SetWeight isn't either. Strange, as I thought I saw the weight field matched up properly. Probably a coding error on my side. I will take a look. And, you know, test my code before shipping. :whistling:
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm

Post » Mon Sep 27, 2010 1:39 am

Yet Another Request: I'd like a function to use on a scripted inventory object that can determine what container that item is currently within. So, if you've got a BagItem with a BagItemObjectScript on it, you could do something like this:

ScriptName BagItemObjectScriptRef containerRefBegin GameMode	Set containerRef to GetItemContainer	If ( containerRef != Player )		ContainerPersistentRef.RemoveAllItems containerRef	EndIfEnd


This way you could have an item where if you placed that item into a container, it would spill all the items from some other reference's inventory into the container with the item in it. There are various other possible uses, too.
User avatar
Makenna Nomad
 
Posts: 3391
Joined: Tue Aug 29, 2006 10:05 pm

Post » Sun Sep 26, 2010 11:12 pm

GetNumItems and GetInventoryObject are in, though. If GetWeaponHandGrip works you can do it.

(Inventory Walking refers to getting references to the inventory objects inside a container, not to getting the base object IDs, as those functions are in)

I can confirm that GetNumItems, GetInventoryObject, ListGetCount, and ListRemoveNthForm all work fine as far as I can tell. Also, I don't think GetWeight works at all - it seems to be returning 0 no matter the weight of the item in question.


Ill get to work on this tonight!
Really really really really appreciate the example script you just made o.o
User avatar
Quick draw II
 
Posts: 3301
Joined: Thu Nov 08, 2007 4:11 pm

Post » Mon Sep 27, 2010 7:31 am

Yet Another Request: I'd like a function to use on a scripted inventory object that can determine what container that item is currently within. So, if you've got a BagItem with a BagItemObjectScript on it, you could do something like this:

ScriptName BagItemObjectScriptRef containerRefBegin GameMode	Set containerRef to GetItemContainer	If ( containerRef != Player )		ContainerPersistentRef.RemoveAllItems containerRef	EndIfEnd


This way you could have an item where if you placed that item into a container, it would spill all the items from some other reference's inventory into the container with the item in it. There are various other possible uses, too.

GetContainer (provided by vanila) should work for this purpose, right?

Ill get to work on this tonight!
Really really really really appreciate the example script you just made o.o

Don't appreciate it too much until you debug through it and solve whatever inevitable problems it has.
User avatar
Lisa Robb
 
Posts: 3542
Joined: Mon Nov 27, 2006 9:13 pm

Post » Mon Sep 27, 2010 7:21 am

Thanks for the clarification re: GetCrosshairRef. No need to apologise that was just my bad comprehension skills getting in the way.
User avatar
Alan Cutler
 
Posts: 3163
Joined: Sun Jul 01, 2007 9:59 am

Post » Mon Sep 27, 2010 4:25 am

GetContainer (provided by vanila) should work for this purpose, right?


I thought there was some function like that, but for some reason I thought it was a FOSE function (and then I looked through FOSE and couldn't find it:p) and my search of the vanilla FO3 commands seemed to lack the proper keywords. Only function for the mod I'm making now is a working Get/SetWeight function, and I'm sure you'll get that fixed soon enough.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Sun Sep 26, 2010 8:05 pm

Any chance the site will go back up soon? Readius just got made for NVSE and I needs me some NVSE!
User avatar
Hot
 
Posts: 3433
Joined: Sat Dec 01, 2007 6:22 pm

Post » Mon Sep 27, 2010 4:50 am

YAY! Now the good mods can get ported. I can't wait for my Jetpack!
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Mon Sep 27, 2010 11:20 am

Nevermind on my earlier post, site's back! Thanks so much for this, I appreciate everything the community does, considering that my game is about as modded as it can be at this point, and the game has easily overtaken Oblivion as my favorite game of this genre ever!
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm

Post » Mon Sep 27, 2010 4:38 am

Don't appreciate it too much until you debug through it and solve whatever inevitable problems it has.


It works. it needs some tweaking but it functions.. way to write my mod for me as an after thought and make me feel dumb. lol j/k

I need to get more functionality in there but this seems to be a good start. Thing is you pulled some scriptnastics there that I didn't even know you can do so I don't fully understand whats happening. Not to distract you or someone else from higher priority's do you think I can get a simple breakdown on what is going on? I understand most of it but im scratching my head on some things. I want to make sure I fully grasp this thing before I start making changes.

Once I get a solid idea of what is going on the rest should be more bite size for a simpleton like myself. :D
/bow
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am

Post » Sun Sep 26, 2010 10:46 pm

*sigh* I guess I have to let steam connect to the internet again so Fallout can patch. I wanted to avoid all patches till i knew they didn't break more then they fixed.

Anyhoo, thanks for the release.
User avatar
dell
 
Posts: 3452
Joined: Sat Mar 24, 2007 2:58 am

Post » Sun Sep 26, 2010 11:32 pm

I'm afraid I don't know enough about FOSE to tell if this is something I should be able to do, but it can't hurt to ask: Should I be able to use the reference returned by GetFirstRefInCell and GetNextRef as a parameter to a function that takes a specific kind of reference? I have a cell with one of each player race in it and I want to MatchRace (and other functions) to a reference returned by the reference-walking functions, but the GECK won't let me save it because it doesn't know that the reference returned will be an actor (Even though I did call GetFirstRefInCell MyCell 200 1 0). I was able to turn up one or two tutorials with the returned ref used as parameter, but I believe they were only functions that would take any kind of reference, not specifically actors. Is there any way to do this?
User avatar
WYatt REed
 
Posts: 3409
Joined: Mon Jun 18, 2007 3:06 pm

Post » Mon Sep 27, 2010 4:18 am

Thank you! I'll start plugging away at my GARU mod and report any issues :)
User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

PreviousNext

Return to Fallout: New Vegas