Jump to content

paulatreides0

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by paulatreides0

  1. Ahhh, so I can't switch them around? Stupid me, I thought they could be switched. So if I want to run the script above, which extends an actor, I would need to RegisterRemoteEvent during an OnInit event and then run the event using Actor.OnItemEquipped, right? Or would it work as it stands? Okay, just answered my own question through testing. So I guess I understood script extension even less than I thought.
  2. I'm trying to attach an ability-type spell into the race record that runs a script. The script itself is very, very simple: Scriptname TestScript:AbilityTestScript extends Actor Message Property Message1 Auto Const Keyword Property Keyword1 Auto Const Event OnItemEquipped(Form akBaseObject, ObjectReference akReference) If akBaseObject.HasKeyword(Keyword1) == True Message1.Show() endIf endEvent This script is then applied to a MagicEffect entry of the "Script" archetype. This MagicEffect is then fed into an ability-type spell. And this ability-type spell is then added to the HumanRace record as an ability. However, when I try equipping a weapon with Keyword1 (which I added to its keyword list) it displays no message, which I think means that the script isn't getting fired. What am I doing wrong? The script is extends Actor and the OnItemEquipped is meant for actors so it should fire, no? Likewise, because it applies to humanrace and PC is humanrace, then it should hold, no?
  3. Actually, that part does work. Tested it and everything. It's a modified version of a companion affinity script. Unfortunately, I can only get it to apply to the player character, which is a bit of a pain, as it means that if you shoot the core out of an NPC's PA and they get out, then they will be able to wield the weapon despite their not being able to normally. Is there any way of "saving" the object for later referrence? Like, for example, assigning it to some variable? I tried finding out how to do so but couldn't find out a way of doing so. If I could say at the beginning: this_gun = self, that would resolve the problem, no? I just don't know how to do that with papyrus. Ideally this could be resolved with the "abPreventEquip" parameter of the UnequipItem function, but every time I try that they just go and equip it again. That's why I am trying to do the roundabout way of deleting the item. Would you happen to know the reason why abpreventequip isn't working?? Thank you for the suggestion. I have a question about that method though - how would I iterate through the actors in the location? I'm not sure of how I could say "while actors in cell don't have perk A" in Papyrus.
  4. So, in my long quest to try to make it so that an item is dynamically unequipped outside of PA, I've tried many things. First I tried forcing them to unequip the item. This didn't work because they would just keep unequipping it. Then I tried setting the "can't equip" setting on UnequipItem() to "True" as follows: 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() endIf endIf endEvent And that didn't work either. They would just keep trying to re-equip it and because there was some slight delay between it being equipped and unequipped, they could get a few shots off. I don't know why it doesn't work - they shouldn't even be able to try to re-equip the thing! (An explanation would be greatly appreciated). So then I decided to try something different: remove the item entirely, and add it back on the death of the NPC. So I did this (whole script ahead): 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 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) RegisterForRemoteEvent(akActor, "OnDeath") endIf endIf endIf endEvent Event Actor.OnDeath(Actor akSender, Actor akKiller) akSender.AddItem(Self.GetBaseObject()) 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 And...it kinda worked. They finally didn't have the weapon around anymore...but when they died the weapon didn't get re-added to their inventory. What is going wrong here? Also, if you guys don't mind a bonus question: at the bottom is a bit of script to prevent the equipment of equipment outside of power armor when you exit it. Because of the OnInit() thing it only applies to the player right now, and I can't think of how to extend it to all human-type actors. Because I can't just state a generic actor, it's a bit of a problem. Any idea how that can be resolved?
  5. Hmm, I'll try it. If you don't mind my asking though, I don't get why that's the case. Isn't self already an instance of the item in question? So if the item is, say, a Gatling Laser, it should know that I'm asking it to unequip not just a gatling laser, but that specific gatling laser in question, no? Your script is running on an Objectreference, whereas the UnequipItem function is expecting a Form. Objectreference.GetBaseObject() returns a Form. Ahh, I see. Thank you!
  6. Hmm, I'll try it. If you don't mind my asking though, I don't get why that's the case. Isn't self already an instance of the item in question? So if the item is, say, a Gatling Laser, it should know that I'm asking it to unequip not just a gatling laser, but that specific gatling laser in question, no?
  7. Hey, sorry to be back yet again, but I've stumbled across something that has me scratching my head big time again. I was trying to change some code to see if I could make it easier to work with and more efficient, so I decided to try using keyword pulls instead of iterating through form lists. My code is 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 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, True, True) CantEquipWearPA.Show() 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 The problem is that it seems that akActor.UnequipItem(Self, True, True) isn't working. And it should, from what I can tell. The script is applied to a weapon so that on being equipped that specific instance of the weapon is what the script is being run on. It DOES properly check itself and say "Do I have this Keyword?" And I know it does that because the CantEquipPA.Show() event happens, but it does not unequip itself from the actor. Any idea what is going on?
  8. I'm trying to configure a script so that it fires when you exit power armor. I checked all the native "OnEvent" options, and none of them seemed to be what was needed. Which means I need to create my own event for this? If I am wrong, can someone please clarify for me, and if I'm not, I would greatly appreciate some help with event creation, as I'm not sure how to go about doing that.
  9. ...Forget it, I'm an idiot. Forgot to enable the mod file >,>
  10. Power Armor automatically sets the strength of the user to 11, anybody know how I could get it to...well, stop doing that? I thought it was under the EnchPA_Abilities page of the enchantments, but after testing...apparently not?
  11. Yup, it should go 0% => 50% => 100% crit chance, but instead it goes.... I'm sorry, I just realized what my mistake was. I have wasted your time and have been a complete idiot. That should be 100, not 1.00, I mixed up that mod crit chance is base based off 100, not 1.00
  12. I'm trying to add an effect to a perk to slow time that is dependent on whether or not the player is holding their breath. Is there any way to detect such a thing? I searched under the conditional items, but saw nothing to that end. Furthermore, is there a way to extend the slow time spell for as long as the player is in that state? It seems to be set as a "Fire and Forget" spell that requires a duration, so it seems that I will have to use a really duration with some kind of turn-on and turn-off conditions or a script to make it work like I"m thinking. Is there any other way of going about it?
  13. Yes, it works if you do that. It seems that the system works in such a way that it holds the first value no matter what instead of discarding it in favor of the value stored in a higher perk. As such, you have to manually handle this hierarchy. Luckily, you only have to do so every increment. So if Perk1 changes, say, damage, Perk2 leaves damage alone, but Perk3 and Perk4 both change it, then you need to configure it so that: For Perk 1: HasPerk3 == 0.0 For Perk3: HasPerk4 == 0.0 Perk4 requires nothing additional. Note that for things like crit chance, that's not stored as a magical effect, so for things that are only available through the entry point menu, then you have to use the actual perk page's conditions part for it. EDIT: It seems the above may not be quite correct. Crit chance is turning out to be a royal pain in the arse, because it seems to behave properly only whenever it feels like it. So be warned that the above might not be quite correct An image of what is going on: http://s33.postimg.org/x91lziu3z/Sniper_Weirdness.png Rank 1 => 2 everything transitions fine, rank 2=>3 only "Mod Scope Hold Breath Mult" changes, "Mod My Critical Hit Chance" resets back to what it was in Rank 1. My eyes see only red.
  14. From what I understand from your question, the rank 1 perk overrides the rank 3 one? If so I noticed Bethesda used a system of "HasPerk" and setting the first rank to only activate if you DO NOT have the second rank, and the same for the opposite. This ensures that only one of the two versions can be active. Yes, that is the problem. Which is very, very strange. I unlock the third rank, and it should overwrite the first rank by setting the value to the new one from the third rank instead of the one from the first rank. But it doesn't, the first one continues to overwrite it and it does this for every property that it shares with the first (e.g. breathing AP drain). So it seems that the first rank is active...but at the same time, I was getting the accuracy boost (to headshots in VATS) from rank 3, so that one had to be active too. It seems like, for some reason, rank 3 didn't overwrite rank 1 even though it should have. Also, note, this is a character started from scratch just to test the file. No perks had been taken. It was at a vanilla level three, un-upgraded, leveled up to 100 via the command console and given the adequate perception and sniper rank. Did you try the solution I mentioned? It can be found in multiple existing perks, so you can find the method in the vanilla fallout4.esm. Whether or not it works would be helpful information :smile: Oh sorry, I misunderstood what you were saying. I'll give it a try and get back to you tomorrow, if I can get my bloody creation kit working, that is. Damn thing's bugging out atm.
  15. From what I understand from your question, the rank 1 perk overrides the rank 3 one? If so I noticed Bethesda used a system of "HasPerk" and setting the first rank to only activate if you DO NOT have the second rank, and the same for the opposite. This ensures that only one of the two versions can be active. Yes, that is the problem. Which is very, very strange. I unlock the third rank, and it should overwrite the first rank by setting the value to the new one from the third rank instead of the one from the first rank. But it doesn't, the first one continues to overwrite it and it does this for every property that it shares with the first (e.g. breathing AP drain). So it seems that the first rank is active...but at the same time, I was getting the accuracy boost (to headshots in VATS) from rank 3, so that one had to be active too. It seems like, for some reason, rank 3 didn't overwrite rank 1 even though it should have. Also, note, this is a character started from scratch just to test the file. No perks had been taken. It was at a vanilla level three, un-upgraded, leveled up to 100 via the command console and given the adequate perception and sniper rank.
  16. A similar question, if I might butt in as I was trying to do something a bit similar, is adjusting values. For example, I tried adding a crit chance to the sniper tree. Okay, worked fine...for the first value. If I added some kind of change via the "entry point" option of the perk options and I used set value, it would stay there no matter what. So if I set the crit chance of sniper 1 to 5% and then set the crit chance of sniper 3 to 100%, it would remain at 5%, and similarly for other such systems. I thought if you used set to value it just over-rid what came before it. Is this false? Should I use set for the first value and then use add/subtract? I feel like something fishy is going on, because the nuclear physicist perk (the increasing fusion core usage part) works by using set every time it changes a new value, but when I try that it just goes kaput and doesn't change.
  17. So, for some reason, my creation kit UI just suddenly stopped working properly. I can no longer find or access the main menu window, which is a major pain because that means I can't do anything, since it's where you open and save files, amongst other things. Here's an image of all I can see: http://s33.postimg.org/qek7fk94d/Creation_Kit_Malfunction.png Does anybody know what is going on here, and how I fix this? This has been bothering me for hours, and it's absolutely driving me nuts. I've tried reinstalling the blasted thing, and nothing seems to change
  18. This is just wrong on so many levels.... Separating humans of "different races" as being "different species" predates the 19th century and science in general, be it explicitly or implicitly. And even then, the "scientific" notion that the races were different didn't just originate in America, but originated concurrently in Europe and the United States. It was simply an adaptation of already extant and popular beliefs under the guise of "science" to make it seem more fashionable and informed than it was. During the 19th century you even had hair splitting between the "white races", with nationalism driving certain nations to believe themselves "genetically superior" to others. To state that the "scientific racism" movement came from the US to try to justify slavery is not just wrong, its dishonest and perpetuates a gargantuan lie. Likewise, what you've said about eugenics is falsehood. Eugenics didn't evolve from some pro-slavery movement. The basic idea has been around since at least as long as Plato. The Spartans actively practiced it. The first man to advocate eugenics to control birth amongst the "lesser" was American, but William Goodell didn't want to stop black people from reproducing, he wanted to use eugenics to prevent mental illness like insanity. Eugenics wasn't something restricted to race either, as many eugenicists were black (notably W.E.B. DuBoise and Thomas Wyatt Turner) Many early eugenicists were not concerned with crippling other races, but with improving their own races through selective breeding and getting rid of mental illness and genetic (or, rather, hereditary illnesses, given the time) through selective breeding and sterilization. And, as with scientific racism, it evolved concurrently in both Europe and the US. One of the founders of the eugenics movements and one of the most crucial proponets was a British man, Francis Galton. The British Eugenics Education Society was founded in 1907. The American Eugenics Society was founded in 1921. The first International Eugenics Conference took place in London in 1912, the second and third took place in New York City in 1921 and 1932. Etc, etc. From the late 19th century until around WWII Eugenics was rampant and "acceptable", although highly, highly controversial both throughout Europe and the Americas. To pretend that Hitler "introduced" Eugenics to Nazi Germany ignores the fact that eugenics had already existed in Europe for as long as it had in America, and had been practiced to some extent or another, by essentially every European power in that time period including the UK and the German Empire/Germany. Don't push historically inaccurate fantasies as if they were facts, that not only spreads misinformation, but is also insulting to the many of the people who suffered because of it, as well as creating a false image of what actually happened historically. Lastly, don't push bunk conspiracy theory. No, Bill Gates is not a eugenicist. Much less the complete and utter tosh of that last paragraph. There is no conspiracy to make white pride look bad, it looks bad because many of its proponents are idiots who make it look bad and espouse the same kind of stupid things that make people think it looks bad.
  19. Is there any way to set an actor to be over encumbered? I looked around the wiki and the kit, but I'm not quite sure. Furthermore, is there a way to modify the inventory weight (e.g. the total weight that someone is carrying)? I can only find out how to modify carry weight, which is the maximal amount the character can carry before becoming overemcumbered. And, lastly, I have a problem with modifying speedmult. Whenever I modify as follows: akActor.SetValue(MoveSpeed, 0.25) ;movespeed = speedmult the player character can't move anymore, even if I set speedmult to 1.00 in the console. Any idea what is going on here? Note: this is part of a script attached to a weapon with an OnEquipped script.
  20. I am back! And also, I got it working! Now it works for the player character, and the next step would be extendability. By this I mean extending this from the player character to all the NPCs in the game. Would a quest/quest script also be adequate for this kind of work? If so, how would I implement it? Cycling through and/or checking every NPC seems like I do for the player character seems like it would be far too resource intensive to work well. And a second question, if you do not mind. Extending the function from simply prohibiting usage to granting less effective usage. For example, ignoring the effect of certain perks and an accuracy malus. For this second part, I have a much more concrete idea of what is going on and how to do it. In this case I would use the already extant quest/quest script that we have to configure any global penalties or bonuses. So, for example, if heavy weapons should yield a universal malus to movement and aiming speed outside of power armor, I would apply it here. To apply any weapon specific maluses (e.g. a change to the weapon's cone for fire for a specific weapon), I would then apply a script to the specific weapon or, I could do it as part of the parent quest script (although I'm not precisely sure how to do this without making a global change to the gun's aim model). Right? Edit #1: With regards to enabling it for all characters, would a workable method be to check all actors in a cell and apply the script to them? if so, I'm not precisely sure how to accomplish it. I'm looking through the documentation on the creation kit wikis at the moment trying to resolve it. My general idea is: check the cell the player character is in for all actors in this cell run the script Edit #2: Is there some kind of "for" statement in the creation kit, I can't seem to find out if there is from the wiki, and I can't think of how to implement this without it. Edit #3: How would I apply a script to a generic actor. For example, if I want to add a script to a weapon that says: Scriptname AdvancedPowerArmor:MinigunRestriction extends ObjectReference Const Message Property CantEquip Auto Const Weapon Property MinigunRef Auto Const Event OnItemEquipped(Form akBaseObject, ObjecReference akReference) if akBaseObject as Minigun if <actor>.IsInPowerArmor How would I make it so that the <actor> is a generic actor? That is to say, how can I make it so that it checks every actor (both the player and all NPCs) equipping the minigun instead of having to specify specific actors? I've come across issues similar to this multiple times in trying to think out how to structure things. I want to say "for all actors" or "for all weapons", or just "actor" as in anything that qualifies as an actor, but I'm not sure how papyrus handles this. What is a good general method of doing these things.
  21. Please excuse my recent absence, between graduation and moving out, it's been difficult to do much. I should be back in action in the next two or three days.
  22. Well, then, yeah, that's really flipping stupid. Anything explosive or incendiary will make it light up like a Christmas tree.
  23. When you return, I also have an additional questions with regards to notepad++ configuration for papyrus. I tried to set it up as listed in the skyrim wiki and put under the run command: Under the run section I have: "C:\Program Files (x86)\Steam\SteamApps\common\Fallout 4\Papyrus Compiler\ScriptCompile.bat" But that kept on telling me that the system couldn't find the specified path, so I think I have to modify it to find the specified path. I know the wiki has this: "C:\Projects\Fallout4\Build\PC\Papyrus compiler\PapyrusCompiler.exe" cd %2"%~dp0PapyrusCompiler" %1 -f="TESV_Papyrus_Flags.flg" -i="%~dp0..\Data\Scripts\Source" -o="%~dp0..\Data\Scripts"pause How would I modify it to work for FO4?
  24. First of all, thank you very, very much for the reply, Reneer! I have some questions, if you don't mind. First of all, why do you prefer a quest script? What advantages does it offer over a conditional check on equip? Also, I assume that the formlist is something that I add to all the weapons? Or is it something I have to create separately in terms of an imported file? Any documentation on how I could work with that? On the other hand, if you just wish to explain it that's fine too. Furthermore, I understand the rest of the code, but what does: if (WeaponsPAOnly != none) Self.StartTimer(1.0, 10) endif do? And lastly, since this is a quest script, I'm assuming I'm not applying it to an item as a script, but making some kind of quest that uses this quest script? Thanks again and sorry for the questions.
×
×
  • Create New...