#GRIP (1H/2H Stance) [0.49+]
1 messages · Page 2 of 1
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?
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
Are they overwriting your event handler..?
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.
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?
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.
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..
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.
The no sheathe fix version doesn't seem to work for me while the regular one works fine
idk if I'm missing something
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
There're two separate versions of the mod for that?
guess I can just use the longblade xp, not a big deal, sick mod
its a really old hacky version
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.
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 ❤️
Updated to fix infinite longsword skill glitch
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 
Based on this mod, you could technically make Bloodborne‘s trick weapon mechanic a thing in Morrowind.
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
Awesome work! 
THANKSSSSSS
what does it sctually do? sorry, im confused...
but it llooks like you might actually be putting the pieces together for full on swordsinging/bankai experience 
stance + grip + magicka = logical conclusion
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
Popping in to say that this mod + staves + OSSC makes for epic aura farming
sounds sick!
just seems like it goes further than just 1h/2h stance that GRIP current has, and adds in:
- weapon reach changes depending on stance
- weapon speed changes depending on stance
- fatigue usage changes depending on stance
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 🤔
GRIP simply takes a weapon and converts it to a 2h version
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
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 
its possible yes
good... 
it sees chitin_spear and makes chitin_spear_longsword
placeholder names ofc
spears in 1h and shortblade in 2h are actually longswords
a transforming dagger to one handed
I made this Dwemer extension for the kukri. Basicly just a whole separate weapon mesh as a spear with a shock damage enchantment. Could be cool to have the ability you have in mind applied onto those two, linking them together.
Then I won't have to RP anymore by using vanilla weapons switch and not seathing in between 🙃
yeah, nice trick weapon that would be a perfect test run
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
that would be sweet
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

Ohhh yeaaaaa
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

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
it should have already been blacklisted
lockpicks, torches and probes should already reject by GRIP
From this mod I ment https://www.nexusmods.com/morrowind/mods/58217
If it is I may be missing something
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
Duel wielding a lock pick to really give Dagoth Ur what for would be hilarious
isnt there a bug with one of the elder scrolls
where a lockpick is a one hit kill weapon
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
awesome sonds good!
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.
please add that weapon id to the new reject.txt file located in Filters folder
YESSSSS THANK YOU
please add the two weapon id to the new file called custom.txt located in the Filters folder
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
if both seem to work fine then I'll push it to live on nexus
Nice! Gonna try it out later this day.
Could the script also handle reverting back to the “default” weapon when you attempt to sheath the switched one? And could this also apply when the switched/transformed/secondary weapon breaks?
@mental dust I should try make a Dwemer trick weapon now 
sheathe fix exist so I could add a third optional entry for the sheathed model
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 
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.
What happens normally when a weapon has been switched with GRIP and it breaks?
its just 0 durability
durability transfers
swap it back and it still has 0 durability
Hmm I like this new update, its giving me lots of ideas. There's some cool stuff could be done with it 
You could enchant two linked weapons separately for example and make use of different effects, depending on the situation.
Elden Ring’s Blade of Night and Flame comes to my mind here immediately.
GRIP natively transfers the enchantment record/current charge on the weapon
so you will run into some issue
the last time Kenpachi Zaraki entered the world of Morrowind, Umbra ran away
Perhaps what I should make instead
is a sort of GRIP framework
basically the “weapon swap guts”
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
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
totally optional
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
That's really cool idea, nicely done sera. I'ma try and make something for it too
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?
Gunswords are back baby
Thank you for providing this coded playground to us! 
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.
Make anything throwable 👀
Visions of impaling someone on a launched dai-katana
expansion of arrows stick.....weapons stick
new magic effect called send and/or return
King Arthur 2004
https://www.imdb.com/title/tt0349683/
Ioan Gruffudd as Lancelot
Til Schweiger as Cynric
I have a movie or tv scene in my mind where someone overhead throws a sword into a dude but can't place it
Fecking spike it 😭😭
the readme explains it
onhit scan?
starts when the item is thrown?
or just like a timer
after you “throw” the system respawns the weapon after like 2s
