Author Topic: minimod: Elerium and Alloys Listed on Top  (Read 12494 times)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: minimod: Elerium and Alloys Listed on Top
« Reply #15 on: February 22, 2015, 05:43:18 pm »
From what I can see, your sub sections may be causing the problem.   You Probably should comment out those lines.

Yaml uses 2 spaces to indicate levels in its hierarchy, so those one space levels maybe throwing it off.

Code: [Select]
items:
# ufo components:
  - type: STR_ALIEN_ALLOYS
    listOrder: 1

etc

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: minimod: Elerium and Alloys Listed on Top
« Reply #16 on: February 22, 2015, 06:22:10 pm »
Tried moving the sections to 2 spaces and all individual items to 4 spaces but it comes up with an error message "invalid node"? Like I can work with the earlier big long list one but I thought it wud be handy to have sections to find items.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: minimod: Elerium and Alloys Listed on Top
« Reply #17 on: February 22, 2015, 06:37:39 pm »
Unfortunately, that is not how the "items" sections of rulesets are formatted. 

You can break this into separate rulesets for each group if that is easier, or you can use the hash tag to comment it out.

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: minimod: Elerium and Alloys Listed on Top
« Reply #18 on: February 22, 2015, 06:50:04 pm »
Like this?

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: minimod: Elerium and Alloys Listed on Top
« Reply #19 on: February 22, 2015, 07:27:56 pm »
Seems to work now with the # put in front of the sections, I'm no programmer or have qualifications in that respect but I'll have a read thru these 2 websites on yaml to see if I can get a grasp on basic stuff for future reference.
 https://llvm.org/docs/YamlIO.html
https://www.yaml.org/spec/1.2/spec.html#Introduction
Once again thanks for all ur help.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: minimod: Elerium and Alloys Listed on Top
« Reply #20 on: February 22, 2015, 08:04:02 pm »
You can't do "sections" by just writing stuff in the file. Then the game comes to the line that says "ufo components" and it doesn't know what that means so it stops reading and gives an error.

Anytime you write something in the file that is not in OpenXCom-yaml ruleset syntax, you will get errors. In this case, since it is just for your ease of reading the ruleset and does nothing rules-wise, this is what we call a comment. You need to precede comments with the appropriate marker, in this case a #, and then the game will know that it's not supposed to read that. Something like:

Code: [Select]
items:
# ufo components:
  - type: STR_ALIEN_ALLOYS
    listOrder: 1
  - type: STR_ELERIUM_115
    listOrder: 2
# craft weapons:

Offline Markus Ramikin

  • Captain
  • ***
  • Posts: 83
    • View Profile
Re: minimod: Elerium and Alloys Listed on Top
« Reply #21 on: March 10, 2021, 11:46:46 pm »
Added the metadata.yml necessary for OpenXCom Extended. Updated the attached file in the original post, as well as uploaded to openxcom.mod.io.

After rereading this thread I wish I'd done this from the start, if people were going to have this much trouble integrating this little thing. Oh, well.