andy5995 Posted 22 hours ago Report Share Posted 22 hours ago (edited) I thought I made the necessary change to a couple maps from the community-maps-2 mod But when I try starting a game with one of the maps I've changed, I get this: Edited 22 hours ago by andy5995 fix typographical error Quote Link to comment Share on other sites More sharing options...
Stan` Posted 15 hours ago Report Share Posted 15 hours ago I imagine there is nothing in the porting guide ? Cc @phosit Quote Link to comment Share on other sites More sharing options...
hyperion Posted 15 hours ago Report Share Posted 15 hours ago Would be nice if you actually copied the error message as text (the image doesn't load for me) so a blind guess is you use SetProgress instead of yield. 1 Quote Link to comment Share on other sites More sharing options...
Arup Posted 14 hours ago Report Share Posted 14 hours ago 53 minutes ago, hyperion said: Would be nice if you actually copied the error message as text (the image doesn't load for me) so a blind guess is you use SetProgress instead of yield. the image is this: Quote Link to comment Share on other sites More sharing options...
phosit Posted 14 hours ago Report Share Posted 14 hours ago You need to import the functions you are using something like import { addAnimals, addBerries, addBluffs, addDecoration, addForests, addHills, addLayeredPatches, addMetal, addStone, addStragglerTrees, createBluffsPassages, markPlayerAvoidanceArea } from "maps/random/rmgen2/gaia.js"; 1 Quote Link to comment Share on other sites More sharing options...
andy5995 Posted 2 hours ago Author Report Share Posted 2 hours ago 11 hours ago, phosit said: You need to import the functions you are using something like import { addAnimals, addBerries, addBluffs, addDecoration, addForests, addHills, addLayeredPatches, addMetal, addStone, addStragglerTrees, createBluffsPassages, markPlayerAvoidanceArea } from "maps/random/rmgen2/gaia.js"; @phositWhen I uncomment the line `Engine.LoadLibrary("rmgen2");` I get the error: ERROR: JavaScript error: maps/random/rmgen2/gaia.js line 1 import declarations may only appear at top level of a module @maps/random/cliffs_of_carnage.js:7:8 ERROR: CMapGenerationCallbacks::LoadScripts: Failed to load script 'maps/random/rmgen2/gaia.js' ERROR: An unhandled promise got rejected: ReferenceError: e_p is not defined @maps/random/cliffs_of_carnage.js:386:1 @Stan`What's the link to the porting guide? Quote Link to comment Share on other sites More sharing options...
andy5995 Posted 2 hours ago Author Report Share Posted 2 hours ago 5 minutes ago, andy5995 said: @phositWhen I uncomment the line `Engine.LoadLibrary("rmgen2");` I get the error: ERROR: JavaScript error: maps/random/rmgen2/gaia.js line 1 import declarations may only appear at top level of a module @maps/random/cliffs_of_carnage.js:7:8 ERROR: CMapGenerationCallbacks::LoadScripts: Failed to load script 'maps/random/rmgen2/gaia.js' ERROR: An unhandled promise got rejected: ReferenceError: e_p is not defined @maps/random/cliffs_of_carnage.js:386:1 @Stan`What's the link to the porting guide? Oh, I think I see. I'll start with a change like this: https://gitea.wildfiregames.com/0ad/0ad/commit/2d43ca6462940e9c3aad82309e41febb53892654?files=binaries%2fdata%2fmods%2fpublic%2fmaps%2frandom%2ffrontier.js Quote Link to comment Share on other sites More sharing options...
andy5995 Posted 1 hour ago Author Report Share Posted 1 hour ago I made some progress, I'll check back when I have more questions. @Stan` I could still use a link to the porting guide though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.