Weapon Additions - Updated Feb. 15th 2014 (Discontinued)

The place to discuss all things Receiver.
Post Reply
User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Sun Nov 03, 2013 10:10 am

lamekupo wrote:Hey, great mod. I'm truly enthused to see someone tackle modding for Receiver in such a big way. Thanks for providing this for us.

I'd love to see where you take this in the future. I think handling the aforementioned stripper clips would be great and it'd be cool to see an SKS or some such.

Something I noticed though, the TT-33 only has a 7 round mag, whereas I believe it's supposed to hold 8. Could you possibly fix that? It'd be nice to have the TT at least slightly different from the M1911.
Thanks! I did this for myself mostly, I always wanted to try different weapons with this kind of control scheme, but you're welcome! For the TT-33 magazine yes, I can change that really easily. I never actually read up on the magazine for that gun so thanks for pointing that out! Also, since all these guns use different calibers they should all have slightly different velocities right? Right now they all start at 251 meters/sec, I'm not sure how big the difference is but it could add a little more variation to the guns.

I should probably finish the Thompson first to make it operate properly but I've quickly whipped up a basic bolt-action rifle with loading while the bolt is back. The model is just some random one I found online so don't pay attention to the crappy-ness!

Image

It was actually super simple to write, basically recreating the revolvers "yolk" rotation but with the bolt, and only letting the slide move if it's open. Right now E toggles the rotation and R pulls and releases the bolt like normal, it's really difficult to operate quickly without fumbling like this but I'm gonna keep playing with it and see if it just takes getting used to. As for letting go of the bolt and leaving it back, I have no idea what to do for that yet. You can hold it back and insert individual rounds but once I get a stripper clip working I think I can just make that hold it open. Either that or use R to pull it back and T to push it forward. I'm open to ideas though!
saladofstones wrote:Awesome work so far
Thanks!

Vicious713
Posts: 2
Joined: Sun Nov 03, 2013 10:20 am

Re: Weapon Additions - Updated Oct. 21st

Post by Vicious713 » Sun Nov 03, 2013 10:24 am

I love the fact that your keeping this game alive, but i'm having the same crashing issues as mentioned above. I think i should note i'm running 8.1 as well. Is it possible to forward that build to me as well? Or perhaps explain the fix, perhaps i did something wrong?

I overwrote the steam download version of the game with your files, and it wont even launch.
So i downloaded your whole base game file instead, and that launches, then crashes.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Sun Nov 03, 2013 11:06 am

Vicious713 wrote:I love the fact that your keeping this game alive, but i'm having the same crashing issues as mentioned above. I think i should note i'm running 8.1 as well. Is it possible to forward that build to me as well? Or perhaps explain the fix, perhaps i did something wrong?

I overwrote the steam download version of the game with your files, and it wont even launch.
So i downloaded your whole base game file instead, and that launches, then crashes.
Hmm... I think it might not be compatible with the Steam version then, I haven't seen anything in the project about Steam integration. None of the files will run on their own though, the base files are supposed to be copied into the original RC7 folder and then the most recent update after that, but I don't think that's the problem. When I post the next update with a download I'll try building it with the architecture at x86_64 and see if that makes any difference, but for now I'll just update the main post and say it's not compatible with Steam.

Here's the link to the build, I'm really not sure if it's against that disclaimer on the source page so I will just make the file hidden again in like an hour or so, or whenever you download it.

Vicious713
Posts: 2
Joined: Sun Nov 03, 2013 10:20 am

Re: Weapon Additions - Updated Oct. 21st

Post by Vicious713 » Sun Nov 03, 2013 11:45 am

Thanks a lot, that launched right up!

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Sun Nov 03, 2013 12:15 pm

No problem!

lamekupo
Posts: 11
Joined: Wed Sep 18, 2013 5:56 am

Re: Weapon Additions - Updated Oct. 21st

Post by lamekupo » Mon Nov 04, 2013 2:49 am

I've also got the Steam version. I was able to install it on the first try, with no issues at all. I'm running a Windows 7 64 bit machine.

The bolt action looks amazing so far! Even despite the less-than-perfect model. An E-R-T control scheme seems a little clunky to me though. The T key is a tad too far to press and hold (Maybe I just have smallish hands, but it requires me to completely move my usual fingers from the WASD keys.) Perhaps use F instead? I know it's normally used for the hammers, but it should be free for use for a bolt action rifle, no?

Alternatively, you might be able to use R to both pull and push the bolt, by having a boolean variable that gets set when the bolt is pulled all the way back or all the way forward, and an if statement to check that boolean each time R is pressed. That might detract a little from the firearm micromanagement concept of Receiver though. That said, pushing and pulling are very similar movements for your brain to handle, so maybe a push/pull R scheme would be for the better?

Messing with the muzzle velocity is an interesting idea, I wonder if it would indeed cause a noticeable difference. Maybe not though, given the short ranges in Receiver.

grimrecka
Posts: 2
Joined: Mon Nov 04, 2013 2:47 am

Re: Weapon Additions - Updated Oct. 21st

Post by grimrecka » Mon Nov 04, 2013 3:11 am

I really love what you've added. Especially the 870, it's so much fun to use.
As for letting go of the bolt and leaving it back, I have no idea what to do for that yet
Do you mean in coding way or controls way? If the later, how about keeping E as toggle rotation, and have R as toggle the pull. Holding R makes sense with the pistols because the slides are spring loaded, but with a bolt action you don't have to be actively doing anything to keep the bolt open

That way to fire again it would be:
1. E (bolt up)
2. R (bolt open, ejecting round)
3. R (close bolt, chambering round)
4. E (bolt down, readying firing pin)

The trick would be getting the timing right between the Rs, otherwise you might start closing the bolt before you've pulled it back far enough to eject and/or chamber a new round.

Keep up the great work!

grimrecka
Posts: 2
Joined: Mon Nov 04, 2013 2:47 am

Re: Weapon Additions - Updated Oct. 21st

Post by grimrecka » Mon Nov 04, 2013 4:45 am

lamekupo wrote: Alternatively, you might be able to use R to both pull and push the bolt, by having a boolean variable that gets set when the bolt is pulled all the way back or all the way forward, and an if statement to check that boolean each time R is pressed. That might detract a little from the firearm micromanagement concept of Receiver though. That said, pushing and pulling are very similar movements for your brain to handle, so maybe a push/pull R scheme would be for the better?
That's pretty much what I was thinking would work best. Cycling a round in a bolt action would consist of of the following:
1. E - Bolt up
2. R - Bolt Open, ejecting the round
3. R - Bolt Close, chambering new round
4. E - Bolt down, arming firing pin.

I reckon that's got a pretty sweet rhythm to it.

Personally I don't think toggle buttons reduce the micromanagement. Plenty of actions in game already use toggles (putting things in inventory, safety/fire select). The point of Receiver is that no action is done for you and that you have to think about every step between the weapons current state and the state that you want it to be in. In this case micro management is still present in the timing of when you press R again. If you do it too fast, then your going to start closing the bolt before it's travelled far enough to eject the round or chamber a new one.

Toggle buttons are a matter of control convenience, not weapon handling convenience. The nest part though, is that if it's programmed right, people can just rebind Bolt Open/Bolt closed to different keys or key them bound to the same key depending on their preference.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Mon Nov 04, 2013 8:33 am

lamekupo wrote:I've also got the Steam version. I was able to install it on the first try, with no issues at all. I'm running a Windows 7 64 bit machine.

The bolt action looks amazing so far! Even despite the less-than-perfect model. An E-R-T control scheme seems a little clunky to me though. The T key is a tad too far to press and hold (Maybe I just have smallish hands, but it requires me to completely move my usual fingers from the WASD keys.) Perhaps use F instead? I know it's normally used for the hammers, but it should be free for use for a bolt action rifle, no?

Alternatively, you might be able to use R to both pull and push the bolt, by having a boolean variable that gets set when the bolt is pulled all the way back or all the way forward, and an if statement to check that boolean each time R is pressed. That might detract a little from the firearm micromanagement concept of Receiver though. That said, pushing and pulling are very similar movements for your brain to handle, so maybe a push/pull R scheme would be for the better?

Messing with the muzzle velocity is an interesting idea, I wonder if it would indeed cause a noticeable difference. Maybe not though, given the short ranges in Receiver.

Haha that's weird (but good!), I guess some people have just messed up somewhere while overwriting the files. I agree with your idea with the boolean and just using R, that's a lot better than what I was thinking of. Like it doesn't really make sense pulling the bolt back and letting go, and it goes forward on it's own. Maybe if you let go before the bolt is fully back it should go forward, so you can't just tap the button once and have it pulled back. I was also thinking pulling the bolt with R while it's rotated closed should automatically open it, those movements are done consecutively without taking your hand off or moving it. Same with closing it, but that makes it really simple to operate.

For the muzzle velocities yeah I'm going to see what happens when I change them but I'm thinking I will just keep them the same in the end. After some quick googling it seems the 1911 in .45acp comes out to 251 m/s like default in the game, while the Glock 17 in 9mm comes out to 348 m/s! The way the damage is calculated using the bullets velocity might make the bullet absolutely destroy whatever it hits, but we will just have to see!

Edit: Missed those other replies earlier - I wasn't sure what would be the most intuitive control scheme at the time, I agree and changed the controls to toggle with R and still rotate with E. It's a lot better. The input handling script calls functions in the gun script when a button is pressed, so it's really simple to call different functions if you change the controls in the config popup, but I'm not exactly sure what you want.

lamekupo
Posts: 11
Joined: Wed Sep 18, 2013 5:56 am

Re: Weapon Additions - Updated Oct. 21st

Post by lamekupo » Tue Nov 05, 2013 5:35 am

I'm glad we all agreed on the push/pull R scheme. Great minds think alike I suppose, heh.

I also agree that making necessary to hold R (for at least half a second) is important. Bolts have a certain "weight" to them that isn't negligible enough to simply flip open. As for having a R-only scheme, you could always save that for lever action or straight pull bolt action guns.

I wasn't aware that Receiver had damage though! Does that mean enemies have health? It'd be interesting if you could add an "armor" factor to enemies, so that certain guns would have more trouble with others than certain enemies. (e.g. .45 ACP is incredibly slow moving and large, so it pierces most things about as well as a butter knife.)

What would be really interesting is an enemy that is mobile (like the flying drones), but is slower and uses a gun (like the turrets). In essence, something that fights sort of the same way the player does. As the game currently is, I never really even need a second mag, and therefore I never even speed reload. I feel that with a mobile gun enemy, your firearm handling skill would really be tested. Right now, the most important skill in the game is mostly just good and quick aim, which is disappointing given the fact that the most interesting feature is the micromanagement.

Just speculation though. I'm not sure how feasible adding new enemies or modifying the existing ones is. I've been wanting to take a look myself, but I've never messed around with Unity before, and I'm sort of short on time in my current state.

But back on topic, how are you planning on handling the controls for inserting a stripper clip vs inserting single rounds?

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Tue Nov 05, 2013 1:17 pm

lamekupo wrote:I'm glad we all agreed on the push/pull R scheme. Great minds think alike I suppose, heh.

I also agree that making necessary to hold R (for at least half a second) is important. Bolts have a certain "weight" to them that isn't negligible enough to simply flip open. As for having a R-only scheme, you could always save that for lever action or straight pull bolt action guns.

I wasn't aware that Receiver had damage though! Does that mean enemies have health? It'd be interesting if you could add an "armor" factor to enemies, so that certain guns would have more trouble with others than certain enemies. (e.g. .45 ACP is incredibly slow moving and large, so it pierces most things about as well as a butter knife.)

What would be really interesting is an enemy that is mobile (like the flying drones), but is slower and uses a gun (like the turrets). In essence, something that fights sort of the same way the player does. As the game currently is, I never really even need a second mag, and therefore I never even speed reload. I feel that with a mobile gun enemy, your firearm handling skill would really be tested. Right now, the most important skill in the game is mostly just good and quick aim, which is disappointing given the fact that the most interesting feature is the micromanagement.

Just speculation though. I'm not sure how feasible adding new enemies or modifying the existing ones is. I've been wanting to take a look myself, but I've never messed around with Unity before, and I'm sort of short on time in my current state.

But back on topic, how are you planning on handling the controls for inserting a stripper clip vs inserting single rounds?
Yeah, making you have to hold it makes more sense so I'm gonna try to write that, and I'll keep E to toggle the rotation for now. It does make more sense for just R for lever action guns/similar so yeah, I'll leave it.

I quickly went through the script and it doesn't seem like the robots have health, it's more like if you're able to hit a part that is vital to it operating then that part will be destroyed. When a bullet hits a robot, it adds some angular velocity and just calls a function with the part the bullet has hit and disables it, there is also a small chance of a lucky shot that disables it regardless of where you hit.

Basically like this:

Code: Select all

if(obj.name == "battery" && battery_alive){
		battery_alive = false;
		motor_alive = false;
		camera_alive = false;
		trigger_alive = false;
And creates that impact spark, etc. It's certainly possible to add some sort of armor threshold, possibly having it degrade slightly every time it gets hit, but I'm gonna wait a little bit to try something like that. It turns out changing the muzzle velocities won't skew the damage crazily, it will pretty much just hit the robots harder.

I have actually been trying to implement the flying gun drone, it's simple to replace the taser instantiation with a bullet, but changing it's target position the way I want is difficult. I want it to hover within a radius and look at you rather than flying directly at you while spraying bullets, like it actually hits you if it's flying straight but it's pretty much like the shock drone just with a farther reach.
Then there's the mobile turret, the math for rotating the back wheel around to aim at the player would be a lot simpler, but it would need some sort of path-finding for that so it doesn't just drive into a wall. There's a crap ton of ideas I have that I want to work on but I think finishing what I have would be best, today I'm going to finish the Thompson so it operates properly and maybe try to get a stripper clip working.

For handling the stripper clip, I think it would work this way but I won't know until I try it - Basically have it act as a magazine. If you press insert while the bolt is open and there is no magazine in your hand, insert a round, but if there is one in your hand, insert it like a magazine. Then if you press insert again, have a for loop constantly push rounds up out of the magazine and add them to the internal magazine at the same time. I think it would turn out great using a for loop, I can have a random number generated to break the loop, making it sometimes require more than one single push to get all the rounds inside. Then the bolt toggling function can simply check if there's a clip inserted to prevent it from moving until you take it out.

saladofstones
Posts: 8
Joined: Wed Nov 07, 2012 1:55 am

Re: Weapon Additions - Updated Oct. 21st

Post by saladofstones » Tue Nov 05, 2013 1:56 pm

Instead of the cumbersome ERT, we could use ERF, as I'm not sure the F key would have any other function.

pressing E->R->F doesn't seem too unnatural and might have a nice rhythm.


While this is more preference, I felt receiver's atmosphere worked because of the unusual nature of the drones. While turrets are nothing special, the melee kill-drones were more interesting than ones who can shoot at a distance, since given how the game handles AI (they only activate if you're in that particular room), it'd be a "who sees who" match.

As far as drones, a lot of the game relies on using sound and music cues, why not a sort of dummy drone? I'm imagining a stationary drone that stays still, but emits noise that blocks the sounds of other drones. Fits more with the whole backstory of the mind-kill and these things being designed specifically for you.

This is also asking much, but I noticed an issue with the game's handling of objects that are in areas you haven't entered yet. It seems if the AI isn't activated, physics doesn't apply and it doesn't notice me shooting at it (and at times it seems like the hitboxes don't work). I can enter and back from a room to cause turrets to stop targeting me, but generally they will be stuck facing the door.

As well, if I knock out a drone while its in this dormant state, it stays floating even after destruction (this is really noticeable on the shooting range map).

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Tue Nov 05, 2013 4:28 pm

saladofstones wrote:Instead of the cumbersome ERT, we could use ERF, as I'm not sure the F key would have any other function.

pressing E->R->F doesn't seem too unnatural and might have a nice rhythm.
I've written it so it's E-R-R but I can easily add an alternate button that only pushes the bolt forward
While this is more preference, I felt receiver's atmosphere worked because of the unusual nature of the drones. While turrets are nothing special, the melee kill-drones were more interesting than ones who can shoot at a distance, since given how the game handles AI (they only activate if you're in that particular room), it'd be a "who sees who" match.

As far as drones, a lot of the game relies on using sound and music cues, why not a sort of dummy drone? I'm imagining a stationary drone that stays still, but emits noise that blocks the sounds of other drones. Fits more with the whole backstory of the mind-kill and these things being designed specifically for you.
That's a pretty good idea and it's really easy to make, I don't know what kind of sound it could make though. For the gun drones I planned on making them rare, if I even get them working. I'll make sure to have a download with them excluded though.
This is also asking much, but I noticed an issue with the game's handling of objects that are in areas you haven't entered yet. It seems if the AI isn't activated, physics doesn't apply and it doesn't notice me shooting at it (and at times it seems like the hitboxes don't work). I can enter and back from a room to cause turrets to stop targeting me, but generally they will be stuck facing the door.

As well, if I knock out a drone while its in this dormant state, it stays floating even after destruction (this is really noticeable on the shooting range map).
I'm pretty sure this can be easily changed and I'll try it in a moment, the drones have a sleep distance that puts their rigidbody to sleep, which freezes it in place until it collides with something or takes a force, like a bullet. Wolfire probably made it this way so it doesn't slow down your computer, but I think I can add a slider to the pause menu for changing that distance manually. Since the level tiles aren't too big, having every drone active might not be too bad on better computers.

Edit: Yeah I can just raise that value and they will be active further away.

Edit 2: After using the profiler it doesn't seem like such a good idea, the robots are the largest sucker of CPU usage apparently. It's really detailed so it shows exactly what operations are using the most resources so I might be able to do a little bit more optimizing.

WTRXGamer
Posts: 13
Joined: Sat Oct 12, 2013 12:16 pm

Re: Weapon Additions - Updated Oct. 21st

Post by WTRXGamer » Sat Nov 09, 2013 4:15 pm

[deleted]
Last edited by WTRXGamer on Thu May 23, 2019 3:41 am, edited 1 time in total.

User avatar
Josh707
Posts: 123
Joined: Sun Jan 22, 2012 3:09 pm
Location: Canada

Re: Weapon Additions - Updated Oct. 21st

Post by Josh707 » Sat Nov 09, 2013 5:50 pm

Yeah, sure! It will take a little bit to upload but I'll edit this post once it's done. Also the Thompson will be somewhat broken in it, I'm rewriting how it works right now.

Edit: Here you are! I found a better rifle model that I'm going to modify so you can actually aim, and there's a few other changes, I was experimenting with audio reverb zones and the TT-33 magazine holds 8 instead of 7 rounds. The pistols use their proper muzzle velocities as well. The rifle models sights aren't lined up perfectly so it's a little inaccurate, but it's temporary. The full change log will be with the next update I post.

Post Reply