1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Battle Square global variable

Discussion in 'Icewind Dale 2' started by SlickRCBD, Nov 22, 2015.

  1. SlickRCBD Gems: 29/31
    Latest gem: Glittering Beljuril


    Resourceful Adored Veteran

    Joined:
    May 7, 2005
    Messages:
    3,142
    Media:
    47
    Likes Received:
    188
    Gender:
    Male
    Is there any way to use Dalekeeper II to determine which ranks and levels I've completed and which I still have to complete in Battle Square?
    I screwed up and lost track and don't want to start over. This segment is tedious enough.
     
  2. Keneth Gems: 29/31
    Latest gem: Glittering Beljuril


    ★ SPS Account Holder Resourceful Adored Veteran

    Joined:
    Jul 22, 2002
    Messages:
    3,160
    Media:
    20
    Likes Received:
    230
    Gender:
    Male
    While I certainly support delving into the bowels of the game to solve your problems, I do kind of wonder why you wouldn't just take the easy way out by restarting and cheating through it.
     
  3. SlickRCBD Gems: 29/31
    Latest gem: Glittering Beljuril


    Resourceful Adored Veteran

    Joined:
    May 7, 2005
    Messages:
    3,142
    Media:
    47
    Likes Received:
    188
    Gender:
    Male
    I wasn't sure if I could install and use the "skip Battle Squares" patch without redoing the whole Ice Temple; or at least the basement.

    Also it seems I have a really old version of G3 Tweaks installed as there is both ease-of-use and tweaks; and the G3 Tweaks does not ask about skipping Battle Squares, only Ease-of-Use does.

    I'll have to look at the cumulative changelog for G3 Tweaks since 1.2 to see if it is worth updating.

    What I'd really like is a mod so you can be told what ranks and levels you have completed and which you still need to do.
    Something like "Level 1 finished, level 2 ranks 3, 4, and 6, level 3 not attempted, level 4 not attempted, level 5 not attempted, level 6 rank 3, level 7 not attempted..."
    Either that or a scorecard for each rank.
     
    Last edited by a moderator: Nov 22, 2015
  4. SlickRCBD Gems: 29/31
    Latest gem: Glittering Beljuril


    Resourceful Adored Veteran

    Joined:
    May 7, 2005
    Messages:
    3,142
    Media:
    47
    Likes Received:
    188
    Gender:
    Male
    I think I have figured it out. However, there are 10 kinds of people, those that understand binary and those that do not. If you are not in the first of the pair, you won't get it.

    It seems vary simple, but I must have missed it in my first glance with Dale Keeper II. Easy to do considering the number of variables to scroll through.

    A little more than 3/4 of the way down it says "BATTLESQUAREWINRANK?" where ? is a number from 1 to 9, kinda like an MS-DOS wildcard.
    Each number should be self-explanatory.
    The value is based on simple binary flags. The position of each bit is relevant to the number of squares you cleared for each rank. As each level in the ranks requires a minimum of 3 squares, and has a maximum of 7, the values range from 4 to 124.
    So win level 1 (3 squares) and bit 3 (starting from one on the right and going to the left) will be set. Win level 5 (7 squares) and bit 7 will be set. win level 3 and bit 5 will be set. Levels you have not yet won will have the corresponding bits reset (cleared, set to 0), and ranks you have not win any levels in might not have a variable at all, or they will be zero.

    It's much simpler than I'm making it sound.
    Look at the value, convert to binary. Say you have a value of 80 in Dale Keeper II. Convert it to binary. You can use Windows Calculator. Calc prior to Windows 7 (Vista and before) should be set to "scientific", while Calc in Windows 7 or later should use "Programmer" mode.
    You get
    1010000
    Ignore the two trailing zeros and count
    You have completed levels 3 and 5, or won with 5 and 7 squares.

    That's it, just count the position of the 1's going from right to left.
    Simple binary.
     
    JT and Sir Rechet like this.
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.