Thread: 3.1 Update
View Single Post
07/11/17, 04:50 PM   #7
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Rhyono View Post
StyleItemIndex is great for dynamic lists, but the constants always made it easier for holding my own information on it. I'm surprised they are doing away with them so soon after cleaning them up in the last update.
We often have to choose between using enumerations and using ids when making a system. Enums are great for writing code against because it makes checks against specific values easy. However, adding to an enumeration requires a programmer to make a code change, and then the new client needs to propagate through several branches before finally reaching the designer who can make use of it. If we use ids, changes do not require any programmer support, but it becomes hard to program against unless you want code like itemStyleId == 5. We've been thinking over some ways to have the best of both worlds, and our favorite option right now is adding a string identifier that can be used to fetch an id. These strings would not be localized and would probably look a lot like the enum values. The designers could fill them out and we would keep them as stable as possible so code could fetch ids using them, or use them for equality checks, etc. But we're open to other ideas.
  Reply With Quote