I want to generate tokenIDs based on the properties generated in the contract.
uint256[5] memory tokenID;
for (uint i = 0; i < 5; i++) {
tokenID[i] = 1 + item[i] + property[i] + level[i];
}
So if the item is 14, the property is 4, and the level is 51, then the combined uint would 114451.
As I see it now I need to convert every uint to a bytes32, convert bytes32 to a string, and then I'm not even sure if there is a simple way to converts string to a uint. Is there a way to do this without much gas, or do I need to look at a more complicated naming convention?
Edit: Forgot to add the current solution which doesn't allow for scaling:
tokenID[i] = (((item[i]+1) * 10**5) + (property[i] * 10**4)) + level[i]
Item goes up to 1000, property goes up to 100, and level is always under 10.