While trying to mod in a new Laser weapon to get a hang of using the fx folder, I got this error when loading up the mod:Spoiler
Fatal: A JSONObject text must begin with '{' at 1 [character 2 line 1]
Check starfarer.log for more info.
It seemed simple enough to solve, the only .json in the mod is the mod_info.json; The mod had worked before adding in this 'Laser weapon' update, but I checked anyway - '{' is right where it's supposed to be - the first character; just to make sure I checked all the text files, but they're all alright as well.
It occurred to me that this may have been a problem caused by the editor I use, but it appeared alright in all the other text editors I used.
I am stumped as to what the problem could be, as I can't find anything wrong with the update files, but since the mod worked beforehand it must be something to do with them; If anyone has an Idea as to what the problem might be, I'd appreciate the help.
Here are the relevant file texts affected/concerning the update causing the error:
The .log -
Spoiler
18587 [Thread-6] INFO com.fs.starfarer.loading.WeaponSpecLoader - Loading weapon [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\data\weapons\particlewavebeam.wpn]
18587 [Thread-6] INFO com.fs.starfarer.loading.LoadingUtils - Loading JSON from [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\data\weapons\particlewavebeam.wpn]
18606 [Thread-10] INFO com.fs.starfarer.loading.scripts.ScriptStore - Compiling script [data.scripts.plugins.BattleObjectivesFleetPointsPluginImpl]
18637 [Thread-10] INFO com.fs.starfarer.loading.scripts.ScriptStore - Compiling script [data.scripts.plugins.BattleObjectivesFogOfWarPluginImpl]
18656 [Thread-6] INFO com.fs.profiler.Profiler - ID Calls Duration Percent
18658 [Thread-6] INFO com.fs.profiler.Profiler - --------------------------------
18666 [Thread-6] ERROR com.fs.starfarer.combat.D - org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:423)
at org.json.JSONObject.<init>(JSONObject.java:184)
at org.json.JSONObject.<init>(JSONObject.java:311)
at com.fs.starfarer.loading.LoadingUtils.?00000(Unknown Source)
at com.fs.starfarer.loading.LoadingUtils.?00000(Unknown Source)
at com.fs.starfarer.loading.WeaponSpecLoader.new(Unknown Source)
at com.fs.starfarer.loading.WeaponSpecLoader.new(Unknown Source)
at com.fs.starfarer.loading.SpecStore.o00000(Unknown Source)
at com.fs.starfarer.loading.G.o00000(Unknown Source)
at com.fs.oOOO.A.?00000(Unknown Source)
at com.fs.starfarer.combat.D.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
18671 [Thread-10] INFO com.fs.starfarer.loading.scripts.ScriptStore - Compiling script [data.scripts.world.BaseSpawnPoint]
18719 [Thread-10] INFO com.fs.starfarer.loading.scripts.ScriptStore - Compiling script [data.scripts.world.SectorGen]
18876 [Thread-10] INFO com.fs.starfarer.loading.scripts.ScriptStore - Compiling script [data.missions.turningthetables.MissionDefinition]
18950 [Thread-10] INFO com.fs.starfarer.loading.scripts.ScriptStore - Compiling script [data.missions.forthegreaterlud.MissionDefinition]
The .wpn - [really just a gravbeam edit]Spoiler
{
"specClass":"beam",
"id":"particlewavebeam",
"type":"ENERGY",
"size":"MEDIUM",
"displayArcRadius":550,
"turretSprite":"graphics/weapons/graviton_beam_turret_base.png",
"turretGlowSprite":"graphics/weapons/graviton_beam_turret_glow.png",
"hardpointSprite":"graphics/weapons/graviton_beam_hardpoint_base.png",
"hardpointGlowSprite":"graphics/weapons/graviton_beam_hardpoint_glow.png",
"turretOffsets":[15, 0],
"turretAngleOffsets":[0],
"hardpointOffsets":[23, 0],
"hardpointAngleOffsets":[0],
"fringeColor":[5,135,175,255],
"coreColor":[200,225,255,255],
"glowColor":[25,215,255,255],
"width":20.0,
"textureType":["graphics/fx/particlewavefringe.png","graphics/fx/particlewavecore.png"],
"textureScrollSpeed":260.0,
"pixelsPerTexel":5.0,
"pierceSet":[PROJECTILE_FF,PROJECTILE_NO_FF,PROJECTILE_FIGHTER],
"fireSoundOne":"beam_medium_intro",
"fireSoundTwo":"beam_medium_loop",
}
The weapon_data.csv - [Copy-pasted straight from the excel sheet.]
Spoiler
Particle Wave Beam particlewavebeam 2 3000 725 250 75 25 10 KINETIC 50 0.85 0.2
The mod_info.json - Spoiler
{
"id":"strifen_wip_mod",
"name":"Strifens' WIP",
"version":"0.1.4",
"description":"Adds Strifens' WIP Mod-stuff to your game",
"gameVersion":"0.52a",
"totalConversion":"false",
"replace":[
],
}
Edit: The Problem seems to have been some rather strange behavior on the part of Libre Office, trouble with BOMs and the Corruption of .wpn files
Case Solved
It seems I switched to using Western Europe (ISO-8859-15/EURO); I remember setting it to Western Europe (Windows-1252/Winlatin 1) due to the example given in the second post of the 'Modding Tools and Resources' Spoiler
http://fractalsoftworks.com/forum/index.php?action=dlattach;topic=633.0;attach=272;image
I'll try runningediting it into Unicode (UTF-8) and seeing if it works
Edit: Now I'm getting a Spoiler
Fatal: Error loading mod descriptor [C:Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\mod_info.json]
error before the launcher even pops up.
How does that even happen...
[C:Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\mod_info.json]
I don't even understand why that is, unless it's just what 'happens' when trying to load a mod.
Here's the .log of that "Fatal: Error loading mod descriptor [C:Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\mod_info.json]" error:
.log - Spoiler
0 [main] INFO com.fs.starfarer.StarfarerLauncher - Starting Starfarer 0.52.1a launcher
0 [main] INFO com.fs.starfarer.StarfarerLauncher - OS: Windows 7 6.1
0 [main] INFO com.fs.starfarer.StarfarerLauncher - Java version: 1.6.0_18
16 [main] INFO com.fs.starfarer.launcher.ModManager - Found mod: ironclads [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\ACM]
16 [main] INFO com.fs.starfarer.launcher.ModManager - Found mod: inorbita [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\ascendency-A.5-full]
16 [main] INFO com.fs.starfarer.launcher.ModManager - Found mod: CAELUS [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\CAELUS]
16 [main] ERROR com.fs.starfarer.StarfarerLauncher - java.lang.RuntimeException: Error loading mod descriptor [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\mod_info.json]
java.lang.RuntimeException: Error loading mod descriptor [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\First_Mod\mod_info.json]
at com.fs.starfarer.launcher.ModManager$1.accept(Unknown Source)
at java.io.File.listFiles(File.java:1134)
at com.fs.starfarer.launcher.ModManager.?00000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.<init>(Unknown Source)
at com.fs.starfarer.launcher.ModManager.return(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.<init>(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.main(Unknown Source)
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:423)
at org.json.JSONObject.<init>(JSONObject.java:184)
at org.json.JSONObject.<init>(JSONObject.java:311)
at com.fs.starfarer.loading.LoadingUtils.?00000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.o00000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.o00000(Unknown Source)
... 7 more
.
Odd. If you can upload the mod somewhere, I'll take a quick look.
Many thanks.
First_Mod.zip: -REMOVED-