MantisBT - VCMI
View Issue Details
0002790VCMIModspublic2017-09-12 07:452017-09-12 09:25
hkoehler 
AVS 
normalminorhave not tried
closedno change required 
0.99 
1.next 
0002790: String identifiers for objects are initialized too late
Currently when mod data is loaded, object identifiers like "spell.fireball" become available as part of the loading process. This means e.g. when heroes are loaded, identifiers for new spells may not be available yet, so referencing them, e.g. for hero specialty, becomes impossible (one could use integers, but that's extremely fragile).
Suggested fix: assign identifiers during preload of mods, so that they are all known by the time they are needed for resolving references.
No tags attached.
Issue History
2017-09-12 07:45hkoehlerNew Issue
2017-09-12 09:25AVSNote Added: 0007279
2017-09-12 09:25AVSStatusnew => closed
2017-09-12 09:25AVSAssigned To => AVS
2017-09-12 09:25AVSResolutionopen => no change required
2017-09-12 09:25AVSFixed in Version => 1.next

Notes
(0007279)
AVS   
2017-09-12 09:25   
We have CIdentifierStorage::requestIdentifier with functor callbacks to solve such issues.

Early identifier assigning (at preload state) might be better solution but it is not a bug and matter of redesign.