-
Posts
20 -
Joined
-
Last visited
Everything posted by kingharvest
-
Indeed, having the ActiveMagicEffect of the bound weapon spell register for "attackStop" on the player gets us a callback at the exact right time (for both regular and power attacks) to dispel the spell! Thanks again for that great suggestion. I haven't done so yet but I also need to pick an earlier event in the attack animation to check for "should I lock controls to ensure a future attackStop event?" so that the player doesn't accidentally prevent the dispel from happening by spamming attacks. I also found that registering for animations is a very useful way to get sheathe/draw/equip events for the player, especially since Skyrim doesn't have RegisterForRemoteEvent like Fo4 does :smile: e: I found an even easier way to forcibly dispel a bound weapon. You can interrupt an attack by disabling player controls and then immediately re-enabling them. Once the attack is interrupted you can catch the "sheatheWeapon" animation event and immediately dispel. Much cleaner. On a related note, there is a quirk to bound weapon spells where the "sheathe to dispel" mechanism doesn't work if the spell is cast via script. A good illustration of this is to use any of the "Ocato's" spells from Enai's Apocalypse or Odin, and store Bound Sword in it. When it triggers it will summon a bound sword to the right hand and an invisible weapon to the left hand, and sheathing won't dispel the bound sword spell. You can fix this behavior in your own bound weapon spell by catching sheath/equip animation events and manually dispelling the effect, similar to what I was trying to do above.
-
You should be able to achieve this with a Perk with a Perk Entry using Entry Point "Apply Combat Hit Spell" (see https://www.creationkit.com/index.php?title=Perk_Entry_Point). There are some notes there about which Spell Archetypes work with it, but also read the Talk page for Perk Entry Point, there is some discussion there about quirks to how it works with different Archetypes. You will probably have to play around with different implementations of the Magic Effect to get it to work correctly. Ultimately it might require a script to work how you're imagining.
-
Good point. I edited the OP but I don't seem to be able to change the thread title. I've found threads on these forums from Google searches that matched on post bodies so hopefully it's still useful as a reference for someone searching for information on this topic. The animation event idea is interesting, thanks!
-
Update: After testing all sorts of crazy alternatives, including: 1. Invoking Dispel() from the ActiveMagicEffect 2. RegisterForSingleUpdate() and then dispelling in OnUpdate 3. Using a quest script fragment to dispel triggered by a SetStage in the OnEffectStart 4. Having another ActiveMagicEffect poll global state in a RegisterForSingleUpdate loop and dispel in OnUpdate. I accidentally figured out what was causing this behavior. The common theme in the above experiments (and more) was that dispelling a bound weapon effect from the player, while the player is in an attack animation, fails. The reason that dispelling from a separate spell (SpellB in my OP) works is that when you cast the separate spell you can't also be attacking with the bound weapon! Alternative "4." above works, but only if it gets a chance to run OnUpdate when the player is not in an attack animation. If the player continuously does non-power swings then the dispel will never succeed! To work around that I added a DisablePlayerControls to the code that dispels the effect, which then re-enables controls once the effect is successfully dispelled, and voila it works every time. I hope this helps someone in the future who comes up against this issue with dispelling bound weapons.
-
That's definitely good advice! As it would happen, in this case I had the same idea and read everything related to this on the Creation Kit wiki several times while working through the problem myself :) That's a good point, and in fact I hadn't even thought of that. In this case, that doesn't help us though, because the spell we are trying to dispel ("SpellA" with effect "EffectA") was cast by the player on itself. In other words, SpellA is affecting the player, an Actor. I'll edit my OP to make it clear whom is affected by SpellA. For anyone who prefers that, no knock to them. I think the reasons why I'd prefer well-defined behavior are pretty obvious/uncontroversial.
-
Is there any documentation on what you can/can't do from inside OnEffectStart for a weapon enchantment effect? I always assumed it was the same as from any spell effect, but now I've found that Actor.DispelSpell() consistently doesn't work there. Some experiments I ran: Setup: - SpellA has a single effect, EffectA. e: For clarity here, SpellA was cast by the player on the player. EffectA is therefore an ActiveMagicEffect on the player. - SpellB is FF/self, with script attached that prints debug message and then calls "PlayerRef.DispelSpell(SpellA)". - e: Important note is that the enchanted weapon is a bound weapon, and SpellA is the spell that adds the bound weapon effect. See my subsequent posts for more information. Experiment 1. - Attach enchantment to weapon, enchantment effect has a script attached, script prints debug message and then calls "PlayerRef.DispelSpell(SpellA)". - Hit something with weapon. - Debug message prints - EffectA effect is NOT dispelled from player. Experiment 2. - Cast SpellB. - Debug message prints. - EffectA effect IS dispelled from player. Experiment 3. - Attach enchantment to weapon, enchantment effect has a script attached, script prints debug message and then calls "SpellB.Cast(PlayerRef as ObjectReference, none)". - Hit something with weapon. - Debug message prints (from enchantment effect). - Another debug message prints (from SpellB effect). - Bar effect is NOT dispelled from player. It seems somehow like DispelSpell() only works if the "root" event is the player casting a spell, or that it specifically doesn't work if the "root" event is a weapon hitting? Does this make any sense given the Skyrim script virtual machine, or how callbacks work? If solid documentation of this stuff exists then please link me because I'm just doing trial and error to see what's possible and it really sucks :sad:
-
episdamagetype and condition "weapon"
kingharvest replied to Arael54's topic in Fallout 4's Creation Kit and Modders
The simplest way is probably to use weapon keywords. Looks like there are a few that could serve the purpose, "WeaponTypeLaser [KYWD:00092A84]" sounds promising. If there isn't one that covers the specific set you like you can check multiple ones, or failing that put them in a form list and check if the weapon is in your custom formlist. -
I'm pretty certain you cannot change the base damage on a single instance of a weapon in FO4 without changing it for every instance of that weapon. If you want instances of a weapon to have (seemingly) random base damage, the best way IMO would be to add a hidden attachment point to all weapons and use it to change damage in a way that's hidden from the player. You can then create a bunch of different OMODs that attach to that point with different bonuses or penalties to damage, throw them all into a MODCOL associated with your new attachment point, and add that MODCOL to all the weapon templates in the game. Once that's done, all the weapons that spawn in the game will have random hidden weapon damage mods on them, seeming to the player like they have different base damage. e: this is how legendary items already work, more or less, so you could look at legendary items in vanilla FO4 and use that as a reference too.
-
OMODs are associated with a modifiable item via keywords. The vanilla keywords for mod associations use the "ma_" prefix. To associate the OMODs with particular attachment points you want to set the appropriate attachment point keywords on the OMODs, the vanilla attachment point keywords use the "ap_" prefix. A good way to understand all of these associations is to take a vanilla weapon as an example and explore how all of its mods are implemented. e: Oh yeah and also you need to put the same attachment point keyword ("ap_*") in the Attach Parent Slots keywords on any item you want to support that attachment point. I think "category" in your question is what I'm calling an attachment point.
-
Increase attack speed of melee weapons?
kingharvest replied to MisterRADical's topic in Fallout 4's Creation Kit and Modders
My guess would be to modify the AV "WeaponSpeedMult". I don't think there's a perk entry point to change attack speed. Assuming that "WeaponSpeedMult" does what you want (you can verify in game just using the console, for example): To modify an AV from a perk you want to use the "Ability" effect type and set it to a Spell that modifies "WeaponSpeedMult". You will probably also need to create your own Magic Effect for the Spell to use, I recommend copying something like "AbFortifyEndurance" and just changing the AV it affects to "WeaponSpeedMult". -
I'm interested in how sway works with scopes and how I can get that to work for iron sights. The three simplest things are changing the player ActorValue AimStability, the weapon's aim model stability, and the weapon's "HasScope" property. I tried changing those in different combinations and it seems like the two aim stability values don't do anything unless "HasScope" is set to true, and setting "HasScope" to true forces you into the scope visual overlay when you aim down sights (thus making it not iron sights anymore). I feel like iron sights sway should be possible to implement, since the "See Through Scopes" mod has a sway option and shows your raised weapon without the vanilla scope overlay. I took a look at what that mod is doing, but it appears that by default sway is off and something in a script is responsible for turning it on and the version of the mod that I found didn't have sources. The documentation I found for See Through Scopes didn't cover how sway is implemented. I think limb damage does something similar in iron sights, but every time I've tried to find how limb damage is hooked up in the CK I made no progress, leading me to assume it's largely hard-coded. If someone can point me in the direction of documentation on limb damage that would be awesome. Any ideas greatly appreciated!
-
Best way to scale monster dmg/hp properly?
kingharvest replied to DocMoebius's topic in Fallout 4's Creation Kit and Modders
Looks like you'll need Lutana to make your damage Perk effect correctly scale off level: https://geckwiki.com/index.php?title=How_to_use_the_Add_Actor_Value_Mult_entry_point e: sorry maybe that bug only exists in FONV engine? The geckwiki doesn't specify, but Lutana is a NV mod and when I checked in xEdit for FO4 there are a bunch of new entry points and probably Add Actor Value Mult got fixed somewhere in between Skyrim and FO4. So this ought to be much easier, and you have the option of Multiply Actor Value Mult too if you want to scale by multiplying rather than add and multiply... e2: can confirm that Multiply Actor Value Mult works if you use the "AVIF" parameter type. You can use it to dynamically set magnitude for a Perk effect from an Actor Value. I tested using the "cone mult" thing that the hip shooting perks use and a random new AV I created and set to different values from the console, the aim reticule grew/shrank with the AV. -
Best way to scale monster dmg/hp properly?
kingharvest replied to DocMoebius's topic in Fallout 4's Creation Kit and Modders
I'd be interested to see an exhaustive list of what effect level can have on NPCs. In vanilla their Health scales and I believe the XP you get for killing them as well. If you want to have a damage bonus that directly scales to level then you can probably achieve that by creating a Perk which imparts that effect (I don't know if there's a Perk effect that does that already, I doubt it) and then give that perk to all of your NPCs that you want to have smoothly scaling damage. The way that eg. Raiders get more damage is just via perks that give flat multipliers, and those are attached to Raider, Raider Scum, Raider Psycho, Raider Scavver, etc. to create a gradient of damage. -
Hip-fire accuracy affects sighted accuracy
kingharvest replied to brumley53's topic in Fallout 4's Creation Kit and Modders
Sorry for necro-posting, but there is so little information about the details of this (in my Google searches, at least) that I thought I'd reply and say thanks for putting this info out there. This, somewhat cryptic, thread asserts the same thing about min/max cone of fire: https://forums.nexusmods.com/index.php?/topic/3867980-fo4edit-weapon-properties-in-detail/ Additionally, I'd like to offer anyone else who finds this a workaround: if you look at the Effects on the Steady Aim perk, you'll see that in order to have it only affect "hip fire" they check "GetInIronSights" on the subject and disable the bonus if so. So, if you really wanted to make a weapon mod that impacts only hip fire accuracy then you could use a Perk and a Keyword, or something like that to hook it up. -
Legally I'm pretty certain that anyone using the GECK signs away all rights to their work with the EULA. So you will have the same non-right to your work that everyone else does.
-
Looks kind of like ENB of The Apocalypse (http://www.nexusmods.com/newvegas/mods/50782/?). This is really hard to answer because the person could have started with some preset and tweaked it, or just tweaked everything from default by themselves.
-
Quest Starts with Note Pickup
kingharvest replied to RedBeakRaven's topic in Fallout New Vegas's Discussion
The construction "IfPlayer.GetHasNote" won't compile since you are missing whitespace between 'if' and 'Player'. According to http://geck.bethsoft.com/index.php?title=GetHasNote GetHasNote is not called on a reference so you probably just want "GetHasNote" instead of "player.GetHasNote". -
Quest Starts with Note Pickup
kingharvest replied to RedBeakRaven's topic in Fallout New Vegas's Discussion
What about a proxy item that looks like, say, a holotape. Make that a Misc item, attach a script to it to add the note, start the quest, and then remove itself from player inventory. For example: begin OnAdd player StartQuest Quest player.RemoveItem ProxyItem AddNote Note end -
Quest Starts with Note Pickup
kingharvest replied to RedBeakRaven's topic in Fallout New Vegas's Discussion
Can't you just begin OnAdd player StartQuest Foo end in the note object's script? -
Hi I'm curious if anyone else has experimented with the (actor) OnHitWith block and/or with weapon effects, and what happens when a hit dismembers an actor. From what I've seen a dismemberment always seems to cause these guys to run twice, which makes particular kinds of behaviors really hard to implement. A concrete example of what happens here is trying to implement simple thrown melee weapon retrieval-- you of course add an effect to the thrown weapon that runs a script to add a copy of the weapon to a hit actor's inventory. If you do this then most of the time it works just like you'd expect, you hit someone with your modified weapon and look in their inventory and there's a copy in there (even works when they are dead). If your modified weapon dismembers the actor, however, you'll find two copies of the weapon on the actor (100% repro, not a race or anything like that). Furthermore, if you put a printc in your weapon effect script you can clearly see it's getting run once on a normal hit and twice on a dismemberment. Now, what happens if you modify your throwing weapon to explode instead of dismember? Your script only gets run once on an explode. This behavior is maybe not totally shocking, but when I searched online I couldn't find any discussion of this at all. I can't be the first person to have noticed, can I? This also means, by the way, that the coin shot effect gives double denarius on a dismemberment (not that you'd ever notice in that particular scenario). I can think of a rather complicated way to keep track of when an item was double-added, but it's pretty ridiculous to set up so much state just to apply a simple weapon effect.