I'm having a lot of code merge problems when trying to make my own mod. I'm applying my mod to a fresh install of the game, the source code is merged and compiled, but parts of the mod code are lost or put into the wrong places in the combined file. I can get some simple changes to work, like fixing Chloe to talk to gnomes in the forest, but doing anything more complicated hits these merge problems. Supposedly cosmetic changes to the mod files, such as changing the order functions are defined or putting copies of unchanged functions into the mod file, can change the merge results and fix/cause problems. Code can easily fail to compile, in which case the game does not run properly, the in-game facility to remove mods is lost, so a full delete and reinstall seems to be needed (is that correct?).
I saw in the help thread that the var {} lines may be causing problems on merge and this may be the case with my files as it is very difficult to do something, like add an extra job, without changing these var{} lines. In the advice for modders it suggests using <AddTo> style code to bypass some merge problems, however I'm using a Godot Engine editor to check the code for syntax errors (as a syntax error can cause a compile error and a reinstall of the game) and the <AddTo> will just throw up a syntax error that will hide any others.
Is anyone else finding these problems, have solutions, or can suggest different methods for me to use?