since I'm working on completely overwriting large portions of my game, instead of the normal "put everything at the end above main", there's some pros and cons to me providing the "full" scripts. The most obvious is the fact that I'm going to exceed my line maximum for a single post. All the functioning parts have been posted, but the locations have not.
here's a rough map:
# * Completed Snippets (And Locations) *
#-------------------------------------------------------------------
# line 135-143 of Game_Enemy = element_ranks(element_id) defines MXP/EXP split
# line 142, 150-171, 195 of Scene_Battler_2 = meta exp code vs. elements.
# line 23, 55-58 of Game_Actor = base meta exp codes
# line 113-120 of Game_Actor = meta exp code base
# line 16, 40-47 of Window_BattleResult = meta exp battle reward
# line 215 of Scene_Battler_2 = meta exp battle reward window
note that I created a new element called "Experience". All elements have 6 levels, 1 through 6. By editing Game_Enemy as follows:
#--------------------------------------------------------------------------
# * Get Element Rank Value
# element_id : Element ID
#--------------------------------------------------------------------------
def element_ranks(element_id)
# Get a numerical value corresponding to element
result = $data_enemies[@enemy_id].element_ranks[element_id]
return result
end
I was able to allow myself easy access to their element numbers, rather than that 100/200/0/-100 gibberish it would spit out otherwise. Once I had numerical access, I could do this:
#=============================================================
# *** Metaphysical Exp Processing ***
# $data_enemies[i].element_ranks[17]
# where i is the enemy id number
case enemy.element_ranks(17)
when 1 # Barbarians & Giants
exp += enemy.exp
when 2 # Monsters & Monks
exp += Integer(0.75 * enemy.exp)
mexp += Integer(0.25 * enemy.exp)
when 3 # Dragons & Elves
exp += Integer(0.50 * enemy.exp)
mexp += Integer(0.50 * enemy.exp)
when 4 # Wizards & Warlocks
exp += Integer(0.25 * enemy.exp)
mexp += Integer(0.75 * enemy.exp)
when 5 # Spirits
mexp += enemy.exp
when 6 # Bad Karma
mexp -= enemy.exp
end
in My Scene_Battle 2.
Note that this engine is only using two forms of experience, and using a single element (#17) to divide it. I could just as easily make a dozen new elements each determining what portion of experience is lost or gained. For example, I could make a "book learning", a 'body building", a "magic learning", a "faithfulness" and a "corruption" pool all related to what monsters I killed or what tasks I performed. I just didn't need more than two pools at the time.