Author Topic: [CLOSED][Support requested] Converting a mod from V7.9.8 to V8.1.0  (Read 217 times)

Offline Aldorn

  • Commander
  • *****
  • Posts: 767
    • View Profile
Hello to the wole team,

First, congratulations for the constant improvement performed to OXC and now OXCE.  :o :-* ::)

I would like to update my mod from V7.9.8 to V8.1.0.

The problem is my mod is a big mod, so it would take me months (or years) to restart it from beginning under V8.1.0, including features one by one and reimplementing when not working anymore under V8.1.0

So I'm trying to run it in V8.1.0, and make correction when requested.


Let's start with the two first issues that I don't understand:

ERROR 1:

Error message:
[23-03-2025_22-08-37]   [ERROR]   failed to load 'Hell Mod'
F:/OXCE/OXCE V8.1.0 HellMod/user/mods/HellMod/Ruleset/ZListOrders/999_ZListOrders_Items.rul: Error for 'Mod': Missing main node at line 140


I can fix it by commenting out the code below
Code: [Select]
items:
# DISABLED BECAUSE OF V8.1.0
#  - name: STR_SHIELD_GENERATOR_CRAFT_MODULE
#    listOrder: 1497
#  - name: STR_EXPLORATION_CRAFT_MODULE
#    listOrder: 1498
This file is 633 lines long, contains all the items listorders, and only those 2 items (out of 300?) cause a failure

Instead of outcommenting the lines in error, I would be interesting to understand why.


ERROR 2:

Error message:
[23-03-2025_21-52-36]   [ERROR]   failed to load 'Hell Mod'
F:/OXCE/OXCE V8.1.0 HellMod/user/mods/HellMod/Ruleset/Flags_OK/Flags_TagExtraSprites.rul: Tried to deserialize value node as map. Flags_TagExtraSprites.rul at line 1:1


The file itself is as below (the real file contains 33 "flags")
Code: [Select]
# =======================================
# ===== CREDIT:  B1ackwolf, Krokots =====
# =======================================
extraSprites: 
  - type: Flag0
    singleImage: true
    files:
      0: Resources/Flags/Flag00_UnitedStates.PNG
  - type: Flag1
    singleImage: true
    files:
      0: Resources/Flags/Flag01_Australia.PNG

Here I'm stuck

If anyone could help me fixing it

Thank you very much

« Last Edit: March 24, 2025, 03:54:00 am by Aldorn »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9453
    • View Profile
Re: [Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #1 on: March 23, 2025, 11:34:11 pm »
Error 1: the item identifier should be "type", not "name"... or in other words, mandatory "type" is missing

Error 2: can't say from just the provided info, need the whole mod

Offline Yankes

  • Commander
  • Global Moderator
  • Commander
  • *****
  • Posts: 3451
  • Posts: 421
    • View Profile
Re: [Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #2 on: March 24, 2025, 01:24:47 am »
Try remove all spaces after `extraSprites:` it could help.

Offline Aldorn

  • Commander
  • *****
  • Posts: 767
    • View Profile
Re: [Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #3 on: March 24, 2025, 02:19:43 am »
Error 1: the item identifier should be "type", not "name"... or in other words, mandatory "type" is missing

Error 2: can't say from just the provided info, need the whole mod

OMG, here is a little bit more of the 1st error

Quote
  - type: STR_HOVERTANK_LAUNCHER
    listOrder: 1495
  - type: STR_HWP_FUSION_BOMB
    listOrder: 1496
# DISABLED BECAUSE OF V8.1.0
#  - name: STR_SHIELD_GENERATOR_CRAFT_MODULE
#    listOrder: 1497
#  - name: STR_EXPLORATION_CRAFT_MODULE
#    listOrder: 1498

# ===============================================
# ===== ARMORS ==================================
# ===============================================
  - type: STR_PILOT_ARMOR
    listOrder: 1500
  - type: STR_LIGHT_ARMOR
    listOrder: 1501
  - type: STR_GRAVMODULE_ARMOR
    listOrder: 1502

It's "type" every where, except for these two lines where it is "name", and I did not notice the difference, instead I put it as comment

So this kind of errors is blocking in V8+, but was not in V7+, very interesting

Thank you very much for your support :)


« Last Edit: March 24, 2025, 02:21:47 am by Aldorn »

Offline Aldorn

  • Commander
  • *****
  • Posts: 767
    • View Profile
Re: [Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #4 on: March 24, 2025, 02:25:50 am »
Try remove all spaces after `extraSprites:` it could help.

I did, and you are right, there were 1 tab + 1 space (despite I always pay attention to that), but still lthe same error message

I will check if the initial mod by Blackwolf and Krokots has been updated to V8+

Thank you for your support anyway

Offline Aldorn

  • Commander
  • *****
  • Posts: 767
    • View Profile
Re: [Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #5 on: March 24, 2025, 02:52:55 am »
Regarding the 2nd error
[23-03-2025_21-52-36]   [ERROR]   failed to load 'Hell Mod'
F:/OXCE/OXCE V8.1.0 HellMod/user/mods/HellMod/Ruleset/Flags_OK/Flags_TagExtraSprites.rul: Tried to deserialize value node as map. Flags_TagExtraSprites.rul at line 1:1


I made several attempts, and you already worked on Blackwolf's version  ;D
https://openxcom.org/forum/index.php?topic=10976.msg169250#msg169250
Attaching a fixed version.

I tried to copy and paste your solution but still the same issue

But after several attempts, I found the cause of this damn error: it was due to the file that was encoded in UTF-16 LE BOM instead of UTF-8-BOM

@Meridian, @Yankes, great support, thanks to you I can carry on my update process to V8.1
« Last Edit: March 24, 2025, 03:54:37 am by Aldorn »

Offline Aldorn

  • Commander
  • *****
  • Posts: 767
    • View Profile
Re: [Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #6 on: March 24, 2025, 03:53:24 am »
Ok, I made it work

The compiler or interpreter (I don't know the exact name)  helped a lot, most of error messages are clearly understandable

Let me close temporary this thread (I mean in title)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9453
    • View Profile
Re: [CLOSED][Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #7 on: March 24, 2025, 09:34:40 am »
Although UTF-8 BOM will work, I strongly recommend converting to UTF-8 (without BOM).

Offline Aldorn

  • Commander
  • *****
  • Posts: 767
    • View Profile
Re: [CLOSED][Support requested] Converting a mod from V7.9.8 to V8.1.0
« Reply #8 on: March 24, 2025, 11:41:13 am »
Although UTF-8 BOM will work, I strongly recommend converting to UTF-8 (without BOM).

OK, I will convert all files :)