Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » Improved Interrupt System
Improved Interrupt System[message #290787]
|
Sat, 17 September 2011 18:25
|
|
Sandro |
|
Messages:420
Registered:November 2008 Location: Mars |
|
|
This is an experimental project.
The interrupt topic was discussed like million times before, but no improvement was ever made if I recall correctly. Well, I am gonna try some things with it.
Where to start...
This project overthrows the current way the interrupts are handled. Instead of gaining interrupts only on the moment a guy spots another guy, we bring in a system which actually counts the amount of time we observe a guy and based on this time and our skills we are given the interrupts. I'll explain the exact mechanics:
-- CORE --
Interrupt Counter
This is the main wheel controlling the interrupt occurences.
The "Interrupt Counter" is a variable that tracks down the amount of APs an enemy (within our LOS) used (counted for each enemy separetely). When the Interrupt Counter hits certain value, we are given an interrupt. As APs represent time in JA2, this means that we have to see the enemy for a while to react and get interrupt, while the length of that while is determined by our skills.
However, for each AP an enemy used, the code rolls for a chance whether this AP would be counted or not.
This chance is based on the merc's abilities. For example if the chance is calculated to be 70% and enemy just used 10 APs for something, following happens:
For each of the 10 points, 70% chance is rolled - 10x 70% chance roll. If the roll is successful (under 70%) the point is counted towards mentioned Interrupt Counter, if the roll is not successful, the point is ignored. So statistically 7 points are counted for Interrupt Counter in this case.
The merc abilities influence both factors:
1) Interrupt Counter lenght is determined by:- Agility
- APs we have at the moment
- Injuries, shock, etc.
2) The chance each enemy AP used is counted or not is determined by:- Experience Level
- Distance to target
- Traits and whatever
- (Camouflage of the enemy etc.)
Basically we could say, that the Counter length represents how FAST can our BODY react.
While the chance on each point represents how well we can percieve and realize what we percieve.
Hearing
Now. While this feature means we have to percieve the enemy for a certain amount of time to be able to react on him, it does not mean that we are never allowed to get the interrupt at the very moment we spot him. The thing is that IF we were able to hear him beforehand, the Interrupt Counter is involved too. For example our merc waits inside a building while an enemy guy runs around the building towards the entrance we aim at. We hear him the whole time as he runs, so we got aware of him well enough. The moment he opens the door and steps in, we get the interrupt and simply pull the trigger.
This feature alone means that: - We can interrupt an enemy we already see
- We can get mmultiple interrupts for each enemy
- The whole procedure of getting interrupts makes more sense
Collective Interrupts
A chance that if a soldier close to another soldier gets an interrupt, the second soldier can get an interrupt too. This means that one soldier can trigger an interrupt for many mercs around. Of course there are mercs' abilities involved.
Basically this feature represents mercs' communication and cooperation when close enough to each other. A perfect feature for Sniper+Spotter combo or Squadleader being center of a squad - capable Squadeader can stand in the middle of the squad watching the battlefield and yell orders triggering Collective Interrupts for others. As the Interrupt Counter length is influenced by current APs of merc (prolonging him the less APs remain), then it is wise teamfight strategy to not spend the Squadleader's APs keeping them on max to trigger collective interrupts more often.
The exact details on the workaround of this feature are not complete yet. But you can see the basis.
-- LUXURIES --
"No More Interrupts! button" - a button for each merc to turn off interrupts for the rest of the turn. Useful when he has too little APs to do something, or you just have some reasons to not trigger the interrupts (scouting with binoculars or whatever).
"Ignore Collective Interrupts! button" - similar to above, but making the soldier to ignore orders/yelling/warnings of others so does not respond to Collective Interrupts, but still getting his own interrupts.
Lock-On Feature Theory
for futureThis is not my idea originally, but I really like it, although I haven't entirely worked up the details of its mechanics yet.
This feature is going to be activated by a hot-key ("k" probably) similarily to using "l" to turn around and raise your gun. When you hit the key you got a cursor to point at either an enemy or an empty tile. When you do that, your merc gets "locked on" the enemy/tile. This means he got all his attention at the specified spot, which allows him to get almost certain interrupt at critical moments. For example - locking on the tile at a corner of a building means you are all ready and focused to pull the trigger the very moment any enemy pops up there. When you are locked on an enemy you get an interrupt at every critical action he is going to do - when he spots you, when he raises a gun, etc.
This feature would interact with our Interrupt Counter thingy - the interrupt would be automatic if the Counter is already filled up (but put on "wait" because of lock-on feature); or if the counter is not filled up yet, there would be a chance calculated at the key moment based on the current Interrupt counter value and merc abilities.
When "Lock-On-Enemy" I would go to make the merc automatically turn when the enemy watched moves out of LOS and turning would allow the merc continuing to watch him (i.e. the next tile enemy moves is visible from mercs position).
The "Lock-On-Tile" feature not only applies to the single tile, but also tiles around it, however, with lesser chance.
-- --
So, now when I am at the end of the rather plain explanation, I am not sure why exactly am I publishing this.... oh, right, I may use some suggestions, that's what. I was able to make the Interrupt Counter working. Experimentally. And it works. It's actually not so hard as one would think.
Must say it's some time I tried to explain something in english. My sentences are awkward like %@#$. :/
I hope you got the idea even though of that.
-- --
EDIT / UPDATE:
IIS was successfuly coded and added to development SVN branch. However I have too many other projects and haven't got so much time to perfectly debug it, so by now it's in a "testing phase" and turned off by defult in the SVN. If you want to play with it, either grab the code from development branch and compile it, or an SCI of revision 4903 or higher (however it may miss several bugfixes).
To enable IIS search for IMPROVED_INTERRUPT_SYSTEM in the JA2_Options.ini or in the ini editor choose it at the game start screen.
[Updated on: Mon, 19 November 2012 14:17] by Moderator Report message to a moderator
|
|
|
|
|
Re: Improved Interrupt System[message #290800]
|
Sun, 18 September 2011 10:25
|
|
knightofni |
|
Messages:96
Registered:August 2011 |
|
|
It would be great to have an improved interrupt system, and i agree with everything you propose.
There's one more feature that would make the interrupt system even more "sensible", which would be to limit what you can do during an interrupt.
I've always thought the following situation to be very weird :
You're waiting for an enemy in a room. Said enemy pops in the room. You try to headshot him, miss. Then with your remaining APs, you just shoot at his general direction, hoping to wound him enough so that he wont be able to fully retaliate.
To me it would make much more sense (and make for a better gameplay ) that after the first shot (missed or not), your adversary has a chance to answer. Two possibilities :
1. Getting shot at gives a interrupt chance (better solution, probably harder to implement)
2. One interrupt = one shot (not as satisfying, but i guess it's not too hard to code)
[Updated on: Sun, 18 September 2011 10:25] by Moderator Report message to a moderator
|
Corporal 1st Class
|
|
|
|
|
Re: Improved Interrupt System[message #290805]
|
Sun, 18 September 2011 14:54
|
|
Sandro |
|
Messages:420
Registered:November 2008 Location: Mars |
|
|
2 knightofni:
Actually what you suggest is already present within the concept I described.
When what you said happens - you got interrupt on an enemy just stepped in a room, you shoot and miss, you just spent X APs by the shooting, this means the opponent can counter-interrupt you right away if his abilities are good enough. He has the Interrupt Counter running too, so you can't dance before him shooting all around, drinking beer and singing hymns, and think he won't get an interrupt. Quite the opposite, you can be pretty sure, he'll get the counter-interrupt if you let him, so you have only a limited time to take him down.
The only little problem is we are only able to get an interrupt AFTER the shot (or any action). So if the enemy shot takes 50 APs, but we would get interrupt after 25 APs the enemy used, it means we should actually interrupt him in the middle of the shot... but instead we will after the 50 when the shot is completed. Well, there are always gonna be such drawbacks in turn-based system. But I personally don't see that a big issue.
And it might be possible to get an interrupt before the shot, after the enemy raised his gun -> spent x APs for that, if our merc is very good.
[Updated on: Sun, 18 September 2011 15:43] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Improved Interrupt System[message #291281]
|
Thu, 29 September 2011 02:15
|
|
KEN C |
|
Messages:244
Registered:May 2007 Location: Aberdeen Washington USA |
|
|
@Sandro, I would like to playtest any betas you come up with.
Report message to a moderator
|
Sergeant 1st Class
|
|
|
|
|
Re: Improved Interrupt System[message #292528]
|
Fri, 21 October 2011 20:50
|
|
LootFragg |
|
Messages:349
Registered:August 2009 Location: Berlin, Germany |
|
|
YOU! Sexy. Czech. Man! You are Sparta! I would EAT the stuff you code. Haven't been updating JA2 for quite a while and when I did I read about all the new stuff. Cursor swap stuff and sidestepping and... INTERRUPT! I came here and then read this and I flipped. This is nasty stuff right here. Tastes like unicorn flesh. Heck yeah!
This is so grand, I feel like I should applaud you. I haven't even tested it but it's so amazing to see things come to fruition.
What came to mind when I read about your idea of a double-layered interrupt system:
1) Yes! Finally!
2) We should have infinite layers.
3) This would be like playing in real time.
---
PasHancockinterrupt at any time he wants as long as he has enough AP I disagree. Snipers don't shoot at any given time, they too have to wait for opportunities. I think it's enough precision to be able to shoot a running soldier at 3 different positions but being able to kill him on every single tile is surgical precision I don't associate with JA2.
I think interrupt intervals are actually quite intuitive. Also, JA2 is very random, lots of things are randomized and opportunities occur a lot. So if a sniper observing someone has a higher interrupt chance and gets several chances of taking a shot, this is absolutely sufficient. No need for extremes. Consider interrupts the circumstance of reacting faster than the enemy acts. Enemy runs towards cover, signals people, ducks down: Lots of time for you to engage. On a small scale however, the enemy moves his head or turns around, jumps, whatever, much faster than you can adapt to it.
Sandroproblem is we are only able to get an interrupt AFTER the shot knightofniThe problem you mention is not really a problem Exactly, the high shooting AP costs are used for stabilizing the larger gun after the shot (recoil compensation) so you can't come up with quick follow-up shots as you would with small weapons. If the gun is quick to raise and aim, however, this doesn't make a difference, you can still get your shot off (that's why combat shotguns should be relatively easy to handle) but you can't quickly fire consecutive shots after the initial one.
---
I have a question. How do APs get handled when you're counting them? Do shooting APs count differently from movement APs? Because fast mercs spend more APs on shooting than slow mercs and it would be counter-intuitive to handle the 50 APs my speedy merc uses for weapon handling exactly like the 30 APs my slow-as-crap merc needs and interrupt the fast merc more often than the slow one. Do the regular maximum APs factor into that equation?
---
Darn thing is I can't get my head to playtesting the new stuff right now. There's lots to learn and do and I'm usually glad I can get a shooter game running and pop some heads without caring for detail. But damn, Sandro, you're the master. You know it. It's so wicked to run Tortoise from time to time and suck the internet dry and see what gems are among the changes. This is beauty. It's unbelievable how I've been ranting about the topic a while ago and bam, there's my change. Yes we can. I somehow feel like I owe you. Compare your spare time coding to what the Techland devs are doing to Dead Island. Nothing, exactly. And they're "professionals". If I ran a game company, I'd so hire you, I'd hire the FUCK out of you. Great man.
I lub yoo so mutch lol! Loot.
Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Improved Interrupt System[message #292894]
|
Mon, 31 October 2011 15:42
|
|
Luppolo |
|
Messages:150
Registered:July 2009 |
|
|
is possible to test this whithout building from source?
can i just put the zip you posted above over a clean 4552?
[Updated on: Mon, 31 October 2011 15:43] by Moderator Report message to a moderator
|
Staff Sergeant
|
|
|
|
|
|
|
|
|
|
|
Re: Improved Interrupt System[message #292915]
|
Mon, 31 October 2011 22:37
|
|
Luppolo |
|
Messages:150
Registered:July 2009 |
|
|
if i read correctly, all the new interrupt system is based "only" on the npc stats and distance to enemy and his camo?
a merc regardless of its experience/health status will still have an easier time intercepting slower enemies (not talking about cth of course, that's already handled about moving targets), i think the "chance of AP count" should take in account also enemies' agility
enemy's physical stats are even more important in a close combat scenario, in that case even enemies traits will have impact in kives fights or when martial arts are involved.
also always in a close combat situation, the ap have a different meaning, punching/slashing requires much more ap's than just raising a gun (some have even 0 ap for draw), but with the system as it is now, when 1 tile away from target, pulling out the gun is less interrupt prone than wrestling.
when 1 tile away from a proficient knife/cq fighter you should not be able to just pull out your gun and fire without being interrupted
or maybe the system already takes all this in account, just the description isn't in-depth?
Report message to a moderator
|
Staff Sergeant
|
|
|
|
|
|
|
|
|
|
Re: Improved Interrupt System[message #293171]
|
Tue, 08 November 2011 07:02
|
|
The Cheshire Cat |
|
Messages:21
Registered:July 2010 |
|
|
This sounds really cool, the basic interrupt system has always bugged me, though this doesn't sound like it will solve one of my key issues with interrupts, in that if you're stealthing behind an enemy and he turns around and notices you, your merc is basically dead, when realistically they really should have had a chance to react since the merc is aware of the enemy but not vice-versa, so the merc really has the drop on him. I suppose you could have this all factor into your calculation for adding up APs - maybe give a huge bonus to how many "interrupt points" you get if the person acting is unaware of the person observing them. This might end up causing a lot of annoying interrupts for snipers, though (although the "no more interrupts!" button you mentioned would certainly solve that).
One suggestion about the "lock-on" concept: I don't think it needs to be a separate button. Just the action of raising the gun itself should be considered to be "locked on" to the tile the player used the "l" button on. I also don't think it should apply only to that tile but rather in a line extending from the merc out through that tile - basically anything that crosses the "middle" of their vision would apply. You could probably have lesser interrupt chances for the tiles adjacent to those ones as well, with diminishing returns until you're about 2-3 tiles away from the center.
It's unfortunate that mercs can only face in the 8 directions in this game, since it would be a lot more natural if their cone of vision just centered on the locked on tile itself, but I guess you have to make compromises when dealing with a 10 year old 2D game engine.
[Updated on: Tue, 08 November 2011 07:04] by Moderator Report message to a moderator
|
Private 1st Class
|
|
|
Goto Forum:
Current Time: Fri Apr 19 05:57:42 GMT+3 2024
Total time taken to generate the page: 0.02129 seconds
|