VXAce Need help with modern algebra Quest Journal

I wanted to change the icon so each individual quest had its own location Icon. Right now it just has a default map icon. All quests locations share the same icon. I tried fixing it myself and couldn't. I've added a screenshot and the script link to show what I mean. I think I'm using a old version of the script but it's the only one I could find.
ICONS = {
some lines of code inbetween
location: 231

There's also a line that says:

Ruby:
bmp = Cache.picture(@quest.banner)

...that shows up twice in his code and looks terribly suspicious. Especially its second call.
Nvm. Google A.I. finally gave me the right answer. Now, I want to change the generic human icon to the quest givers ghibli heads.
Next time I'll ignore your help requests. Just go google them.
And let me add that I do think the last part of my previous reply was correct.
Nvm. Google A.I. finally gave me the right answer. Now, I want to change the generic human icon to the quest givers ghibli heads.
That's a little bit interesting as normally AI stuff does not correctly give accurate code.

Also would be of use if you shared what you found so that we can evaluate the code and maybe help others.
The answer for the first should be the same for the second part your asking for.
Also would be of use if you shared what you found so that we can evaluate the code and maybe help others.
Isn't it against the forum rules to share ai-generated code?

In any case, here is my take on drawing specific icons for the quests, you may put this script below Modern Algebra's script and follow the installation and description.

Ruby:
#==============================================================================
# Quest Journal - local quest data addon
#------------------------------------------------------------------------------
# Author: Timtrack
# date: 05/01/2026
# Requires: modern algebra's Quest Journal for VX Ace 1.03
#==============================================================================

$imported ||= {}
$imported["TIM-MA_QuestJournal-LocalData-addon"] = true

#==============================================================================
# Description: add new entries to the quest objects, given s a BASIC_DATA_TYPES:
#  q[:icons][s] = icon_id
# will change the icon displayed with the basic type, if none is specified,
# ICONS[s] will be used instead.
#  q[:vocab][s] = "text"
# will change the name if the data displayed, if none is specified, VOCAB[s]
# will be used instead.
#
# Examples
# q[:icons][:location] = 3
# q[:icons][:client]   = 18
# q[:vocab][:location] = "Town"
#==============================================================================
# Installation: put this script below the original script, you may put it above
# or below your quest list script.
#
# In method self.setup_quest(quest_id) from QuestData (where you list your
# quests), replace the first line which should be:
# q = { objectives: [] }
# with:
# q = { objectives: [], icons: {}, vocab: {} }
#
# You may then simply edit your quest list script to add entries such as
# q[:icons][x] or q[:vocab][x]
#==============================================================================
# Term of use: free for commercial and free games
#==============================================================================

#==============================================================================
# Game_Quest
#==============================================================================
class Game_Quest
  attr_reader :icons, :vocab
  #--------------------------------------------------------------------------
  # alias method: data_symbol_array
  #--------------------------------------------------------------------------
  alias tim_qlocal_data_symbol_array data_symbol_array
  def data_symbol_array
    tim_qlocal_data_symbol_array + [:icons, :vocab]
  end
 
  #--------------------------------------------------------------------------
  # alias method: default_value_for
  #--------------------------------------------------------------------------
  alias tim_qlocal_default_value_for default_value_for
  def default_value_for(method)
    case method
    when :icons, :vocab then {} #hash table
    else
      tim_qlocal_default_value_for(method)
    end
  end
end #Game_Quest

#==============================================================================
# Window_QuestData
#==============================================================================
class Window_QuestData < Window_Selectable
  #--------------------------------------------------------------------------
  # new method: quest_icon -> get icon associated with data if in quest obj,
  # else, return the default icon
  #--------------------------------------------------------------------------
  def quest_icon(data_type)
    @quest.icons[data_type] || QuestData::ICONS[data_type]
  end
 
  #--------------------------------------------------------------------------
  # new method: quest_vocab -> same idea as quest_icon but for the text
  #--------------------------------------------------------------------------
  def quest_vocab(data_type)
    @quest.vocab[data_type] || QuestData::VOCAB[data_type]
  end
 
  #--------------------------------------------------------------------------
  # overwrite methods: draw_x for x in QuestData::BASIC_DATA_TYPES
  #--------------------------------------------------------------------------
  QuestData::BASIC_DATA_TYPES.each do |data_type|
    define_method(:"draw_#{data_type}") {
      draw_basic_data(@draw_y, quest_icon(data_type), quest_vocab(data_type),
                      @quest.send(data_type))
    }
  end
end #Window_QuestData
That's a little bit interesting as normally AI stuff does not correctly give accurate code.

Also would be of use if you shared what you found so that we can evaluate the code and maybe help others.
The answer for the first should be the same for the second part your asking for.
It took me hours to get the right answers. I was trying to figure it out myself. So I wouldn't feel completely incompetent. I had to make many changes. I don't remember them all so I just added a text file of the final working version. There maybe a line of unnecessary code from one of the previous wrong answers. But it didn't affect the end result. It's basically wherever you see the word 'loc' Script code for 'location' for anyone not good with scripts.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-modern-algebra-quest-journal.181772/