Author Topic: Loading mod rulesets  (Read 7122 times)

Offline tyran_nick

  • Captain
  • ***
  • Posts: 59
    • View Profile
Loading mod rulesets
« on: August 21, 2013, 02:44:24 am »
Was there any change how mods are loaded over the last few nightly builds?
I add them as usually in options.cfg under rulesets, but they no longer load in game. In fact, when I exit openxcom any mod rulesets that I had added are removed from the list in options.cfg. 

Tried all builds with the new version of yaml and have the same problem.

Offline xracer

  • Commander
  • *****
  • Posts: 564
  • X-COM lover, we've gone at it everywhere
    • View Profile
Re: Loading mod rulesets
« Reply #1 on: August 21, 2013, 04:10:12 am »
I blame SupSuper :P

but last i heard everything is the same, maybe YAML 5 is causing more problems :) and if they are being removed after you exit wow... maybe the game doesn't like your mods :).

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Loading mod rulesets
« Reply #2 on: August 21, 2013, 06:21:57 am »
I did tell people on the frontpage to keep an eye out for issues from the YAML upgrade. :P

I've reproduced the problem and am investigating.

Offline Kikupj

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Loading mod rulesets
« Reply #3 on: August 22, 2013, 04:17:01 am »
I'm having a similar issue by the way.The config removes any mod rul entires.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Loading mod rulesets
« Reply #4 on: August 22, 2013, 06:21:56 pm »
Should be fixed now, let me know if you experience any other problems.

Offline tyran_nick

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: Loading mod rulesets
« Reply #5 on: August 22, 2013, 10:28:45 pm »
Great! Now they load and stay in options.cfg, but it seems that the extra strings are not read correctly for all the rulesets (potentially more staff). The last mod ruleset in options.cfg seems to load fine, but all previous ones do not, at least for the "extra strings" bit in the ruleset.

wsmithjr has done a bit of investigation in the comments at the main openxcom page.
Thanks for looking into this!

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Loading mod rulesets
« Reply #6 on: August 22, 2013, 11:01:06 pm »
It should be fixed in the next Git build. Every loaded ruleset would "reset" the existing extra strings, which is why only the last ruleset remained intact.

Offline tyran_nick

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: Loading mod rulesets
« Reply #7 on: August 23, 2013, 09:40:23 am »
Thanks for looking into this. Tried it and now works fine.

I stumbled across another issue, but I am not sure if it is related. I am building a mod that adds countries and cities to geoscape. It used to work, but now I am getting the following when openxcom loads:
yaml-ccp error: at line 0, column 0: bad conversion

The script is very simplistic. I can post it if it helps, but used to work beforehand.
It just has the categories: "countries:", "regions:", "extraStrings:" and the details to add a country and a city. The very first line in the script is "countries:"

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Loading mod rulesets
« Reply #8 on: August 23, 2013, 05:21:17 pm »
Please post the script and I'll have a look. Yaml-cpp always says the error is in "line 0, column 0", much to my annoyance.

Offline tyran_nick

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: Loading mod rulesets
« Reply #9 on: August 24, 2013, 11:16:36 am »
Here's the script:

Code: [Select]
countries:
  - type: STR_GREECE
    fundingBase: 160
    fundingCap: 10000
    labelLon: 21
    labelLat: -40
    areas:
      - [18.5, 29.5, -42, -34]
regions:
  - type: STR_EUROPE
    cities:
      - name: Athens
        lon: 24.05
        lat: -38
extraStrings:
  - type: English
    strings:
      STR_GREECE: GREECE
  - type: EnglishUk
    strings:
      STR_GREECE: GREECE

P.S. The locations/coordinates in the script are not final, so keep that in mind if anyone wants to use this!

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Loading mod rulesets
« Reply #10 on: August 25, 2013, 02:26:21 am »
Should be fixed in the next Git build.

Offline tyran_nick

  • Captain
  • ***
  • Posts: 59
    • View Profile
Re: Loading mod rulesets
« Reply #11 on: August 26, 2013, 09:22:28 am »
Works fine! Also I like the inventory screen in equip craft. Great job!
Now, using one of my saves I get the following message when I start an ufo crash mission: "vector:_M_range_check". It never enters battlescape.
Does this make any sense? Not sure if this is related to the ruleset problem.

I have attached the savegame here. If you just let it continue for a couple of game minutes there is an interception to take place between an avenger and a battleship, which reproduces the issue when I try to start the battle.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Loading mod rulesets
« Reply #12 on: August 26, 2013, 09:04:29 pm »
Thanks, it was another bug with multiple rulesets, should be fixed in the next build.

Keep up the good work, as I'm sure there's a lot of possible bugs from the yaml-cpp upgrade that are only gonna get uncovered with some thorough testing. :)