tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
434 stars 41 forks source link

Figure out the room, spell, trap, door availability #356

Closed tonihele closed 4 years ago

tonihele commented 4 years ago

Figure out the room, spell, trap, door availability. Now that we have everything researchable, it looks as we don't perfectly understand the what is available and what is researchable. The code looks kinda odd, spells seem to be a special case according to it. This would be the setupPlayers() in GameController.

The availability structure goes so that first there are entries without player ID. Followed by player specific availability. These should be perhaps processed separately. Somehow it seems that they have different values. Might even be that we should start with full list and start eliminating? Dunno, a bit weird if our parsing of the file format is correct.

After #341 there are faulty entries in the campaign maps. Should be tested with campaign maps and custom maps alike (during campaigns one doesn't ever research rooms, not maybe even traps...).

https://lubiki.keeperklan.com/dk2_docs/dk2_editor_manual.htm#manual_walkth02availresrch

tonihele commented 4 years ago

Note that this also goes for the player creatures. Currently also broken.

ArchDemons commented 4 years ago
public enum AvailabilityValue implements IValueEnum {

            EMPTY(1),
            DISABLE(2),
            ENABLE(3),
            EMPTY_ROOM(4);

should be

public enum AvailabilityValue implements IValueEnum {

            Unavailable(1),
            Researchable(2),
            Available(3),
            Unavailable_ROOM(4); // maybe game bug
tonihele commented 4 years ago

Nice thanks!

On Wed, 18 Mar 2020, 16:51 ArchDemons, notifications@github.com wrote:

public enum AvailabilityValue implements IValueEnum {

        EMPTY(1),
        DISABLE(2),
        ENABLE(3),
        EMPTY_ROOM(4);

should be

public enum AvailabilityValue implements IValueEnum {

        Unavailable(1),
        Researchable(2),
        Available(3),
        Unavailable_ROOM(4); // maybe game bug

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tonihele/OpenKeeper/issues/356#issuecomment-600668071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7VJPW7H65HTBVLBZHE47TRIDNYXANCNFSM4KYS2NAA .