• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Free Sway mod..

Just a bit of note from someone who has been goofing around with UnrealScript since Unreal (the SP game):

The bullets don't come out of the barrel. They don't even come out relative to the barrel (unless you go out of your way to make it look like this happens). They come out of a vector that is defined relative to the player. Hell, the gun you see in first-person view and the gun you see in third person view are completely different (unless you go out of your way to change this, and I am not even sure if it would be possible to without access to the actual source code).

That is why it doesn't matter how your gun sways, the bullet will still be aimed at the (lack of) crosshairs in the center of the screen. This is true of most engines (I think that whatever Operation Flashpoint uses might be one of the only engines to define the vector relative to the gun), which is why fire-cones are so popular. Theoretically, it allows the player to assume there is recoil or a swaying barrel. In practice, it makes it look like the SAS and Delta Force being incapable of hitting a stationary target at five meters.

If you really do want this, you would probably need to find a way to calculate the current "sway", and then alter the vector the bullets come out of accordingly. Just, keep in mind that unless Tripwire already laid the framework for this, it will be annoying as hell.
 
Upvote 0
Just a bit of note from someone who has been goofing around with UnrealScript since Unreal (the SP game):

The bullets don't come out of the barrel. They don't even come out relative to the barrel (unless you go out of your way to make it look like this happens). They come out of a vector that is defined relative to the player. Hell, the gun you see in first-person view and the gun you see in third person view are completely different (unless you go out of your way to change this, and I am not even sure if it would be possible to without access to the actual source code).

That is why it doesn't matter how your gun sways, the bullet will still be aimed at the (lack of) crosshairs in the center of the screen. This is true of most engines (I think that whatever Operation Flashpoint uses might be one of the only engines to define the vector relative to the gun), which is why fire-cones are so popular. Theoretically, it allows the player to assume there is recoil or a swaying barrel. In practice, it makes it look like the SAS and Delta Force being incapable of hitting a stationary target at five meters.

If you really do want this, you would probably need to find a way to calculate the current "sway", and then alter the vector the bullets come out of accordingly. Just, keep in mind that unless Tripwire already laid the framework for this, it will be annoying as hell.

Thanks for this info. Looks like it's best to stick with building a mutator that will decrease accuracy when firing from the hip by adjusting the spread modifier (fire-cone as you state).
 
Upvote 0
Just a bit of note from someone who has been goofing around with UnrealScript since Unreal (the SP game):

The bullets don't come out of the barrel. They don't even come out relative to the barrel (unless you go out of your way to make it look like this happens). They come out of a vector that is defined relative to the player. Hell, the gun you see in first-person view and the gun you see in third person view are completely different (unless you go out of your way to change this, and I am not even sure if it would be possible to without access to the actual source code).

That is why it doesn't matter how your gun sways, the bullet will still be aimed at the (lack of) crosshairs in the center of the screen. This is true of most engines (I think that whatever Operation Flashpoint uses might be one of the only engines to define the vector relative to the gun), which is why fire-cones are so popular. Theoretically, it allows the player to assume there is recoil or a swaying barrel. In practice, it makes it look like the SAS and Delta Force being incapable of hitting a stationary target at five meters.

If you really do want this, you would probably need to find a way to calculate the current "sway", and then alter the vector the bullets come out of accordingly. Just, keep in mind that unless Tripwire already laid the framework for this, it will be annoying as hell.

hm, you checked the RO code? cause it certainly doesnt sound like you did...
 
Upvote 0
Well, I've read all the tutorials and was finally able to compile script into a mutator using conText and ucc make. Everything seems to be working as far as getting the script into a mutator and having the mutator show up in the game without errors/warnings. However, the settings I've done don't seem to be doing anything...

I wanted to start small, so I figured I'd see if I could adjust the Hip Spread Modifier and nothing else.

Here's the code I compiled into a .u format:
Code:
class HipSpreadMut extends ROProjectileFire;
defaultproperties
{
   HipSpreadModifier=500.0
}

Next I wrote a .ucl file to allow the mutator to appear in RO:
Code:
Mutator=(ClassName=HipSpreadMut.HipSpreadMut,IconMaterialName=MutatorArt.nosym,FriendlyName=HipSpreadMut.HipSpreadMut.FriendlyName,Description=HipSpreadMut.HipSpreadMut.Description,FriendlyName=HipSpreadMut.HipSpreadMut.FriendlyName,FallbackName="HipSpreadMut",FallbackDesc="Adjusts Hip Spread Modifier.")

No matter what I set HipSpreadModifier at, it doesn't seem to be affecting anything... bullets are still going directly to the center of the screen.

Any ideas on what I'm missing?
 
Upvote 0
hm, you checked the RO code? cause it certainly doesnt sound like you did...

I did not. I am just giving basic UnrealScript related info which is based off the engine. Maybe they did do a massive rewrite to make the bullets come out relative to the gun. But, Occam's Razor suggests the simplest explanation. The simplest explanation is that they did what pretty much everyone else with the Unreal Engine has been doing since the first version: They just offset the vector so it looks pretty.

So what you're saying is that said shooting vector is fixed and not affected by movement at all? The bobbing of the guns in first person is purely cosmetical?

Or in other words: Accuracy is completely unaffected by movement?

I would have to look at the code (which I probably won't, I already have too many projects on the side), but I suspect RO does the same thing most games do to handle that: Your firecone is enlarged. Let's say you have a 30 degree arc of evil fire cone when you fire from the hip. The way it is usually handled is that, when moving, your cone would increase to 45 or 60 degrees. There ARE some engines out there that handle this even better "out of the box" but they are few and far between (mainly because you can make stuff look a lot prettier if your first person and third person weapons are completely different entities).

Take everything I say with a grain of salt (since this is general observations based off of what I know of the Unreal Engine), but considering RO's origin, I sincerely doubt the bullets come out relative to the first-person barrel. If people didn't complain back when they didn't have access to the source, I doubt they would see a reason to rewrite such a massive thing. Although, if they did, kudos.
 
Upvote 0