|
Re: Trunk AI and improvements[message #364192 is a reply to message #364167]
|
Sun, 16 January 2022 15:34
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
r9259
Improved door noise sound playing: only play sound if soldier opening/closing door is visible on screen or if player team hears noise from door.
r9260
ESC key:
- close active skill sub-menu
- stop moving merc
- stop moving group of mercs
- stop dragging
- unready weapon
Changed hotkeys:
- [A]: activate skills menu.
- [Alt]+[A]: start autobandage
- [Q]: change scope mode
- [Ctrl]+[Q]: change grenade launcher angle
Updated hotkeys file
https://drive.google.com/file/d/1Rw5RZ5SFc30N_70675NCPzq-iTga23_m/view?usp=sharing
r9262
Added functions for quick utf8 <> wstring conversion (I don't know if something similar existed?).
Added message when AI breaks deadlock because cannot complete action (so it not just silently skips AI action but informs that something is wrong).
[Updated on: Sun, 16 January 2022 19:45]
Left this community.Report message to a moderator
|
|
|
|
|
Re: Trunk AI and improvements[message #364227 is a reply to message #364212]
|
Fri, 21 January 2022 21:25
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
Starting from r9270, militia should respect ENEMIES_DONT_SPARE_LAUNCHABLES option and don't always spare RPGs when fighting tanks in tactical battles.
[Updated on: Fri, 21 January 2022 23:47]
Left this community.Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Trunk AI and improvements[message #364622 is a reply to message #364615]
|
Tue, 03 May 2022 15:46
|
|
Deleted. |
|
Messages:2657
Registered:December 2012 Location: Russian Federation |
|
|
r9375
SIDE_FACING_DIVISOR option tweaks:
- only for standing targets (crouched and prone JSD's have different shape)
- only for human bodytypes (deviation modifier should not apply when shooting at vehicles or creatures)
- only when aiming at torso/legs (head is 1 voxel so it has the same projection from all sides)
- added safety checks
- disabled divisor for vertical deviation (target JSD projection square changes only horizontally, not vertically)
Some more technical details:
Quote from 1.13 code
// One drawback of the new shooting mechanism is that it depends on the the JSD files being accurate. These
// files determine how an obstruction (like an enemy soldier) takes up space in a 3D tile. This is done by
// splitting a tile into 125 "cubes", stacked 5 x 5 x 5. Each "cube" is 2 units wide, 2 units deep and about
// 6 units tall. A standing merc in the JSD files is represented by a "plus sign" shaped construct that is
// 3 "cubes" tall, 3 "cubes" wide and 1 "cube" deep. A crouching soldier is 2 x 3 x 2 and a prone soldier is
// 1 x 3 x 5. This means if we're shooting at a standing target from the side, we effectively have 1/3 the
// chance to hit as we would a target that was facing us. Unfortunately, the graphical cursor can't display
// this information so it will appear as though you have the same chance of hitting regardless of the targets
// facing.
//
// As a result of the above, this function determines the targets facing compared to the shooters, and will
// reduce the Shot Offsets if the target isn't facing directly towards or away from the shooter. This isn't
// the most accurate solution but it's the best solution I can come up with at this time. The alternative is
// to let shots that appear to have no chance of missing (shooting aperture within the targets displayed body)
// actually miss an average of 2 in every 3 shots.
//
// I'm going to assume for the moment that the 1/3rd chance only occurs when a target is facing directly perpendicular
// to your facing. I don't know for sure if this is true or not, but it's the assumption I'm going to make.
Standard standing JSD (front projection is 3 times wider than side, making it easier to hit):
Standing at 45 degrees (difference is less than in first picture):
Crouched in standard ja2 JSD:
Crouched in improved JSD (note the head is 3 times harder to hit now compared to standard version):
In general, I don't think this function accomplishes declared goal, because it's too difficult to correctly predict the effect of JSD from different angles and especially with different bodytypes and aiming at different body parts.
Also, the idea of NCTH is that we only know the distribution of shot, and the actual CTH is determined by physical model, and cursor should not display any CTH.
For example, when shooting at head, cursor size doesn't change, even though CTH changes radically, and also "head" size may be different depending on JSD used.
So it may be easier for player to just understand that it's harder to hit target from side than from face direction.
For those interested in tweaking JSD's, JSD editor is available here:
https://github.com/egorovav/Ja2Project/releases/download/JsdEditor2.0.5/JsdEditor205.zip
Improved JSD project:
http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=358887&#msg_358887
There is also project of high resolution JSD's for vanilla Ja2 sources, which may improve physical model of hitting targets from various angles:
http://forum.ja2.su/cgi-bin/yabb/YaBB.pl?board=othermods;action=display;num=1438448058
[Updated on: Tue, 03 May 2022 15:53]
Left this community.Report message to a moderator
|
|
|
|