id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,phab_field 4950,rmgen / CLogger timestamps,elexis,elexis,"In Caledonian Meadows and Wild Lake there is/was some code to compute timestamps for the different steps of map generation. This serves the general use case of debugging why some parts of the map generation code are much slower than others. Instead of repeating Date calculations in every random map script, it should become a universal feature with the same string format in each string. The `log()` function called by RMS is registered in `ScriptInterface.cpp` and is just a proxy to a non-rendered `WriteMessage` in `CLogger.cpp` that writes to `mainlog.html`. A current example is: {{{

Loading simulation script 'simulation/components/VisionSharing.js'

Loading simulation script 'simulation/components/WallPiece.js'

Loading simulation script 'simulation/components/WallSet.js'

Loading simulation script 'simulation/components/Wonder.js'

'art/terrains/terrains.xml' does not exist. Using previous properties.

Loading RMS 'maps/random/volcanic_lands.js'

Loading map generator script 'maps/random/rmgen/area.js'

Loading map generator script 'maps/random/rmgen/constraint.js'

Loading map generator script 'maps/random/rmgen/entity.js'

...

Loading map generator script 'maps/random/rmgen/terrain.js'

Loading map generator script 'maps/random/rmgen/tileclass.js'

Loading map generator script 'maps/random/rmgen/wall_builder.js'

Creating new map...

Creating volcano

Creating hills...

Creating forests...

Creating dirt patches...

Creating stone mines...

Creating small stone mines...

Creating metal mines...

Creating small decorative rocks...

Creating large decorative rocks...

Creating straggler trees...

Determine starting units...

Ensure resources for a civic center...

Placing player units...

Determine starting units...

Ensure resources for a civic center...

Placing player units...

Determine starting units...

Ensure resources for a civic center...

Placing player units...

Saving map...

Number of entities: 380

CSkeletonAnimManager::GetAnimation(art/animation/biped/new/fem_idle_long.dae): Loaded successfully

CSkeletonAnimManager::GetAnimation(art/animation/biped/new/fem_idle_short.dae): Loaded successfully

CSkeletonAnimManager::GetAnimation(art/animation/biped/new/fem_idle_relax.dae): Loaded successfully

CSkeletonAnimManager::GetAnimation(art/animation/biped/new/fem_idle_relax_b.dae): Loaded successfully

}}} The timestamp could be the time since launch of the game or since start of the map generator: {{{

[1324] Creating volcano

[1325] Creating hills...

[1642] Creating forests...

}}} The timestamp could become a feature of the `CLogger` rather than only adding it to the random map generation code. ",defect,closed,Nice to Have,Alpha 23,Maps,fixed,,,