Author Topic: Brutal-OXCE 9.2.6  (Read 84462 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9459
    • View Profile
Re: Brutal-OXCE 9.2.2
« Reply #345 on: January 28, 2025, 09:27:25 am »
NUL is \x00. So you seeing 2 is probably a result of some sort of UB. The actual value of that variable is 0.

I was seeing 2 (character '2', not number 2), because I was loading the broken BOXCE 9.2.2 save, not an OXCE save. Sorry for the confusion.

Anyway your fix makes sense and works, @Xilmi: see attached.

With this fix, I can load any OXC/OXCE/BOXCE save... except for the broken/incompatible BOXCE 9.2.2 saves.
« Last Edit: January 28, 2025, 12:57:21 pm by Meridian »

Online Yankes

  • Commander
  • Global Moderator
  • Commander
  • *****
  • Posts: 3454
  • Posts: 421
    • View Profile
Re: Brutal-OXCE 9.2.2
« Reply #346 on: January 28, 2025, 12:07:14 pm »
I think one change we should do here, this check should be in `unserializeInt`, this mean switch should have `case 0:` too.
This is useless for old properties but any new will benefits from simpler code.

On other hand, if OXCE add new property then it break BOXCE. Overall current handling work only good for "linear" backward-forward compatibility.
Any "forks" will easy break saves.

I think if better would be split binary data in separate buffers that are loaded by name:
Code: [Select]
binTiles:  AAAAAAMAGAAbAAQAAQABAAEAAQAAAAABAAAAAwD//xwABAABAP//AQABAAAAAAIAAAADAP//GwAEAAEA//8BAAEAAAAAAwAAAAMA//
binExtended:
   OXCE_X1: AAAAAAMAGAAbAAQAAQABAAEAAQAAAAABAAAAAwD//xwABAABAP//AQABAAAAAAIAAAADAP//GwAEAAEA//8BAAEAAAAAAwAAAAMA//
   OXCE_X2: AAAAAAMAGAAbAAQAAQABAAEAAQAAAAABAAAAAwD//xwABAABAP//AQABAAAAAAIAAAADAP//GwAEAAEA//8BAAEAAAAAAwAAAAMA//
   OXCE_X3_V2: AAAAAAMAGAAbAAQAAQABAAEAAQAAAAABAAAAAwD//xwABAABAP//AQABAAAAAAIAAAADAP//GwAEAAEA//8BAAEAAAAAAwAAAAMA//
   BOXCE_N2: AAAAAAMAGAAbAAQAAQABAAEAAQAAAAABAAAAAwD//xwABAABAP//AQABAAAAAAIAAAADAP//GwAEAAEA//8BAAEAAAAAAwAAAAMA//
   FTA_Z: AAAAAAMAGAAbAAQAAQABAAEAAQAAAAABAAAAAwD//xwABAABAP//AQABAAAAAAIAAAADAP//GwAEAAEA//8BAAEAAAAAAwAAAAMA//
At least now compatibility problems will be reduced to having unique names in all forks.

Question is there is use case where storing size of data is useful? aka 2byte vs 2byte or 4byte. If old code try load it, it do not have enough space it store it it will be truncated anyway.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9459
    • View Profile
Re: Brutal-OXCE 9.2.2
« Reply #347 on: January 28, 2025, 12:43:40 pm »
I think if better would be split binary data in separate buffers that are loaded by name:

We can recommend that for future forks, but it won't help here anymore (for those 3 existing fields anyway).

Online Yankes

  • Commander
  • Global Moderator
  • Commander
  • *****
  • Posts: 3454
  • Posts: 421
    • View Profile
Re: Brutal-OXCE 9.2.2
« Reply #348 on: January 28, 2025, 12:50:59 pm »
Yes, this is not solution for current problem but when we try add new field to tile we need consider BOXCE too.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 658
    • View Profile
Re: Brutal-OXCE 9.2.2
« Reply #349 on: January 28, 2025, 05:16:44 pm »
aaaa, this is new property that is not in OXCE, this mean my previous comment is not accurate. This mean OXCE save should not have it.
But this save was generated by OXCE? Should this save be from BOXCE?
Yes, the purpose of these is simply for the AI to remember at what turn it has scouted each tile on the map. This is used in AI-code for determining where to search for enemy-units.
Basically the longer ago a tile was scouted, the more likely the AI thinks enemy units are there.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 658
    • View Profile
Re: Brutal-OXCE 9.2.2
« Reply #350 on: January 28, 2025, 06:35:08 pm »
I was seeing 2 (character '2', not number 2), because I was loading the broken BOXCE 9.2.2 save, not an OXCE save. Sorry for the confusion.

Anyway your fix makes sense and works, @Xilmi: see attached.

With this fix, I can load any OXC/OXCE/BOXCE save... except for the broken/incompatible BOXCE 9.2.2 saves.
Thanks!

Works wonderfully! :)

I am really grateful for the support you provide to help me maintain this fork!

Offline AndyFox

  • Colonel
  • ****
  • Posts: 106
  • ÷)
    • View Profile
Re: Brutal-OXCE 9.2.5
« Reply #351 on: January 29, 2025, 09:11:57 pm »
Suggest adding two lines to common\Language\OCXE\ru.yml:

STR_NO_CRAFT_FILTER: "В транспорте"
STR_NOT_ASSIGNED: "Не назначен"

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 658
    • View Profile
Re: Brutal-OXCE 9.2.5
« Reply #352 on: January 31, 2025, 07:50:55 pm »
Suggest adding two lines to common\Language\OCXE\ru.yml:

STR_NO_CRAFT_FILTER: "В транспорте"
STR_NOT_ASSIGNED: "Не назначен"
Added in my repo but won't make a new build for this.

Online Delian

  • Commander
  • *****
  • Posts: 678
    • View Profile
Re: Brutal-OXCE 9.2.5
« Reply #353 on: February 03, 2025, 10:18:52 pm »
I don't think you need to include yaml-cpp.dll in the releases anymore.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 658
    • View Profile
Re: Brutal-OXCE 9.2.5
« Reply #354 on: February 04, 2025, 05:42:52 pm »
I don't think you need to include yaml-cpp.dll in the releases anymore.
Can I remove both yaml-cpp and yaml-cppd or do I need to keep the latter?

Online Delian

  • Commander
  • *****
  • Posts: 678
    • View Profile
Re: Brutal-OXCE 9.2.5
« Reply #355 on: February 04, 2025, 07:18:40 pm »
Yes. If your build still somehow relies on yaml-cpp, then it wasn't rebased correctly.

Online Aldorn

  • Commander
  • *****
  • Posts: 771
    • View Profile
Re: Brutal-OXCE 9.2.6
« Reply #356 on: March 24, 2025, 12:25:47 pm »
Hi dudes,

Simple question : in the first post of this thread, you speak about Brutal AI as a mod
I think my AI-mod is now complete enough for me to consider it releaseable.

But in fact, this is not a mod, but a new exe, do you confirm?





Offline Juku121

  • Commander
  • *****
  • Posts: 1841
  • We're all mad here.
    • View Profile
Re: Brutal-OXCE 9.2.6
« Reply #357 on: March 24, 2025, 04:48:16 pm »
It's both, a fork of OXCE and a data mod for the latter. The first one is more important, though.

Online Aldorn

  • Commander
  • *****
  • Posts: 771
    • View Profile
Re: Brutal-OXCE 9.2.6
« Reply #358 on: March 24, 2025, 05:51:40 pm »
It's both, a fork of OXCE and a data mod for the latter. The first one is more important, though.
Thank you Juku121  :)

But where is the mod, do you know?

I downloaded from mod.io, and it's an executable installation :o

Despite he speaks about a mod in the first line of the first post of this thread, the link reaches the fork (as you named it, I did not know this word lol) itself, and the shared video is clearly about the fork installation.
I think my AI-mod is now complete enough for me to consider it releaseable.


« Last Edit: March 24, 2025, 06:05:07 pm by Aldorn »

Offline Juku121

  • Commander
  • *****
  • Posts: 1841
  • We're all mad here.
    • View Profile
Re: Brutal-OXCE 9.2.6
« Reply #359 on: March 24, 2025, 06:03:04 pm »
The mod should be included in the installer. Not sure if it defaults to 'on' or 'off'.