New Script Functions

Post » Fri May 27, 2011 9:11 pm

This is a list of new script functions. As people figure out how to use these new functions, I (and I'm sure everyone else) would appreciate it if you'd post here and share with the rest of us how they work.

EDIT: I just went through and made a new list of functions - the ones that are actually new, since the previous list had a few ones that actually weren't (they just weren't on the GECK for some reason).

Spoiler
AddCardToPlayer
AddCreatureToLeveledList
AddFormToFormList
AddItemToLeveledList
AddNPCToLeveledList
AddReputation
AddReputationExact
ChallengeLocked
ClearScreenSplatter
DetonatePlacedExplosives
DisablehardcoeTracking
EnableLoadingMenu
GetCasinoWinningsLevel
GetCasinoWinningStage
GetChallengeCompleted
GetDLCCount
GetForceHitReaction
GetOwnerLastTarget
GetReputation
GetReputationPct
GetReputationThreshold
IsAlwayshardcoe
IsCodeRedeemed
IsDLCInstalled
Ishardcoe
IsLoadingMenuEnabled
IsPlayerInRegion
MoveToMarkerWithFade
ObjectUnderReticle
PlaceAtReticle
PlayerInRegion
RedeemCode
RemapWaterType
RemoveAllTypedItems
RemoveRecurringFromChallenge
RemoveReputation
RemoveReputationExact
ResetXP
RevokeCode
SetCameraFOV
SetCasinoCheatLevel
SetCasinoWinningsLevel
Sethardcoe
SetReputation
SetScreenSplatterFade
SetScreenSplatterTexture
SetSecuritronExpression
ShowBlackJackMenu
ShowBlackJackMenuParams
ShowCaravanMenu
ShowLoveTesterMenu
ShowLoveTesterMenuParams
ShowRecipeMenu
ShowRouletteMenu
ShowRouletteMenuParams
ShowSlotMachineMenu
ShowSlotMachineMenuParams
ShowTraitMenu
ShowTraitSelectMenu
SwapTextureOnRef
ToggleDemigodMode
TriggerScreenSplatter
UnlockChallenge


There are 63 new script functions.

The only new function I've tested and am pretty sure on how it works is RemoveAllTypedItems. It requires several parameters:

Ref1.RemoveAllTypedItems Ref2 ??? RepressMessages ObjectType ExclusionList

This removes all objects of ObjectType (40 for weapons, 31 for misc, etc) from Ref1 and adds them to Ref2, ignoring items that are in ExclusionList (a FormList). If RepressMessages is set to 1, then you won't be spammed with item removed/added messages. Not sure what ??? is for, but I think it's probably 'RetainsOwnership'.

Anyone want to share how the other new functions work, or how any old functions may have changed?
User avatar
Katy Hogben
 
Posts: 3457
Joined: Mon Oct 30, 2006 12:20 am

Post » Fri May 27, 2011 12:49 pm

Interesting. RemoveAllTyped Items and ObjectUnderReticle look useful. Where'd you get the list, and does your source also have an update of any new actor values? I don't see any functions related to changing or reading the hardcoe mode needs levels, so I'm assuming they're actor values (they're not globals).
User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Fri May 27, 2011 2:03 pm

GetCasinoWinningsLevel,,125C,
GetCasinoWinningStage,,1262,

Both of these have to do with the Comps level set up in the Casino window. You pick the first, second, third, and 'bust' stages. At each of which the floor manager comps you something, and at bust, or level four, kicks you out. I think level returns what level of this they are at. (1-4)

Look at this chunk of the script, its part of the check to see if the player has gotten more money than level one for the Tops, which is 2500 winnings.

GetCasinoWinningsLevel TheTopsCasinoData =http://forums.bethsoft.com/index.php?/topic/1127542-new-script-functions/= 1


If they are at level 1 (set as 2500 in the Casino windows) its true.


At some point soon I am going to make my own practice casino to check out all these things. Just a single empty room with a floor manager, a bank NPC and 1 slot, roulette and blackjack table. Just to see if I can get it working.
User avatar
Manuela Ribeiro Pereira
 
Posts: 3423
Joined: Fri Nov 17, 2006 10:24 pm

Post » Fri May 27, 2011 8:42 am

Some of these aren't new though. I am pretty sure I have used ToggleActorsAI before, as one example.
User avatar
Sarah Unwin
 
Posts: 3413
Joined: Tue Aug 01, 2006 10:31 pm

Post » Fri May 27, 2011 5:52 pm

Abs probably isn't new, it's just an operation to make a negative value positive. Very handy though if it isn't, as the way I usually have to go about doign this when a system doesn't have an Abs function is to check if the value is <0 and if it is multiply it by -1. Not too elegant, lol.
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Fri May 27, 2011 10:26 am

IsPlayersLastRiddenHorse
IsRidingHorse
IsShieldOut

Looks lime more leftover from Oblivion. Shame they took the riding functionality completely out...
User avatar
Oyuki Manson Lavey
 
Posts: 3438
Joined: Mon Aug 28, 2006 2:47 am

Post » Fri May 27, 2011 10:25 pm

I got the new functions from http://www.gamesas.com/index.php?/topic/1122265-initial-technical-details/page__view__findpost__p__16508760. I simply cut out the ones that are new from the ones that are not and just posted the ones that are.

ToggleActorsAI is a console function in FO3, but it isn't available as a script function. It is in NV, apparently.
User avatar
Rudy Paint fingers
 
Posts: 3416
Joined: Sun Nov 11, 2007 1:52 am

Post » Fri May 27, 2011 9:13 pm

I got the new functions from http://www.gamesas.com/index.php?/topic/1122265-initial-technical-details/page__view__findpost__p__16508760. I simply cut out the ones that are new from the ones that are not and just posted the ones that are.

ToggleActorsAI is a console function in FO3, but it isn't available as a script function. It is in NV, apparently.


You know what, now that you mention it, I think what I had used was "setactorsai".
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Fri May 27, 2011 9:47 pm

The new OnFire blocktype does exactly what you would expect.
Handy, really. Don't know if it triggers on shots caused by FireWeapon, though.
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am

Post » Fri May 27, 2011 6:42 pm

IsPlayersLastRiddenHorse
IsRidingHorse
IsShieldOut

Looks lime more leftover from Oblivion. Shame they took the riding functionality completely out...


I'm actually surprised with how much is left over from Fallout 3, let alone New Vegas. All of the items from Fallout 3 are still there in the Construction set. Even DLC content from Fallout 3 is in there. Don't ask me why...


~Miles "Tails" Prower out! Catch me if you can!
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Fri May 27, 2011 7:26 am

I'm actually surprised with how much is left over from Fallout 3, let alone New Vegas. All of the items from Fallout 3 are still there in the Construction set. Even DLC content from Fallout 3 is in there. Don't ask me why...


~Miles "Tails" Prower out! Catch me if you can!


It was free content - already created, taking little or no effort to add to the game. They had to know including it would make both players and modders extremely happy, improving sales. Makes total sense financially.

And I'm really glad to see an onfire block. My last project for FO3 was a set of energy weapons that used power armor charge for ammo. It required FOSE functions to determine when the player was trying to fire, but this block will let me do the same thing more simply and without NVSE. :celebration:

Also, to add to the list of new stuff, I found the three actor values associated with hardcoe mode hunger/thirst/sleep:

hunger
dehydration
sleepdeprevation (they misspelled it)

They can be adjusted via player.getav/setav/modav, etc.
User avatar
Undisclosed Desires
 
Posts: 3388
Joined: Fri Mar 02, 2007 4:10 pm

Post » Fri May 27, 2011 9:13 am

And I'm really glad to see an onfire block. My last project for FO3 was a set of energy weapons that used power armor charge for ammo. It required FOSE functions to determine when the player was trying to fire, but this block will let me do the same thing more simply and without NVSE. :celebration:
Er, you didn't actually need NVSE. The following code works aok in vanilla Fallout 3- might still be useful if OnFire triggers from FireWeapon commands, or doesn't work on thrown/melee.
ref usershort activeshort animbegin gamemodeif(active)	if(user.GetAnimAction == 2 && anim == 0)		set anim to 1	elseif(user.getanimaction != 2 && anim == 1)		set anim to 0		;DETECTED WEAPON FIRED	endifendifend

User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Fri May 27, 2011 10:25 pm

The weapon didn't have ammo though, so I had to somehow prevent the user from firing when the power armor ran out of charge, making disablecontrol still necessary. Come to think of it, I guess I'll still need that command even with the onfire block, unless I do something like unequip the weapon when it runs out of charge. That would be a hassle for the user though.

I was using several of FOSE's setweapon... commands anyway to tweak the stats dynamically (it was a little over the top). The laser assault rifle had adjustable damage, rate of fire, and 3 firing modes, but overheated more quickly if the damage per second was too high, reducing accuracy as the weapon's materials underwent thermal expansion. The sniper rifle (which hasn't been released yet) has two firing modes, semi and full auto. Full auto is your basic autosnipe, but the semi auto mode fires when the player releases the mouse button rather than when they press it. If you just tap the fire button, it seems to fire like normal, but holding it down for about a second "charges" the weapon, firing a different, more powerful laser blast. I balanced it so that it actually has a slightly higher DPS if you keep firing it as soon as it's fully charged than if you fire it full auto, meaning you trade the difficulty of a slower fire rate for higher damage if you're good with it. It's pretty fun.
User avatar
A Boy called Marilyn
 
Posts: 3391
Joined: Sat May 26, 2007 7:17 am

Post » Fri May 27, 2011 3:13 pm

I just went through and made a new list of functions - the ones that are actually new, since the previous list had a few ones that actually weren't (they just weren't on the GECK for some reason). The corrected list is in the first post.
User avatar
biiibi
 
Posts: 3384
Joined: Sun Apr 08, 2007 4:39 am


Return to Fallout: New Vegas