#GRIP (1H/2H Stance) [0.49+]

1 messages · Page 2 of 1

tidal estuary
#

In a fair way though 😂

reef sphinx
#

I just can't understand it is all.. its too far over my head. I can't even see the events there is the cameraDisableTag the event?

tidal estuary
#

no, there's just a bunch of bit in my script like this:


        onKeyPress = function(key)
            if key.symbol == input.KEY.Escape and zoomActive then
                self:sendEvent('Hawk3yeToggle', ZoomState.DISABLE)
            end
        end
#

input.registerTriggerHandler(
    MOD_NAME .. 'ToggleTrigger',
    async:callback(
        function()
            self:sendEvent('Hawk3yeToggle', zoomActive and ZoomState.DISABLE or ZoomState.ENABLE)
        end
    )
)

input.registerActionHandler(
    MOD_NAME .. 'HoldAction',
    async:callback(
        function(pressed)
            self:sendEvent('Hawk3yeToggle', pressed and ZoomState.ENABLE or ZoomState.DISABLE)
        end
    )
)
#

etc etc

#

so I have an eventHandler called Hawk3yeToggle, send it to myself, function gets called.

#

It happens on the next frame but it's basically same as calling the function + implicit mod compatibility

#

then anybody else can just go

return {
  eventHandlers = {
      Hawk3yeToggle = function()
        return false
      end
  ]
}

As long as your mod loads after mine, you've now completely disabled it

reef sphinx
#

Are they overwriting your event handler..?

tidal estuary
#

They're overwriting it by returning false, but they are just making another one

#

You can have a billion or 0 eventHandlers by the same name

#

if you return false in an eventHandler, everything else that use that event after you, will not happen

#

Maybe you shouldn't be able to zoom in, in a particular cell. Or you should only be able to zoom in, if you have a particular item equipped/in your inventory. Or a bunch of other things I neither know nor care about in advance.

reef sphinx
#
local self = require("openmw.self")

local function onMyEvent(data)
    print("Event triggered! Data =", data.msg)
end

local function doSomething()
    -- This triggers the handler in this same player script
    self:sendEvent("MyEvent", { msg = "hello!" })
end

return {
    eventHandlers = {
        MyEvent = onMyEvent,
    },

    engineHandlers = {
        onInit = function()
            doSomething()
        end
    }
}

So will this work?

tidal estuary
#

100%.

#

that's perfect.

#

Note, the second argument, does not have to be a table if you don't want it to be. So you could do self:sendEvent("MyEvent", 'hello!')and that's fine too.

#

It'll only work when you first install the mod, since it's called in onInit, but it'll work.

#

If you wanted to do it on every load, then:

local self = require("openmw.self")

local function onMyEvent(data)
    print("Event triggered! Data =", data.msg)
end

local function doSomething()
    -- This triggers the handler in this same player script
    self:sendEvent("MyEvent", { msg = "hello!" })
end

doSomething()

return {
    eventHandlers = {
        MyEvent = onMyEvent,
    },
}
#

if this script is hooked up to only the player, then anything can send events to the player and only the player to trigger this. You could put it on Containers, or NPCs, or, whatever.

#

I have two fairly easy rules of thumb for deciding when this could be useful, it's mostly if I look at something and think somebody else is either going to:
A) Break it on accident, or want to break it intentionally
B) Want to know about when it happens

That's a good time to use an event.

reef sphinx
#

I may need the frame delay and a custom event in my HUD weapon charge.. right now.. the state for displays in the options menu are not consistent or 100% predictable..

tidal estuary
#

It's funny you say that because I also use events for that exact thing in my HUD

#

I don't have a charge bar, but I do have a durability bar, resizing it always routes through events

#

Not too sure what you mean about the options menu offhand tho.

spiral pivot
#

The no sheathe fix version doesn't seem to work for me while the regular one works fine

#

idk if I'm missing something

spiral pivot
#

Okay so I just removed the two lines OHS_StanceChanged = onStanceChanged and local STANCE = types.Actor.STANCE and now it works like normal if anyone else wanted to use the no sheathe version

tidal estuary
#

There're two separate versions of the mod for that?

spiral pivot
#

yeah on Nexus

#

not appearing to get xp with the 1H spear though

spiral pivot
#

guess I can just use the longblade xp, not a big deal, sick mod

noble forge
#

someone was complaining that they didnt want to sheath two handed weapons on the back and prefered to have their weapons clip into the ground

#

me being absolute trash at making menu options work... well decided to just strip out the sheathe function and upload it as the "no sheathe" version

#

so its not only an outdated version of the mod, it was a quick-hack fix that I didn't really put any additional effort into.

tidal estuary
#

Oh.

#

Want me to slap that in?

noble forge
noble forge
#

Fixed the weapon damage setting not applying retroactively (old records get replaced with new records if the damage values are changed)

#

Hardened the functions around spear skill bridging (bug report fix)

#

Fixed potential Max Charge/auto calc Charge Mismatch issue (bug report/feedback fix)

#

Shoutout to NotFugi for the feedback

#

@merry lake ❤️

noble forge
#

Updated to fix infinite longsword skill glitch

noble forge
#

4.1.2 adds in snapshot for skill damage when using a weapon variant with less skill than Longblade

#

fixes issues with damaged skills not reverting

#

I forgot to get rid of the damage after the last skill bridge fix, so it restores your base skill, then oopsies, damage is still set.

A stupid mistake brainlet

steady dove
#

Based on this mod, you could technically make Bloodborne‘s trick weapon mechanic a thing in Morrowind.

round jackal
#

I created new optional settings for GRIP the extends to weapon speed and reach based on the two variants like damage, can get very cheaty but fun, not tested with Real Range, new settings can be tweaked and turned off entirely, reload lua for changes to take effect

round jackal
mental dust
#

stance + grip + magicka = logical conclusion

round jackal
# mental dust what does it sctually do? sorry, im confused... but it llooks like you might ac...

Adds setting for converted weapon speed, weapon reach, and fatigue drain can be configured based on the converted weapon skill, the though process was to further scale down the capabilities of using a converted weapon, the fatigue is to simulate changing a 1h to 2h weapon using it a little lighter/ faster because your using a second grip, and vice versa for a 2h to 1 handed converted weapon, using a 1handed weapon that was 2 handed makes using the weapon weighty and slow because your trying to use a heavy weapon with one hand

#

Any of these changes to the core mod can completely be turn off and won’t interfere with the core functionality of the mod - also for future edits and patches of mods nothing will be permanently changed by me, though my new settings are enabled by default

graceful light
#

Popping in to say that this mod + staves + OSSC makes for epic aura farming

noble forge
mental dust
#

is there a way of adding custom weapons to GRIP? or is it all based off type? i've been wondering about making a wepon that changes when you switch grip 🤔

noble forge
#

it already changes weapon type for weapons that don't have 2h versions

#

Shortblades and spears

#

so technically GRIP already does that

#

changes a weapon type

mental dust
#

yeah im just wondering if it can specify a particular one, you know like this misc_wooden_mallet becomes gun01 when you change grip

#

or some suchalike

#

im just tired and cant be bothered to look at the code rn yagrwut

noble forge
#

its possible yes

mental dust
#

good... clavicus

noble forge
#

it sees chitin_spear and makes chitin_spear_longsword

#

placeholder names ofc

#

spears in 1h and shortblade in 2h are actually longswords

round jackal
#

a transforming dagger to one handed

steady dove
mental dust
noble forge
#

so like a GRIP styled framework

#

where the user can add their own weapon pairs

#

and then system will let players swap between the two modes

mental dust
#

that would be sweet

noble forge
#

feel free to cannibalize GRIP to make it if you want. I'd work on it myself but...

#

I'm working on ||wand building|| as the 'expansion mod' to Spellforge

round jackal
#

Ohhh yeaaaaa

tidal estuary
#

It would be really easy for us to add an override interface

#

It wouldn't need to be a new framework or anything like that, we'd just need something like I.GRIP.registerWeaponOverride(oldId, newId)

#

It'd be somewhat simpler than existing branches too

noble forge
round jackal
#

Is there a way to stop specific weapon ids from being able to be converted? This adds the armorers hammer as a equippable weapon but I don’t want it to be converted, some like like a blacklist for weapon/item ids

noble forge
#

it should have already been blacklisted

#

lockpicks, torches and probes should already reject by GRIP

round jackal
#

If it is I may be missing something

noble forge
#

well in the base game you cant equip the armorer hammer AFAIK

#

or repair prongs

#

so my guess is GRIP just sees that as a weapon

#

it would need to be specifically rejected, I think s3ctor mentioned a good idea, a “deny” list for users to add weapons manually

graceful light
noble forge
#

isnt there a bug with one of the elder scrolls

#

where a lockpick is a one hit kill weapon

noble forge
#

I'm going to add in two features

#

Reject file

Allows the user to add in item id that GRIP will ignore

#

Custom file

Allows the user to add in item ID AND a paired ID that the item will always turn into (no custom records made, purely a swap between the two items)

#

that would mean the only thing copied between the two custom items would be

#
  • Enchantment Record + current charge
#
  • Durability
#

Now the real question is: can I modify those two things WITHOUT changing the refID

#

I don't think we can do that

#

so if your weapon is a quest item that depends on a specific refID

#

we have no recourse

#

randomized refID generation is hard coded into the engine, there is simply no way to drive it with Lua as far as I know

#

IE you can't tell lua "make this item record, and make the refID 'Super_Cool_Spear'

#

its always going to be some randomized string

#

like 0x001A

mental dust
#

awesome sonds good!

noble forge
#

should be straight forward

#

two .txt files

#

reject and custom

#

super easy to use

#

for custom its literally just

#

custom_dwemer_spear = custom_dwemer_spear_head_dagger

#

thats all a user needs to do

#

item 1 id = item 2 id

#

save the txt file.

noble forge
noble forge
#

please add that weapon id to the new reject.txt file located in Filters folder

round jackal
#

YESSSSS THANK YOU

noble forge
#

the only downside is it swaps to the weapon instantly so like...

#

idk something something animation blending etc

#

I'm utter garbage at anything animation related

noble forge
#

if both seem to work fine then I'll push it to live on nexus

steady dove
steady dove
#

@mental dust I should try make a Dwemer trick weapon now aygurl

noble forge
#

in custom

#

idk about when it breaks

#

seems pretty item specific

#

I guess I could add in an additional filters file for durability 0 items

#

if anyone ever wanted to go BOTW route

#

and make weapons FULLY break

#

you could change it to broken versions or just like broken junk

#

scrap metal

#

seems like feature creep tho sweatingheh

steady dove
# noble forge idk about when it breaks

I’m asking since the spear extension I showed is kinda like an overpowered last resort type weapon, with high physical damage but only 100 points of durability and an enchantment that lasts for like 5 hits.
So in this case I’d use the grip/weapon switch as a brief power-up mechanic.

mental dust
#

What happens normally when a weapon has been switched with GRIP and it breaks?

noble forge
#

its just 0 durability

#

durability transfers

#

swap it back and it still has 0 durability

mental dust
#

Hmm I like this new update, its giving me lots of ideas. There's some cool stuff could be done with it datchim

steady dove
noble forge
#

GRIP natively transfers the enchantment record/current charge on the weapon

#

so you will run into some issue

pale flame
# mental dust

the last time Kenpachi Zaraki entered the world of Morrowind, Umbra ran away

noble forge
#

Perhaps what I should make instead

#

is a sort of GRIP framework

#

basically the “weapon swap guts”

noble forge
#

it seems like for the trick weapon system you want:

  • No innate enchant record on the main weapon
  • An innate enchant record on the trick weapon
  • Enchant records don't migrate between swaps. Durability doesn't either.
  • When durability hits 0 it swaps back to the saved state of the main weapon (with whatever durability it had)
  • When sheathed the weapon also reverts back to the main weapon
noble forge
#

I'm thinking that such drastic changes would be better served as a companion mod to GRIP

#

or like a expansion mod

#

compatability shim?

#

its just a lot of stuff that GRIP doesn't do, or goes counter to what GRIP does do, just for one specific mod.

#

a companion mod + the rejection list would be my idea

#

put your special trick items into the rejection list

#

GRIP ignores those weapons.

#

the companion mod now owns them

#

you can still use grip, you can still use trick weapons, everyone is happy

round jackal
#

totally optional

noble forge
#

Please try the GRIP addon for your trick weapon idea

#

I have nothing to test it with so I have no idea if it works

#

Load Trick Weapons after GRIP

#

add your trick weapons to main GRIP mods 'reject' list

#

add your trick weapons to GRIP Trick Weapons 'trick_pair' list

mental dust
#

That's really cool idea, nicely done sera. I'ma try and make something for it too

round jackal
#

wait wait so what does this do, im a lil burnt out right now

#

cus this could be very big

#

Use case a crossbow into a rapier and then back?

mental dust
#

Gunswords are back baby

steady dove
steady dove
# mental dust Gunswords are back baby

Maybe this is something too complicated for now, but I have a mwscript that always gives you 1 amount of a custom made bolt, when having a guncrossbow equiped. Though you can only shoot it, as long as you have a specific amount of magicka, which gets consumed when shooting. So basicly magicka based bolt shooting.

Now the combination with the Trick Weapon GRIP would be, trying to create something like Krato's Axes or Thor's Hammer, which has a default swinging mode and a switchable throwing one. When you throw the weapon, it obviously leaves your inventory and should be re-added again afterwards. Maybe there needs to be an ancor item in the inventory too that the script can check for, when re-adding the thrown axe back or something.

I probably don't have enough skill to code this further, but wanted to share the idea anyway.

dry bloom
#

Make anything throwable 👀

dry bloom
#

Visions of impaling someone on a launched dai-katana

round jackal
#

expansion of arrows stick.....weapons stick

#

new magic effect called send and/or return

dry bloom
#

I have a movie or tv scene in my mind where someone overhead throws a sword into a dude but can't place it

round jackal
#

Fecking spike it 😭😭

noble forge
noble forge
#

starts when the item is thrown?

#

or just like a timer

#

after you “throw” the system respawns the weapon after like 2s