Jump to content

grapple gun or grappling hook.


RevanFanMan

Recommended Posts

For those of us who prefer a bit more finesse with getting to hard to reach destinations. Obviously a jetpack that practically screams "Hey I'm over here!" doesn't cut it. Now I don't know if such a mod would be possible but still it was worth mentioning at least.

Link to comment
Share on other sites

This has actually been in the TODO / partially complete side of my zany weapon mods list for a long time. My aim is to bring a lot of homages to the old favorite video game weapons in here, Fallout 4 style. That said, I am not a modeler, and I don't have the tools even if I was, so I try to stick to the interesting programming concepts.

(I've already been at least partially through a force push / air gun, a portal gun, a "gravity gun", a synth infiltrator killing implement, a PokeBall, a shark gun, a mind control / possess gun, a black hole gun, a BFG-type gun (with seeker drones), and a fireworks/airstrike show gun).

Specifically, here I'm working on the Anchorshot, a Broadsider that shoots an anchor with a rope attached. I'm envisioning both a shoot and be carried mode and a placeable rail/zipline point-to-point mode. I'm excited to do this more than many of the previous mods.

The big technical issue with making a hookshot-style grappling gun work at all acceptably is actually just getting the wire to appear (most everything else is in place in the background of my portal gun mod). To help implement the electrical power system, the game and the editor both support the dynamic creation of textured prism meshes to approximate wires. We know that process works in-game because you can move the wire out and watch as it resizes and sometimes slacks.

In terms of gamefile record types, this is done through the new BendableSpline record type.
BendableSplines must be specified in-editor only it seems (which is a shame for dynamically creating the wires through Papyrus). There is a way around this, which is to use a purpose-built wire stashed somewhere as the canonical rope. That works fine. But to get something that looks half decent, you want to move both ends of the rope programmatically. In the CK, this works fine. You set up two SplineEndpointMarkers and move them apart, link them with a spline. You can grab the endpoint markers in the editor, move them around, and a new rope will be calcuated for you and appear. Great!

But the problem is that these SplineEndpointMarkers are special in the editor. Once you've joined the markers in the editor, they SORT OF seem to cease to exist as separate references. (You can't even get the Reference Properties edit window up on them! Cloning/Duplicating this form/object is of no use - it seems to be tied to the permanent FormID, not the NIF or even the internal name). They look like linked objects, but don't quite behave the same way. A papyrus check in-game on the spline object lists no linked refs (even if they appear this way in the editor). You can't set the endpoints as object reference properties (even before they're joined) in scripts (they aren't in the pick list, even if they are in the object list (but only prior to joining into the spline assembly). Even a very clever approach, like putting an object in the space and trying to find all references of a certain type or with a certain keyword (SplineLink) by doing a FindAllReferences call in Papyrus during the game fails to radius-find SplineEndpointMarkers after the Spline assembly (point A, B, and the "wire") is completed...

The existing wiring in the game (e.g. the buggy stuff at the Castle) is actually a complete cheat.
There are SplineEndpointMarkers or the like which are not tethered to some node of the switches and lights. Move those and the wires won't actually move with you, even in the editor. What I'm hoping otherwise is there is some workaround where we can grab some existing power pylons tethered to each other legitimately.

I could be wrong, but this seems an arbitrary and honestly kind of premeditated behavior.
I'm guessing that to use the BendableSpline type for a grapple weapon, we would have to ask someone who knows (a Bethesda programmer in this area, e.g. SmkViper) if they know of any way to get around these restrictions. There may either be a very good behind-the-scenes reason for doing this, or it could just be something they never thought of and could patch in for the use of mod authors.
A really ugly and inefficient and probably terrible workaround would be to linearize/interpolate the arc with a large number or small rope meshes (the calculus approach).

And it depends what you want from a grappling hook. There isn't a great way (besides the Arrow projectile type held over from Skyrim maybe) to stick to geometry and anchor. This rules out some Just Cause styles of grappling. You could conceivably tether NPCs together programmatically in a lazy fashion - you run a semi-fast Timer (allowing fake "slack") on the wire object itself and compute the (weighted) average of the two time derivatives of the displacement vectors.

If you want something like the Quake mod version of the grappling hook, there I think you are going to run into hard engine limitations. The math is annoying enough, but that's in a context where you have pretty full control of the game physics. See the grappling hook Just Cause style mod for GTA5 for an example of the suitability of that game engine vs. this one. Another reason is that simulating good-enough SHM / pendulum motion and gravity by script is going to have to move the wire much faster than it may want to actually visually appear after translating / generating. Additionally, the GrabbityGun shows that objects in these games completely just lose their physics after some translations!

 

For my shark gun, I had to make Ol' Peg into a Race and Actor, because it seemed to have a higher appearing chance and rendering priority than Statics.
Note that Bethesda took nearly all "fine" motion and didn't trust it to Script translation. For example, the Prydwen arrival flight is apparently just in large part a oversized animation...

tl;dr:
Anyone who somehow knows arcane information about dynamic wires in this game, let me know!
I want to help bring you a grappling hook. :smile:

Edited by ElPolloAzul
Link to comment
Share on other sites

This has actually been in the TODO / partially complete side of my zany weapon mods list for a long time. My aim is to bring a lot of homages to the old favorite video game weapons in here, Fallout 4 style. That said, I am not a modeler, and I don't have the tools even if I was, so I try to stick to the interesting programming concepts.

 

(I've already been at least partially through a force push / air gun, a portal gun, a "gravity gun", a synth infiltrator killing implement, a PokeBall, a shark gun, a mind control / possess gun, a black hole gun, a BFG-type gun (with seeker drones), and a fireworks/airstrike show gun).

 

Specifically, here I'm working on the Anchorshot, a Broadsider that shoots an anchor with a rope attached. I'm envisioning both a shoot and be carried mode and a placeable rail/zipline point-to-point mode. I'm excited to do this more than many of the previous mods.

 

The big technical issue with making a hookshot-style grappling gun work at all acceptably is actually just getting the wire to appear (most everything else is in place in the background of my portal gun mod). To help implement the electrical power system, the game and the editor both support the dynamic creation of textured prism meshes to approximate wires. We know that process works in-game because you can move the wire out and watch as it resizes and sometimes slacks.

 

In terms of gamefile record types, this is done through the new BendableSpline record type.

BendableSplines must be specified in-editor only it seems (which is a shame for dynamically creating the wires through Papyrus). There is a way around this, which is to use a purpose-built wire stashed somewhere as the canonical rope. That works fine. But to get something that looks half decent, you want to move both ends of the rope programmatically. In the CK, this works fine. You set up two SplineEndpointMarkers and move them apart, link them with a spline. You can grab the endpoint markers in the editor, move them around, and a new rope will be calcuated for you and appear. Great!

 

But the problem is that these SplineEndpointMarkers are special in the editor. Once you've joined the markers in the editor, they SORT OF seem to cease to exist as separate references. (You can't even get the Reference Properties edit window up on them! Cloning/Duplicating this form/object is of no use - it seems to be tied to the permanent FormID, not the NIF or even the internal name). They look like linked objects, but don't quite behave the same way. A papyrus check in-game on the spline object lists no linked refs (even if they appear this way in the editor). You can't set the endpoints as object reference properties (even before they're joined) in scripts (they aren't in the pick list, even if they are in the object list (but only prior to joining into the spline assembly). Even a very clever approach, like putting an object in the space and trying to find all references of a certain type or with a certain keyword (SplineLink) by doing a FindAllReferences call in Papyrus during the game fails to radius-find SplineEndpointMarkers after the Spline assembly (point A, B, and the "wire") is completed...

 

The existing wiring in the game (e.g. the buggy stuff at the Castle) is actually a complete cheat.

There are SplineEndpointMarkers or the like which are not tethered to some node of the switches and lights. Move those and the wires won't actually move with you, even in the editor. What I'm hoping otherwise is there is some workaround where we can grab some existing power pylons tethered to each other legitimately.

 

I could be wrong, but this seems an arbitrary and honestly kind of premeditated behavior.

I'm guessing that to use the BendableSpline type for a grapple weapon, we would have to ask someone who knows (a Bethesda programmer in this area, e.g. SmkViper) if they know of any way to get around these restrictions. There may either be a very good behind-the-scenes reason for doing this, or it could just be something they never thought of and could patch in for the use of mod authors.

A really ugly and inefficient and probably terrible workaround would be to linearize/interpolate the arc with a large number or small rope meshes (the calculus approach).

 

And it depends what you want from a grappling hook. There isn't a great way (besides the Arrow projectile type held over from Skyrim maybe) to stick to geometry and anchor. This rules out some Just Cause styles of grappling. You could conceivably tether NPCs together programmatically in a lazy fashion - you run a semi-fast Timer (allowing fake "slack") on the wire object itself and compute the (weighted) average of the two time derivatives of the displacement vectors.

 

If you want something like the Quake mod version of the grappling hook, there I think you are going to run into hard engine limitations. The math is annoying enough, but that's in a context where you have pretty full control of the game physics. See the grappling hook Just Cause style mod for GTA5 for an example of the suitability of that game engine vs. this one. Another reason is that simulating good-enough SHM / pendulum motion and gravity by script is going to have to move the wire much faster than it may want to actually visually appear after translating / generating. Additionally, the GrabbityGun shows that objects in these games completely just lose their physics after some translations!

 

For my shark gun, I had to make Ol' Peg into a Race and Actor, because it seemed to have a higher appearing chance and rendering priority than Statics.

Note that Bethesda took nearly all "fine" motion and didn't trust it to Script translation. For example, the Prydwen arrival flight is apparently just in large part a oversized animation...

 

tl;dr:

Anyone who somehow knows arcane information about dynamic wires in this game, let me know!

I want to help bring you a grappling hook. :smile:

 

I dont have so much idea about what Im saying... but

 

Couldn't be possible to made any kind of projectile, the same way the Railway Rile uses, that once they hit a wall and gets "anchored" they just spawn a rope that goes from the proyectile to the ground (probably across the floor... but nvm..) and then try to make any way to make that rope as a climbable object?

 

Later add some things like a "rope deploying animation" (to prevent the rope will just spawn, so It will look like the rope "get out from the proyectile") and I suppose a new player animation designed to it with the go up/go down using the rope.

 

Couldn't be made this way something like the suggested thing? (of course a basic one... would love to see something more complex)

 

I say this, because I think there was any mod for skyrim that were doing this with arrows, making this sort o mechanic to get ropes to be able to clim.

Edited by BioClone
Link to comment
Share on other sites

I dont have so much idea about what Im saying... but

 

Couldn't be possible to made any kind of projectile, the same way the Railway Rile uses, that once they hit a wall and gets "anchored" they just spawn a rope that goes from the proyectile to the ground (probably across the floor... but nvm..) and then try to make any way to make that rope as a climbable object?

 

Later add some things like a "rope deploying animation" (to prevent the rope will just spawn, so It will look like the rope "get out from the proyectile") and I suppose a new player animation designed to it with the go up/go down using the rope.

 

Couldn't be made this way something like the suggested thing? (of course a basic one... would love to see something more complex)

 

I say this, because I think there was any mod for skyrim that were doing this with arrows, making this sort o mechanic to get ropes to be able to clim.

 

 

I mean, if you want to be doggedly practical and not care too much about the graphics of the matter, you can certainly move around these splines by their midpoints.

 

So...

 

That means you could just make a rope longer than the effective range of the gun, translate it to the midpoint between your current position and the projectile landing position, rotate it straight up (or just build the rope in the editor in its holding cell this way) and then find the additional 3-parameter rotation for this "vector" which will make the rotated spline intersect the two position point vectors. The downside is that you will see the rope coming out both directions of where it actually is for the purpose of climbing, and it will go through buildings in front of your target and behind you.

 

(If you didn't want to do the math to find the rotation, as you seem to suggest, you could probably just take the midpoint and just translate it to the destination and make sure the rope is rotated straight up). You will have the awkward situation of phasing through ceilings if you shoot the projectile, say, into the Diamond City office. If you were particularly crazy, you could spawn in invisible NPCs, since only Actors can do line-of-sight checks, to do this sanity checking on either side of the effective segment of the rope to guard somewhat against that.)

 

You can forestall the matter somewhat (and the lack of a climbing animation) by just ziplining the player across the effective span of the rope once the mesh is positioned and forcing a first person camera the whole time so that at least you don't see the ineffective segment of rope behind the firing position.

 

But, if you really don't care either way, you can certainly have the interactive version, and I'm sure there is a way by intercepting animation events to intend forward and backward, and even drop off at some point in between, as you can easily get any percent of projection of yourself along the vector, and interpolate the span in small distances. The A-B and B-A ziplining action on the rope could be engaged if you were less excited to do that by placing activators at both projectile target and firing position.

 

And if you wanted to be Spiderman somehow, you could spawn in an invisible collision-ed platform helper object ahead of time to the end of the rope.

 

It's a question of what options the community thinks would be too cheesy, and also a question of what works reliably.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...