Created my first map, but cannot play test it nor upload it: Missing _script.lua
-
So I've been working on my first map with the map editor made by ozonexo3.
Everything works great and is super intuitive except there is one key file missing. It would look like "Map_Name_Script.lua" but it simply doesn't exist. I have checked with other maps, and these script files are there and actually quite chunky in size (comparatively speaking).I have tried to figure out what this file actually does so I could manually make one but I couldn't find any straight forward documentation apart from one line on the faf wiki about map editing saying the following: "Area used for Playable Area is defined in script.lua file."
Because this one line is all I have to go on, I tried making a restriction on the play area just slightly, to see if the script.lua file would be generated, but it was not.
This script file seems important, and I would've expected the map maker to automatically generate it in order to save important events like camera locations, AI markers, etc.
TL:DR
Can't load the map or upload it because missing script.lua file. -
You can copy and paste that file from another map into your new map directory and just rename the file to match your map name.
it should look something like this.
local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua') local ScenarioFramework = import('/lua/ScenarioFramework.lua') function OnPopulate() ScenarioUtils.InitializeArmies() ScenarioFramework.SetPlayableArea('AREA_1' , false) end function OnStart(scenario) end
-
I created a new file with the appropriate name and pasted in what you put there, and it worked! Thank you for your help STING!
-
Tried to do the same but still no joy