Git Product home page Git Product logo

Comments (3)

DakkJaniels avatar DakkJaniels commented on May 22, 2024

So should an id column be added to maintain order?

from devilutionx.

AJenbo avatar AJenbo commented on May 22, 2024

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 MonsterData[MT_BASEMONSTER]

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 MT_CUSTOMMONSTER or something like that so new monsters won't have to pretend to be some original monster type.

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.

from devilutionx.

AJenbo avatar AJenbo commented on May 22, 2024

... looks like we do need to add it :)

reader.advance(); // Skip the first column (monster ID).

from devilutionx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.