Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » Improved Interrupt System
Re: Improved Interrupt System[message #317820] Thu, 25 April 2013 01:07 Go to previous messageGo to next message
turtlemoviesco is currently offline turtlemoviesco

 
Messages:16
Registered:April 2013
Location: UnitedStates
So which version is currently the most stable?

Report message to a moderator

Private
Re: Improved Interrupt System[message #317823] Thu, 25 April 2013 04:42 Go to previous messageGo to next message
LootFragg is currently offline LootFragg

 
Messages:349
Registered:August 2009
Location: Berlin, Germany
Which version of what?

For 1.13, there are pretty much no stable versions. Even the "stable" 4870 release contains bugs that get squished in later revisions. 1.13 is at over 6000 (Vegeta scream!) now.

For IIS, you need to have at least revision 4903. There is a most advanced revision which is the latest one but there is no "most stable". Most stable means turning the computer off because that prevents it from crashing.

Report message to a moderator

Master Sergeant
Re: Improved Interrupt System[message #317831] Thu, 25 April 2013 10:35 Go to previous messageGo to next message
pheloncab is currently offline pheloncab

 
Messages:278
Registered:August 2004
Location: So. Cal. or texas
actually 4870 with the fix was pretty stable when I used it for AF last year, it just lacks so many of the fun new features you get moving up to the 5800s like prisoners, and the new repair system and the extra imp built in and all sorts of other goodies.

i'm actually hoping by summer they will do another bug hunting/stomping period and maybe get us a nice new stable release for xmas so all the modders can reupdate to a 'stable' version and I can start the new year with 3 months of playing different mods.

if you want IIs, I'd recommend the something after 5996 since I know 2992 or 3 quashed a couple ugly bugs.

Report message to a moderator

Master Sergeant
Re: Improved Interrupt System[message #317846] Thu, 25 April 2013 13:10 Go to previous messageGo to next message
turtlemoviesco is currently offline turtlemoviesco

 
Messages:16
Registered:April 2013
Location: UnitedStates
Alright thanks, well I have been using the stable release from the wikipage for the past two years or so and found all these new features that I don't have, and I want them Smile

I found a crash for the latest release and know what causes it, were should I post my information?

Report message to a moderator

Private
Re: Improved Interrupt System[message #317852] Thu, 25 April 2013 14:33 Go to previous messageGo to next message
Sam Hotte

 
Messages:1966
Registered:March 2009
Location: Middle of Germany
Bugreport section?
http://www.ja-galaxy-forum.com/board/ubbthreads.php/forums/36/1/v1_13_Bug_Reports.html

Report message to a moderator

Sergeant Major
Re: Improved Interrupt System[message #321220] Thu, 30 May 2013 20:39 Go to previous messageGo to next message
Shad is currently offline Shad

 
Messages:65
Registered:July 2012
I had a lot of trouble with this when I turned it on. My mercs were constantly interrupting things that were on the other side of the map they couldn't get to, and it was really constant. I had to spam the hell out of that button until it was my turn. I ended up quitting the game for the sake of my sanity. Going to start a new game today with it turned off to see what the difference is.

[Updated on: Thu, 30 May 2013 20:40] by Moderator

Report message to a moderator

Corporal
Re: Improved Interrupt System[message #325041] Wed, 11 September 2013 17:43 Go to previous messageGo to next message
Gigagames is currently offline Gigagames

 
Messages:33
Registered:January 2013
ok how i use it ? i activate it , but i cant use

Report message to a moderator

Private 1st Class
Re: Improved Interrupt System[message #325052] Wed, 11 September 2013 22:15 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
What do you mean? The improved interrupt system works automatically when turned on. There is no way to "use it".

Report message to a moderator

Lieutenant
Re: Improved Interrupt System[message #325066] Thu, 12 September 2013 00:25 Go to previous messageGo to next message
Gigagames is currently offline Gigagames

 
Messages:33
Registered:January 2013
First post :
"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.




I doint see this features, i doint see this buttons

Report message to a moderator

Private 1st Class
Re: Improved Interrupt System[message #325072] Thu, 12 September 2013 00:55 Go to previous messageGo to next message
Sam Hotte

 
Messages:1966
Registered:March 2009
Location: Middle of Germany
Read the whole thread, pls. IIRC it's been said somewhere that the buttons didn't make it into version that has been committed.

Report message to a moderator

Sergeant Major
Re: Improved Interrupt System[message #325098] Thu, 12 September 2013 17:07 Go to previous messageGo to next message
Gigagames is currently offline Gigagames

 
Messages:33
Registered:January 2013
Sam_Hotte
Read the whole thread, pls. IIRC it's been said somewhere that the buttons didn't make it into version that has been committed.


sry when he is writing something that it doint in the version
The thread isent clear for me , and my english issend very well

Report message to a moderator

Private 1st Class
Re: Improved Interrupt System[message #325107] Thu, 12 September 2013 20:04 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
The automatic stuff is in the game. Drives me mad sometimes when I get an interrupt after the enemy managed to get behind the next obstacle...

Still it's fun to play with. I like the changes.

I don't really miss those button features because I usually make sure that my mercs can do something at the end of the turn and if they are out of AP they don't get an interrupt anyway.

Report message to a moderator

Lieutenant
Re: Improved Interrupt System[message #327860] Sun, 10 November 2013 16:43 Go to previous messageGo to next message
Bananarepublic is currently offline Bananarepublic

 
Messages:39
Registered:October 2013
Sevenfm
Playing Arulco Revisited 1.3 on 5740 revision with IIS enabled, and some time have hard time fighting in dungeons/buildings, when enemy appears in a doorway and shoots at me or tosses grenade, and none of my mercs have a chance to interrupt and shoot him, despite the fact that they all point their guns at him and wait. I think of some tactical solution for such situation.

Is it possible to use that "last tile that we shot" feature from OCTH (that gives flat+10% bonus), if i understand it right? So if enemy appear on the tile that we just shot at last round, we have a much greater chance to interrupt.
Another suggestion it to compare light levels (and maybe smoke levels) of the merc's tile and enemy's tile as a part of formula.


I am getting this as well on underground fights.
Whole squad positioned to shoot at doorway (most of the squad is at level 4 - high for this area - highest agility was 89 i think) and i can see a guy running 2 tiles, throws a mustard grenade, and i get the interrupt after his action.

A question came to mind:
Is there any way to make interrupts less binary?
The way it is now you either get a full interrupt or get fully interrupted. How about if some interrupts only gave you a fraction of your left over AP?
This way, if you are looking at a door, for example, and an enemy appears, you get a few AP to do a quick action. If you have your weapon ready you could perhaps fire a few unaimed shots or crawl or get up and run.

If an enemy runs towards your merc (but both see each other), triggers an interrupt but has some AP left, we won't get the full 100 AP to run towards him and stab him back. We could either run for cover or start the process of running towards him, maybe stab him once. However, he has 40 Ap left and probably shouldn't watch 100 AP go by without doing anything.

Also thought about snipers. If said sniper gets an interrupt but hasn't got his rifle ready, he probably wouldn't be able to get a shot off. However, had he his rifle ready, he would be able to, at most, fire a non-perfect shot. Therefore, fully aimed shots would only be possible during regular turns (which i think is good).
However, this would mean different AP if you are using a sniper rifle or a SMG. And how would you relate your available AP to the enemy? What if there are multiple enemies? I tried to think up on this but my mind went kaput.

[Updated on: Sun, 10 November 2013 18:03] by Moderator

Report message to a moderator

Private 1st Class
Re: Improved Interrupt System[message #355783 is a reply to message #290787] Sun, 11 November 2018 06:34 Go to previous messageGo to next message
HellsWind is currently offline HellsWind

 
Messages:43
Registered:October 2018
Location: Netherlands
Ctrl-D or in other words skip whole player team interrupts until end of enemy turn does not seem to work. I was wondering; was this intentional?

Report message to a moderator

Corporal
Re: Improved Interrupt System[message #355787 is a reply to message #355783] Sun, 11 November 2018 10:25 Go to previous messageGo to next message
ZedJA2

 
Messages:202
Registered:January 2018
I did not read the entire thread, I will try to do so later in the week, but a few comments based on what I did read:

(Also from what I can tell, most of this happens already, I think it just may happen more in one interrupt system than another, shrug)


1) I see little development justification for a mere minor convenience of skipping some or all or specific interrupts, when you can just choose to do no interrupt when the faces come up in the first place. Whether you look at potraits and choose to do something or not, or look at a stupid button to skip, it will take almost an identical amount of time. The advantage with the current Potraits and allocation of action or not system is it works whether you choose to skip or not, which makes it universally useful. I'm amazed at the requests to skip all, then skip some, then skip for just one merc, then skip only collective, what the heck let's get a third keyboard and make this true for every feature, YEAH! Really? REALLY? Pfft, no.

2) On the other side of clear value are these sorts of suggestions others made and I may be expanding upon:

a ) If my Merc uses the FOCUS skill from a related trait like Gunslinger, am I given a bonus to interrupt chance for that? I'm guessing no, when obviously I should be seeing such a bonus.

b ) Raising a weapon already focuses on one cone and means you are ready to act. It is up to you to leave enough AP to fire as required, whether that means AP for multiple Aim Clicks, auto or burst fire, and the like.

c) The suggestion to mark a certain area is fine, but you are already focusing down a cone when you Look and Raise the Weapon, especially with any attachments on it. For what it is worth, it does SEEM to benefit you and increase interrupts if you have your weapon raised. Have no idea if it is so in the code.

3) The rest I'm not sure about at this time:

a ) What happens if there is tracer fire from enemies? Should that not have high priority to cause an interrupt especially if focused?

b ) Don't forget that we don't have to be that sure to interrupt with the new Suppression system. I don't need to hit the guys down the stairs if indoors, I need to cover that area with suppressive fire, and I'll probably hit them anyway -- at least that sums up the attitude. I'm not sure this system even considers all that, does it?

c) We again go back to the old question again though: Who should benefit first from what?

Example, we blow a hole in the wall and gain a huge surprise advantage over the A.I.? Well if they were surrounded, should they not be expecting us to blow such a hole and then fire everything they have, or most of it, thru the hole in the wall? All depends on what the enemy is expecting, if you think about it, and when. What we can grant is that such explosion will cause kickback, smoke, and vision impairment, and so it should still be rather effective, to a degree.

Example, we open a door and start down the stairs aiming at the bottom which is in the dark -- so we see ourselves as having the advantage. But do we? What if the enemy has heard us open the doors, and heard us walk clickety-clak on the hard tile flooring, maybe they should interrupt us first? What I mean is, who said that are being at the top of the stairs is the beginning of advantage when we have been opening a door to an underground complex, probably shedding some light on the lower part of the stairs where the enemies may be on guard? A human merc would notice that, does an A.I. controlled merc simulating a human, react similarly?

So some of this is dependent on when the A.I. gets woken up for interrupt counting, and our mindset as to when we feel we got ripped off or not. I don't why our Mercs should be either more ready when Zombies jump crash thru glass windows to enter a room than not. Is it expected or have we seen it a million times?

Anyway, I don't mean to disparage the system. The problem is that anything that counts time as the turn begins, is allowing early actions of the enemy to have lesser importance to cause counter-actions than later rounds, since it is a summation of trigger points and so on, like with movement. I don't see any good way around it all. I'm glad to see that there was discussion even in the original post about hearing and turn over turn memory of such trigger points accumulating for the waiting merc or enemy.

No matter how perfect your interrupt system, you have to retain value for decisions during the active phase to have as much or greater value than the automatic interrupt system on the other side. In that regard, maybe having a targeted area makes a lot of sense, since it is chosen before the opponent's phase, but then it should also have probable slight negatives outside of that targeted area -- which sounds a lot like that is done already with the Focus Skill or the Spotter Skill in descriptions of how they work.

Just thinking out loud. I'm not sure there is much issue here in the end.

I don't right now see the benefit of non-binary interrupts, whatever that really is. Graduated scale of APs based on summed up interrupt trigger points, for example, would have to have some graininess, I think. No point to less APs that the movement of one tile. Almost no point to APs less that a stance change. No offensive point to having APs less than a single fire of your weapon, or single grenade or throwing knife toss, and so on. Again, I think you choose how many APs are at the ready, how wired the guy is, all APs reserved like a big cat, to interrupt and pounce. Or to put it another way, how calm he is just focused all APs on reserved on doing his job, watching without movement, eyes clear, the calm before the storm. The rest is up to his skill, how triggered he is by events and skill to detect those events. So I prefer the more binary system at this time.

[Updated on: Sun, 11 November 2018 10:35]

Report message to a moderator

Sergeant 1st Class
Re: Improved Interrupt System[message #355790 is a reply to message #355783] Sun, 11 November 2018 11:18 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
HellsWind wrote on Sun, 11 November 2018 05:34
Ctrl-D or in other words skip whole player team interrupts until end of enemy turn does not seem to work. I was wondering; was this intentional?

I guess you have to ask Sevenfm.
	// sevenfm: if Ctrl+D pressed - skip all player interrupts for this turn
	if( !is_networked && !UsingImprovedInterruptSystem() && pSoldier->bTeam == OUR_TEAM && gTacticalStatus.ubDisablePlayerInterrupts )
		return FALSE;

With the improved interrupt system the game ignores the CTRL + D command.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Improved Interrupt System[message #355791 is a reply to message #355790] Sun, 11 November 2018 11:37 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
I think this should be moved to StandardInterruptConditionsMet, where all other interrupt conditions are placed, and IIS restriction can be probably removed, though I never tested that.

Interesting that in original game, if a merc had interrupt and was able to shoot but decided to skip, he could not get any more interrupts this turn (pSoldier->bPassedLastInterrupt code). But at some point this code was disabled in 1.13



Left this community.

Report message to a moderator

Lieutenant

Re: Improved Interrupt System[message #355794 is a reply to message #355791] Sun, 11 November 2018 15:28 Go to previous messageGo to next message
HellsWind is currently offline HellsWind

 
Messages:43
Registered:October 2018
Location: Netherlands
Hmm...How interesting.

It was a neat feature but since I have figured out that the game has a turbo button (key: subtract) it really doesn't matter because I can speed up the game manually which is just what I needed/wanted. It balances out in the end big grin

This game is a gift that keeps on giving.

LOVE your mods guys (and technical jargon). Keep up the awesome, impressive work.

Cheers!

[Updated on: Sun, 11 November 2018 15:31]

Report message to a moderator

Corporal
Re: Improved Interrupt System[message #355815 is a reply to message #355787] Tue, 13 November 2018 02:24 Go to previous messageGo to next message
Mai Ti Miao is currently offline Mai Ti Miao

 
Messages:71
Registered:November 2018
ZedJA2 wrote on Sun, 11 November 2018 09:25
2 a) If my Merc uses the FOCUS skill from a related trait like Gunslinger, am I given a bonus to interrupt chance for that? I'm guessing no

Skill_Settings.ini -> Marksman Trait explains it:
The 'Focus' skill [..]
; While focus is active, they have an improved interrupt chance against all targets in that area,
; but drastically lowered interrupt chance against all targets outside.
[..]

FOCUS_SKILL_RADIUS

FOCUS_SKILL_INTERRUPT_BONUS


ZedJA2 wrote on Sun, 11 November 2018 09:25
2 b ) Raising a weapon already focuses on one cone and means you are ready to act.

2 c) The suggestion to mark a certain area is fine, but you are already focusing down a cone when you Look and Raise the Weapon, especially with any attachments on it. For what it is worth, it does SEEM to benefit you and increase interrupts if you have your weapon raised. Have no idea if it is so in the code.

Though this doesn't add to interrupt chance, as far as i know ; and is actually not based on [weapon in hands], but on [attack type]: unarmend combat / armed combat. Both get the same chance to interrupt if i remember correctly (since 2007~2009, i never play unarmed/melee combat if i can avoid it).
Finally, the Focus skill adds a square, not a cone.

Raised weapon giving a higher interrupt bonus might just be a perceived stat ; the brain tries to find patterns/schemes, no matter if there are any.
Some attachments might indeed help with interrupts, i.e. a Reflex Sight giving a bonus to Target Tracking Speed, but i'm not sure.

ZedJA2 wrote on Sun, 11 November 2018 09:25
3 a) What happens if there is tracer fire from enemies? Should that not have high priority to cause an interrupt especially if focused?

I forgot the context, maybe it doesn't apply here, but anyway: Flugente once said that keeping track of stuff like this would require to collect data from many sources (in this case: each creature present in combat) over an indefinite amount of time ; thus eating up too much CPU.

ZedJA2 wrote on Sun, 11 November 2018 09:25
3 c) We again go back to the old question again though: Who should benefit first from what?

Who first: the guy with the higher [effective stats + accumulated interrupt points] ; at least this would be the ideal and desired case.
I didn't get the "from what" question.

[Updated on: Tue, 13 November 2018 03:31]

Report message to a moderator

Corporal
Re: Improved Interrupt System[message #355823 is a reply to message #355815] Tue, 13 November 2018 10:21 Go to previous messageGo to next message
ZedJA2

 
Messages:202
Registered:January 2018
Nevermind. Any long post I would make to clarify more here, is not going to be helpful or productive. It still ended up a long post, and I regret making it, but going to post it anyway.

A.I. depends on context. What does the game know about what goes on outside a building if it has no view thru any of the apertures and sees no player units? Some would say it knows nothing. If the A.I. is human, it knows a heck of a lot, or thinks it does. It knows that any player units heard may be intending to gain vision into the building, since it can't see the player units, most likely they are going to try to gain vision into the building to kill A.I. units. That tells it likely tactics to expect, if coded appropriately.

Yet, most would say, that when they open a door to the stairs to the floor below -- they have their team ready with weapons and should get the interrupts first, not the A.I. I was merely saying why? I'd possibly expect the opposite. Opening a door might let light in, seen by enemies in a passageway on the floor, even though they are not visible to the player units. It might raise dust, it might startle a cat, a roach might scurry due to the vibrations, yadda yadda. If the A.I. and game have that in them, then opening a door is a disadvantage on prepared enemies expecting such, and shouldn't they expect such?

I'm not going to go further into it.

Thanks for the info on the Focus skill, I had originally thought that, and then thought the other way after reading some posts in this thread. Good to hear it does effect interrupts.

I'm not going to go into patterns, perception, and the like, in a thread about A.I. (since A.I. is all about coding patterns and perception LOL, why can't I have any patterns, perceptions, etc.) It is funny to consider that if one takes either of these two positions:

1) Perception is everything

2) Perception is nothing

about the impact of perception on understanding and communication, it will have absolutely zero impact on the communication or understanding there-in. I could say that it's both a given and not worth mentioning. Life is a larger thing than perception, including it already within it, yet I don't see philosophers or most people mentioning life during every discussion. Nuff said.

I'd note lastly that it SEEMED that diagonal movement was off and it did cost the same as alternating east and south movement, etc., but it ended up amazingly to be what it seemed -- incorrect for all these years. Occasionally that happens. But it could be, as someone mentioned in the thread, a habit of OCTH just leaking into my continued play when I thought it SEEMED that raising a weapon did help in NCTH for getting interrupts. It seems to help, and there are reasons for that, perhaps using the attachments on the gun aid vision, perhaps just the AP saved for the next shot, dunno. (I capitalize SEEMED in order to highlight that I am not sure)

But I have my doubts that the code is searched always so thoroughly that we are as sure as we should be of everything anymore. Too many basic things in this game, have been found wrong just in the last month. So I've sort of given up on anything more than doing what seems to work

And still too long a post anyway. In the end, the person who constructs the A.I. will do so as they choose, shrug. Good luck to them.

[Updated on: Tue, 13 November 2018 10:43]

Report message to a moderator

Sergeant 1st Class
Re: Improved Interrupt System[message #355842 is a reply to message #355823] Wed, 14 November 2018 06:03 Go to previous messageGo to next message
Mai Ti Miao is currently offline Mai Ti Miao

 
Messages:71
Registered:November 2018
Hi Zed happy

Thanks for elaborating ; i don't think it was a wasted effort, after all, discussions may become long, especially if expalantions and examples are needed to shed light on specific questions.

ZedJA2 wrote on Tue, 13 November 2018 09:21
A.I. depends on context. [..]
That tells it likely tactics to expect, if coded appropriately.

From what i've seen so far, the AI can still be tricked.
Case example, a large rectangular building.
Entrance is on the northern side. Player lets some mercs run along and throw rocks against the western and eastern walls. This will distract enemies inside the building in the vicinity of these walls = looking at the wall.
Why ? The AI reacts to what it sees and/or hears ; and the AI has a large hearing range (i don't know the exact length).
Not necessarily all AI units will be distracted, and some might turn around (or even move due to patrol orders or tactical decisions) again, even if they got distracted. But generally speaking, the AI is not overly smart.

ZedJA2 wrote on Tue, 13 November 2018 09:21
Yet, most would say, that when they open a door to the stairs to the floor below -- they have their team ready with weapons and should get the interrupts first, not the A.I. I was merely saying why? I'd possibly expect the opposite.

So would i.
The difficulty is, however, [stair door] vs [building door].
The player, sitting outside in the dark, stealthily (is this possible or will the door make a noise even in stealth mode ? ) opens the door into a lit room: a) player is blinded due to the bright light suddenly hitting his eyes b ) enemy inside is still staring at the snail snailing along the wall, because s/he didn't notice the door was opened. Who interrupts first ?
I haven't had these situations with my recent play yet, so i don't know how it is solved ingame ; but generally speaking, both sides of the discussion can bring up valid arguments.

ZedJA2 wrote on Tue, 13 November 2018 09:21
Thanks for the info on the Focus skill, I had originally thought that, and then thought the other way after reading some posts in this thread.

You're welcome happy
The tricky part is that many features/discussions started years ago ; while new feautres might have been implemented, yet not discussed in lenght, at later stages.

ZedJA2 wrote on Tue, 13 November 2018 09:21
I capitalize SEEMED in order to highlight that I am not sure

All good. I'm also not sure if what i was talking about is correct. I forgot much about the game, and also humbly speaking: some things are [nice to know], but [not necessary to survive].
The one thing that embarasses me though, is that i didn't realize the wrong move cost in diagonal direction ; assuming the bug was present when i last played. Why ? I'm a tiny little bit crazy and occupy myself with this kind of details. So, well, i'm confuss now suprised

Report message to a moderator

Corporal
Re: Improved Interrupt System[message #355844 is a reply to message #355842] Wed, 14 November 2018 08:37 Go to previous messageGo to next message
ZedJA2

 
Messages:202
Registered:January 2018
@ Mao Ti Miao

No problem. I was a bit ticked off at the internet last night and in a lot of physical pain, not uncommon after work. I was and am going to have to stop posting for a while just to reset a bit.

Well, the diagonal movement costs has been an old problem per discussing it with others, just noticed by accident really by a few and SevenFM and SilverSurfer have been working on fixing parts of the code, small parts. SevenFM has a really good eye at finding syntax errors or logic errors, like recently he found one where it had the correct > sign, but not the = condition as well, and things like that. Ends up, of course, that in code, that can mean a whole lot.

So previous SCI build they had included a fix that caught an error where the last person of a group or squad doing a task would not actually be activated to do it, but the rest would. Like say they all are doctoring, well the last one wasn't doctoring though you though it was, etc.

Diagonal movement is another, it was costing in the end the same as zigzag movement, so no benefit to the shorter path, that's fixed for 8635 and later. Another one SevenFM noticed was this unable to jump to the N direction, which looks NE on the map, but that is actually North I think in JA2, about the heading to 2 o'clock or so. Anyway, SilverSurfer said it was a really odd conditional bug for that direction, and had other limitations that I forget.

Anyway, so now we should be able to benefit and maybe seem more mobile with efficient use of diagonal movement. I'm wondering if the A.I. will also benefit though, could be scary then.

I think what happens is that some may report this stuff or notice it, but then give up on reporting to correct it, as often there were higher priorities with some working on the mods, plus it is a lot of makework. But currently SevenFM and SilverSurfer seem to be doing a careful check thru the basic code, like an editor on a book, and it really seems to be paying off. SevenFM works on lot on figuring out how to improve the A.I. in his A.I. modifications, so he exposes himself to a lot of code, and watching things like how they move and react, so that helps because of that work. SilverSurfer has a good attitude as he seems to see it as almost an archaelogical hunt thru history of pc gaming, at least when he talks about it, so I hope they know how much we appreciate their work and also how cool it actually is. Sir-Tech was one of the great companies in early pc gaming, achieving great things with the code at the time, but they often did things in odd ways compared to today's coders, just to save space in either memory or data footprint. So it really is like being exposed to an ancient mindset.

Heck, I don't know half of the things except when I experience them. Actually it was some of their posts that got me in the mood to question a few of the obvious things. Like what A.I. should know, and the diagonal movement costs, since their posts examine such things sometimes. If only we all had more time, what we could study in our spare time. Maybe in the after-life, let's hope.

[Updated on: Wed, 14 November 2018 08:40]

Report message to a moderator

Sergeant 1st Class
Re: Improved Interrupt System[message #355848 is a reply to message #355842] Wed, 14 November 2018 10:35 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Mai Ti Miao wrote on Wed, 14 November 2018 05:03

From what i've seen so far, the AI can still be tricked.
Case example, a large rectangular building.
Entrance is on the northern side. Player lets some mercs run along and throw rocks against the western and eastern walls. This will distract enemies inside the building in the vicinity of these walls = looking at the wall.

Ssh! Don't you tell my favorite tactic to distract enemies inside buildings! big grin

Mai Ti Miao wrote on Wed, 14 November 2018 05:03

The player, sitting outside in the dark, stealthily (is this possible or will the door make a noise even in stealth mode ? ) opens the door into a lit room: a) player is blinded due to the bright light suddenly hitting his eyes b ) enemy inside is still staring at the snail snailing along the wall, because s/he didn't notice the door was opened. Who interrupts first ?
I haven't had these situations with my recent play yet, so i don't know how it is solved ingame ; but generally speaking, both sides of the discussion can bring up valid arguments.

Now that we can open doors from the side it gets even more complicated because we can remain invisible to the enemy. He will only see the door opening.

@Zed
Btw. I'm not checking the code. I'm merely trying to fix important (in my opinion) bugs that I can replicate. I'm currently not playing JA2 so I won't experience bugs on my own and if a player won't give a proper bug report that allows to replicate the bug I won't even bother looking for it.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: Improved Interrupt System[message #355859 is a reply to message #355848] Wed, 14 November 2018 20:50 Go to previous messageGo to next message
ZedJA2

 
Messages:202
Registered:January 2018
@ SilverSurfer

Oh. Well, you are doing a good job fixing things, especially considering you aren't playing it currently. At least I wrote up your effort well for when you reach legendary status? Or is it super legendary status? It is all so technical, ha.

Report message to a moderator

Sergeant 1st Class
Re: Improved Interrupt System[message #357804 is a reply to message #290787] Thu, 08 August 2019 12:19 Go to previous messageGo to next message
xJAckAsSx is currently offline xJAckAsSx
Messages:1
Registered:August 2019
Is this the only thread explaining Improved Interrupt System? Is it finished in the last stable version? I am really not sure whether to use it... Is there any well explaining tutorial like this one on NCTH - Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » New CTH system - Presentation? (Cant send links yet). Thanks.

Report message to a moderator

Civilian
Re: Improved Interrupt System[message #360602 is a reply to message #357804] Wed, 15 July 2020 18:16 Go to previous messageGo to next message
sun_alf is currently offline sun_alf

 
Messages:7
Registered:April 2020
I've seen dozens of complainments the IIS does strange things. And I finally decided to rework it, see the result, and then post my findings here.

First of all,
I removed the most creepy parts of code what I totally disagree. There are:
1.
___ // adjust by range to target
___ INT16 iDistVisible = pOpponent->GetMaxDistanceVisible(pOpponent->sGridNo, pOpponent->bTargetLevel, CALC_FROM_ALL_DIRS ) * CELL_X_SIZE; // -1% registered by 4% of the difference of how far we can see and how far is the target
___ iDistVisible = max(iDistVisible, CELL_X_SIZE);
___ ubPointsRegistered -= min( 25, ( 25 * GetRangeInCellCoordsFromGridNoDiff( pOpponent->sGridNo, pSoldier->sGridNo ) / iDistVisible ));
This range adjustment results in less useful snipers only. And that's all. I mean, my sniper often react a moving enemy too late, when its' body is behind a tree or some obstacle already.

2.
___ // without Night Ops, we get small penalty for interrupting a target in dark
___ if ( !(HAS_SKILL_TRAIT( pOpponent, NIGHT_OPS_NT )) && pOpponent->aiData.bOppList[pSoldier->ubID] == SEEN_CURRENTLY)
___ {
___ ___ INT8 bLightLevel = LightTrueLevel(pSoldier->sGridNo, pSoldier->pathing.bLevel);
___ ___ if ( bLightLevel > 6) // 7+ lightlevel is darkness
___ ___ {
___ ___ ___ ubPointsRegistered -= bLightLevel; // -7 to -12%
___ ___ }
___ }
Damn'it! Why do we need this adjustment? We already keep in mind NIGHT_OPS by determining, do we see/hear an enemy or not!

3.
___ // adjust based on Agility
___ if ( pInterrupter->stats.bAgility >= 80 )
___ {
___ ___ uiReactionTime = (uiReactionTime * (100 - (2 * (pInterrupter->stats.bAgility - 80))) / 100);
___ }
___ else if ( pInterrupter->stats.bAgility < 80 && pInterrupter->stats.bAgility > 50 )
___ {
___ ___ uiReactionTime = (uiReactionTime * (100 + (2 * (80 - pInterrupter->stats.bAgility))) / 100);
___ }
___ else
___ {
___ ___ uiReactionTime = (uiReactionTime * 8 / 5);
___ }
The most stupid thing among the enlisted ones. If our AGI is 50 to 80 we get a PENALTY? Really? What is about AGI of an enemy we see? What if it's a snail with rocket launcher? Still a penalty? Oh, come on...

4. <Changed code line>
___ uiReactionTime = (uiReactionTime * (100 + (pInterrupter->aiData.bShock * 5)) / 100);
I changed 20% to 5% per shock point. 20% is too much. It is really too much, I double-checked.

5.
___ // Phlegmatic characters has slightly longer reaction time
___ if ( DoesMercHavePersonality( pSoldier, CHAR_TRAIT_PHLEGMATIC ) )
___ {
___ ___ uiReactionTime = ((uiReactionTime * 110) / 100);
___ }
Emmm... no, I don't think so. The adjustment was removed.

And I tried the renewed this way IIS. And guys, guess, what these changes resulted in?
It goes really much better. No more slow-pokes, no more quake3 players jumping out of the corner and shooting the whole his mag. Interrupts seems more alike classic interrupts though, it is still IIS for sure, and there is no completely instant interrupts.
The result confirmed my hypothesis why strange things were regularly happening with IIS. Mess of magic numbers, odd adjustments and fractional calculations within UINT8 and UINT16 types can easily lead us to numerical overflows and so on.

Then I went further.
I implemented new design of calculations, this variant takes into account all major stats of both guys -- the one who interrupts ("camper" for short), and the one who is interrupted ("victim" for short).
In few words, the idea is to calculate both Interrupt Counter and Reaction Time in the same units. I've chosen APs of a camper to do that job. That means we have to re-evaluate APs spent by victim into campers' APs, i.e. do scaling.

Let's see how we can do that. Remember, APs represent out real time. E.g. one turn is a 5-seconds time chunk, a merc has 100 APs max, so his "speed" is 20 APs/sec. Another merc has 60 APs max due stats, condition or something else; his "speed" is 12 APs/sec. This makes clear 60 APs of the 1st guy is not the same as 60 APs of the 2nd one. Now let's take some equations:
V_spent_aps -- is how much Victim spent its' APs
V_c_aps -- is the same but measured in APs of Camper
V_speed = V_max_aps / 5; // 5 seconds is duration of a turn
C_speed = C_max_aps / 5;
To transform V_spent_aps into V_c_aps we have to evaluate V_spent_aps in seconds first, then multiply it by C_speed:
V_c_aps = (V_spent_aps / V_speed) * C_speed = (V_spent_aps * 5 / V_max_aps) * C_max_aps / 5 = V_spent_aps * C_max_aps / V_max_aps

Now we have V_c_aps which basically is an addition to our Interrupt Counter on one hand. On other hand we should have Reaction Time to compare with. In current IIs implementation we have configurable external game option "BASIC_REACTION_TIME_LENGTH", OK let it be. On this stage at least.
As usually, compare IC against RT and realize does Camper interrupt Victim or not.

This is a basic idea of new way of calculations for IIS. It already takes into account some Victim/Camper stats and condition as it is included into calculation of CalcActionPoints(): exp level, agility, life, bandages, drugs, alcohol, breath, traits etc and even worn gear! But we want more complexity or configurability, right? Let's do it!

Calculate Reaction Time.
In external game options I defined BEST_REACTION_TIME instead of BASE value. It is the shortest time to react an uber-soldier (all stats are 100, and exp level is 10) can perform. We are going to calculate Effective Reaction Time using inverse proportion:
BEST_REACTION_TIME --- 300 // 10_EXP_LVL * 10 + 100_WIS + 100_DEX
effective_rt --- sum // EXP_LVL * 10 + WIS + DEX
effective_rt = 300 * BEST_REACTION_TIME / sum

BEST_REACTION_TIME value is in APs, so effective_rt is also APs (camper's APs, of course).
Why DEX? I looked through stats descriptions in the Internet, they all say JA2 Dexterity is about Fine Motor Skills and reaction. That is why DEX is so important for secondary skills (MED, MEC, EXPLOSIVES) and for shooting as well. On other hand, AGI is more about legs and movement.
Now let's apply penaties for getting 1st aid, being in gas or shock. I evicted according percentage values to external options: REACTION_TIME_PENALTY_AID, REACTION_TIME_PENALTY_GAS, REACTION_TIME_PENALTY_SHOCK. Apply as sum of these percents, not one by one -- it is not the same. Applying as a sum is more straightforward way for modders:
effective_rt *= (100 + percents_sum) / 100

Calculate Interrupt Counter.
We aldready have V_c_aps formula (IC for short), and we want to make it more flexible/configurable. In the same manner, I introduced BEST_CAUTION_COEFFICIENT what is basically bonus to victims' IC, if victim is an uber-soldier. So, effective caution_coef and IC:
caution_coef = 300 * BEST_CAUTION_COEFFICIENT / sum
IC = (V_spent_aps * C_max_aps / V_max_aps) * caution_coef

Unlike effective_rt, the caution_coef is dimensionless (it is coefficient, of course), and its' value varies between 0.0 and 1.0; if cannot be > 1.0, otherwise it becomes a penalty. Regarding stats we take into account -- it is the same EXP_LVL, WIS and DEX.
But what if the victim is only heard? May be I am wrong, but I decided to use only EXP_LVL and WIS in the case. This makes victims' reaction not so valuable when he is heard:
caution_coef = 200 * BEST_CAUTION_COEFFICIENT / (EXP_LVL * 10 + WIS)

Now traits bonuses can be applied to IC (in order to reduce it, of course) in the same percentage manner, if any. From Skills_Settings.ini:
IC_WHEN_CHARGING_IN_PERCENT_REDUCTION
REDUCED_CHANCE_TO_BE_INTERRUPTED

Conclusions
* IIS has stopped doing odd things.
* Magic numbers (what is bad, bad practice) were removed.
* Interruptions became more fair and realistic. Sitting and waiting around the corner is not so effective as before as you easily can ran into interrupt of interrupt of interrupt and so on. (Suck my HDD, campers!) Let's say, you have full APs and you interrupt a guy, you do a shot and miss -- it is mostly like your interruption ends, and the bad guy strikes back.
* The things worth to customize were evicted to external game options.

Certain values I am satisfied with.
BEST_REACTION_TIME = 7.0
BEST_CAUTION_COEFFICIENT = 0.5
REACTION_TIME_PENALTY_AID = 15
REACTION_TIME_PENALTY_GAS = 30
REACTION_TIME_PENALTY_SHOCK = 0.5
REDUCED_CHANCE_TO_BE_INTERRUPTED = 20
IC_WHEN_CHARGING_IN_PERCENT_REDUCTION = 15

Collective interrupts.
I did not touch Collective Interrupts as don't understand enough what is that. As far as I remember I had interrupts with 2 or more mercs active even in the classic game.

Links to patch and executable
Link to patch and JA2.exe (rev. 8856 / GameDir 2556), so everyone can try the changes in the game:
https://gofile.io/d/1ugtgt
New_IIS_JA2.zip // executable
New_IIS_Patch.zip // patch

Passcode for New_IIS_JA2.zip is "12345". Is it better to download the patch zip and apply "JA2_options.ini" and "Skills_Settings.ini" changes though.

Small program to calculate your best numbers.
Link to source code:
https://gofile.io/d/9uVLmC

I have no idea on how long these shared files will be kept alive.

[Updated on: Wed, 05 August 2020 17:00]

Report message to a moderator

Private
Re: Improved Interrupt System[message #360611 is a reply to message #360602] Thu, 16 July 2020 21:24 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Hmm. I have a few thoughts on that.

1. So our reaction is worse the further away the other guy is? I'd honestly expect that. Seems ok to me.
2. Not entirely sure about this. On one hand it is reasonable that someone with the Night Ops trait is better at night, on the other hand we already get the bonus for INTERRUPTS_BONUS_IN_DARK if we have Night Ops elsewhere.
3. 80 is the base AGI value for most calculations. It seems reasonable that we get a bonus if we're better if we have more and a penalty if we have less agility, and the penalty is cut off at 50 AGI. I think that's reasonable. What could be improved though is using EffectiveAgility(...) instead of the pure base stat, as that also incorporates changes from background/disease/overweight/being drunk.
4. I mean... that's replacing one magic number with another one. Don't know why the new one is better.
5. Being worse at interrupt is the stated drawback of being phlegmatic. So why would we remove that?

It's hard to understand how your idea is better when one does not know the current code, so I can't really comment on this idea. I'm not that keen on reading all the details of the interrupt code to understand it's details and to then weight how this is better or worse today, tbh.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: Improved Interrupt System[message #360616 is a reply to message #360611] Fri, 17 July 2020 16:05 Go to previous message
sun_alf is currently offline sun_alf

 
Messages:7
Registered:April 2020
Oh no! You have commented my the first step! It was just a very early experiment to reveal what's wrong with IIS. All the old stuff is replaced by new in my proposition, please read the second part (Then I went further.).

Report message to a moderator

Private
Previous Topic: Tutorial for rendering and creating animations for LOBOT [OUTDATED]
Next Topic: Mike´s "Second Coming"
Goto Forum:
  


Current Time: Fri Mar 29 07:22:37 GMT+2 2024

Total time taken to generate the page: 0.03037 seconds