-
Posts
192 -
Joined
-
Last visited
Everything posted by trashgarbage666
-
Quick question about blood decals!
trashgarbage666 replied to trashgarbage666's topic in Fallout New Vegas's GECK and Modders
Thanks for all the responses!! It's a shame it's handled by an .ini as opposed to something that can be edited in the GECK and packed into an .esm, but I guess beggars can't be choosers. -
Quick question about blood decals!
trashgarbage666 replied to trashgarbage666's topic in Fallout New Vegas's GECK and Modders
I tried that, but didn't have any luck. I was editing "PoolCueFleshImpact" while testing. The duration is initially set at 0.0600. I tried raising it by a little and saw no visible change. Then I raised it by a lot, and it still faded at the normal speed. I started suspecting that maybe PoolCueFleshImpact wasn't the correct Impact Data for my test weapon, so I doubled the minimum and maximum size of the decal, and sure enough that worked just fine. So either the Duration field doesn't work, or doesn't control what we think it does. -
I think you might be on to something with that, because I tried swapping GetSelf with something really simple... Ref rTarget BEGIN GameMode Set rTarget to GetSelf If (GetHitLocation == 1 || GetHitLocation == 2) If Player.GetCombatTarget != rTarget CastImmediateOnSelf HeadshotSpell2 Else CastImmediateOnSelf HeadshotSpell EndIf EndIf END ...and it straight up crashes the game. So I tried printing what GetSelf has been returning all this time, and holy s***, the GECK wiki page for NVSE's Print could not be any less helpful. It's written for people who already know what it is and how to use it. You wouldn't happen to know how to use it, would you? It seems like a really helpful tool for testing things! I'm having trouble getting this to save, but I'm gonna keep moving parts of it around until GECK decides to be less stubborn. My brain has been fried for weeks, ahaha. But same! Hammering this out has been really fun!
-
GetSelf seemed to be functioning fine without assigning it to a reference. In fact, I've seen lots of scripts use various Get____ commands in a similar way. But I gave your suggestion a shot, just in case it ended up being the missing piece to all this, and it didn't turn out so well. Which is pretty confusing, honestly. At the very least, I thought it would just be a different method leading to get to the same result. I was getting experience, but the kills weren't actually being assigned to me. Then I changed "Player.GetCombatTarget != rOwner" to "Player.GetCombatTarget == rOwner", and I was getting credited for the kills. However, when I spawned in 15 NCR troopers to fight 15 Legionaries and pointed my gun a Legionary just as they died, I got credit for all subsequent Legion deaths until the fight ended. This happened consistently every fight. With the GetSelf method, I was only getting wrongfully credited for the murder of the person I was pointing my gun at, and nobody else. EDIT: Sometimes I use "IsKiller Player" on corpses in-game to double check if the player is getting correctly credited for kills. Is there a way to manually set the player to be someone's killer? If so, that might be easier to have headshots do 999 damage to the target, and then tell the game it's the player's fault.
-
Actually, the reason I had both was because "ForceAV Health 0" by itself wasn't killing the target. "DamageAV Health 0" does kill them, but doesn't consider the player to be the person who killed the target. Having "KillActor Player" by itself gives double XP for headshots so long as you bodyshot the target first. I'm thinking about just reducing the XP reward for killing NPCs by half, that way non-headshot kills would award full XP. I don't like that option, but if I can't find a solution, I might be stuck with it. I was able to get the AmmoSCRIPT to tell the difference between player-owned headshots and NPC-owned headshots, but there's a catch... BEGIN GameMode If (GetHitLocation == 1 || GetHitLocation == 2) If Player.GetCombatTarget != GetSelf CastImmediateOnSelf HeadshotSpell2 Else CastImmediateOnSelf HeadshotSpell EndIf EndIf END I tested this by spawning 15 NCR troopers and 15 Legion Veterans close to each other and watching them fight over and over again. None of the kills were wrongfully awarded to me unless I pointed my gun at one of them right before they died. I guess the game considers anything the player is aiming at to be the player's combat target, regardless of whether I pull the trigger or not. I feel like the solution is closeby, I just don't know what to substitute "Player.GetCombatTarget" with. I tried swapping it out for "Player.GetOwnerLastTarget", but it considered every kill to be mine no matter who did it.
-
I actually had the same concern, so I spawned in a monster next to an NPC and set the monster's health to 1 so the NPC would kill it right away. When the monster died, I wasn't given any EXP, and my "Creatures Killed" stat did not go up by one. But I'm still going to follow your advice, just in case. Actually, I did manage to find a bug! If your first hit on an NPC is a headshot, it awards the correct amount of EXP. However! If you shoot a different body part first and then headshot them, you are given double EXP. It doesn't stack, though, so nine body shots and one headshot will not award the player 10x EXP. At max, you're always getting double. My guess is that multiple instances of either the headshot script or headshot spell are still running on the NPC, even after the bullet hits its target. Is there some way to tell a script to "terminate" itself at the end of its code? EDIT: Turns out my current setup does have problems assigning correct kill ownership when the player isn't involved in the fight. Like we had initially assumed, thanks to "KillActor Player", it assumes the player is responsible for every headshot that takes place. I've been tearing the wiki apart trying to find out how to get an item or script to reference itself so I can use GetOwner, but still haven't found anything.
-
HAH!! IT WORKS!! Turns out "ScriptEffectStart" was the script block I needed to use! This is amazing! All this effort finally payed off! It's stable, correctly assigns wonership to each kill regardless of who did it, and awards the correct amount of EXP to the player! To answer your question Mktavish, this setup is lethal to NPCs as well as the player! Dubiousintent and Mktavish, thank you guys so much!
-
I tried out a new method and actually got it to work! It has one noticeable bug, but it's kind of small, and I'm thinking it can be worked out. For some reason, it's rewarding the player with 3x the normal experience for a headshot kill. I'm moving things around to try and solve the issue, but maybe I made a rookie mistake somewhere that I'm just not seeing. Maybe you can spot the problem? On all relevant ammo, I have an Impact Script that looks like this ScriptName AmmoSCRIPT BEGIN GameMode If (GetHitLocation == 1 || GetHitLocation == 2) CastImmediateOnSelf HeadshotSpell EndIf END HeadshotSpell is an Actor Effect type spell with "Disallow Absorb/Reflect", "Script Effect Always Applies", and "Area Effect Ignores LOS" all checked. HeadshotSpell only has one effect, which is to execute the HeadshotBaseEffect so long as the victim isn't wearing a relevant helmet, isn't a creature, and isn't dead. HeadshotBaseEffect has Self checked, and uses the "Script" Effect Archetype. The script it uses is called "HeadshotSCRIPT", and it looks like this ScriptName HeadshotSCRIPT BEGIN GameMode ForceAV Health 0 KillActor Player END And those are all the moving parts! In HeadshotSCRIPT, I originally used "DamageAV Health 999" without "KillActor Player", but it didn't give the player any credit for the kill, and oddly enough, dealt 999 damage to the victim three times. So I think there's a potential clue there.
-
There are two ways to fill GetScriptVariable's target field: selecting something from the Render Window, or telling it which Cell your object is in, and selecting from a dropdown list of objects contained within the Cell. I feel like this method is for something like unique NPCs or objects. My script is attached to all ammunition, and thus isn't something being placed in the game world. GetQuestVariable might be the more viable option, but I have zero experience with quests. I'll give it a try, but it'll be harder to distinguish lack of functionality from user error. For some reason, I'm having no luck using an Ability effect to apply damage on hit. I'm going to keep at it, but it's kind of discouraging that I'm getting nothing from it at all. Like the other thing, I'm having a hard time telling if I'm doing something wrong, or if it just doesn't like GetHitLocation.
-
After lots and lots of testing, I found the script to be too inconsistent to be reliable. And when it started acting odd, it wouldn't work again until the next fight. Sometimes the game would crash when the bullet hit its target. The problem was bad enough that I wanted to try out a perk version, and it's sooo much more stable. No crashes, and no inconsistencies! I guess the goal now is to make two perks for the player -- one that lets NPCs headshot the player, and one that lets the player headshot NPCs. I'm trying to use GetScriptVariable, but its Function Paramters field, the field where I'm assuming my script goes, needs me to select something from the Render Window. Meaning it's expecting my script to be a ...physical object in the game world? Either that, or it's being very misleading. Either way, I have no idea how to feed my script into it. After multiple experiments with "Adjust Limb Damage", I can confirm beyond a reasonable doubt that it only affects how much damage a limb can withstand before being crippled. Limbs do not have health points, they have a durability number derived from the owner's health points. Both numbers go down when damage is applied, but they are separate values.
-
I've set up a perk that gives the player a guaranteed critical hit along with a massive critical hit damage bonus against NPCs not wearing a helmet. I'm using Entry Point > Calculate My Critical Hit Chance and Entry Point > Calculate My Critical Hit Damage. It offers three condition fields: Perk Owner, Weapon, and Target. GetHitLocation seems unresponsive in all three fields. All other conditions I've set are working fine, but GetHitLocation is arguably the most important part of a would-be headshot perk. Maybe I could attach a script to a weapon that sets a variable when it hits something in the head, and then have the perk check for that variable ...? I'm not sure how to get perks to check for variables, though.
-
I read here that you can't use GetHitLocation on a weapon's Object Effect: http://geck.bethsoft.com/index.php?title=GetHitLocation "GetHitLocation won't work if used in a weapon's Object Effect, but will work if used in the weapon's Crit Effect." But, like the "NPCs can't have perks" thing, I'm just parroting stuff I read on the wiki. Obviously, I'm no expert.
-
After a little tinkering, I found a way to work your suggestion into my script, and unfortunately it didn't work. When I loaded up the game, there was about a 50/50 chance I'd be killed from a headshot, helmet or not. It almost felt like the outcome was random each time. I'm assuming your script is able to accurately differentiate between players and NPCs, but in the next script block, the target is still being determined by Player.GetCombatTarget. As for giving perks a try, I really don't want to scrap this script when there's only one bug left to work out. My first attempt at working headshots in the game involved me cranking up the damage mult on human heads, and applying a hidden perk to all helmets that would cancel out the damage bonus. Unfortunately, I wasn't able to successfully get the perk to apply to NPCs. Maybe I will give the helmet perk thing a second try, but I'd also really like to know how to change the subject of GetCombatTarget to the person who owns the weapon. EDIT: Also, just as a side thing, I'm almost certain "Adjust Limb Damage" is for limb crippling, not health points. (Just confirmed it.) EDIT: Actually, after thinking on it for a bit, I realized the reason why I couldn't get perks to apply to NPCs -- because I was trying to reference the player then, too. I need to be able to reference the item's owner in both scenarios. Like... Ref rHelmetWearer Set rHelmetWearer to (this item).GetOwner I don't know how to get the item to reference itself.
-
Turns out I was wrong about NPCs being able to headshot the player. Not really sure how I got tricked into thinking that was working! I'm pretty sure this is an easy fix, but I'm having trouble finding a replacement for the part that references the player. Like I said in previous posts, the script finds its target with "Player.GetCombatTarget". I'd like to change the "Player." part to instead reference the person who owns the gun. I'm not sure if it will work, but here's what I have in mind: Ref rShooter Ref rTarget Set rShooter to (MYSELF).GetOwner Set rTarget to rShooter.GetCombatTarget Since this script is attached to the ammo that comes out of the gun, I'm assuming the game considers the bullet to be owned by the person shooting the gun. However, as you can see from the example script, I'm not really sure how to tell the script to reference itself or the bullet it's attached to. I've been searching google and reading relevant GECK wiki articles, but the example scripts are a little vague, and haven't had any luck yet.
-
I was actually able to get your previous suggestion to work perfectly! You might not have seen it, because I just kind of stealth edited my previous post to say so. However, I thought I'd give your new idea a try just to see if it had any notable pros or cons over the other method, and while it did manage to save, it wasn't able to differentiate between creatures and NPCs. But still! I wasn't even aware of Form Types, so it was helpful all the same! I just wanted to say thanks for all your help. Like I mentioned in a previous post, making mods has sort of become how I de-stress, and now that I'm past this problem I can continue doing that!
-
So after reading this, I thought "oh my god, that's a great idea! I finally get to move forward with my mod! I'm so excited!" and added it to my script right away... only to be stopped dead in the water immediately. The script won't save. It's acting like there's a typo or syntax error. There isn't. Honestly, I think it's not working just to spite me. I hate this. I hate it. I see no reason why your idea shouldn't work, and yet here we are. EDIT: Well, I know "GetEquipped (Form List) == 0" works because I've been using it to tell the script to ignore anyone wearing a helmet! So! I put together an armor / clothing Form List and told the script to only kill things wearing clothes or armor. It didn't work at first, so I changed how the script found its target from "GetOwnerLastTarget" to "Player.GetCombatTarget" and it started working just fine. So it's pretty much mission accomplished at this point? Kind of? I was sorta hoping the player could be killed by headshots as well, but Player.GetCombatTarget dictates that only NPCs shot by the player will be killed. I've been experimenting with stuff like (OwnerOfThis).GetCombatTarget, but haven't had any luck. Anyone have any ideas?
-
Unfortunately, I think you might be right. It's unfortunate because I'm reading the UDF and Event Handling pages on the GECK wiki, and it's just ...completely out of my league. I don't even know where to begin. If you know how to set something like this up, could you walk me through it? Making this mod has been helping me de-stress, and and this point, I feel like my project has hit a wall.
-
I think the problem is GetIsCreature and GetIsCreatureType doesn't like playing nice with the GameMode script block. Here's what I mean: ScriptName HeadshotAmmoSCRIPT BEGIN GameMode Ref rTarget Set rTarget to GetOwnerLastTarget If rTarget.GetIsCreature != 1 ForceActorValue Health 0 Else EndIf END ScriptName HeadshotAmmoSCRIPT BEGIN GameMode Ref rTarget Set rTarget to GetOwnerLastTarget If rTarget.GetIsCreatureType 6 != 1 ForceActorValue Health 0 Else EndIf END Neither of these scripts work. The first script should make my ammo 1-hit kill anything that isn't a creature, and the second script should 1-hit kill anything that isn't a robot, and yet the bullets indiscriminately kill everything they hit. Check out the Boxing Glove script from the vanilla game: scn BoxingGlovesFatigueOnHitScript ; Inflicts Fatigue damage on the target to temporarily knock it out. ; JES Begin OnHit Ref BoxingGloveTarget Set BoxingGloveTarget to GetOwnerLastTarget If (BoxingGloveTarget != PlayerRef) && (BoxingGloveTarget.GetIsCreatureType 6 != 1) BoxingGloveTarget.damageav Fatigue 16 Else BoxingGloveTarget.damageav Health 10 EndIf End This code is able to successfully differentiate between creatures, NPCs, and the player, and yet it does so within the OnHit script block. I'd gladly use OnHit for my code, but I read somewhere on the GECK wiki that the GetHitLocation command doesn't work inside OnHit. Is it possible to use multiple script blocks within the same script? If so, I could probably use OnHit to determine if the target's a creature, and GameMode to determine if the target got hit in the head. That could work... right? EDIT: Couldn't get it to work. So I had another Idea. I tried giving a super mutant a dummy "helmet" item and told the script to not insta-kill anything that has that item in its inventory. It didn't work either, which completely blows me away because I had no problem telling the script not to insta-kill someone wearing a helmet. I'm at a complete loss for what to do.
-
Like the title says, I'm working on a headshot script, and need some help working out a very persistent bug. I have no coding knowledge whatsoever, so the code you're seeing now is based purely on examples and lots and lots of testing. What the script does: The script is attached to Ammo as an "Impact Script". When the ammo hits a target, it checks if the target's human, checks if the target's been hit in either the head or neck, checks if the target isn't wearing a helmet, and checks if the target isn't dead already. If all four conditions are good, it sets the target's health to 0. (I omitted the part that checks for helmets from the example script below, because I actually use three different versions of this script that I apply to ammo of varying caliber. The only difference between the three versions being which helmets prevent headshots from insta-killing the target. It's just a GetEquipped Form List check. It isn't causing the error.) ScriptName HeadshotAmmoSCRIPT BEGIN GameMode Ref rTarget Set rTarget to GetOwnerLastTarget If (GetHitLocation == 1 || GetHitLocation == 2) && (rTarget.GetDead != 1) && (rTarget.GetIsCreature != 1) ForceActorValue Health 0 Else EndIf ENDHere's my problem: Currently, the code says headshots are only lethal if the target IS NOT a creature. However, if I load up the game with the code looking like this, headshots are lethal to everything. Creatures and NPCs. If I reverse the condition so headshots are ONLY lethal to creatures, then headshots behave like a bodyshot on all creatures and NPCs. The GetIsCreature command is behaving like it can't tell the difference between humans and animals. It's really important that I get this script to ignore creatures, because I'd much rather handle headshot lethality on a creature to creature basis through Body Part Data damage mults. The player shouldn't be able to 1-shot deathclaws with a 9mm. Hopefully all my script needs is a fresh set of eyes on it. Thanks for hearing me out!
-
I actually have the Tutorial Killer mod downloaded already! I've been looking it over for a while now. However, like I said in the original post, I can't find the faction messages in the first place to study them, Tutorial Killer mod or not. I suspect that the faction reputation messages aren't actually stored in the Messages section of the GECK, but I'm a total novice with this program, and could easily be wrong. EDIT: Just as a side thing, I'm also curious if it's possible to find and disable the "your target's right leg has been crippled" messages. That's another one I can't seem to find.
-
The only place I find any reference to these pop-up messages in the GECK is under Gameplay / Settings and typing "sRepTitle" into the filter. I find them to be really disruptive, and was hoping I could convert them into corner messages (I'd shorten the text, obviously) or just outright disable them. Any information would be extremely appreciated. This is a mod I've wanted to make for a very long time.