-
Posts
60 -
Joined
-
Last visited
Everything posted by paulatreides0
-
Easy Way to Check for Followers?
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
Ahh, okay, thank you. I was mainly curious as to how handle updating, and now I know! So then, something like this would work? Actor this_actor Actor[] companions_list Form this_weapon Event OnEffectStart(Actor akTarget, Actor akCaster) this_actor = akTarget If this_actor == Game.GetPlayer() companions_list = Game.GetPlayerFollowers( ) RegisterForCustomEvent (FollowersScript.GetScript(), "CompanionChange") endIf endEvent Event FollowersScript.CompanionChange(FollowersScript akSender, Var[] akArgs) companions_list = Game.GetPlayerFollowers() endEvent -
Is there any easy way to check if an actor is a follower? I need it because I need to handle followers differently from other NPCs for my mod (normally NPCs get heavy weapons removed until they die, and I can't do that with followers for obvious reasons). The only way I can think of is to use an array of the player's followers using Game.GetPlayerFollowers(), but I'm running into issues with that with regards as to how to update the list. I couldn't find a way of updating the list whenever the player gets a new follower, which obviously poses a problem because the only way I can think of resolving that is to, in turn, run a function that updates every x seconds, which could just weigh the game down with constantly running scripts (granted, it's not much, but would still prefer to avoid it if possible).
-
"wah, wah- I want money" post on Gamasutra
paulatreides0 replied to zanity's topic in Fallout 4's Discussion
What you just said is completely false. Changing the price of your product or charging for portions of your product that were previously free (or available at any price) has never been, and will probably never be (and thank god for that) illegal under any legal system on the planet. What is illegal is changing the price of a service in violation of some previous agreement. In other words - a company can't promise you electricity at $10/month at a locked rate and then change it, but unless they explicitly stated that the rate was locked, they could change it anytime they please to whatever they please. Other than that it is, of course, illegal to charge someone retroactively (e.g. selling a product for $5 and then coming back and demanding that you pay another $45 on top of that for the product). But paid modding would be neither of the above and in violation of no law anywhere. If you want to state that it *is* a violation of the above, please provide the exact portion of the EULA or any other legally binding document where Bethesda agrees to provide this service for free indefinitely. -
Where are equipped fusion cores?
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
Unfortunately I had already searched those prior to coming here, and couldn't find much. Insofar as I could tell, the game never needs such a function as what I want because it only has one type of fusion core to begin with. I would like to try to add different cores beyond just "PA_FusionCore01", which would need to be done in the CK, but I can't figure out how that they are incorporated for the life of me. Gahhh, never mind. I'm an absolute idiot! I found out how to do it!...I think... -
I'm trying to change fusion core drain rates. At first I tried changing the actor value PABatteryDrain, which achieved my goal of speeding up core consumption, and then made multiple different cores with more health. Then on experimenting I realized that, apparently, fusion core drain rates aren't affected by the core's health. So now I'm trying a different approach that uses a script to modify PABatteryDrain depending on the equipped core, but I need to know how the game "equips" fusion cores to armor, which I'm not sure of. I pretty much just want to return the name of the fusion core. As it stands now I have 4 new varieties of fusion cores plus the vanilla one. They are added to the "PA_FusionCore01" OMOD (which I think is what the game uses to power PAs) using their own constructible objects like normal fusion cores do. But I need a way of checking which one is equipped. Simply being able to check the name would be enough. But since PA is not a weapon I can't use that. And I tried using "Game.GetPlayer().IsEquipped(<CoreName>)", but that didn't seem to work either. Anyone have any clue how to check that?
-
Script Not Applying Consistently?
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
You're absolutely right. Here is the fixed code: Event OnEffectStart(Actor akTarget, Actor akCaster) this_actor = akTarget if (this_actor.GetEquippedWeapon() != none) Weapon equippedweapon = this_actor.GetEquippedWeapon() this_actor.UnequipItem(equippedweapon) Utility.Wait(1.0) this_actor.EquipItem(equippedweapon) endif endEvent Ahh, okay. Thank you for letting me know! I was confused for a moment. -
Script Not Applying Consistently?
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
Ahh, thanks, I was presuming that was happening. Thanks for the solution! But what was really puzzling me was why it was working back when I had an "OnEquipped" event on the weapons, as opposed to know when it's an "OnItemEquipped" event on the race record. Also, a quick question: this_actor.GetEquippedWeapon() is none when you are running the equip function, no? After all, we unequip the actor earlier, so he would have nothing equipped. Or am I getting something wrong here? -
My script isn't applying consistently. Or at least, it's inconsistent to how it was working before. The purpose of the script is to detect if heavy weapons are equipped, and then does some stuff. For reference, here's the current script, it is attached to a script-archetype magiceffect applied to an ability-type spell applied to the humanrace record: Scriptname RestrictionFunctions:HeavyWeaponryRestriction extends activemagiceffect Keyword Property HeavyRangedWeapon Auto Const Keyword Property HeavyMeleeWeapon Auto Const Message Property CantEquipWearPA Auto Const Message Property EquipWithLargeMaluses Auto Const Message Property EquipWithSmallMaluses Auto Const Keyword Property isPowerArmorFrame Auto Const ActorValue Property Strength Auto Const Perk Property BigLeagues01 Auto Const Perk Property BigLeagues02 Auto Const Perk Property BigLeagues03 Auto Const Perk Property HeavyGunner01 Auto Const Perk Property HeavyGunner02 Auto Const Perk Property HeavyGunner03 Auto Const Perk Property StrongBack01 Auto Const Perk Property StrongBack02 Auto Const Perk Property StrongBack03 Auto Const Actor this_actor Form this_weapon Event OnEffectStart(Actor akTarget, Actor akCaster) this_actor = akTarget endEvent Event OnItemEquipped(Form akBaseObject, ObjectReference akReference) this_weapon = akBaseObject If (this_actor != none) If (this_weapon.HasKeyword(HeavyRangedWeapon) == True && this_actor.IsInPowerArmor() == False) If (this_actor.HasPerk(StrongBack01) == False || this_actor.HasPerk(HeavyGunner01) == False || this_actor.GetBaseValue(Strength) < 8) this_actor.UnequipItem(this_weapon, True, True) If this_actor == Game.GetPlayer() CantEquipWearPA.Show() endIf If this_actor != Game.GetPlayer() this_actor.RemoveItem(this_weapon) RegisterForRemoteEvent(this_actor, "OnDeath") endIf endIf ElseIf (this_weapon.HasKeyword(HeavyMeleeWeapon) == True && this_actor.IsInPowerArmor() == False) If (this_actor.HasPerk(StrongBack01) == False || this_actor.HasPerk(BigLeagues01) == False || this_actor.GetBaseValue(Strength) < 8) this_actor.UnequipItem(this_weapon, True, True) If this_actor == Game.GetPlayer() CantEquipWearPA.Show() endIf If this_actor != Game.GetPlayer() this_actor.RemoveItem(this_weapon) RegisterForRemoteEvent(this_actor, "OnDeath") endIf endIf endIf endif endEvent Event OnItemUnequipped(Form akBaseObject, ObjectReference akReference) If (this_actor != none) If akBaseObject.HasKeyword(isPowerArmorFrame) == True If this_actor.GetEquippedWeapon().HasKeyword(HeavyRangedWeapon) If (this_actor.HasPerk(StrongBack01) == False || this_actor.HasPerk(HeavyGunner01) == False || this_actor.GetBaseValue(Strength) < 8) this_actor.UnequipItem(this_actor.GetEquippedWeapon(), True, True) If this_actor == Game.GetPlayer() CantEquipWearPA.Show() endIf endIf ElseIf this_actor.GetEquippedWeapon().HasKeyword(HeavyMeleeWeapon) If (this_actor.HasPerk(StrongBack01) == False || this_actor.HasPerk(BigLeagues01) == False || this_actor.GetBaseValue(Strength) < 8) this_actor.UnequipItem(this_actor.GetEquippedWeapon(), True, True) If this_actor == Game.GetPlayer() CantEquipWearPA.Show() endIf endIf endIf endIf endIf endEvent The script seems to work fine, except for people who begin with the weapon in their inventory. For example, Ack-Ack in the satellite station or any of the flamer guys at Saugus. They will be able to keep their weapons equipped in opposition to the script, but after you kill them all other actors will behave consistently and follow the script. Now, the reason that this is mysterious is because I used to have another script that did the similar thing. This script was attached directly to weapons and was as follows: Scriptname RestrictionFunctions:HeavyRangedWeaponry extends ObjectReference Const Message Property CantEquipWearPA Auto Const Perk Property HeavyGunner1 Auto Const Perk Property StrongBack1 Auto Const Keyword Property isPowerArmorFrame Auto Const Keyword Property HeavyRangedWeapon Auto Const ActorValue Property Strength Auto Const Weapon Property this_gun Auto Const Event OnInit() RegisterForRemoteEvent(Game.GetPlayer(), "OnItemUnequipped") ; Register for player unequipping item, in this case Power Armor EndEvent Event OnEquipped(Actor AkActor) If (Self.HasKeyword(HeavyRangedWeapon) == True && akActor.IsInPowerArmor() == false) If (akActor.HasPerk(StrongBack1) == false || akActor.HasPerk(HeavyGunner1) == false || akActor.GetBaseValue(Strength) < 8) akActor.UnequipItem(Self.GetBaseObject(), True, True) CantEquipWearPA.Show() If akActor != Game.GetPlayer() akActor.RemoveItem(Self.GetBaseObject()) RegisterForRemoteEvent(akActor, "OnDeath") endIf endIf endIf endEvent Event Actor.OnItemUnequipped(Actor akSender, Form akBaseObject, ObjectReference akReference) If akBaseObject.HasKeyword(isPowerArmorFrame) == True ; Check if the player did unequip Power Armor If akSender.GetEquippedWeapon().HasKeyword(HeavyRangedWeapon) If (akSender.HasPerk(StrongBack1) == false || akSender.HasPerk(HeavyGunner1) == false || akSender.GetBaseValue(Strength) < 8) akSender.UnequipItem(akSender.GetEquippedWeapon(), True, True) CantEquipWearPA.Show() endIf endIf endIf EndEvent But this script did remove the weapons from people like Ack-Ack and the flamer guys. Any idea why this seeming inconsistency is there? Afterall, both the "OnEquipped" and the "OnItemEquipped" fire on an item being an equipped, no? So why is this [seeming] inconsistency there?
-
SPECIAL check for equipment
paulatreides0 replied to zrovektor's topic in Fallout 4's Creation Kit and Modders
You make a script on the weapon in question. The script would be something along the lines of: Scriptname Namespace:NameOfScript extends ObjectReference Const ActorValue Strength Event OnEquipped(Actor akActor) If akActor.GetBaseValue(Strength) < 10 akActor.UnEquipItem(Self.GetBaseObject()) endIf endEvent Note that the actor value for strength should probably be defined through the properties section of your script, which you can access by double clicking your script in the CK. -
"wah, wah- I want money" post on Gamasutra
paulatreides0 replied to zanity's topic in Fallout 4's Discussion
Ya, it's not like Fallout 4 had a statement on the packaging saying "comes with bonus free mods that you can download from Beth.rot". And even if it did, as long as SOME mods were available for free, then Bethesda is off the hook. 25% is better than 0% And, from experience, it's significantly easier to live on 25% than 0%. -
I've tried to handle it through both an object script and a magiceffect script applied to the race record, and it's never worked. Does the abPreventEquip function of UnequipItem just not work?
-
Making New Unequip Event
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
You got it. Words cannot describe my excitement right now. I've been trying to figure out how to define flags and global variables in Papyrus for a while now, and had no idea it was so simple! Thank you so very, very much! You've been a greater help than mere language can express, Reneer! -
Making New Unequip Event
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
No, you would not. Look at the OnEffectStart event - it provides the akTarget for you. akTarget is the NPC that the Magic Effect is running on. NPCRef is a global variable that is available everywhere in the script. Ohhh, I think I see. Since NPCRef is a global variable, when I define it in "OnEffectStart", then the value is saved, globally, correct? By which I mean, if I were to use a third event trigger, "OnEventX(ObjectReference akReference)", then I could use still use NPCRef with it's stored value of akTarget, correct? Such that an instance of the magic effect, if "akTarget = Game.GetPlayer()", when I call "NPCRef.GetHealth()" it'll call "Game.GetPlayer().GetHealth", right?? -
Making New Unequip Event
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
If I use "Actor NPCRef", wouldn't I have to explicitly name the actor beforehand? Or is it like defining a generic actor such that any actor that triggers the "OnItemEquipped" trigger will get saved as a reference and carry over into the event? -
Making New Unequip Event
paulatreides0 replied to paulatreides0's topic in Fallout 4's Creation Kit and Modders
Because being able to add it as an ability effect on humanrace means that it would be automatically added to every humanrace actor, including custom companions and new NPCs. Which means more extendability and support. -
I want to make a new unequip event, but am not sure how exactly to define the event and execute it. Because I want this to apply to every actor of the human race, I am thinking of applying it via an ability-type spell effect that runs a script-archetype magic effect. The problem is that I need to be able to freely reference both the actor and the item the actor equips in the same event, I tried playing around with using Onequip and OnItemEquipped simultaneously, but that didn't work because it seemed to only fire one off at a time. So instead I'm trying to go about it by defining a new type of "OnEquip" event that has both objects and actors as parameter inputs. The big problem is that I'm not exactly sure how to do that. I tried reading what Scrivener07 had said in another thread, but I didn't really understand how to apply that in my case. EDIT: Oops, name should be making new EQUIP event. Not unequip.
-
Need help with papryus function.
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
The "!" is actually a logical NOT operator / negation. So if Game.GetPlayer().HasPerk(DisablePlayerEquipingLimiter) returns false, the logical NOT means that it will execute the if statement's code. Ahh, I wasn't aware you could apply it like that. -
Need help with papryus function.
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
Is it not compiling? Also, I think I see a problem right off the bat: I suggest that if you post a script you tell us whether it failed to compile or not, or whether you are just giving us example code. if !(Game.GetPlayer().HasPerk(DisablePlayerEquipingLimiter)) That "!" before "(Game.GetPlayer().Blah-Blah-Blah)" might cause an error, I presume you left it in there by accident. -
Need help with papryus function.
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
Daww, you make me blush. But I'm by no means experienced :P -
How to create a new event?
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
Ah, okay. If I have any questions I'll open up a public thread then. -
How to create a new event?
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
So as to not hijack someone else's thread, do you mind if I PM with any questions I have? -
Need help with papryus function.
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
It's hard to know how to help you because we can't see your whole script. You have people essentially guessing as to how to do that. From what I can tell you are trying to remove an item that has a certain keyword? If so then you want something along the lines of: Game.GetPlayer().RemoveItem(<ObjectNameHere>.HasKeyword(<KeywordNameHere>)) Of course you'll need some kind of way of iterating through objects, either through a list that runs through and checks everything, or using events to check items. But, again, to say any more than that we'd need to see your code. -
How to create a new event?
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
I actually had a very similar question. I am trying to run a script that necessitates a type of "onequip" event, but it needs to store the equipped item and the actor, not just one or the other. So it would be something like: "Event OnHeavyWeaponEquip(Actor akActor, Form akBaseObject). Is this possible? And if so, how would I do it? I've looked at all the custom event creation material, but I still have no idea. I know I can define a custom event, but how to do anything else but define I am completely lost on. -
Need help with papryus function.
paulatreides0 replied to khazerruss's topic in Fallout 4's Creation Kit and Modders
Seeing your script would be rather useful.