Rodril wrote:Seems, file host has not handle the video, i've uploaded it to Youtube: https://youtu.be/lipriutf3SI .
I've forgot to mention, this script works only with MM8.
Script generates few new tables in "...Data\Tables folder", one of them is "Potion settings.txt", something can be edit there.
Also there is new array in game - evt.PotionEffects . It consist of functions, indexed according to "Pot Id" column of TXT file. How it works: when player uses potion (drink it or uses on other item), if evt.PotionEffects have function at index of this potion, function will be executed, if function returns "true" original behaivor of potion is bypassed.
Here is example, effect is senseless, just to see it in action:
Code: Select all
-- According to "Potion settings.txt", 1 is item 221 - catalyst potion
evt.PotionEffects = function(IsDrunk, Target, Power)
-- IsDrunk - true if player drinks potion, false - if potion used on item
-- Target - Player structure if IsDrunk == true, otherwise Item structure
-- Power - number - power of potion
if IsDrunk then
Target.HP = Target.HP/2
Item.Broken = true -- note, first you have to allow potion to be used on items in "Potion settings.txt"
return true -- don't execute usual effect
More detailed explanation is in video, i'm sure it is possible to watch it now.
So... just for example, let's say that I wanted to swap the effects of Blue and Green potions so that Blue is awaken and Green is restore magic. From what I see in this video, it looks like what I'd need to do is just add two new ones? Or is there something more obvious that I'm missing?