SEVERANCE, BLADE OF DARKNESS

Prospero's pages

Updated July 21, 2005

HOME PAGEAUTHORS > PROSPERO > BOD PYTHON SCRIPTING (02)

 

Tut2. Stopping 'Ice Skating'.

As you proceed to build your map in the LED and add new parts, you will eventually encounter the 'Ice Skating' syndrome where the Player will slide about when entering certain areas. This is because when the map is first loaded, certain info on the structure is compiled into files in a 'pak' folder which is created in the main map folder.
You need not pay any attention to this as it takes care of itself. However, this folder and files is only created if it does not exist and making changes to your map will confuse the engine if these files contain info about an earlier version of the
*bw file. This folder should be removed everytime you recompile the map.

To achieve this, add this code to your
cfg.py file


import os

try:
    os.remove("..\\..\\Maps\\MyMap\\pak\\BODPak.dat)
    os.remove("..\\..\\Maps\\MyMap\\pak\\pf.dat")
except:
    pass


This will force an update of the files. When you have finished building the map structure, delete this code to save a bit of load time. Speaking of which, as you add to your map the load times will increase and you will find the loading bar will reach the end before the map has finished loading. To adjust this, look at your cfg.py for the line:

LoadBar.ECTSProgressBar(333,"BladeProgress.jpg")

Increase the value 333 (or whatever) as your load times increase. (It's mostly guesswork, and maps don't always take the same times to load.) You can make a
Blade_progress.jpg if you like. Use fav graphics prog and size to 640x480. Save in BODLoader\Maps\MyMap folder. They tend to appear lighter in the game than in graphics prog so allow for this. BOD will look for a file of this name, but it will cause no probs if you don't have one. When the load bar reaches about halfway BOD will look for "BladeProgress2.jpg". Again, this is optional.

One more little thing I have found. If you are playing a RAS map and stop and load a custom map, you might find that the Player will maybe not be the one you were expecting. The Player from the RAS map will continue into the custom map at their current level and inventory.. Use this code before
LoadBar code in cfg.py to clear out current Player info:


import MemPersistence
try:
    Bladex.DeleteStringValue("MainChar")
    props=MemPersistence.Get("MainChar")
    props[2]["Objects"]             = []
    props[2]["Weapons"]             = []
    props[2]["Shields"]             = []
    props[2]["Quivers"]             = []
    props[2]["Keys"]                = []
    props[2]["SpecialKeys"]         = []
    props[2]["Tablets"]             = []
    props[2]["InvLeft"]             = None
    props[2]["InvLeft2"]            = None
    props[2]["InvRight"]            = None
    props[2]["InvLeftBack"]         = None
    props[2]["InvRightBack"]        = None
except:
    pass