095 to 096

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.

Moderator: POL Developer

Post Reply
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

095 to 096

Post by Poi »

Ok, ive ready about 096 and looked at images, it looks alot better then 095, plus obviously its always good to stay up-to-date, but i know and have been told going form one core to another is hard, very hard, but is there an update version, only the cvhanged files included, or is there a converter or a guide somewhere?
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

theres no converter programs that exist that I know of. Your only guide is to actually go through the core-changes.txt and try to understand all of the changes since POL095 (which theres a ton) and make sure you know what it means for your scripts and how they need to be updated. For many of us, converting from 095 to 096 took months.
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Post by Poi »

Well... i guess im stuck.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

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.
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

Thats not it... theres a lot more bugs that'll get caused by just random stuff depending on the scriptbase you use. Also, you never covered spellcasting in general. Spellcasting would cease to work correctly if you dont take care of everything they say about it in your scripts.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

I post a disclaimer then:
NOTE: Any suggestions given by me may or may not work completely or as promised or at all. The help was free so it may be worth exactly what you paid for it.

Now, maybe you could add to my post with further things that one should look for CWO.
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

well I hate to give a vague answer but it completely depends on your scriptbase and what its doing. I could only suggest that you go through the whole changelog and consider what each thing means to your scripts and set aside a long time or even another instance of the server for testing purposes. And hope that your players actually do test. Mine didnt and inherited a lot of bugs...
I pulled spellcasting out of my head because til this day I'm still fixing it and I converted back in December.
Last edited by CWO on Thu Jun 22, 2006 12:45 pm, edited 1 time in total.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

Forgot this in my original reply.
Add this line to the entry for spellbook as well.

SpellType Magic

As for other conversion info, it may follow as I continue my muddling througyh the process myself.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

For purposes of simplicity it is always assumed unless otherwise stated that folks are using the latest "official" POL Development Team Distro release I would think but you are correct. So Poi, what script base are you trying to convert? Is it the POL 95 Distro?
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Post by Poi »

Yes it is, but uhh.. i just don't know how/want to redo all my custom scripts for this and if something goes wrong and my members quit or somehting and yeah.. i just really don't want to stay at one spot on POL when everyone else is 10 spots ahead of me.. I don't know what i should do because eventually i assume 095 support will cease to exist.. i guess by then i would be pretty good at escript, but yeah.. i just don't know.. Im using 095 core though.
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

just really don't want to stay at one spot on POL when everyone else is 10 spots ahead of me
I don't think everybody is 10 spots ahead of you.
Imho there are only a few shards running 96 yet. Mostly the ones of Pol Devs or very old pol veterans. Even for the last group it took a lot of work to convert the whole scriptbase. In my case about 80-100 hours over the test time of pol 96. If you are new, it will take you much longer cause you perhaps don't know what these changes in corechanges.txt exactly mean.
In this case imho you should do this on a test shard not on a live shard or wait for the distro on 96. Cause your players won't like if the server is down :wink:
If you further plan to convert your scripts, the only way is to get through the corechanges. Depending of your system linux/windows you could use search programs to detect which changed command/config is in what file of your own system. Both windows and linux have these functions.
Post Reply