Author Topic: [SOURCEMOD] Brutal-OXCE 7.12.1  (Read 125955 times)

Offline spawi

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #315 on: September 13, 2023, 10:22:50 am »
Hey folks, first off, huge thanks for Brutal-OXCE! I am stunned by what it has achieved. I am tremendously enjoying auto-combat, instant priming and the new accuracy system. Exquisite!

Two questions:

- Is it possible to rebind the auto-combat key from Ctrl+A to something else? I bound WSAD keys to camera panning, hence doing Ctrl+A causes my camera to constantly pan left. Sometimes this problem doesn't trigger, but I am unsure yet how to prevent it.
- Is it possible to say "do auto-combat only for this soldier, only for this turn" ?

I would like to avoid having to modify the source code, as I would have to recompile each new release.

If these are not possible, I kindly ask for these to be added to Brutal-OXCE! If there is a better place to ask or submit a feature request, please do let me know. Thx! :)
« Last Edit: September 13, 2023, 10:33:29 am by spawarotti »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #316 on: September 14, 2023, 01:17:28 pm »
- Is it possible to rebind the auto-combat key from Ctrl+A to something else? I bound WSAD keys to camera panning, hence doing Ctrl+A causes my camera to constantly pan left. Sometimes this problem doesn't trigger, but I am unsure yet how to prevent it.
I agree, something other to turn it on or off would probably be good.

- Is it possible to say "do auto-combat only for this soldier, only for this turn" ?
I think the request here is something like a button to just run AI for the currently selected soldier instead of having it controlled by a human. I think that would be nice. Would also be neat for debugging, so you can move soldier after soldier. I shall look into that.

Offline spawi

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #317 on: September 15, 2023, 06:10:08 am »

I agree, something other to turn it on or off would probably be good.

I think the request here is something like a button to just run AI for the currently selected soldier instead of having it controlled by a human. I think that would be nice. Would also be neat for debugging, so you can move soldier after soldier. I shall look into that.


Awesome, much appreciated! And yes, you interpreted my asks correctly :)

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #318 on: September 16, 2023, 08:04:53 am »
Okay, I'm now positive the AI cheats in a major way in vision mode 3.

Video showing it off provided. The save file and options.cfg used are attached.
Version screen:


Video:
https://streamable.com/dc1c41

In case my accent is too thick, the transcript:
Quote
The dog is over here, and the turret is over here.
It's been standing here for several turns now.
And it will continue to be standing there for as long as the dog doesn't open this door.
The dog can go here and open this door for instance... nothing will happen.
But if the dog goes here, opens this door, the turret will move.
As such, somehow the roboturret knows where, uhh, the door is open there. [brain fart, meant to say the turret knows the door was open there]
« Last Edit: September 16, 2023, 08:14:49 am by DeltaEpsilon »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #319 on: September 16, 2023, 02:45:26 pm »
Okay, I'm now positive the AI cheats in a major way in vision mode 3.
This is not related to the vision-mode. It's related to opening doors, as you correctly assumed in your video.

After a player told me that if you go to the center of the map before ending your turn and then use stereo-listening to hear where doors are opening, I made the AI assume someone is near the door that was opened.

Code: [Select]
if (door == 0)
{
      _parent->getMod()->getSoundByDepth(_parent->getDepth(), Mod::DOOR_OPEN)->play(-1, _parent->getMap()->getSoundAngle(_unit->getPosition())); // normal door
      _unit->updateEnemyKnowledge(_parent->getSave()->getTileIndex(_unit->getPosition()));
}

As you can see in the code, the way the sound is played also contains the information about the location of the door that was opened. So the AI is just getting the same information in this case.

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #320 on: September 16, 2023, 03:20:38 pm »
This is unreasonably precise IMO.
Additionally, it only seems to react to the door that's very close. The door that's just a few tiles away in the same direction that I open does not cause the turret to react at all.

I don't really think there is an easy way as a player to determine which door was open during hidden movement. I certainly cannot tell even with stereo sound nor does it seem to at all be consistent. Maybe spotting enemies during hidden movement moves the camera or something, but I've never managed to correctly determine which door was opened during AI turn. I suspect there is a way, but it doesn't seem like it's easily determinable in game.
« Last Edit: September 16, 2023, 03:24:36 pm by DeltaEpsilon »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #321 on: September 16, 2023, 04:04:11 pm »
Additionally, it only seems to react to the door that's very close. The door that's just a few tiles away in the same direction that I open does not cause the turret to react at all.
This is likely related to the aggressiveness of the unit. Just knowing that a door opened doesn't mean the unit will go there to check. It only checks for the nearby door because it thinks it can attack whoever opened it. On a higher aggressiveness, it would also have gone for the unit that opened the other door.

About being unreasonably precise: A way to potentially change that would be to assume it's the closest door to the unit's previously assumed position that was opened whenever any door opens. That would be a bit more complicated to code than just knowing the correct door.

Offline spawi

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #322 on: September 19, 2023, 11:14:26 am »
Reporting two bugs with accuracy in release 7.6.4 [1]

Bug 1: Have a look at the attached screenshot. You can see the debug log saying my agent (standing on the right) hit the deep one (standing one the left) but it is not true - the shot actually hit the tree. Right in the middle.

Bug 2: when I aim at the deep one, the agent (Rafael Silva/Snpr) has 86% accuracy with aimed shot. But once I make the shot, the next one is 95%, without any terrain getting damaged.

I also attach the save file.

[1] https://github.com/Xilmi/OpenXcom/releases/tag/v_7_6_4
« Last Edit: September 19, 2023, 11:16:38 am by spawarotti »

Offline jnarical

  • Captain
  • ***
  • Posts: 78
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #323 on: September 19, 2023, 05:07:40 pm »
Reporting two bugs with accuracy in release 7.6.4 [1]
I'm going to investigate that, thanks for feedback!

upd: I haven't try TFTD with my mod... but tried huge complex ~500 Mb total conversion 40k/Rosigma. Anyway, both bugs SHOULDN'T be there in the first place. Time to get TFTD )
« Last Edit: September 19, 2023, 05:13:57 pm by jnarical »

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #324 on: September 20, 2023, 01:36:05 am »
Xilmi, one more thing I found out:
dogs, werewolves etc. have barking/howling attack, which is ordinarily used to damage TU, morale and reactions, rarely causing stun reactions.
BAI tends to prefer this over convenient claws/jaws, which damages HP.
Recently I've got the mission in X-Piratez where I had to deal with 9 werewolves barehandedly (don't ask why, it's insanely deep lore of XPZ), and they were running around me and howling.

Could that be another AI check: if something can do lethal damage, prefer it over others (not 100% chance, maybe 66-80% because howling is fun too). But I have little comprehension how that would not cause troubles with tribals behavior, who prefer using poisonous darts (damages little HP, but lot of morale and stun), but have daggers as well. See, they doing good. Only dogs and werewolves aren't.

Right now I am doing mission vs deep ones on cruise liner, and I have to say it's very immersive to freaking be scared of every door across, because that last couple of MF's lured so nicely for last suicidal run in the name of deep ocean god.

GJ man. 
« Last Edit: September 20, 2023, 01:43:03 am by Abyss »

Offline spawi

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #325 on: September 20, 2023, 10:42:26 am »
jnarical, big thx for looking into my bug reports! I found one more problem in the same file as in my previous post [1].

See the attached screenshot. 95% to hit, but in reality 0%. In fact the agent never hits.

Note I have teleported the agent using debug mode. He is not standing there in the save file.

Note the save file is from X-COM Files, which requires the original TFTD data.

[1] https://openxcom.org/forum/index.php/topic,10967.msg157774.html#msg157774
« Last Edit: September 20, 2023, 11:02:19 am by spawarotti »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #326 on: September 20, 2023, 11:20:41 am »
Note the save file is from X-COM Files, which requires the original TFTD data.

No, it doesn't. I can't even think how it could work. ;)

Offline jnarical

  • Captain
  • ***
  • Posts: 78
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #327 on: September 20, 2023, 12:58:38 pm »
Bug 2: when I aim at the deep one, the agent (Rafael Silva/Snpr) has 86% accuracy with aimed shot. But once I make the shot, the next one is 95%, without any terrain getting damaged.

Here's the bug in the natural habitat. On the picture you can see rayscan of target for left, center and right point of view. # means exposed voxel, O means covering object - tree and part of the slope at the right side. Left rayscan from each pair show first scanning (for 86% accuracy), right one is the second. Origin point of view unexpectedly shifting without any visible reason, and target for left shift becomes a little bit more exposed, just for 79%, which gives 120*0.79=94.8 of total accuracy, rounded up to 95.

Just wanted to share, while I'm still figuring that out)

upd: left/center/right shift represents "leaning" of shooter to find more effective line of fire.

upd2: first calculation assumes that unit is facing direction=6 (top left) which is obviously wrong, Second one uses direction=5 (left), thus moving left shift origin to a better position, which gives 95% accuracy. If you right-click to the left of ot first, you'll get 95% immediately, albeit there won't be visible unit rotation. Odd.

upd3: mystery solved. Origin defining function uses so-called "action" object to get origin tile coodinates... There's no action if you didn't do anything. Action could be walking or turning, so even if you press RMB in the direction you're already looking - there won't be any TUs spent but it will create TURN action, which will have origin tile where unit is located. Original "UFO Extender accuracy" didn't accept action as parameter, it was much less complex.

upd4: Bug #2 fixed, uploaded to accuracy repo, now it all up to Xilmi to merge. What about Bug #1... There IS a reason why your soldier missed :) If you look at the picture and imagine what it was like when the left tree was there - well, seems like there were just a couple voxels exposed. But that's totally a bug anyway. If someone get similar bug while playing - please load autosave, check if the bug is presented, and send it to me via this forum.
« Last Edit: September 20, 2023, 05:24:21 pm by jnarical »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #328 on: September 20, 2023, 06:23:22 pm »
Xilmi, one more thing I found out:
dogs, werewolves etc. have barking/howling attack, which is ordinarily used to damage TU, morale and reactions, rarely causing stun reactions.
BAI tends to prefer this over convenient claws/jaws, which damages HP.
Recently I've got the mission in X-Piratez where I had to deal with 9 werewolves barehandedly (don't ask why, it's insanely deep lore of XPZ), and they were running around me and howling.
Do you have a save from that mission? I'm pretty sure I know what causes this issue and how to fix it. I just didn't have a practical example for toying around with it.
In short: They only consider what does more "damage". But that includes "damage to TUs", which obviously isn't real damage.
I think I need some sort of damage-type-dependent score-modifier, where damage to HPs has to be evaluated significantly higher.

Edit: I put out a 7.6.6 that shall fix the issue. I have only tested whether normal behaviour still works but the code looks pretty-straight-forward and should work. So please retest the aforementioned scenario and let me know if the changes in 7.6.6 resolve the issue of wearwolves only lowering temporary stats instead of inflicting actual damage.
« Last Edit: September 20, 2023, 07:31:33 pm by Xilmi »

Offline spawi

  • Sergeant
  • **
  • Posts: 24
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.3
« Reply #329 on: September 20, 2023, 11:55:24 pm »
No, it doesn't. I can't even think how it could work. ;)

@Solarius Scorch, my bad! I just assumed it does, given it appears to use a lot of the TFTD assets. Hence I thought one has to copy the TFTD folder from original TFTD installation, per usual installation instructions: https://github.com/MeridianOXC/OpenXcom#installation

@jnarical thanks for sharing and very quick bugfix! Very interesting analysis.
« Last Edit: September 21, 2023, 12:00:33 am by spawarotti »