Blade of Darkness holds true to the greatest of hack and slash legends, combining sorcery, knights, and swords with god forsaken enemies that deserve to have their arms slashed off with a broadsward. Blade of Darkness looked excellent in 2001, and still delivers its gore well today. Holding True to it's genre it offers modders both custom maps and scripts. Relevent Links Fansite Mod List Modding Community

Post tutorial Report RSS Level Editing Scripting by Prospero. Part. 2

Second Part of the tutorial, Stopping "Ice Skating".

Posted by on - Basic Client Side Coding

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

python code:
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:

python code:
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 favorite graphics program and size to 640x480. Save in BODLoader\Maps\MyMap folder. They tend to appear lighter in the game than in graphics program 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:

python code:
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

more later.....

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: