Mappers' Corner Mappers and Modders

Go Back   Omnip)o(tentS Forums > SERVERS > Mappers' Corner
Reply
 
Thread Tools Display Modes
Old 08-21-2016, 10:00 PM   #41
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Okay, I think I've finally got a good working edit. I used your texture, Anon, but made it a little darker and lowered the alpha channel way down to reduce some of the shiny reflections. I'm happy with it now. I'll work on the HUD icon later. For now I just put that back to default.

One weird thing that's happening is if I have both the regular Assault Rifle and my version the scroll wheel will not switch to other weapons. It just cycles through the two Assault Rifles. If, however, I use the Level Configurator to force the players to spawn with only my version then the scroll wheel works fine for changing to other weapons. Shouldn't be a problem since I don't plan on having the default rifle in the map.

The Level Configurator works. Thanks for that find, Anon. I still want to try to make a small mut that does the same thing. The Configurator has a ton of classes and you can change all kinds of things. Seems like overkill and plus I'm a little worried it might change some things by default that I don't want changed. Oh, plus I can't get it to spawn dual-wield. No biggy since I can just put pickups right by the spawn points.

Last edited by Binger; 08-22-2016 at 12:07 AM.. Reason: spelling
Binger is offline  
Old 08-21-2016, 10:27 PM   #42
Anonymous[Lolz]
Getting there...
 
Anonymous[Lolz]'s Avatar
 
Join Date: Feb 2009
Location: New York State
Posts: 859
Default
Reply With Quote


Ok, that sounds good. Want me to try to remake the HUD icon?
Anonymous[Lolz] is offline  
Old 08-22-2016, 12:07 AM   #43
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Quote:
Originally Posted by Anonymous[Lolz] View Post
Ok, that sounds good. Want me to try to remake the HUD icon?
No, it's cool, unless you've already done it. It's just an Assault Rifle. Thanks, though. I might mess around with it later. I already imported the default hud icons into Gimp. I'll see if I can make it work.

Now I'm working on the spread (which is really the whole point). If I set the spread to zero and take out this bit of code the accuracy is always perfect, which is a little much I think. Ideally I would like to have perfect accuracy until about 3 seconds.

Code:
event ModeDoFire()
{
    if ( Level.TimeSeconds - LastFireTime > 0.5 )
        Spread = Default.Spread;
    else
        Spread = FMin(Spread+0.02,0.12);
    LastFireTime = Level.TimeSeconds;
    Super.ModeDoFire();
}
Setting that value of 0.5 to 3.0 doesn't work. The rifle is immediately inaccurate. I'm also not sure of the two different numbers in the first line for else. More experimenting is required.

One more weird error I'm getting that I forgot to mention is that the charge meter for the grenades immediately goes to full, even though the grenades work normally so that the longer you hold alt-fire the further they shoot. Also no biggy though.
Binger is offline  
Old 08-22-2016, 01:15 AM   #44
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Here's what I got so far. I put it in a very basic map just for testing. Accuracy is not perfect but close. The bots on Inhuman were kicking my ass.

Last edited by Binger; 08-22-2016 at 03:31 PM.. Reason: Removed link.
Binger is offline  
Old 08-22-2016, 06:49 AM   #45
Miauz55555
I'm a cute Cat.
 
Miauz55555's Avatar
 
Join Date: Apr 2016
Posts: 118
Default
Reply With Quote


Quote:
Originally Posted by Binger View Post
Here's what I got so far. I put it in a very basic map just for testing. Accuracy is not perfect but close. The bots on Inhuman were kicking my ass.
https://www.dropbox.com/s/eeyphk7e2t...ester.zip?dl=0
Hey Binger there are some missing files for me. LevelConfigManagerV3; assaultrifleb (UTDeps)

Also when I try to open it in the editor it crached it.

Spoiler!
Miauz55555 is offline  
Old 08-22-2016, 03:38 PM   #46
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Quote:
Originally Posted by Miauz55555 View Post
Hey Binger there are some missing files for me. LevelConfigManagerV3; assaultrifleb (UTDeps)

Also when I try to open it in the editor it crached it.

Spoiler!
Okay, sorry about that. I loaded those two files first without embedding them and then when I went to upload I embedded them. I thought that would work but I should have removed the files from my system folder and tested it. My bad.

The crash may have something to do with that. Not sure.

I'll try again. It's nothing special for sure. The map is not meant to be anything other than for testing and the modified AR is interesting at best. It is actually crazy powerful. I didn't change that at all but just making it more accurate really makes it an effective weapon.
Binger is offline  
Old 08-23-2016, 07:23 AM   #47
Miauz55555
I'm a cute Cat.
 
Miauz55555's Avatar
 
Join Date: Apr 2016
Posts: 118
Default
Reply With Quote


Quote:
Originally Posted by Binger View Post
Okay, sorry about that. I loaded those two files first without embedding them and then when I went to upload I embedded them. I thought that would work but I should have removed the files from my system folder and tested it. My bad.

The crash may have something to do with that. Not sure.
[...]
I think so.

No problem. It was just an information post for you.
Miauz55555 is offline  
Old 08-25-2016, 02:56 PM   #48
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Quote:
Originally Posted by Miauz55555 View Post
I think so.

No problem. It was just an information post for you.
I appreciate it.

I don't want to make a d/l for the assaultrifleb file because I'm still changing things in it and I would have to rename it. That's why I tried to embed it.
Binger is offline  
Old 09-15-2016, 09:32 PM   #49
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


I noticed the XxxXLinkGun on Flight of Fury was dual-mode so I compared it's script to the Assault Rifle and all I had to do was add bDualMode=True to the properties and it worked. Now I have it so that I can spawn players with just the AR-II in dual-mode. Awesome. Next is figuring out how to control the spread the way I want it.
Binger is offline  
Old 09-17-2016, 11:52 AM   #50
Castiel
Just Registered
 
Join Date: Jul 2016
Posts: 27
Default
Reply With Quote


You change the spread in the default properties of the weapons Fire/Alt Fire UC classes

HERE IS THE selections of the UC for the assault gun primary fire that controls the spread/accuracy.

class AssaultFire extends InstantFire;

event ModeDoFire()
{
if ( Level.TimeSeconds - LastFireTime > 0.5 )
Spread = Default.Spread;
else
Spread = FMin(Spread+0.02,0.12);

LastFireTime = Level.TimeSeconds;
Super.ModeDoFire();
}


defaultproperties
{

aimerror=800.000000 <--- Controls random deviation from center per shot. 0 = none, 1000 = little center hit. Think Shockrifle, LG, etc.. If you click and one projectile comes out per shot.


Spread=0.020000 <----- Controls the spread of rotator/multi projectile/beam weapons. 0.0 = no spread, 15000 = my ToePopper weapon. This is used if u have multi projectiles per shot or auto fire such as the flak cannon or rox

The two are unrelated, but in autofire weapons, I.E. minigun and AR they are both used and are carefully tweaked.

The best way to think about it is the spread is the maximum size of the ring around the bullseye any individual bullet can deviate and the aimerror is how often the bullets will miss the bullseye..

I hope that helps.


Scott

Last edited by Castiel; 09-17-2016 at 12:07 PM..
Castiel is offline  
Old 09-17-2016, 04:25 PM   #51
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Quote:
Originally Posted by Castiel View Post
You change the spread in the default properties of the weapons Fire/Alt Fire UC classes

HERE IS THE selections of the UC for the assault gun primary fire that controls the spread/accuracy.

class AssaultFire extends InstantFire;

event ModeDoFire()
{
if ( Level.TimeSeconds - LastFireTime > 0.5 )
Spread = Default.Spread;
else
Spread = FMin(Spread+0.02,0.12);

LastFireTime = Level.TimeSeconds;
Super.ModeDoFire();
}


defaultproperties
{

aimerror=800.000000 <--- Controls random deviation from center per shot. 0 = none, 1000 = little center hit. Think Shockrifle, LG, etc.. If you click and one projectile comes out per shot.


Spread=0.020000 <----- Controls the spread of rotator/multi projectile/beam weapons. 0.0 = no spread, 15000 = my ToePopper weapon. This is used if u have multi projectiles per shot or auto fire such as the flak cannon or rox

The two are unrelated, but in autofire weapons, I.E. minigun and AR they are both used and are carefully tweaked.

The best way to think about it is the spread is the maximum size of the ring around the bullseye any individual bullet can deviate and the aimerror is how often the bullets will miss the bullseye..

I hope that helps.


Scott
Thanks for the info. The only thing I hadn't figured out was the aimerror.

What I'm getting stuck on is that bit of code. It's easy to remove it and set the spread to perfect but that is too much. It makes the AR very deadly. Damage is 7 and fire rate is 0.16 so that's 43.75 damage per second. What I want to do is have it perfect for about 2 seconds then go to a higher spread, but not nearly as high as it goes now. I can't figure that out though.

My interpretation of that code is that if it's been more than half a second since you fired than use the default spread, if it's been less than half a second use the alternate (and worse) spread, but that is not the way it works with experimenting. What it seems to say to me is that you take the game clock and subtract what the game clock was when you last fired, but since the clocks count down wouldn't that give you a negative value? Also, is LastFireTime the last time you pressed the trigger or the last time a shot left the gun? Does that even matter? For some reason I'm having trouble rapping my head around this. This is why I gave up trying to learn code years ago.

Also, why are there two values for Spread in the Else line? The first value matches the default spread. Does that mean the spread can be anywhere between those two numbers? That doesn't really make sense if the default spread doesn't also have two values.

So to sum up my goal here is to have perfect aim until 2 seconds and then have the spread get worse after that. Once I get that figured out I can tweak those values and maybe the fire rate and damage values while testing with bots. I was working on this late last night but suddenly my changes didn't seem to make any difference in game so I decided I wasn't thinking clearly and gave up for the night.
Binger is offline  
Old 09-18-2016, 02:47 AM   #52
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


A couple of interesting things I found while experimenting with this. I changed that 0.5 value to 0.05 and the spread stayed at default (the good accuracy). I then started lowering the number from 0.5 until I got the spread to stay at default. It stayed with the less accurate spread until 0.15, then at 0.14 the spread went to default. I then went to 0.149 and it was still less accurate although it seemed to hit the center more often. Very weird. Doesn't make sense to me. I'm gonna play with this some more but I'm giving up for the night. Apparently though it doesn't work like I thought it did, which is that after a certain amount of time holding the trigger the spread gets worse.

Also, for some reason I started wondering if dual wield did twice the damage, which I just assumed it did. Nope, Both single and dual took the same amount of time to take down a full health core. That's just stupid.
Binger is offline  
Old 09-18-2016, 08:24 PM   #53
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


I'm giving up on that bit of code. I removed it. It doesn't do what I thought it did.

Turbo, if you read this... How did you get the OMFG gun to be dual wield on Furious 3? It seems to work like I would expect it to, doing twice the damage.
Binger is offline  
Old 09-19-2016, 07:41 PM   #54
Turbo K
Community Veteran

 
Turbo K's Avatar
 
Join Date: Jun 2010
Posts: 1,490
Default
Reply With Quote


Quote:
Originally Posted by Binger View Post
I'm giving up on that bit of code. I removed it. It doesn't do what I thought it did.

Turbo, if you read this... How did you get the OMFG gun to be dual wield on Furious 3? It seems to work like I would expect it to, doing twice the damage.
It's a completely different gun, called the OMFG2. I didn't mess with the code.
Turbo K is offline  
Old 09-22-2016, 08:41 PM   #55
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Quote:
Originally Posted by Turbo K View Post
It's a completely different gun, called the OMFG2. I didn't mess with the code.
Okay, got it. Thanks.

It looks like a lot of code went into making it "DualGun" so I'll just live with the dual wield AR-II not doing twice the damage. I can up the damage if need be. I actually anticipated having to lower the damage. At least it looks cool.
Binger is offline  
Old 09-23-2016, 10:07 PM   #56
Castiel
Just Registered
 
Join Date: Jul 2016
Posts: 27
Default
Reply With Quote


Sorry Binger,

I forgot about this forum post.

The code you are trying to modify works to simulate real life circumstances of
firing slowly and aiming for greater accuracy
and less accuracy for holding down the trigger
by measuring the time between shots.

What you want to do is more like.. if im shooting for 2 seconds do this, if im shoot after that do this.. Totally different.

Here it is like this I will put in comments in the code to explain everything.

Dual offset or whatever it is is just cosmetic.

class AssaultFire extends InstantFire;

// instant fire means well instant fire.
//The target is hit as soon as you shoot
//The bullets you see are just an emitter effect and has no baring on whether or not you hit it.


event ModeDoFire()
{
if ( Level.TimeSeconds - LastFireTime > 0.5 )
// This does not give negative numbers. Think if it just used minutes not seconds.
// (leveltime is 1:01am) - (lastfiretime 1:00am) = (1 minute since you last fired.)
// Basically, if you are firing slowly use the value below

Spread = Default.Spread;


else
// Another way of saying "if its not the above mentioned state ^ use the value below me


Spread = FMin(Spread+0.02,0.12);
// This means take the default spread and add a varying ammount to it
//basically make it less accurate.
//Fmin = return to smaller of the values. and yes this is a float range.

LastFireTime = Level.TimeSeconds;
Super.ModeDoFire();
// not relevent to the discussion

}



I am not sure exactly how you would do what you are wanting. Id like to look into it, but you could do something like this.

event ModeDoFire()
{
if ( Level.TimeSeconds - LastFireTime > 0.5 )
Spread = 0.00;
else
Spread = DefaultSpread;

LastFireTime = Level.TimeSeconds;
Super.ModeDoFire();
}

This

Essentially, you would have made the rifle a perfect hitscan shot the first time you fire and
the regular spread there after. (Assuming your fire rate is slower or equal to 0.50.)
Castiel is offline  
Old 09-24-2016, 03:52 PM   #57
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Quote:
Originally Posted by Castiel View Post
Sorry Binger,

I forgot about this forum post.

The code you are trying to modify works to simulate real life circumstances of
firing slowly and aiming for greater accuracy
and less accuracy for holding down the trigger
by measuring the time between shots.

What you want to do is more like.. if im shooting for 2 seconds do this, if im shoot after that do this.. Totally different.
I don't see the difference in these two.

Quote:
Originally Posted by Castiel View Post
Dual offset or whatever it is is just cosmetic.
Yeah, I already figured that out with my test on the core and that's why I asked Turbo_K about the OMFG gun in Furious 3, which is dual wield and does twice the damage. There seems to be a lot of code that went into that, code that is different from the dual wield code of the AR, so I will leave it as is and I can up the damage if I feel it needs it.

Quote:
Originally Posted by Castiel View Post
class AssaultFire extends InstantFire;

// instant fire means well instant fire.
//The target is hit as soon as you shoot
//The bullets you see are just an emitter effect and has no baring on whether or not you hit it.
Already knew this but thanks. The AR has no visible tracers which is fine. Bullet tracers on an instant hit gun are going to give a false representation of where you're hitting if you are moving the gun because they have travel time where as the shot does not. This is something I encountered on the Goliath II Minigun where I sped the tracers up so fast you usually can't even seem them.

Quote:
Originally Posted by Castiel View Post
event ModeDoFire()
{
if ( Level.TimeSeconds - LastFireTime > 0.5 )
// This does not give negative numbers. Think if it just used minutes not seconds.
// (leveltime is 1:01am) - (lastfiretime 1:00am) = (1 minute since you last fired.)
// Basically, if you are firing slowly use the value below
But the clock in ONS (and I think all gametypes) counts down, which is where my confusion was. Obviously it doesn't use that clock and uses an internal clock that counts up because if the clock counted down then the current clock time would always be lower than the last fire time (except for the moment of firing), which would give a negative result. No biggy though as it doesn't matter if you just assume it doesn't use the game clock, which was my mistake.


Okay part two of this needs another post so, to be continued soon.
Binger is offline  
Old 09-24-2016, 04:35 PM   #58
Castiel
Just Registered
 
Join Date: Jul 2016
Posts: 27
Default
Reply With Quote


Quote:
Originally Posted by Binger View Post
I don't see the difference in these two.

No biggy though as it doesn't matter if you just assume it doesn't use the game clock, which was my mistake.
Yeah, It uses real-time server timestamp. You will never get a negative number..

As for not knowing the difference.

The code in the assault rifle is only calculates the time between each individual shot. It does not calculate or regulate anything from the time you start firing to when you stop. It resets between each shot. The code you would want would be something that measures and regulates all the shots from the time you click the button until you stop the auto fire.

This is pseudo-code because I cant remember the correct specific references are.. I assume its just FirstFireTime and I cant remember at all what the autofire check it... but it should essentially go something like this:

event ModeDoFire()
{
if ( Level.TimeSeconds - FirstFireTime <= 2.0 && b.isautofiremode)
Spread = 0.00;
else

if ( Level.TimeSeconds - FirstFireTime > 2.0 && b.isautofiremode)
Spread = Default.Spread;
FirstFireTime = Level.TimeSeconds;
Super.ModeDoFire();
}


That would measure the total time between your starting and ending time; not in between each shot. Furthermore it would differentiate between if you are clicking each time or if you are holding the button down.. I think this is the code you need. I just need to find the specific check reference for auto-firing to make it work.
Castiel is offline  
Old 09-30-2016, 04:45 PM   #59
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


It's a pretty stupid bit of code they put in there. My theory is that someone intended it to do what I wanted but couldn't figure it out and they just left it in there. Who fires one shot at a time with the AR? The fire rate at .16 and that value in the code at 1.5 means that only the first bullet is accurate. 1.5 isn't even close to affecting it. What's the point? It would make sense if it was a combination of Spread and Aim Error, so that after the first bullet the Aim Error slowly starting getting worse until at 1.5 it was at full Aim Error (does that make sense?) but from my tests it seems that the second bullet is as likely to be as inaccurate as the hundredth.

Assuming my fire is .15 (which it is) I still don't understand why at .149 it doesn't go to default spread. Between .149 to about .141 (I think) it's gets better but it doesn't get better immediately at .149. Also, it's not the spread that changes between those values but how likely it is to hit the center. At higher values almost all shots miss the center but then at lower values almost shots hit the center. Almost like it's changing Aim Error and not Spread. Oh well, it doesn't matter.

I still don't understand why there are two values in FMin. I played with those but couldn't figure it out. Making changes then testing them gets tedious after a while. Change the code. Save. Close the file. Go to command prompt. F3. Enter. Open Editor. Load map. Play. Test. Close Editor. Delete files from System folder. Open file. Repeat. Doesn't sound like much but it gets old for just changing one value.

I'm taking a break from this for a while but when I get back to it I'll try your code, Castiel. Thanks.
Binger is offline  
Old 10-03-2016, 01:07 AM   #60
Binger
.

 
Binger's Avatar
 
Join Date: Nov 2007
Posts: 2,198
Default
Reply With Quote


Hey Lag, you said you might want to put this in a map. Keep in mind that I never intended this to be mixed in with stock weapons. I was making it just for the Adrift-Ventilation map I'm working on.

Here are the changes I've made so far.

-Damage is 7 with the FireRate at .15 (stock is .16), so that's about 46 dps, if I'm doing my math right. I think I have a vehicle damage multiplier at 1.5 but that's completely untested and I can set it to whatever.

-Accuracy is perfect at the moment. I can set that to whatever you want but I haven't tried Castiel's code yet.

-Range is 28000

-It's dual-wield but that is just cosmetic. It doesn't increase its damage.

-Default ammo is 500 but can go up to 999.

-Grenade count is 4 but that's 8 with dual-wield.

Overall not much different than the the stock AR except for the accuracy.

When I had this is in a map with the stock Assault Rifle the scroll wheel would not change to other weapons. It would only cycle through the two ARs. I haven't figured out how to force spawn players without the stock AR by using one of those simple muts and was using the LevelConfig mut.

Insignificant changes are the messages. Instead of "You got the AR-II" it will be "Pickup: AR-II" and I don't like fancy death messages so it's just "Lagzilla killed Binger | AR-II".

If you're interested let me know and I will package it up. I will need to check everything over really well because I just removed all UT files from my main drive and reinstalled the game. I'm not sure which backup of the AR-II I was using.

Btw: Check out this gun that cyberhawk just made. I've tried it and it's pretty cool. A little much for Onslaught but there's a separate file that lets you customize it.

https://www.epicgames.com/unrealtour...Weapon-Mutator
Binger is offline  
Reply


Go Back   Omnip)o(tentS Forums > SERVERS > Mappers' Corner

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying Vehicles Binger Mappers' Corner 92 07-22-2016 04:25 PM
BATFE banning popular rifle ammo Schadenfreude Off Topic 5 02-23-2015 01:43 AM
NTW 20 Anti-Material Rifle XI Off Topic 6 07-10-2008 05:20 PM
Super Shock Rifle Kain Lightfoot Mappers' Corner 4 04-28-2007 08:15 PM
Insta-gib shock rifle N1ghtmare Onslaught 37 02-21-2007 03:35 PM


All times are GMT -5. The time now is 02:17 PM.