aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jnarical

Pages: [1] 2 3 ... 5
1
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: Today at 10:51:09 am »
a bug - accuracy calculation when shooting alien through walls does not work correctly
I'll check that after finishing to fix the crash.

2
Brutal AI / Re: Brutal-OXCE 8.6.0
« on: Today at 10:49:05 am »
crit error - cydonia part 2, alien movement
I'm looking into it.

3
and which value of "Realistic accuracy cover efficiency" will be the most brutal? what is your opinion?
as Xilmi mentioned before - 0% is the most brutal by his opinion?
if "Realistic accuracy and cover system" = NO (default) then "Realistic accuracy cover efficiency" will be 0% too (regardless of the set value) ?
I’m not sure about “most brutal”, cause all mechanics works the same way for both player and AI. So it’s not about difficulty, more about how tedious will your battles be. Less cover efficiency - more successful shots for both sides.

Yes, the topmost RA option enables all set of RA options. Without it, shooting mechanics should be vanilla. If you like tight spread of RA but don’t like cover mechanics - you could disable covers by setting “cover efficiency” to 0%.

4
Realistic accuracy improved aimed shots

Realistic accuracy cover efficiency
is default value 50% ? or 70% ? now it seems to be 70% default value (image below)
which value will be the best and most brutal?
This is bug, it seems ( the intention was to make 50% default

5
Brutal AI / Re: Brutal-OXCE 8.5.1
« on: June 04, 2024, 09:35:44 pm »
(and need to translate options string - STR_BATTLEALTGRENADES)
Is it fixed now?

6
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: June 04, 2024, 09:21:06 pm »
New update to Realistic Accuracy. Internally I consider it as "RA v1.0" and it's a huge milestone.

What's added / changed:
  • I've changed, almost removed accuracy caps. Now it's 1% / 300% for minimum/maximum respectively. Was 5%/95%. It was a quick and dirty fix, in the nearest future I'll change that to 1/1000 :) I plan to remove upper cap entirely by default, and to add "98% upper cap" as menu option. Reason: as I found out, in mods like XCF one could possibly get up to 600 final accuracy... So who am I to disallow that? :)

  • Now short-ranged aimed shots have 100% cap instead of 95%. After some distance, you could be sure that you won't miss.

  • New option: cover efficiency! It means - how much of your accuracy is affected by targe'st cover. Possible values are 0, 30, 50, 70 and 100%. 0% effectively disables all cover-based accuracy penalties - so you get vanilla-like hit chances. 100% means all your accuracy is multiplied by target exposure percent - that's how RA used to be earlier. Default value will be 50%, with 70% as a more hard/tactical option. Calculation example: you're targeting enemy with 10% exposure, your accuracy with bonuses like kneeling is 120%, and cover efficiency is set to 70%. That means, we take 100-70=30% of your accuracy as unaffected, that would be 120%*0.3=36%. Then, we take the remaining 70% of your accuracy (120%*0.7=84%) and apply target exposure to it: 84%*0.1=8,4% - and then we add the numbers together: 36+8,4=44.4% - and that would be your final accuracy, except for the case with aimed shot - 'cause there's another option!

  • New option: sniping mechanics. Here's how it works. Imagine you got a unit with 83 own accuracy stat. That unit is performing an aimed shot while kneeled, gets 120% weapon bonus for aimed and 1.2 multiplier for kneeling, which gives us 83*1,2*1,2=119,52 (120 like in the previous example, if rounded). We get sniping bonus as (total accuracy - unit's accuracy)/2, which is (119,52-83)/2=18,26. Adding that to the result of previous example, we get 44,4+18,26=63% chance to hit - that's almost 2 of 3 shots. That way, aimed shots now have significant tactical advantage against heavy covered targets, negating their protection from cover. Sniping bonus couldn't make your accuracy higher than you "initial final" accuracy, and is capped at that value. For shots which were improved to their maximum value by sniping bonus - crosshair cursor becomes white, which means "Look! You'he got a good sniper shot here, congrats!" Another small detail about this mechanics - accuracy size multiplier for targeting big units doesn't counts in sniping bonus, but... it's still used for accuracy calculation before applying bonus.

    But don't forget, that even if auto-shot has a much smaller initial chance, it has a good chance to destroy the cover so remaining shots wil have much better chances against the target, opened to fire.

  • And the last one... I've updated russian translation.

Feel free to test and give feedback, positive or negative! And don't forget to submit bugs, too.

7
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: May 21, 2024, 01:38:45 pm »
- sniper shots exceeding 100% may be worth reconsidering formula, because weapon accuracies had been balanced around different shooting mechanics. Plain over-100% growth of hitchance is something that will make it surreal that 130% accuracy-guy will have 80% of actual chance to hit 50%-covered unit, while 100%-guy will have plain 50%. May it be 1/3 penalty for everything beyond 100% too, be worth considering. 
1) About the formula - all numbers are just arbitrary... Maybe a threshold for sniping should be equal to unit's own accuracy? I don't know, but the core idea of sniping is just like that) Your example has a mistake... 130% accuracy to 50% covered target will be 130%*0.5 + 30% = 95%... and this mechanics should be used with "partial"effect from cover. It'll make 130% accuracy even more powerful and 100% accuracy to half-covered target - less penalized.

- empty-tile shooting is somehow broken in OG:
* when you have a wall adjacent to a tile you shoot: sometimes unit shots into wall, instead of a tile.
* when tile is empty or beyond visibility range, (or enemy that stands on it is undiscovered yet) - shooting goes into the ground tile.
 
It's not broken. It chooses target voxel based on tile type, and it's different one for different kinds of walls. About a tile with undiscovered unit - it's also makes kind of sense. And what about shooting in desired direction - as far as know, CTRL works just like that. To me at least, it works as "target the center of a tile, regardless of its type". So, if you'll shoot a tile with an undiscovered enemy with a CTRL, you'll get precisely what you want. I was experimenting with it lately, without CTRL a bullet goes to a floor (for a "floor" tile without a wall), with CTRL flies "horizontally" (considering the fact that gun's barrel is higher than tile center, it goes downwards slightly)

- as we go through hit/miss rolls, there is one more thing I would like to suggest, regarding the visible targets shooting:
BASIC
* roll for hit means bullet flies into the target voxel
* roll for cover means bullet hits target OR cover, but within target voxel cone
* roll for miss DOESN'T mean necessary miss, but instead gives random shot within cone, where shot can go everywhere. (even, into the target, randomly)
DIFFERENCES for abovementioned ALT-method
*ALT+ roll for hit means bullet flies into target's voxel center's 1/3 height, even if there is cover (contrary to the specific case when unit shoots precisely into the finger, which sticks out from the window. Prove me incorrect, if CTRL+shooting already goes into center, not open-part of the body)
* NO COVER is considered when calculating ALT-shots. If there's cover, indeed, it is up to player to consider this method. This method is specifically good for destruction covers with heavy weapons.
* roll for miss works as default (goes everywhere, even into the target, randomly)
I didn't get much tbh but I'll look again outside my working hours))

For now, I can tell that destroying covers already works well with CTRL. I'm not sure where target voxel precisely is when you aim a unit with CTRL... Both ways are possible, I should check. For now, I don't get why you're asking for another firing mode, my guess is that you want to have a way to shoot slightly down... for destroying obstacles with HE shots, for example. So those HE shots could explode more often and not fly away to the sky ))

UPD:

For HE ammo, I've already adjusted target point to a lower one

8
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: May 20, 2024, 10:28:57 am »
Added some fixes, including important one. Changes involve "missing shots" mostly, improving how they work.

1. When targeting a unit with autoshot, and that unit is killed before all the projectiles are launched - remaining projectiles no more target the floor, they still aim to that target voxel which was part of that unit's body.

That's normal targeting behaviour for OG and always was that way, and I considered it a bug in RA. Now  it's gone, and heavy multiple projectile autofire weapons, like chainguns - work correctly. That was a small code change, but it'a big deal, really.
.
2. Now when shooting empty tile, roll-based hit/miss mechanics considers "virtual" medium-sized unit as target for calculating missing shots. So, if your accuracy roll gets a miss - shot will fly outside that "invisible" unit (but it surely could fly through the target tile at the same time)

3. Since the OG, when targeting empty tile, target voxel is fixed depending on tile type - 2 types of walls, floor, ceiling, object, or void. For example, for "void" tiles target is (8,8,12) inside that tile, its center. For RA, when targeting such tiles and rolling a hit - projectile now gets light deviation around that point. And when rolling a miss - yes, it'll fly outside invisible unit))

I've tested that code a little, in classic, XCF and 40k. All seems fine.

My next goal will be adding two things simultaniously:

1) "weightened" effect of target's exposure.

Possible options would be: 0% (off), 30% (light), 50% (medium), 70% (high), 100% (full)
In current version, it's 100%/full.

For example, you got 100% accuracy shot to 30% exposed target.
With different settings, final accuracy will be:

0%/off: 100%
30%/light: 70% + 30%*0.3 = 79%
50%/medium: 50% + 50%*0.3 = 65%
70%/high: 30% + 70%*0.3 = 51%
100%/full: 100% * 0.3 = 30% (current RA version)

2) "Sniper accuracy mechanics" - portion of accuracy, exceeding 100% initially, added after calculating exposure effect. And that could be weighted based on shot type, if needed. Time will tell.

For example, you get very high accuracy shot to a highly covered target. Initial accuracy 180%, target exposure is 5% (basically, some sectoid looking from a small window, with only its head exposed). Even with 100% exposure weight from the previous option, you get 180*0.05 (9%) + 180-100 (80%) = 89% chance to hit, where 80% part is for "sniping".

9
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: May 12, 2024, 04:48:50 pm »
After I've got a couple of positive opinions about my version of throwing accuracy code, I've decided to return it back to game, under new option (independent from RA) - "Alternative throwing mechanics".

Here's the reasoning behind it.

There is applyAccuracy function, which applies unit's accuracy, adding deviation to target voxel, and there're several issues here.

1) Resulting deviation for successful rolls is not enough to make grenade fall to tiles, adjanced to target. It always falls to target tile in that regard.
That feels unnatural.

2) Resulting deviation for unsuccessful rolls feels unnatural too - grenade could fall too far away from target

3) Accuracy for direct shots counted the same way as for throwable explosives. Throwing accuracy of 70% means that roughtly 70% of the time that highly explosive thing will hit the ground right under the target unit, demolishing both the target and surroundings. This is the main issue - although there's a distance modifier, it doesn't affect "successful" rolls. So, no matter how low your accuracy is, if you get a succesful roll - your grenades turn to a "sniper" ones. There's no significant difference between high and low throwing accuracy.

For successful hit with explosives - you doesn't need a precise hit to a voxel inside target's body, hitting any tile around it can be considered as success, to a different degree depending on a distance from target to explosion.

As a quick and dirty solution, for "Alternative throwing" option

1) I've added additional deviation so grenades could fall around the a target more naturally

2) Decreased deviation for "missed" rolls (again, to make them look more natural)

3) I've changed the formula, introducing accuracy additional penalty based on accuracy and distance. Distance without penalty is equal to square root from unit's accuracy multiplied by 3. All numbers are arbitrary and are subject to change of course, now I consider them as pretty conservative.

That way, a unit with T.Accuracy=36 could throw to 6 * 3 = 18 tiles without a penalty, and then it gets additional 16 voxels of deviation for every additional tile of distance.

T.Acc=49 gives 21 tile of "aimed" throwing
T.Acc=64 gives 24 tiles
T.Acc=81 gives 27 tiles
T.Acc=100 gives 30 tiles

With these changes, grenades are much less precise and powerful, you couldn't throw them across the whole map straight to target's feet anymore. But they are still powerful enough in hands of people with good throwing accuracy. Different accuracy and strength now matters more - there could be situation, when you got a soldier with good strength but poor accuracy.. so he could throw anything across the map, but without any precision, On the other hand, another soldier with poor strength never gets a penalty, as he just couldn't throw far enough, so he always hit target OR one ot its nearest tiles.

10
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: May 10, 2024, 12:51:44 am »
brown accuracy digits are a cheat
it will show you exactly where the alien is, even if you can't see it, just move the crosshair from your ship over the UFO
Fixed, It was trivial.

11
brown accuracy digits are a cheat
it will show you exactly where the alien is, even if you can't see it, just move the crosshair from your ship over the UFO
Thanks, I’ll look what could be done here.

12
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: May 04, 2024, 11:38:04 pm »
Latest changes in RA part (not that much)


1) There's a kind of old bug where unit is elevated, target point belongs to the upper tile, and my code wasn't detecting that unit in one function, but detected in another, so there was discrepancy (50% no-LoS penalty was incorrectly applying in applyAccuracy, but not in drawTerrain). Yes, that's a part of that known bug with tank in XPZ, seems like its fix wasn't complete

2) All arcing shots now work with classic accuracy code, so no "precise" chance to hit or checking % target visibility. It immediately fixed related bugs (I've closed two issues in github). It is temporary solution ofc, I just want to narrow down all other bugs before starting to write "arcing RA" part. This could be confusing so I'll repeat)) RA is disabled for all arcing shots!

3) Two bugs - one in RA part in applyAccuracy, setting target voxel for missing trajectory outside of the map. I didn't think that would be a bug, as any voxel outside of the map still could be used as a valid target for a shot... but the issue comes when this voxel is used to get a tile from it, somewhere in code, and gives invalid tile. So I've restricted search for missing trajectroies only inside map boundaries. Second one - there's 100-times cycle which don't do anything useful, if target voxel belongs to invalid tile. I've added early break from the cycle in that regard.

4) Rollback that unlucky grenades accuracy commit that Meridian told about

My real life takes over one more time, so I cannot have as much time dedicated to OXC development as I want, but hope it'll change.

13
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: April 14, 2024, 11:14:15 am »
I seem to be somewhat in a minority, though.
I've heard a significant number of complaints about this issue from different people, throwable explosives are just much more efficient overall. I'm not sure for 100% but I think mods' developers (I recall XCF in particular) try to mitigate that advantage somehow.

UPD:
Tried original DOS version... What should I say? OXCE perfectly represents old algorithm :)

14
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: April 13, 2024, 11:19:38 pm »
I do hope you either put this behind RA, or introduce some more variety.
The main goal of making RA initially was and still remains to make accuracy generally better... So, I'm not only planning to "put that behind RA", but hope to fix it to reasonable state first. Now I'm sure that using same accuracy function to calculate both direct-hit weapons and tile-based throwables is a bad idea. And I plan to test that in original old UFO for comparison. And of course "vanilla" OXCE algorithm will be available in untouched state. As I've said earier, I consider every observable difference between OXCE and BOXCE w.o. RA as a bug.

Was there a difference in your tests when using a lower-accuracy soldier?
Ok, I selected 4 soldiers with minimum throwing accuracy available. Results:
T.Accuracy 55: 4/6 target tile, 1/6 adjanced tile, 1/6 - distance 2 tiles to target
T.Accuracy 59: 5/6 target tile, 1/6 - distance 3 tiles to target
T.Accuracy 63: 5/6 target tile, 1/6 adjanced tile
T.Accuracy 54: 3/6 target tile, 1/6 adjanced tile, 1/6 - distance 2 tiles to target, 1/6 - distance 3 tiles to target
Overall: 71% asbsolute hit, 12,5% adjanced tile, 8,3% 2-tile distance, 8,3% 3-tile-distance...

In other words, 100% hit with good enough explosive, or 83,5% (good) hit with weak grenades

15
Brutal AI / Re: "Realistic accuracy and cover system" option
« on: April 13, 2024, 09:11:13 pm »
engine-level tightened throwing dispersion when I think said dispersion is ridiculously low to begin with, and modding tools provide limited means to address that
Ok, I've just made an experiment - 4 guys throw 8 grenades each at a reasonably long distance.
BOXCE, RA on - 90% of grenades go straight to the target tile
BOXCE, RA off - 100$ similar
OXCE - 100% similar

I have to admit, throwing is kinda broken (and was initially) and my edits made dispersion tighter (and worse). I didn't want to deal with original accuracy code, but it seems that I have to. At least, now I know another issue and working on it.

upd:
What do I mean by "broken"? Here's a test in "vanilla" OXCE, which I use to look for differences with BOXCE, with or without RA.
24 flares thrown from a tile, where selected unit is. Throwing accuracy of units: 55, 73, 75, 77.
16/24 = 67% went straight to the target tile.
7/24 = 29% went to adjanced tile
1/24 = 4% went 2 tiles away from target
I've that test several times, and to me the issue is obvious.


The reason of this - that accuracy applied voxel-based, and when bullet with enough deviation (usually 10+ for small target is enough) just misses entirely, throwables drop near a target, not flying away.

Pages: [1] 2 3 ... 5