Jump to content

issue with my mod when trying to see my civilization overview


vpereira
 Share

Recommended Posts

Hello Mod community,

 

I'm developing a mod, more to learn about 0 a.d development. I'm introducing for now 2 civilizations: Trojans and Mycenaeans.  I'm already able to play with both, but when on game clicking in the "Myceneans emblem"  I'm getting the following error:

Quote

ERROR: Errors executing script event "SelectionChange"

ERROR: JavaScript error: gui/reference/common/TemplateLister.js line 39 this.TemplateLoader.getVariantBaseAndType(...) is undefined compileTemplateLists@gui/reference/common/TemplateLister.js:39:57 setActiveCiv@gui/reference/common/ReferencePage.js:26:51 selectCiv@gui/reference/structree/StructreePage.js:47:8 onSelectionChange@gui/reference/common/Dropdowns/CivSelectDropdown.js:26:11 CivSelectDropdown/this.civSelection.onSelectionChange@gui/reference/common/Dropdowns/CivSelectDropdown.js:18:52 selectCiv@gui/reference/common/Dropdowns/CivSelectDropdown.js:53:3 init@gui/reference/structree/structree.js:11:23 openPage@gui/session/top_panel/CivIcon.js:35:10 onPress@gui/session/top_panel/CivIcon.js:27:8

I reviewed already my civilization definition over and over again, and cannot spot any issue https://github.com/vpereira/0ad-troy-mod/tree/master/simulation/data/civs

Does anyone knows what the problem could be?

Thank you in advance!

 

Link to comment
Share on other sites

since TemplateLoader returns undefined, i'm guessing you either are missing a template you are referencing to, or have a typo to a template you are referencing to (within the mixin's/parent's template ref). I think the errors that come after the 2nd error line are just the result of templateloader not returning anything. Which could explain why you can just play a civ just fine, but only untill that buggy template comes into play, if you haven't encountered it yet while playing it's probably a not much used unit.

Those are my quick 2 cents but maybe someone else might help you better.

EDIT: I also just noticed you have `.keep` files in your templates folder for mycea in both units and structures which troj doesn't have, you can try deleting those. It might be that templateloader is trying to initialize those.

Edited by Grapjas
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...