• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Tip Cards

Resource Tip Cards 1.2

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
wrigty12 submitted a new resource:

Tip Cards - Give your players some tips and hints!

In the recent mainline games, cards can appear to explain mechanics or give gameplay tips. Why not have these same cards in Essentials games?

Using pbShowTipCard(TipID), you can show a tip to the player.

For example, pbShowTipCard(:CATCH) will show this tip card:
View attachment 26344

But, what if you want to show more than one tip at a time, especially if they are all related? You can do that, too! Just include more TipIDs as...

Read more about this resource...
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
That will go great with the Trainer's guide (or whatever they call it in the main games). It'll certainly be more useful as a place where to check all those tips instead of simply telling you how to open the menu (or whatever the single tip it gave was).
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
That will go great with the Trainer's guide (or whatever they call it in the main games). It'll certainly be more useful as a place where to check all those tips instead of simply telling you how to open the menu (or whatever the single tip it gave was).
It looks like it's called Adventure Guide. I honestly forgot that it was even an item since I never used it!
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
I think it was not on the latest games? At least that I remember, is merely an open book on the desk of the player's room that said one tip and that was all.
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
I think it was not on the latest games? At least that I remember, is merely an open book on the desk of the player's room that said one tip and that was all.
It's a key item in at least XY, Sword/Shield, and Scarlet/Violet. I'll be implementing it in a way that it can be used as an event too though.
 

CelestialFearow

Venipede User
Member
Joined
Jul 24, 2020
Posts
200
Idk what is wrong but the console spam alot

console spam.PNG
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
wrigty12 updated Tip Cards with a new update entry:

Update 1.1 - More settings, Groups, Seen tracking, and the Adventure Guide item

BEFORE UPDATING ANY FILES: If you have made any edits to the 000_Settings file, make sure to make a backup of that files before updating the plugin. If you copy over files to update, it will overwrite your changes.

Change Log
  • ⭐New feature: Image placement control. Now you can set images to be at the Top, Bottom, Left, or Right or text in each tip. By default, it will place wider images to Top, and taller images to Left...

Read the rest of this update entry...
 

rafahbit

Trainer
Member
Joined
Oct 21, 2020
Posts
53
I loved this script, I tried to do something similar but I never managed to make it work, so I gave up.

I noticed that when using the Adventure guide, it was necessary to go through all the tipcards already seen to close, so I made a change to close when I pressed back.

in the 002_Tracking script I replace this:

old:
Expand Collapse Copy
    ItemHandlers::UseFromBag.add(:ADVENTUREGUIDE, proc { |item|

        pbRevisitTipCardsGrouped

        next 1

    })


    ItemHandlers::UseInField.add(:ADVENTUREGUIDE, proc { |item|

        pbRevisitTipCardsGrouped

        next true

    })

so:

new:
Expand Collapse Copy
    ItemHandlers::UseFromBag.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCardsGrouped

        next 1

      end

    })


    ItemHandlers::UseInField.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCardsGrouped

        next true

      end

    })

    ItemHandlers::UseFromBag.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCards

        next 1

      end

    })


    ItemHandlers::UseInField.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCards

        next true

      end

    })

and in the 001_Scene script, I modified the controls in def pbScene,

from:

old:
Expand Collapse Copy
    def pbScene
        loop do
            Graphics.update
            Input.update
            pbUpdate
            oldindex = @index
            quit = false
            if Input.trigger?(Input::USE)
                if @index < @pages - 1
                    @index += 1
                else
                    pbSEPlay(Settings::TIP_CARDS_DISMISS_SE)
                    break
                end
            elsif Input.trigger?(Input::BACK) || Input.trigger?(Input::LEFT)
                @index -= 1 if @index > 0
            elsif Input.trigger?(Input::RIGHT)
                @index += 1 if @index < @pages - 1
            end
            if oldindex != @index
                pbDrawTip
                pbSEPlay("GUI sel cursor")
            end
        end
    end

for:

new:
Expand Collapse Copy
def pbScene
  loop do
    Graphics.update
    Input.update
    pbUpdate
    oldindex = @index
    quit = false
    if Input.trigger?(Input::USE)
      if @index < @pages - 1
        @index += 1
      else
        pbSEPlay(Settings::TIP_CARDS_DISMISS_SE)
        break
      end
    elsif Input.trigger?(Input::BACK)
      if $adventure_guide_used
        pbSEPlay(Settings::TIP_CARDS_DISMISS_SE)
        break
      end
    elsif Input.trigger?(Input::LEFT)  # Triggers only when the LEFT button is pressed, not BACK
      @index -= 1 if @index > 0
    elsif Input.trigger?(Input::RIGHT)
      @index += 1 if @index < @pages - 1
    end
    if oldindex != @index
      pbDrawTip
      pbSEPlay("GUI sel cursor")
    end
  end
  $adventure_guide_used = false  # Reset the flag when the Tip Card is closed
end

These modifications only affect the adventure guide item, the first time you see a tip card, the back button will not close, this prevents it from accidentally closing and not seeing the following tip cards and ending up not being able to see them again.

If anyone is going to apply these changes, make a backup beforehand, it worked for my game, but you never know if it will work for everyone (in logic, it's supposed to work hahahaha)

I'm trying to improve the adventure guide, I wanted it to open a choice interface for which tipcard you would like to review, but I haven't been successful with that yet, I'm quite an amateur with script codes. :)

EDIT:If you are only going to use groups, you don't need to make any of these changes, you only need to if you are going to use a few tip cards and don't want to use a group for each one.
 
Last edited:

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
I loved this script, I tried to do something similar but I never managed to make it work, so I gave up.

I noticed that when using the Adventure guide, it was necessary to go through all the tipcards already seen to close, so I made a change to close when I pressed back.

in the 002_Tracking script I replace this:

old:
Expand Collapse Copy
    ItemHandlers::UseFromBag.add(:ADVENTUREGUIDE, proc { |item|

        pbRevisitTipCardsGrouped

        next 1

    })


    ItemHandlers::UseInField.add(:ADVENTUREGUIDE, proc { |item|

        pbRevisitTipCardsGrouped

        next true

    })

so:

new:
Expand Collapse Copy
    ItemHandlers::UseFromBag.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCardsGrouped

        next 1

      end

    })


    ItemHandlers::UseInField.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCardsGrouped

        next true

      end

    })

    ItemHandlers::UseFromBag.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCards

        next 1

      end

    })


    ItemHandlers::UseInField.add(:ADVENTUREGUIDE, proc { |item|

      if !$adventure_guide_used

        $adventure_guide_used = true

        pbRevisitTipCards

        next true

      end

    })

and in the 001_Scene script, I modified the controls in def pbScene,

from:

old:
Expand Collapse Copy
    def pbScene
        loop do
            Graphics.update
            Input.update
            pbUpdate
            oldindex = @index
            quit = false
            if Input.trigger?(Input::USE)
                if @index < @pages - 1
                    @index += 1
                else
                    pbSEPlay(Settings::TIP_CARDS_DISMISS_SE)
                    break
                end
            elsif Input.trigger?(Input::BACK) || Input.trigger?(Input::LEFT)
                @index -= 1 if @index > 0
            elsif Input.trigger?(Input::RIGHT)
                @index += 1 if @index < @pages - 1
            end
            if oldindex != @index
                pbDrawTip
                pbSEPlay("GUI sel cursor")
            end
        end
    end

for:

new:
Expand Collapse Copy
def pbScene
  loop do
    Graphics.update
    Input.update
    pbUpdate
    oldindex = @index
    quit = false
    if Input.trigger?(Input::USE)
      if @index < @pages - 1
        @index += 1
      else
        pbSEPlay(Settings::TIP_CARDS_DISMISS_SE)
        break
      end
    elsif Input.trigger?(Input::BACK)
      if $adventure_guide_used
        pbSEPlay(Settings::TIP_CARDS_DISMISS_SE)
        break
      end
    elsif Input.trigger?(Input::LEFT)  # Triggers only when the LEFT button is pressed, not BACK
      @index -= 1 if @index > 0
    elsif Input.trigger?(Input::RIGHT)
      @index += 1 if @index < @pages - 1
    end
    if oldindex != @index
      pbDrawTip
      pbSEPlay("GUI sel cursor")
    end
  end
  $adventure_guide_used = false  # Reset the flag when the Tip Card is closed
end

These modifications only affect the adventure guide item, the first time you see a tip card, the back button will not close, this prevents it from accidentally closing and not seeing the following tip cards and ending up not being able to see them again.

If anyone is going to apply these changes, make a backup beforehand, it worked for my game, but you never know if it will work for everyone (in logic, it's supposed to work hahahaha)

I'm trying to improve the adventure guide, I wanted it to open a choice interface for which tipcard you would like to review, but I haven't been successful with that yet, I'm quite an amateur with script codes. :)
If you use groups, then the back button will close the Adventure Guide; that's already included in the code. Using groups will also solve your want for a "choice interface" that you describe, I'm pretty sure.

Based on how you're describing the behavior, it sounds like you aren't using groups so all seen tips are being shown in one continuous list (which, then that is correct that back button wont work). If you categorize your tips into groups, it will emulate how the Adventure Guide works in the mainline games, allowing you to jump between groups and using the back button to close the entire guide. If you only set up 1 group, you can change the
TIP_CARDS_SINGLE_GROUP_SHOW_HEADER settings item to true to show the group header, and in turn it should allow closing via the back button.
 

rafahbit

Trainer
Member
Joined
Oct 21, 2020
Posts
53
If you use groups, then the back button will close the Adventure Guide; that's already included in the code. Using groups will also solve your want for a "choice interface" that you describe, I'm pretty sure.

Based on how you're describing the behavior, it sounds like you aren't using groups so all seen tips are being shown in one continuous list (which, then that is correct that back button wont work). If you categorize your tips into groups, it will emulate how the Adventure Guide works in the mainline games, allowing you to jump between groups and using the back button to close the entire guide. If you only set up 1 group, you can change the
TIP_CARDS_SINGLE_GROUP_SHOW_HEADER settings item to true to show the group header, and in turn it should allow closing via the back button.
I used groups and tested without these changes, but it didn't work like you said.
I used pbShowTipCardsGrouped(:BATTLE) and pbShowTipCardsGrouped(:CONTROL), and in the battle group I put 6 tips, and when using adventureguide, it only shows a continuous list,
I used groups, I saw that you can switch between groups using the "A" and "s" keys, but what I'm trying to do is appear a list and you can choose what you want to see, without having to go through the others, something like that, and also, the adventureguide only works the way you said if you only use groups, if you use a normal showtipcard, it does not appear in the adventureguide.
These changes I made to make it work in my game were due to tipcards outside of groups, creating a group for a tipcard just doesn't please me hahahha
That's why I'm trying to make a list appear, because then, regardless of whether you used a group or not, it will appear in the adventure guide, if I can't, I'll use everything as a group :)
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
I used groups and tested without these changes, but it didn't work like you said.
I used pbShowTipCardsGrouped(:BATTLE) and pbShowTipCardsGrouped(:CONTROL), and in the battle group I put 6 tips, and when using adventureguide, it only shows a continuous list,
I used groups, I saw that you can switch between groups using the "A" and "s" keys, but what I'm trying to do is appear a list and you can choose what you want to see, without having to go through the others, something like that, and also, the adventureguide only works the way you said if you only use groups, if you use a normal showtipcard, it does not appear in the adventureguide.
These changes I made to make it work in my game were due to tipcards outside of groups, creating a group for a tipcard just doesn't please me hahahha
That's why I'm trying to make a list appear, because then, regardless of whether you used a group or not, it will appear in the adventure guide, if I can't, I'll use everything as a group :)
If the Adventure Guide is only showing a continuous list, that means only tips that are contained within one group have been seen. What happens when you set TIP_CARDS_SINGLE_GROUP_SHOW_HEADER to true? Does it only show the header of one of the groups?

As for the list, I guess yeah you can play with how you want it to appear. The way I've implemented it allows for moving between groups of tips like the real Adventure Guide does, but doesn't try to add a visual list of all groups because there isn't room on screen. I felt like they way I implemented married the two in a way where you can still get the functionality out of jumping between groups without taking up screen space.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
How are you so great, wrigty? Genuinely one of my favorite creators.
Thanks so much for this script that looks leagues better than what I homebrewed for my project lol in both appearance to the player and in code.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
What I eventually want is to emulate Scarlet/Violet's adventure guide.
I had a list like this before, but I ditched it for your plugin because it's nicer in other ways.
Is this kind of list planned, or should I go ahead and tweak the plugin?
20240302_111347.jpg


There's not enough room for the list AND the preview, but a list that then switches to the tip selected when you click it would be what I'm going for.
If you plan on doing that, I'll just wait.
 
Back
Top