[RGSS3] Script modification - Gambit Icon List

● ARCHIVED · READ-ONLY
Started by tvghost 7 posts View original ↗
  1. Script can be found here: https://www.rpgmakercentral.com/topic/15788-gambit-icon-list/

    The script uses database item descriptions in order to get the "unlocked" descriptions for specific achievements.
    However, there is only one universal "locked" achievement description, that's specified in the script:

    VocabLockIconHelpWindowLine1 = "You have not unlocked this item!"
    VocabLockIconHelpWindowLine2 = ""

    I was wondering if there's a way to get individual descriptions for locked achievements? Maybe something done inside of the item note window could work, but I'm open to descriptions being written inside of the script, too.
  2. the problem with that idea is that you can either use a single vocab for everything, or you'll need to load the vocab from the item itself. The second option is possible, but it needs notetags and a redirection of the script to load from those notetags.
    so yes, it can be done but it is a bigger change to the original script.
  3. Andar said:
    the problem with that idea is that you can either use a single vocab for everything, or you'll need to load the vocab from the item itself. The second option is possible, but it needs notetags and a redirection of the script to load from those notetags.
    so yes, it can be done but it is a bigger change to the original script.

    Thought as much. Notetags would be a lot more painful to set up regardless.

    I suppose I could use individual vocab lines and add a ton of if statements, but I have no clue what the "if ___ " would be.
    Something like item.icon_index == [numberhere] maybe?
  4. Yes - and that is exactly why it wouldn't work with ifs in the code.
    It could be done with ifs, but then the resulting script would be custom-fit to your game only.
    And custom scripts usually require something in return, while general scripts that are usable by anyone (like the notetag based Variant) might get someone interested for free.
  5. Andar said:
    Yes - and that is exactly why it wouldn't work with ifs in the code.
    It could be done with ifs, but then the resulting script would be custom-fit to your game only.
    And custom scripts usually require something in return, while general scripts that are usable by anyone (like the notetag based Variant) might get someone interested for free.

    I'd be fine with writing the edits myself. Some help on figuring out what I need to check with "if" statements is all I'd ask.
    So far I've tried "if $data_items[number]" "if $data_items == [number]" and "if $game_party.icon_list[number]" but none of these have worked.
  6. To be frank, the script structure is kinda ... funny. Editing that will require some 'twist', since I won't be doing it like that if I were to create a same system.

    I'd prefer approach of notetag for each item, but I see you're not fond of it.
    The draw help is being draw in update_help
    Code:
      def update_help
        if item
          desc = $data_items[item].description
          if Gambit::IconList::EnableNumber
            if desc.match(/\n/)
              desc += sprintf(" %s %d/%d", Gambit::IconList::VocabIcon,
              index + 1, item_max)
            else
              desc += "\n" + sprintf("%s %d/%d", Gambit::IconList::VocabIcon,
              index + 1, item_max)
            end
          end
          @help_window.set_text(desc)
        else
          @help_window.set_text(Gambit::IconList::VocabLockIconHelpWindowLine1 +
            "\n" + (Gambit::IconList::VocabLockIconHelpWindowLine2 == "" ? "" :
            Gambit::IconList::VocabLockIconHelpWindowLine2 + " ") + 
            (Gambit::IconList::EnableNumber ? sprintf("%s %d/%d",
            Gambit::IconList::VocabIcon, index + 1, item_max) : ""))
        end
      end
    If you want to customize stuff, you want to add an "elsif" there like
    Screenshot_453.png

    Disclaimer: I didn't test it myself so it may or may not work.
  7. TheoAllen said:
    To be frank, the script structure is kinda ... funny. Editing that will require some 'twist', since I won't be doing it like that if I were to create a same system.

    I'd prefer approach of notetag for each item, but I see you're not fond of it.
    The draw help is being draw in update_help
    Code:
      def update_help
        if item
          desc = $data_items[item].description
          if Gambit::IconList::EnableNumber
            if desc.match(/\n/)
              desc += sprintf(" %s %d/%d", Gambit::IconList::VocabIcon,
              index + 1, item_max)
            else
              desc += "\n" + sprintf("%s %d/%d", Gambit::IconList::VocabIcon,
              index + 1, item_max)
            end
          end
          @help_window.set_text(desc)
        else
          @help_window.set_text(Gambit::IconList::VocabLockIconHelpWindowLine1 +
            "\n" + (Gambit::IconList::VocabLockIconHelpWindowLine2 == "" ? "" :
            Gambit::IconList::VocabLockIconHelpWindowLine2 + " ") +
            (Gambit::IconList::EnableNumber ? sprintf("%s %d/%d",
            Gambit::IconList::VocabIcon, index + 1, item_max) : ""))
        end
      end
    If you want to customize stuff, you want to add an "elsif" there like
    View attachment 96943

    Disclaimer: I didn't test it myself so it may or may not work.
    That screenshot with the elsif line was exactly what I was looking for, haha. You're a life saver, thank you. : )