Using ultra lighting and hoping to remove the lantern popup (Solved)

qWhat I mean is in the screenshot, if you hit the input key and when the light turns on the name for it comes up too. I've tried peeking into the script to see if I could fix it myself, but I don't know enough about ruby without breaking it in the process. 😢I'm hoping there's a way I can have it not show up, but if it's too deeply ingrained into the script I can just live with it. 😅
Could you post a screenshot of the event where you give this to the player. I use this script and - at least for the torch - it doesn't happen to me. So either the flashlight is intrinsically different in some way from the torch, or you're calling it in a different way.

For the screenshot, please use Alt+PrtSc so that we only get the event page(s) not your whole desktop, it makes it much easier to read.
Go to the KUL | Item Lantern script, search and comment the following 2 lines (put a # before the code so the entire line turns green):
Code:
$game_map.lantern_popup = Lantern_Popup.new(light_items[li+1])
...
$game_map.lantern_popup = Lantern_Popup.new(light_items[0])

The code will look like this:
Code:
    if li
      if (li + 1) < light_items.size
        #$game_map.lantern_popup = Lantern_Popup.new(light_items[li+1])
        give_light(light_items[li+1].light_id)
      end
    else
      #$game_map.lantern_popup = Lantern_Popup.new(light_items[0])
      give_light(light_items[0].light_id)
    end

This will disable the popups when activating a lantern 🙂
Thank you Khas! ; w ; And one more question if I may, where would I put the script lines for changing the sprite graphic and playing a click noise for when it gets turned on and off? If I can't change the sprite I'll settle for just the click. 😤
You may create new lights with whatever sprites you like in the section below. Please read the instructions carefully.
Code:
#-------------------------------------------------------------------------------
# * Lights
#-------------------------------------------------------------------------------
# To create a light, use the following model and paste the code below.
#
# "name" => {
#    :light => "file" / {2 => "file2", 4 => "file4", 6 => "file6", 8 => "file8"},
#    :opacity => a, :variation => b,
#    :static => true/false, :shadows => true/false,
#    :group => "group name",
#    :offset => [ox, oy] / {2=>[ox2,oy2], 4=>[ox4,oy4], 6=>[ox6,oy6], 8=>[[ox8,oy8]}
#  },
#
#

My policy is that game logic implementation is responsibility of the user (you can easily implement a lanterns system with events, integrated with my script), however I'll give a quick code that may help.

For playing sound effects, you can use this script code:
Code:
Audio.se_play(filename, volume, pitch)

Then you may replace the "refresh_lantern" method code by this code (change the Audio.se_play file names):
Code:
  def refresh_lantern
    return if $game_map.interpreter.running?
    $game_map.lantern_popup.dispose if $game_map.lantern_popup
    $game_map.lantern_popup = nil
    light_items = []
    for item in $game_party.items
      light_items << item if item.light_id.is_a?(String)
    end
    if light_items.empty?
      drop_light
      return
    end
    clight = nil
    if carrying_light?
      clight = @light.id
      drop_light
    end
    light_items.uniq! { |item| item.light_id }
    li = light_items.index { |item| item.light_id == clight }
    if li
      if (li + 1) < light_items.size
        $game_map.lantern_popup = Lantern_Popup.new(light_items[li+1])
        give_light(light_items[li+1].light_id)
        Audio.se_play("turned on click", 80, 100)
      else
        Audio.se_play("turned off click", 80, 100)
      end
    else
      $game_map.lantern_popup = Lantern_Popup.new(light_items[0])
      give_light(light_items[0].light_id)
      Audio.se_play("turned on click", 80, 100)
    end
  end
Maybe I should specify what I really meant. 😅 I know about how to make new graphics and lights in the script. What I meant was making it look like the character is holding the lit flashlight when it's turn on, then not when its off. There's a screenshot of two events that kind of show what I mean.

The one on the left in the picture is what the player sprite previouly looked like with the light on and the one on the right is how it now looks with the light on. One character sprite has a lil' ball of light on it and the other doesn't.

Sorry for the confusion, had a bit of a dumb moment and forgot that sprite means basically any graphic in rpg maker. 😢
However, the where to put it is still answered for me and for anyone curious that finds this thread later:

$game_player.set_graphic(character_name = "spritesheet", character_index = 3)

This is what I'm using to change the character graphic. For events it's $game_map.events[id] instead of just player. The link is for the page on this site where I learned this from. 😍

Original thread: https://forums.rpgmakerweb.com/threads/using-ultra-lighting-and-hoping-to-remove-the-lantern-popup-solved.90471/