Your editor decided to meet an asset to the moon or two maps over and now you can’t shoot on parts of the map or, I’ve seen this at least once, all the assets are completely black? Here’s how you fix it yourself since 8 months’ worth of threads with this exact problem aren’t enough of a reason for a patch.
- A text editor is slightly more capable than Notepad. I personally use Notepad++, it’s free. All the information mentioned in this guide uses commands (break row and add/remote tabs) used in Notepad++, if you’re using another editor you might need to look up what it’s using for those functions.
- Some patience and a couple of minutes of time.
How to Fix Broken Map
Step 1: Navigate to C:\Users\UserName\AppData\LocalLow\Team17 Digital Ltd\Golf With Your Friends\CustomLevels\MapName. This goes for Windows 10, it should be pretty much the same in earlier Windows versions. I have no idea about the location in OSX.
Step 2: Make a backup of the file named ‘map’. You can skip this if you want but don’t blame me if you ♥♥♥♥ up and ruin your map.
Step 3: Open the file in your text editor of choice and you’ll find something like this. It’s a terrible, unreadable, mess. Don’t worry, we’ll fix that.
Step 4: Go into Settings > Preferences > Language and change the tab length to 18. This will make it easier to spot broken values later. Also, deactivate word wrap in the View menu.
Step 5: Now go into the Replace menu (Ctrl+H), enter ]}}, in find what and ]}}\n in replace with. Make sure the Search Mode is set to extended. Now hit Replace all, this might take a few seconds depending on the number of assets placed. This will put everything into its own line and make it a whole lot easier to read. But it’s still not perfect.
Step 6: While still in the find/replace enter,” in find what, \t,” in replace with, and hit Replace all again. It now should look something like this. Every value lined up, nice and neat.
Step 7: Now scroll through the file until you find pX/Y/Z-values that are either higher/lower than 350/-350 and/or have decimal values with more than 4 digits after the. (e.g. 0.0000001E8). Simply change them to something reasonable or delete the whole line. Just make sure to fix the syntax in case it’s the last line, it ends in }}]} not }}, like the rest.
Sadly the editor doesn’t like tabs and won’t load the file as it is right now. So when you’re sure everything is good, go back into the find/replace dialog and replace \t,” with,” to remove them. It doesn’t care about them being in individual lines so there’s no need to revert that.
Step 8: Now save the file, make sure the encoding hasn’t changed to something other than UTF-8, and open it in the GWYF editor. If everything’s alright it should load and work as expected. If you’re getting an error while loading it most likely due to a syntax error… a missing, is all it needs. Either start over (you made a backup right?) or try to fix it.
And that's all for this Golf With Your Friends guide. Do you have any suggestions or tips to improve this guide for Golf With Your Friends? If yes, then make sure to leave a comment down below. This guide has been made possible by Herbstwerk. You can check him out by simply clicking his name.