Jump to content

Fallout New Vegas GECK & Scripting Help 101


Recommended Posts

Posted

Weapons and Ammo:

 

  1. If you use a DT Reduction or DR Reduction ammo effect, that DT/DR modifier only applies for that ammo, right?  It doesn't permanently fuck up someone's armor so that other ammo has an easier time getting through, right?  I know that the GECK wiki SAYS that DR isn't used in NV, but it looks like it is for Med-X and some perks and the final damage calculation if the NV wikia is right.  Just want some confirmation.
  2. According to the GECK wiki, the "Ignore Normal Weapon Resistance" flags for weapon and presumably ammo don't work anymore.  Is there a way to apply DT/DR reduction to a weapon, or is that unnecessary if you've got it on the ammo?  I know that you have to do at least 1 damage for effect scripts to go off, but I don't know if the weapon has to do 1 damage for the Ammo Effect script to go off.
  3. The weapon that I'm using/creating is a dart gun.  The original texture/mesh files are included in NV even though the game doesn't have one in it.  The companion shows the weapon at her side, and she's executing her package properly (as in, a console check shows that she's using the right package).  However, she doesn't fire the gun.  When I replaced it with another weapon, she was firing it.  I've got no 1st person IS checked, but I left 3rd person IS unchecked.  Is the problem a missing or incorrect weapon anim?  Any ideas?

EDIT:  I have been looking at other dartgun mods to mimic the same settings, although now that I think about it, I don't know if they said that a companion can use it.  It's marked as playable and isn't limited to the player, so it isn't/shouldn't be a matter of flags.

 

EDIT EDIT:  : P    Does the weapon also need to do DPS?

Posted

3) I just created the dartgun and it works with my follower. NPCs can use every weapon if you don't flag Player Only, but they must know the ammos they have in inventory are the right ones. I ASSUME the package isn't working for that reason, you force her to wield it but she can't shoot because she has no bullets so she unwield and it loops. Inside the WeapDartGun (or whatever you called it) check if you flagged NPC use ammo, Playable and you chosed the right ammunition type from the drop down menu Ammunition (your small stimpak ammos), the rest should be only visual / cause effects (Projectiles). If you want to make a try, you could give it to your follower and temporary de-activate her combat behaviours (the script where she shoots at you) to check if she normally shoots at enemies when in combat: if you do in the right way you will see her shooting at them (well, healing them... :) )

Posted

Don't forget the Spell effect of the ammo or weapon I think is only applied if the target takes at least one point of damage so if they have high DR/DT it may not work on them which sort of makes sense. It's in the GECK help somewhere.

Posted

Yes that stupid damage thing was hyper annoying on my dart gun as well. The idea was a tranquilizer dart. Three hits and the player is knocked out. Only due to the "script only fires when damaged" caveat, the player ends up getting hit like 10 times instead! :blush:

Posted

Yes that stupid damage thing was hyper annoying on my dart gun as well. The idea was a tranquilizer dart. Three hits and the player is knocked out. Only due to the "script only fires when damaged" caveat, the player ends up getting hit like 10 times instead! :blush:

I think the order you have the ammo effects in is also important, I think I increate the DR/DT slightly then reduce the damage of the ammo afterwards.

Posted

Well, it's time I asked a possibly complicated question! (Or at least it's complicated to me this morning!) :blush:

 

Two questions, though figuring out only one would be sufficient.

 

One: This might only be regarding ZAZ. Is there a way to use the Sexout system for playing an animation indefinitely? Particularly a 2 or more person animation.

 

Scenario: Player walks into a building with multiple NPC's engaged in 2 or 3 person animations. (I'm thinking chiefly ZAZ animations here.) From there, the player can take action via a messagebox or even better dialog. (That might be odd though depending on animation!) :s

 

Two: Thoughts on a procedure for getting an NPC to idle in a ZAZ animation and also allow 2 person (or more) animations to take place periodically?

 

Scenario: I'd like to have NPC's stuck in various ZAZ devices (cross, pillory, whatever). Then randomly (via packages, scriptbox perhaps) other NPC's walk up and engage in an animation. This could of course be useful for normal Sexout animations as well.

 

So what's the point of it all?

I already wrote a series of scripts for making NPC's play a ZAZ animation forever. I did that by using playidle onLoad and a check in GameMode to start the animation again if it has stopped. (This was needed for combat as NPC's have a tendency to hop out of animations when combat happens even if restrained.) Activating an NPC stuck in an animation pops up a messagebox allowing the player to take action or walk away. In this manner I've been able to make use of ZAZ devices provided they are only single person animations. As interesting as that is, I'd like to use 2 or more person animations as well. I can handle positioning for one NPC and a static object, but handling two NPC's (or more) sounds a bit... inconvenient. :shy:

 

The first scenario is probably going to be simplest. Though random animations would be more interesting.

 

Any thoughts on any of this? :cool:

Guest tomm434
Posted

Hello. Can anyone help me with a script?

 

 

scriptname aaraiderfriendlyfire

ref raideractorbomb

begin gamemode
if (raideractorbomb.IsKiller player ==1 && raideractorbomb.GetInFaction raiderfaction ==1)
player.PlaceAtMe NVDLC01BombCollarExplosion
player.kill player 1
endif
end

 

 

I want player character to explode on the moment she kills any raider.

If I write "begin ondeath" instead of "begin  gamemode" the script can not set as "quest script".

I tried to find any reputation scripts in GECK(scripts which are activated when player hits any friendly faction NPC in New Vegas) so I could just take conditions from it but I didn't find anything.(at least not by "reputation" or "faction" tags)

 

So. any tips on what should I do?

Posted

Well, it's time I asked a possibly complicated question! (Or at least it's complicated to me this morning!) :blush:

 

Two questions, though figuring out only one would be sufficient.

 

One: This might only be regarding ZAZ. Is there a way to use the Sexout system for playing an animation indefinitely? Particularly a 2 or more person animation.

Any animation, including ZAZ, can be paused indefinitely by casting SexoutNGPause on one of the actors involved in the act. Resume with SexoutNGResume.

 

Two: Thoughts on a procedure for getting an NPC to idle in a ZAZ animation and also allow 2 person (or more) animations to take place periodically?

 

Scenario: I'd like to have NPC's stuck in various ZAZ devices (cross, pillory, whatever). Then randomly (via packages, scriptbox perhaps) other NPC's walk up and engage in an animation. This could of course be useful for normal Sexout animations as well.

This is a bit tougher, but I have been laying the groundwork to do this with refSurface for a while. Right now you can do it by just playing one side of the ZAZ animation and then stopping that animation and doing the 2p or 3p one, but there will be ragdolling in between. The pillory or other device will be facing a different direction unless you position and rotate actorb before starting the second act.

Posted

Hello. Can anyone help me with a script?

I want player character to explode on the moment she kills any raider.

If I write "begin ondeath" instead of "begin  gamemode" the script can not set as "quest script".

I tried to find any reputation scripts in GECK(scripts which are activated when player hits any friendly faction NPC in New Vegas) so I could just take conditions from it but I didn't find anything.(at least not by "reputation" or "faction" tags)

 

So. any tips on what should I do?

 

I think you miss the part where you should define that reference.

If these are "special raiders" (like a new small group you created for your mod), you could add a OnDeath script to them all with a GetRef.

 

But if it should work with ALL the raiders ingame, I assume they must be your friends too, you modified your relationship with their faction (or you should flee instead of fight them back?), so I would create a similar script but checking the faction relationship with their faction. But it's better if you explain a bit more about this.

Guest tomm434
Posted

 

Hello. Can anyone help me with a script?

I want player character to explode on the moment she kills any raider.

If I write "begin ondeath" instead of "begin  gamemode" the script can not set as "quest script".

I tried to find any reputation scripts in GECK(scripts which are activated when player hits any friendly faction NPC in New Vegas) so I could just take conditions from it but I didn't find anything.(at least not by "reputation" or "faction" tags)

 

So. any tips on what should I do?

 

I think you miss the part where you should define that reference.

If these are "special raiders" (like a new small group you created for your mod), you could add a OnDeath script to them all with a GetRef.

 

But if it should work with ALL the raiders ingame, I assume they must be your friends too, you modified your relationship with their faction (or you should flee instead of fight them back?), so I would create a similar script but checking the faction relationship with their faction. But it's better if you explain a bit more about this.

 

 

It applies to all Raiders in game. They all are in "raiderfaction". They are generaly hostile but I make them friendly with player later.

Posted

So I ASSUME you must die only after you became friend to them? because if not, for some time the player will be obliged to flee from them or he will explode. Is it correct?

Guest tomm434
Posted

So I ASSUME you must die only after you became friend to them? because if not, for some time the player will be obliged to flee from them or he will explode. Is it correct?

 

Yes, so after some dialogues quest starts and player character gets collar on her neck. Quest has this script running. After getting collar off, quest stops and these scripts no longer run so player can kill raiders freely.(or I can make a condtion of player having collar equiped)

 

The problem is - I don't know how to make a reference to all npc in raider faction. i know hot to make reference to particular NPC but there are a lot of raiders npc IDs in GECK.

Posted

 

The problem is - I don't know how to make a reference to all npc in raider faction. i know hot to make reference to particular NPC but there are a lot of raiders npc IDs in GECK.

 

 

Stick their base in a static formlist and check against NX_IsInList = base?

 

Posted

That's what I was thinking. The first solution that comes to my head is this one, but maybe someone else has something more interesting.

 

Easiest solution:

quest stage 10 - I become friend of raiders >>>> go to quest stage 20

if quest stage == 20

  if player is enemy of raider faction, then kill him

 

at this point when the quest stage will be 30 for example, and you won't have the collar anymore, it won't work anymore. Essentially what I'm thinking is that if you kill a raider and you have witnesses you should become their enemy. But still this doesn't work for sneak kills, which makes sense if you will die because a raider triggers your collar, but won't make sense if the collar should trigger automatically because it has some sort of electronic device.

 

another solution,harder but more believable, could be this one:

 

if GetStage MyQuest == the moment I take the collar

  If player.IsInCombat

    set MyRef to GetCombatTarget

    if MyRef.GetInFaction RaiderFaction

      if MyRef.GetHitLocation != -1

        my head explodes

 

Which essentially means if the player is fighting, check who is his combat target (which doesn't mean you are fighting with him). If the combat target is a raider, check if you have hit him in some location, if it so make your head explode. This could run in gamemode inside the quest script. The sintax must be checked, I just dropped down the idea without checking it

Posted

I'm having trouble understanding this.  If they are shooting at you, which in turn forces you to 'not' defend yourself, why don't they just push the button and blow your head off instead of wasting ammo and running you down?  Am I missing something?

 

It sounds like a 'hold still while we kill you, or... we'll kill you' situation.  Why the middle man?

Guest tomm434
Posted

That's what I was thinking. The first solution that comes to my head is this one, but maybe someone else has something more interesting.

 

Easiest solution:

quest stage 10 - I become friend of raiders >>>> go to quest stage 20

if quest stage == 20

  if player is enemy of raider faction, then kill him

 

at this point when the quest stage will be 30 for example, and you won't have the collar anymore, it won't work anymore. Essentially what I'm thinking is that if you kill a raider and you have witnesses you should become their enemy. But still this doesn't work for sneak kills, which makes sense if you will die because a raider triggers your collar, but won't make sense if the collar should trigger automatically because it has some sort of electronic device.

 

another solution,harder but more believable, could be this one:

 

if GetStage MyQuest == the moment I take the collar

  If player.IsInCombat

    set MyRef to GetCombatTarget

    if MyRef.GetInFaction RaiderFaction

      if MyRef.GetHitLocation != -1

        my head explodes

 

Which essentially means if the player is fighting, check who is his combat target (which doesn't mean you are fighting with him). If the combat target is a raider, check if you have hit him in some location, if it so make your head explode. This could run in gamemode inside the quest script. The sintax must be checked, I just dropped down the idea without checking it

 

brilliant. The problem is  - in TTW after you made player friends wirh raiders and player kills on of them - they don't become hostile. they only become hostile if character hit any of them for 4-5 times.

So, I will try to implement the second option. Thanks.

 

 

 

Stick their base in a static formlist and check against NX_IsInList = base?

Thanks. I will keep it it mind.

 

 

 

 

I'm having trouble understanding this.  If they are shooting at you, which in turn forces you to 'not' defend yourself, why don't they just push the button and blow your head off instead of wasting ammo and running you down?  Am I missing something?

 

It sounds like a 'hold still while we kill you, or... we'll kill you' situation.  Why the middle man?

 

It's a sexout mod so they keep player character alive for sex but on the short leash. And if player hurts any of them - she literally blows up.

Posted (edited)

Why would they be shooting at you if they want you alive?  Not to be difficult, just trying to follow along with clarity.

 

EDIT: Oh you mean after they've been set to non hostile I think?  NVM.

Edited by t3589
Guest tomm434
Posted

"GetCombatTarget" requires an expllicit reference(specified reference) and in my case I have no specified reference. Am I doing something wrong

Posted (edited)

Thinking of something else.  I'll shut up now.

 

EDIT: What I meant to say was you can use ref.GetCombatTarget as a bool to check if it's empty.

Edited by t3589
Guest tomm434
Posted

Thinking of something else.  I'll shut up now.

 

EDIT: What I meant to say was you can use ref.GetCombatTarget as a bool to check if it's empty.

 

I don't know what you mean by that.

I tried using your part of the code, GECK saves the script but nothing happens in game.

Posted

set MyRef to GetCombatTarget should be ref.GetCombatTarget.  I'm guessing you want to return Player.GetCombatTarget, which will only return something valid if you're actually pointing your crosshairs at it I think.

Posted

"GetCombatTarget" requires an expllicit reference(specified reference) and in my case I have no specified reference. Am I doing something wrong

 

yes sorry, I mean set Myref to player.getcombattarget >>> put in a reference the one the player is targetting

 

EDIT: yes T, that's why the next IF checks if that target is actually being hit by the player in any location. It should become valid because of the next If statement, if it's in Raiderfaction so it's a raider >>> valid ref

 

EDIT again:

while I nested the conditions so that they give less weight to the script execution, I suppose that for sync problems it will miss shoots during a fight involving more people (both friends and raiders) because it is possible that you shoot to someone else you didn't focus in the previous frame execution. It needs to be tested, but I feel it needs more code to work. Let me know.

Posted

I feel more confortable with this one:

if GetStage MyQuest == the moment I take the collar

  If player.IsInCombat

    if TargetIsRaider
        set MyNextRef to player.GetCombat Target
        if MyNextRef == MyRef
           if MyRef.GetHitLocation != -1
              my head explodes
           endif
        else
           Set TargetIsRaider to 0
        endif

    else
    set MyRef to player.GetCombatTarget
    if MyRef.GetInFaction RaiderFaction
         set TargetIsRaider to 1
    else
         set TargetIsRaider to 0
    endif
 endif

Where I would mean this:

 

TargetIsRaider is a boolean, true if the target is a raider. It is setted in the second block.

 

Second block (it runs if I still have not a raider as target)

- Give me the target. If it's raider, set the boolean to true.

 

First block

- If I have a raider as target, give me the actual target. If it's the same reference, check if it was shot by me. If it is, let my head explode. If it's a different raider, go back to the second block. This should prevent that de-sync I was thinking about

 

Hope it makes sense for you

Posted

I'm pretty sure when GetCombatTarget is called on the player it will return NULL, unless the player is pointing their cross hairs over the target.  If that is true, then you have to account for the instance when the player is not pointing over the target or MyRef will be blank.

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