Resolved Terasology not loading mods on latest git version

nh_99

New Member
Contributor
I have been having an issue with the version of terasology in the develop branch of git where I can't run the game with mods. The game log says that there is no source in all of the mods when there clearly is and doesn't show the images for the modded tools that should be in the game.


This is the log that I get: http://pastebin.com/S0rt9k2k

This is what I get when I use gradlew idea to compile the mods: http://imgur.com/V8zfTB
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Tested around a bit with nh_99 on IRC. Game works when started with "gradlew run" but despite a "gradlew idea" creating a valid project structure that can be opened in IntelliJ, and even show the modules in bold, hasCode = false for all modules.

In looking at the startup logging vs. what I get on my system stuff I noticed includes:

file:/C:/Users/Noah/IntelliJ%20Projects/Tera-Git/classes/production/Terasology/
file:/E:/Dev/Terasology/Git/integrate/out/production/Terasology/
The encoded space probably doesn't matter, we tried plain C:\Terasology too. But "classes" vs. "out" differs.

Parsing produces slightly fewer items on his system vs. mine too:

nh_99 said:
16:05:27.605 [main] INFO org.reflections.Reflections:205 - Reflections took 9633 ms to scan 1 urls, producing 198 keys and 920 values
16:05:27.928 [main] INFO org.terasology.logic.mod.ModManager:146 - Discovered mod: Books and Bookcases (hasCode = false)
Cervator said:
20:37:16.946 [main] INFO org.reflections.Reflections:205 - Reflections took 399 ms to scan 1 urls, producing 212 keys and 976 values
20:37:16.981 [main] INFO org.terasology.logic.mod.ModManager:146 - Discovered mod: Books and Bookcases (hasCode = true)
Last big difference is my side scanning module URLs and finding things, nh_99 instead getting a ton of deserialization errors on all the module objects are are invoked on a normal run (which doesn't crash the game, just leaves none of it working)
Immortius / mkalb / somebody - might need to ask for some ideas :)
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Hmm, I just did a clean setup of Terasology from latest develop with no issue, so not sure. Sounds like the mod code hasn't been compiled though.

I guess the questions I would ask are:
* Have you checked whether the classes subdirectories exist in each mod with code, and are populated?
* Have you turned on "Make Project Automatically" in IntelliJ (I would recommend this). Otherwise you can choose Build->Rebuild project which should also compile all the mods. (Remember, running Terasology in IntelliJ doesn't cause the mods to compile because Terasology doesn't depend on them).

Although 'gradlew run' should have compiled the mods.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Although 'gradlew run' should have compiled the mods.
It seemingly did, as running from the command line allowed the game modules to work. But running from inside IntelliJ fails to find stuff. It is almost like running via IntelliJ looks for compiled stuff in the wrong place ("out" vs "classes" ?)
 

nh_99

New Member
Contributor
Hmm, I just did a clean setup of Terasology from latest develop with no issue, so not sure. Sounds like the mod code hasn't been compiled though.

I guess the questions I would ask are:
* Have you checked whether the classes subdirectories exist in each mod with code, and are populated?
* Have you turned on "Make Project Automatically" in IntelliJ (I would recommend this). Otherwise you can choose Build->Rebuild project which should also compile all the mods. (Remember, running Terasology in IntelliJ doesn't cause the mods to compile because Terasology doesn't depend on them).

Although 'gradlew run' should have compiled the mods.
I rebuilt the project and it is working now. Thanks!
 

nh_99

New Member
Contributor
So, I figured out it was just working because of the forced gradle compile. As requested from Cervator here is a screenshot of my project structure:
projectstrucute.PNG
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Thanks :)

Two more small requests, screenie not needed just copy paste

1) Under Project Settings / Project what is the project compiler output? For me it is C:\LocalStorage\Terasology\Terasology\out (on my work laptop, anyway)
2) Under the Terasology module, on the Paths tab, is Compiler Output set to inherit? If not, what are the settings?
3) On a sample module with code (although probably any one works), again on the Paths tab, is Compiler Output hard-set to a value and if so which? My example: C:\LocalStorage\Terasology\Terasology\mods\portals\classes
 

nh_99

New Member
Contributor
1) Compiler output: C:\Users\Noah\IntelliJ Projects\Tera-Git\classes
2) Inherit, yes
3) Inherit

EDIT: As a note, there is no out folder in my project.
 

nh_99

New Member
Contributor
I changed the output to out but it still won't run with mods even though all of their source is there. Is there something that I a missing?
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Looks like we found it. Still might be able to narrow down the root cause (modules, #3 above, shouldn't be on inherit, but how did that happen), but found a fix in tweaking the compiler output for modules anyway :)

I'll leave further details / testing / wiki fun for nh_99 - thanks for sticking with it!
 

nh_99

New Member
Contributor
Yeah, I am going to do a bit of further testing just to see if something might have caused it. I am not completely sure, but could it have something to do with windows 8?
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Maaayyyybe ... I don't think we have a lot of devs on Win8 yet. Still, that would be a long shot. Sort of the same thing with Java 7 - no real reason it should work differently, but most are using 6 still.
 

mkalb

Active Member
Contributor
Logistics
Can you try this at the console/command line:
<Close IntelliJIDEA>
gradlew clean cleanIdea
gradlew idea
<Open IntelliJIDEA>
 

nh_99

New Member
Contributor
Found out why this was happening. Instead of opening the project like I should have I was importing it from gradle.
 
Top