Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

You could use GetParentCell to find the current cell at start of a menumode block, then see if it changes immediately in GameMode.

 

Alternatively, in MenuMode, move an XMarker to the player. Then in GameMode,

 

if GetInGrid XMarker, 1 ; if player is still in same or next cell to the marker

 

is false, then you assume fast travel.

Link to comment

Odessa, thanks for the tip!

Unfortunately, both will still not fire from MenuMode 1007 (it just seems to never enter this block at all), but I may have some ideas... I could probably measure Player's average speed using a marker, and when it exceeds any reasonable value, assume fast travel/teleport.

...unless the PC is using a motorcycle mod, grrr!

 

BTW, I've seen a lot of MenuMode 1007 checks in various scripts, are they there just for the sake of logic, or is it just my issue with a non-working 1007 block?

Link to comment

Fairly sure that MenuMode 1007 is the game loading screen, i.e. the save game picking screen.  Now I could be wrong... but...my advice, when you detect MenuMode 1023 ( pip boy data screen), record the position of the character. When you no longer detect MenuMode 1023 (in a GameMode block that's alerted by a flag you set when you enter MenuMode 1023), check position again. If a significant move has occured, they fast traveled. Or use Odessa's suggestion, of GetParentCell.

 

TBH, a lot of ways of accomplishing this.

Link to comment

astymma, thanks, sounds like the best way so far :)

 

Fairly sure that MenuMode 1007 is the game loading screen, i.e. the save game picking screen.

Hmm, from what I've read I thought it's the "spinning wheel" screen which is shown when jumping to a new location or loading a save game.

 

TBH, a lot of ways of accomplishing this.

Well, I was just hoping the game has some built-in means for something like that... which it does, but why the hell they don't work? %))
Link to comment
  • 4 weeks later...

Quick question : Is it possible to find out the actor gender (male or female) from a script type effect? If its possible... whats the syntax?

 

Thanks! :)

From the GECK use the Wiki link in Help, the commands are something like rActor.IsFemale and rActor.IsMale where rActor is the Actor you want to check
Link to comment

The only way my script compile is if I test actor.getissex gender isfemale or ismale does not compile :/

Oops sorry yes you are using the right ones, I haven't used them for a while to remember exactly what they were. Yes its:

if (rActor.GetIsSex Female == 1)

Link to comment

The only way my script compile is if I test actor.getissex gender isfemale or ismale does not compile :/

 

Essentially what you want is this:

 

 

if ref.GetIsSex Female == 1
  do something here
endif

 

If you want something to happen different for both genders, do this:

 

 

if ref.GetIsSex Female == 1
  do something here
else
  do something else
endif
Link to comment

How can you generate a random number in a effect script?

 

I use set rnd to GetRandomPercent into the Begin ScriptEffectStart tag but it seem i always get the same %

Link to comment
  • 4 weeks later...

Hello all,

i want to modify a little part of a script from the Sunny Companion.

 

I made my way throught the hidden topics in Quest windows under Windows 10 - it costs me some time^^

... but anyway - i made screenshots to show you my question.

 

I am loading this ESM's as Masters - Sunny Companion needs them :

 

post-973800-0-87515000-1445702017_thumb.jpg

 

If i choose the dialog "aSunnySexAnal" and open the editor for the Result Script - it shows a "function"

--> where can i find the function "aSunnySexFunction" ? :

 

post-973800-0-15532900-1445702300_thumb.jpg

 

I searched the entire objects inside the GECK - but do not find it....

 

Thanks for help

 

Ava

 

PS.: Can somone tell me how to add a "spoiler"... i dont find the option^^

Link to comment

ok - now i struggle with the API...

 

i simply want to add an option "Sunny masturbate for me"...

 

But as far as i see i have only 3 classes

call fnSexoutActSetInt "IsOral" 1
call fnSexoutActSetInt "IsVaginal" 1
call fnSexoutActSetInt "IsAnal" 1

As far as i understood - they trigger just a randomizer for the class - pe "isOral".

 

...are there no other classes like "isBDSM" or "isMasturbate" ..... ?

 

 

But i see i can adress animations directly -

call fnSexoutActSetInt "Anim" 635

How do i find Animation 635?

 

Is there a kind of database where i see what animation number i need to trigger the correct Animation for a Masturbation Action?

 

Thanks for help

 

Ava

Link to comment

There is an API guide by prideslayer/me here: http://git.loverslab.com/Odessa/sexout/wikis/API

 

If you switch to the new ActRunFull call method, you can use flags to customize the random picker a lot more.

 

For an anim database, your best bet is to look inside the scripts fnSexoutAddInternalAnimsA-H and fnSexoutAmraAddAnimsA-B

 

---

 

To make Sunny masturbate you can just do this:

 

call fnSexoutActRunFull (Ar_Map "ActorA"::SunnyREF)

Link to comment

Thanks for help so far.... :-)

 

I try to edit my first script...

 

Here it is:

 

 

 

scn LevelersMerchantTrade1Script
short Button
short ProcessButton
long myCaps
long myCaps1
long myCaps2
long myCaps3

;begin OnLoad
;    EquipItem LC1SophiaOutfit1NPC 1
;    EquipItem LC1SophiaOutfit2NPC 1
;    EquipItem LC1SophiaOutfit3NPC 1
;    EquipItem LC1SophiaOutfit4NPC 1
;    EquipItem LC1SophiaOutfit5NPC 1
;    EquipItem LC1SophiaOutfit6NPC 1
;    EquipItem LC1SophiaOutfit7NPC 1
;end

begin OnActivate
    if IsActionRef player == 1
        ;set myCaps1 to ( GetItemCount Caps001 )
        set myCaps1 to ( GetGold )
        set myCaps2 to ( LevelersMerchantTrunkREF.GetItemCount Caps001 )
        set myCaps to myCaps1 + myCaps2
        if myCaps2 > 0
            LevelersMerchantTrunkREF.RemoveItem Caps001 myCaps2
            AddItem Caps001 myCaps2
        endif
        if myCaps > 35000
            set myCaps3 to myCaps - 10000
            RemoveItem Caps001 myCaps3
        endif
        if myCaps < 15000
            AddItem Caps001 12000
        endif
        if GetItemCount Ammo10mm < 100
            AddItem Ammo10mm 150
        endif
        if GetItemCount Stimpak < 5
            AddItem Stimpak 5
        endif
        if player.IsSneaking == 0
            set ProcessButton to 1
            if player.GetIsSex Male
                ShowMessage LevelersMerchantMainMMESG
            else
                ShowMessage LevelersMerchantMainFMESG
            endif
        else
            LevelersMerchantREF.OpenTeammateContainer 1
        endif
    endif
end

begin GameMode
    if ProcessButton == 1
        set Button to GetButtonPressed
        if Button > -1
            if ( Button == 0 )
                set ProcessButton to 0
                ShowBarterMenu 25
            elseif ( Button == 1 )
                set ProcessButton to 0
                ShowRepairMenu 100
            elseif ( Button == 2 )
                set ProcessButton to 0
                ShowBarberMenu
            elseif ( Button == 3 )
                set ProcessButton to 0
                ShowPlasticSurgeonMenu
            elseif ( Button == 4 )
                set ProcessButton to 0
                if eval (call fnSexoutActorInUse LevelersMerchantREF)
                    DebugPrint "LevMerT1 - Ava-Action: Masturbating on LevelersMerchantREF - WAITING"
                        ; Wait. ActorREF is already having sex, so any call will fail
                else
                    DebugPrint "LevMerT1 - Ava-Action: Masturbating on LevelersMerchantREF"
                    call fnSexoutActRunFull (Ar_Map "ActorA"::LevelersMerchantREF)
                endif
            elseif ( Button == 5 )
                set ProcessButton to 0
                Activate
            else
                set ProcessButton to 0
            endif
        endif
    endif
end

 

 

 

Its a small menu with a few options - one of it should start the NPC to masturbate.

 

If i choose the option - the NPC walks in position and from then nothing happens.

After i have choosen the option a can't even force the NPC to play other animations - seems for me the NPC is in a kind of waiting position.

 

Two questions.

1. I have a "debugPrint" statement in the script - but i don't see any output in the console - what do i make wrong?

2. Why is the NPC waiting?

 

This is my first try to edit a script^^ so hopefully you will be not to bothered from me....

 

Thanks for help

 

Ava

Link to comment
  • 1 month later...
Guest luthienanarion

Debug prints need debugging to be turned on with a line something like Set Debug 1, I do that in the beginning of SexoutSCR00Main somewhere

dbmode 1

Link to comment

I'm not sure if this has been asked before, but I would like to ask anyway:

 

How do you force third person out of first? I have a mod that forces first person by using DisablePlayerControls, but when I get control

back I am still in first person and have to press 'F' to get back to third. What I want to do is modify the script so I can be able to go back

to third automatically without pressing the 'F' key to do it. Would also come in handy so I can make a mod that disables first person mode.

 

Thanks for any advice! ^_~

Link to comment

I'm not sure if this has been asked before, but I would like to ask anyway:

 

How do you force third person out of first? I have a mod that forces first person by using DisablePlayerControls, but when I get control

back I am still in first person and have to press 'F' to get back to third. What I want to do is modify the script so I can be able to go back

to third automatically without pressing the 'F' key to do it. Would also come in handy so I can make a mod that disables first person mode.

 

Thanks for any advice! ^_~

 

Tapcontrol

 

Link to comment
  • 3 weeks later...

Hey there. I wonder: if the player receives enough XP to gain a level, is there some way to temporarily prevent the Level Up menu from showing up?

Guess it depends by the situations. I think you don't have many chances out there.

The only 2 things I could think about are call a menumode to stop the game, or in case you want to remain in gamemode you should simulate a combat - when npcs are alerted the level up doesnt' come out

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use