New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unique->MonsterType mapping is not position independant #6822
Comments
So should an id column be added to maintain order? |
There already is an ID colum (at least in the TSV data), we just need to search the array for the right monster rather then just assuming that it's on for (auto &baseMonster : MonsterData) {
if (baseMonster.ID == MT_BASEMONSTER)
// oh here it is
} If it's not in the struct then it need to be added and we need to parse for it. We should probably also add a On a related not currently the game will crash and burn if you try to cut down the list. So we probably should handle cases where a monster type isn't found (but just concluding that there won't be a Snotspill quest if there is no Fallen Ones, or something to that effect. |
... looks like we do need to add it :) devilutionX/Source/monstdat.cpp Line 482 in c4792be
|
Operating System
Windows x64
DevilutionX version
1.5.1
Describe
Modifying the order of monsters will cause the unique monsters type to point to the incorrect monster as it does not search by ID but instead just indexes directly into the table.
To Reproduce
Order the monsdat.tsv by one of the columns alphabetically should give some interesting unique monsters :)
Expected Behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: