OpenXcom Forum

Modding => Work In Progress => Topic started by: Hollow_Fang on January 22, 2015, 05:58:26 am

Title: Not sure what i'm doing wrong?
Post by: Hollow_Fang on January 22, 2015, 05:58:26 am
When loaded up says
Mod failed to load Facilityvar
Yaml-cpp: error at line 3, column 2: end of map not found

not sure what i did wrong as there is not much info on more step by step creation :(
Any help would be great.
Title: Re: Not sure what i'm doing wrong?
Post by: Warboy1982 on January 22, 2015, 06:22:38 am
your indentation is all wrong

make sure your text editor uses a fixed width font, i suggest notepad++ as it supports yaml format natively.

compare this version:
Title: Re: Not sure what i'm doing wrong?
Post by: Hollow_Fang on January 22, 2015, 07:05:53 am
your indentation is all wrong

make sure your text editor uses a fixed width font, i suggest notepad++ as it supports yaml format natively.

compare this version:
i am using NP++?
i set it to yaml
Title: Re: Not sure what i'm doing wrong?
Post by: Hobbes on January 22, 2015, 07:20:20 am
Try this: https://falkooxc2.pythonanywhere.com/rulcheck (https://falkooxc2.pythonanywhere.com/rulcheck)

Click where it says Open rulfile, then copy/paste your ruleset there (delete first what's already in the validator). Save and close, then test your ruleset. It will tell you precisely where the syntax issues are located.
Title: Re: Not sure what i'm doing wrong?
Post by: Hollow_Fang on January 22, 2015, 07:52:32 am
Try this: https://falkooxc2.pythonanywhere.com/rulcheck (https://falkooxc2.pythonanywhere.com/rulcheck)

Click where it says Open rulfile, then copy/paste your ruleset there (delete first what's already in the validator). Save and close, then test your ruleset. It will tell you precisely where the syntax issues are located.
is the red in NP++ showing error in code or what idk coding very well at all .
right now my main goal is to figure out why the image in my resources is not show up
Code: [Select]
facilities:
  - type: STR_Micro_RADAR_SYSTEM
mapName: XBASE_04
  - type: STR_Micro_Radar_System
spriteShape: 201
buildCost: 20000
buildTime: 5
monthlyCost: 1000
radarRange: 500
radarChance: 5
mapName: XBASE_04
radarRange: 800
radarChance: 7
costBuy: 500
costRent: 200
- type: STR_Tiny_Radar_System
  mapName: XBASE_04
  - type: STR_Tiny_Radar_System_2
    spriteShape: 2
    spriteFacility: 21
    buildCost: 20000
    buildTime: 5
    monthlyCost: 1000
    radarRange: 500
    radarChance: 5
    mapName: XBASE_04
    radarRange: 800
    radarChance: 7
    costBuy: 500
    costRent: 200
  - type: STR_SMALL_RADAR_SYSTEM
    requires:
    - STR_ALIEN_ALLOYS
    - STR_ELERIUM_115
    spriteShape: 2
    spriteFacility: 21
    buildCost: 500000
    buildTime: 12
    monthlyCost: 10000
    radarRange: 1500
    radarChance: 10
    mapName: XBASE_04
  - type: STR_LARGE_RADAR_SYSTEM
    requires:
    - STR_UFO_NAVIGATION - STR_ALIEN_ALLOYS - STR_ELERIUM_115
    spriteShape: 1
    SpriteFacility: 22
    buildCost: 800000
    buildTime: 25
    monthlyCost: 15000
    radarRange: 2250
    radarChance: 20
    mapName: XBASE_05
    extraSprites:
    files:
  201: extraSprites:/Resources/FacilityVar/MicroRadar.gif
  202: extraSprites:/Resources/FacilityVar/TinyRadar.gif
extraStrings:
  - type: en-US
    strings:
      STR_Micro_RADAR_SYSTEM_2: "Micro Radar System"
      STR_Tiny_Radar_System_2: "Large Storage Facility"

Thanks for helping me out too hope i can get this working as i got plans to make other buildings in variations
Title: Re: Not sure what i'm doing wrong?
Post by: Warboy1982 on January 22, 2015, 09:38:41 am
i've re-fixed and re-uploaded my original attachment, there were some more indentation errors and a missing "extraSprites:", as well as missing strings.

yes, if notepad++ is showing you red lines, that means there's something wrong