JS-PROGRESSIVE-LOAD
Room 87 has been created to give builders an easy, simplified way to do what is called 'progressive loading'. Progressive loading is where the percentage chance an item will load is dependant on how many are currently in the game. Usually the more instances of a particular item that are in existance, the lower the chance for another to load.
The function is used as follows:
Room.at(87).progressiveLoad(progObj,progTarget,progPerc,'args');
<progObj> replace this with the number of the object you wish to load
<progTarget> this should be replaced with the person who the object will
load on. Usually it will be self but could be actor or subject
<progPerc> replace this with the minimum percent chance that your object
will load. This is usually a small number.
args within this option you should place pairs of numbers which
correspond to the differing percentages and the limits for
when they are valid. You may also include the option 'equip'
in here, which tells the function to load the objects and
immediately make the target try to wear the item.
In addition you can include the option 'tweak' followed by a
number which will put the item if loaded through the tweak
code to tweak at a percentage of the number given.
Note: The tweak and equip option can both be used at the
same time, this will cause no issues.
If you wanted your mob to equip the magical sword Frostform 100% of the time
up until a limit of 2 was reached, then have the sword load at a 1% chance
you would do the following:
Room.at(87).progressiveLoad(10026,self,1,'100 2 equip');
If you wanted the above item to tweak at 25% if it loads you would
change the syntax to the following.
Room.at(87).progressiveLoad(10026,self,1,'100 2 equip tweak 25');
Now if you wanted the item Thundercage to load 50% of the time until one was
popped, then 10% until 5 were loaded then 2% until 9 were and then default
at 0.5% after that you would do the following:
Room.at(87).progressiveLoad(10025,self,0.5,'50 1 10 5 2 9');
Last edited by Engada in March 2006.