Jump to content

LeahTheUnknown

Premium Member
  • Posts

    149
  • Joined

  • Last visited

Everything posted by LeahTheUnknown

  1. I'd say there's more efficient ways, just from a mathematical standpoint. Might make the script longer, but it would be faster. Might try doubling the power required every loop until the thing shuts off, then knocking it back by 1 until it's powered again. Also, I think you can use a smaller wait than 0.1, but don't quote me. There might be even more efficient methods, but that would require me to google stuff. :tongue: power = 1 While IsPowered() power = power * 2 SetValue(PowerRequired, power) Utility.Wait(0.01) EndWhile While !IsPowered() power -= 1 SetValue(PowerRequired, power) Utility.Wait(0.01) EndWhile SetValue(PowerRequired, 0)
  2. A comment on my Color Power Lines mod asked about making power lines invisible outside of workshop mode. The only way I can think to do it is with a texture (splines can be textured), but I don't know how to make a texture that behaves in this way. Anyone know how to do this/if it's possible? ~GKX
  3. Sorry, forgot the variable for OnEquipped. This one should work (also changed the player to owner): Scriptname ArmorModSwitch extends ObjectReference ObjectMod Property NewModel Auto Keyword Property CheckKW Auto Event OnEquipped(Actor Owner) RegisterForRemoteEvent(Owner, "OnItemEquipped") RegisterForRemoteEvent(Owner, "OnItemUnequipped") EndEvent Event Actor.OnItemEquipped(Actor Owner, Form BaseObject, ObjectReference Ref1) If BaseObject.HasKeyword(CheckKW) Self.AttachMod(NewModel) EndIf RegisterForRemoteEvent(Owner, "OnItemUnequipped") EndEvent Event Actor.OnItemUnequipped(Actor Owner, Form BaseObject, ObjectReference Ref1) If BaseObject.HasKeyword(CheckKW) Self.RemoveMod(NewModel) EndIf RegisterForRemoteEvent(Owner, "OnItemEquipped") EndEvent
  4. "Armor Property CheckArmor Auto" is a property declaration. Once the script compiles, you need to assign forms to the properties you declared. Read here about properties and variables. The BaseObject and Ref1 in the events are just the variables i chose for this script. An OnItemEquipped event, for example, requires you to have a form then an objectreference in the parentheses. When the event is triggered (when the player equips an item) this part of the script will run. What my script there does is check if the item equipped is the same as the one assigned to the property "CheckArmor." I misunderstood your first post, I guess. I thought you were asking for a specific armor piece. Also, I forgot OnItemEquipped is an Actor event, and can't be put in an ObjectReference script. Basically, the script is asking if to check when the underarmor you're wearing equips an item, which isn't going to work. What you'll need is a RegisterForRemoteEvent function in your script (see below). This script will check, every time the player equips an item, if the item has the keyword you assign in the properties window. Scriptname ArmorModSwitch extends ObjectReference ObjectMod Property NewModel Auto Keyword Property CheckKW Auto Event OnEquipped() RegisterForRemoteEvent(Game.GetPlayer() as Actor, "OnItemEquipped") ; This tells the script to let it know when the player equips an item. RegisterForRemoteEvent(Game.GetPlayer() as Actor, "OnItemUnequipped") ; Same, but for unequip. EndEvent Event Actor.OnItemEquipped(Actor Player, Form BaseObject, ObjectReference Ref1) If BaseObject.HasKeyword(CheckKW) Self.AttachMod(NewModel) EndIf RegisterForRemoteEvent(Game.GetPlayer() as Actor, "OnItemUnequipped") ; If the onunequip event has already been called, this re-registers for it to trigger. EndEvent Event Actor.OnItemUnequipped(Actor Player, Form BaseObject, ObjectReference Ref1) If BaseObject.HasKeyword(CheckKW) Self.RemoveMod(NewModel) EndIf RegisterForRemoteEvent(Game.GetPlayer() as Actor, "OnItemEquipped") ; Same as the equip re-register. EndEvent One problem I found is that there is no keyword specifically for Right Arm armor. You'll have to use AWKCR for that, it has one. Here's a quick and dirty tutorial I threw together for you. Good luck! ~GKX
  5. What he said. To expand a bit: First, you'll want to create an object mod for your underamor, one that changes the model. Next, attach a script with an OnItemEquipped event to the underarmor (see below). As for your other request, it's likely not possible without editing every leg armor in the game. I worked up this script, it should do the trick. Someone with more scripting savvy than me may weigh in with some suggestions. ScriptName ArmorModSwitch Extends ObjectReference ObjectMod Property NewModel Auto Armor Property CheckArmor Auto Event OnItemEquipped(Form BaseObject, ObjectReference Ref1) If BaseObject == CheckArmor as Form Self.AttachMod(NewModel) EndIf EndEvent Event OnItemUnequipped(Form BaseObject, ObjectReference Ref1) If BaseObject == CheckArmor as Form Self.RemoveMod(NewModel) EndIf EndEvent
  6. Title. I was working on my Propaganda Defense mod, and I wanted to make a loudspeaker to compliment the beacon. I used the Siren that's in the base game for its model. Problem is, whenever I supply it power, I get the wailing air-raid siren noise. Is the sound an add-on node of some kind? I created a new activator with just the model filename copied from the Siren.
  7. I want to make straight power lines. (Yes, I know it's not realistic.) I could swear I figured out how to do this once. Now, it eludes me. I've searched the game settings using every variation of wire, spline, tension, etc, to no effect. ~GKX
  8. Yeah, the perk shows up in the pipboy, but no bonus show on the SPECIAL tab.
  9. OK, So I created a magic effect that is Constant Effect, Self, and has Value Modifier -> Luck, then created a Spell, type Ability, added my magic effect, set magnitude to 1, then created a Perk, and added as an Entry my ability spell. In game, I get no +1 Luck. :down: Anyone have any idea why this is happening? ~GKX
  10. I want a script to be able to call a BendableSpline as a property. How would I go about doing this? Is it even possible to add a Property Type? Figured it out, now I have other problems, will post new topic, because this is a doozy.
  11. Check the Ruleset (the little dropdown menu under Target Type). You'll find one with an asterisk (*) somewhere in the main window. For dn_CommonGun, it's ruleset 3. The asterisk tells the game to use the item's name at that instance. Any higher-numbered Rulesets will apply after the name. Incidentally, it's not a great idea to modify the vanilla instance naming rules. Create your own and add a quick quest with a script like below. Scriptname MergeINNR extends Quest InstanceNamingRules Property OldList Auto InstanceNamingRules Property NewList Auto Event OnQuestInit() OldList.MergeWith(NewList) EndEvent
  12. I am trying to make custom grenades, and this is what I get when I use them in game and have the demolitions perk that allows me to see their trajectory. Any idea why this is happening/what I need to change?
  13. It is possible, but it would be an enormous amount of work and require a beefy machine to run. I've actually considered making such a mod, but never started because I know how time-consuming it would be. Just using the example of trees, there are over 100 static tree base objects, with actual occurrences numbering in the tens of thousands. All would have to be remade as Movable Static (regular statics can't have destruction data), then destruction data added to each, then replace the existing trees. Figure in other stuff, crates, walls, debris piles, etc, etc, you're talking hundreds of hours of work. The beefy computer component comes in when you deal with Precombines. Most statics are packed into Precombined meshes, so your computer only has to load one file rather than fifty. Removing any one of those static objects from the Precombine breaks it for the entire cell. So you're back to loading fifty (or a couple hundred) static meshes. You can create new Precombined data for each cell, but that takes hours, sometimes days. Don't get me wrong, I'm not trying to be a negative nelly. I'm just explaining why this has never been done. Perhaps someday I will tackle this project, I imagine the bulk of the grind work could be done with FO4Edit scripts. I'm just not there yet. Too many other, easier mods to make :P
  14. I'm working on improving my Wave Spawner (and Spawn Grenade, since it probably has the same problem). User M1stLynx pointed out that they spawn multiple copies of the same guy whenever the device triggers. I've tried separating out the spawns into individual rolls like so, and the same thing happens. It always picks the first actor in the LeveledActor list. For reference, this is what my properties look like. Function SpawnRandom(Int MenuChoice, Int SpawnChoice, Int SpawnNum) Int Count = 1 While Count <= SpawnNum If MenuChoice == 0 ToSpawn = AnimalWave[SpawnChoice] ElseIf MenuChoice == 1 ToSpawn = RobotWave[SpawnChoice] ElseIf MenuChoice == 2 ToSpawn = EnemyWave[SpawnChoice] ElseIf MenuChoice == 3 ToSpawn = GangWave[SpawnChoice] ElseIf MenuChoice == 4 ToSpawn = MonsterWave[SpawnChoice] EndIf PlaceAtMe(ToSpawn, 1) Count += 1 EndWhile EndFunction For example, if I choose Raider off the menu, I get EncRaider01Template every time. Bear in mind, I tested this with a level 100 character. Do scripts simply not know how to handle leveled actors, or am I doing something wrong with either the script or the properties? Full script under spoiler below.
  15. Hate to be that guy but.. horses are extinct in the Fallout universe.
  16. Minutemen: The Institute is a threat to freedom. Forget all the great things we could do for the Commonwealth if we had their resources and tech, let's blow the place up, it will look cooler. Railroad: The Institute enslaves sentient beings. Let's exterminate the race by blowing up the only known way for them to reproduce. Brotherhood: The Institute has created a technological abomination. Rather than take over their facility and spend years sorting out their advanced technology, let's just nuke the place. None of these make any sense. The Institute facility is ridiculously advanced. They have a working teleporter for crying out loud. Rather than harness this resource, all of their enemies opt to detonate their reactor (which is an over-used, highly non-scientific trope; reactor != nuclear bomb). Maybe the Railroad ending makes sense, they're not known for their critical thinking, but the other two definitely do not. Especially the Brotherhood. Sorry if this has been brought up before, it's just something that has always irked me. ~GKX
  17. I think the Chinese had a spy in Nuka-World, and a very inept one. He discovered Project Cobalt, but failed to understand its implications (a more powerful fat man), but he also discovered the Quantum release date, and again, failed to grasp the true meaning. Confusing the two, he relayed to his superiors that the US had developed a Cobalt Bomb and planned to deploy it on the date of the Quantum release. Hence the first strike by the Chinese, and the US's retaliatory attacks. Just my goofy head-canon. ~GKX
  18. Ok, I did the stack profiling for a one-wave (six spawns) run through and got the following result. I have no idea how to interpret it, however. To my untrained eye, it looks like everything is working normally (queue_push, push, pop, etc) I opted for using Utility.Wait because the delays are so variable, writing all those timer scripts would be a pain in the ass.
×
×
  • Create New...