diff --git a/components/esm/loadskil.cpp b/components/esm/loadskil.cpp index a4d21c591..ac9fc2789 100644 --- a/components/esm/loadskil.cpp +++ b/components/esm/loadskil.cpp @@ -1,5 +1,7 @@ #include "loadskil.hpp" +#include + #include "esmreader.hpp" #include "esmwriter.hpp" @@ -98,6 +100,22 @@ void Skill::load(ESMReader &esm) esm.getHNT(mIndex, "INDX"); esm.getHNT(mData, "SKDT", 24); mDescription = esm.getHNOString("DESC"); + + // create an ID from the index and the name (only used in the editor and likely to change in the + // future) + std::ostringstream stream; + + stream << "#"; + + if (mIndex<10) + stream << "0"; + + stream << mIndex; + + if (mIndex>=0 && mIndex