Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
301 stars 47 forks source link

3.5.0 won't run #169

Closed AMDmi3 closed 5 years ago

AMDmi3 commented 5 years ago

When testing 3.5.0 update:

% wyrmsun                                              
Invalid currency: "scilling".
Invalid currency: "tremissis".
Invalid terrain type: "dirt".
/usr/work/dtmp/wyrmgus/work/Wyrmgus-3.5.0/src/map/script_map.cpp:1417: CclDefineTerrainType: Terrain doesn't exist.
Terrain doesn't exist.
stack traceback:
    [C]: in function 'DefineTerrainType'
    [string "/usr/local/share/wyrmsun/scripts/terrain_ty..."]:28: in main chunk
    [C]: in function 'Load'
    [string "/usr/local/share/wyrmsun/scripts/stratagus...."]:1970: in main chunk
Andrettin commented 5 years ago

It looks like the data folder isn't being properly read (the "dirt" terrain type definition is there for instance, as is that of the two mentioned currencies).

Presuming that the /data/ folder is correctly present, then it could be a problem with the parsing, which for some reason does not occur here but occurred in your install. I looked at the relevant code, namely the CConfigData::ParseConfigData C++ method, and the LoadDataFiles lua function, but unfortunately could find nothing so far to indicate the cause of the issue.

Andrettin commented 5 years ago

I've managed to reproduce the issue now, and I'm working on finding the exact cause.

Andrettin commented 5 years ago

Fixed the issue in Wyrmgus now, and made a new release containing the fix. Thanks for reporting the bug, and sorry for the inconvenience!

AMDmi3 commented 5 years ago

3.5.1 still won't run, and there are more errors.

Invalid calendar: "anglo-saxon-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "anglo-saxon-calendar".
Invalid currency: "scilling".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid currency: "tremissis".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "norse-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid calendar: "gregorian-calendar".
Invalid terrain type: "dirt".
/usr/work/dtmp/wyrmgus/work/Wyrmgus-3.5.1/src/map/script_map.cpp:1417: CclDefineTerrainType: Terrain doesn't exist.
Terrain doesn't exist.
stack traceback:
    [C]: in function 'DefineTerrainType'
    [string "/usr/local/share/wyrmsun/scripts/terrain_ty..."]:28: in main chunk
    [C]: in function 'Load'
    [string "/usr/local/share/wyrmsun/scripts/stratagus...."]:1970: in main chunk
AMDmi3 commented 5 years ago

Oh, I think I've found the problem. The data directory appeared in 3.5, but it was not installed by FreeBSD port, as I have to list the directories to install manually.

Which suggests that you should add an installation script. Probably, in cmake format to be uniform with the engine and for flexibility.

AMDmi3 commented 5 years ago

Which suggests that you should add an installation script

I'm working on this.

Andrettin commented 5 years ago

I'm working on this.

Thank you!

By the way, about the new errors, that's because in 3.5.0 there was no error logging for missing calendars but now there is, hence the new error output.