I have done a conversion. It's not easy. Definitely NOT for the feint of heart or those prone to vertigo, dizzy spells or who get car sick.
But seriously, you can do it. I created a file (copied and pasted from corechange.txt) of the functions that need updated with the realm member, Here it is:
Code: Select all
const _DEFAULT_REALM := "britannia";
CreateItemAtLocation( x, y, z, objtype, amount := 1, realm := _DEFAULT_REALM );
CreateItemCopyAtLocation(x, y, z, item, realm := _DEFAULT_REALM);
boat.move_offline_mobiles(int x, int y, int z[, string realm]);
(If realm is not set, Boat-realm is used.)
CreateMultiAtLocation( x, y, z, objtype, flags := 0, realm := _DEFAULT_REALM );
CreateNpcFromTemplate( template, x, y, z, override_properties := 0, realm := _DEFAULT_REALM);
FindPath( x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM, mobilesblock := 0, searchskirt := 5 );
GetHarvestDifficulty( resource, x, y, tiletype, realm := _DEFAULT_REALM );
GetMapInfo( x, y, realm := _DEFAULT_REALM );
GetRegionString( resource, x, y, propertyname, realm := _DEFAULT_REALM );
GetStandingHeight( x, y, startz, realm := _DEFAULT_REALM );
GetWorldHeight( x, y, realm := _DEFAULT_REALM );
HarvestResource( resource, x, y, b, n, realm := _DEFAULT_REALM ); // returns b*a where 0 <= a <= n
ListGhostsNearLocation( x, y, z, range, realm := _DEFAULT_REALM );
ListItemsAtLocation( x, y, z, realm := _DEFAULT_REALM );
ListItemsNearLocation( x, y, z, range, realm := _DEFAULT_REALM );
ListItemsNearLocationOfType( x,y,z, range, objtype, realm := _DEFAULT_REALM );
ListItemsNearLocationWithFlag( x,y,z, range, flags, realm := _DEFAULT_REALM );
ListMobilesNearLocation( x, y, z, range, realm := _DEFAULT_REALM );
ListMobilesNearLocationEx( x,y,z, range, flags, realm := _DEFAULT_REALM );
ListObjectsInBox( x1,y1,z1, x2,y2,z2, realm := _DEFAULT_REALM );
ListMultisInBox( x1,y1,z1, x2,y2,z2, realm := _DEFAULT_REALM );
PlayMovingEffectXYZ( srcx, srcy, srcz, dstx, dsty, dstz, effect, speed, loop := 0, explode := 0, realm := _DEFAULT_REALM );
PlayStationaryEffect( x, y, z, effect, speed, loop := 0, explode := 0, realm := _DEFAULT_REALM );
10-17 Austin
Added : Added uo::MoveObjectToLocation( object, x, y, z, realm := _DEFAULT_REALM, flags := MOVEOBJECT_NORMAL );
Function will replace MoveCharacterToLocation(), MoveItemToLocation(), and MoveObjectToRealm()
Currently moves boats, mobiles, and items.
You have to be careful because some calls to functions do not contain some values because the core em module has a default value for them. This applies mainly to flags.
Example:
CreateNPCFromTemplate ("troll1" x,y,z);
in POL 95 is a valid call because the override flags have a default value. So when you convert this to POL 96 it needs to have a value before the realm parameter.
It will need to look something like this:
CreateNPCFromTemplate("troll1",x,y,z,0,realmname);
Search your files for the functions listed there and add the realm parameter. Also you might want to go ahead and change any MoveItemToLocation and MoveCharacterToLocation function calls to MoveObjectToLocation because the former functions WILL be deprecated later and will cause compile errors in future POL versions (probably POL 97 I'd guess).
Remember to change the definition of spellbook in itemdesc.cfg in \pol\config from Container to Spellbook.
As I said it is not easy but it can be done.
Most bugs after the conversion will be caused from a missing 'realm' member from a function call.