Ryandor.com

Forums
It is currently Fri Jul 04, 2025 8:06 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Fri May 14, 2004 5:38 am 
Offline
Grand Master
Grand Master
User avatar

Joined: Thu Aug 07, 2003 6:57 am
Posts: 472
Anyone have any juicy details/bits of info they'd like to share concerning the .def files in the installation folder of UO? :P

Obviously it's to tell the client to use "this art" instead of "that art" and such, but how exactly does it work - and for which clients, 2D or 3D?

_________________
-= Ho Eyo He Hum =-


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 14, 2004 7:14 am 
Offline
Posting Whore
Posting Whore

Joined: Fri Aug 29, 2003 6:21 pm
Posts: 1434
Location: Colorado Springs, Co.
They are .dif not .def files but the following post might provide some info on how annoying they can be (or helpful if used properly)

http://www.ryandor.com/forum/viewtopic.php?t=1712&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1674&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1713&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1656&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1566&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1541&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1534&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=1313&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=952&highlight=tilematrixpatch

http://www.ryandor.com/forum/viewtopic.php?t=869&highlight=tilematrixpatch

In other words they act as additional static files but are map specific to put it in simple terms.

Dev

_________________
"So...if crazy people don't know their crazy...does that mean your only sane if your know your crazy?"


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 14, 2004 12:50 pm 
Offline
Grand Master
Grand Master
User avatar

Joined: Thu Aug 07, 2003 6:57 am
Posts: 472
Heh no. I wrote .def files and I meant .def files :)
I know what the .DIF(F) files are already thank you ;)

_________________
-= Ho Eyo He Hum =-


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 14, 2004 1:01 pm 
Offline
Not your daddy
Not your daddy

Joined: Mon Nov 18, 2002 2:18 am
Posts: 1224
Location: Oregon State
there is one thread on RunUO I think.. could have possibly been another forum, but I am almost certain its RunUO, having to do with some tiledata editing, a guy pasted his (whatever).Def file, and what the entries were.

I will try to find it as well.

_________________
Forget what you know, know what you forget.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 14, 2004 4:59 pm 
Offline
Posting Whore
Posting Whore

Joined: Fri Aug 29, 2003 6:21 pm
Posts: 1434
Location: Colorado Springs, Co.
The .def files even used for EMU's?

(edit)
I did find some basic info on .def files in the Orbsydia forums
http://www.orbsydia.com/forum/showthread.php?t=1061


Dev

_________________
"So...if crazy people don't know their crazy...does that mean your only sane if your know your crazy?"


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 15, 2004 1:06 pm 
Offline
Grand Master
Grand Master

Joined: Thu Jul 17, 2003 8:54 am
Posts: 971
I wrote that post over on the Orbsydia forums. :)

The .def files are entirely client side. So any EMU that supports the newer clients will also support .def files.

The .def files are all text files, so they are pretty easy to modify. There are several different .def files, and I haven't figured them all out yet. I know that bodyconv.def tells the client what animation ID's to assign to the animations in anim2.mul (Blackthorne's Revenge) and anim3.mul (Age of Shadows).

But probably the most useful .def file is body.def. Body.def basically does the same thing as those utilities that copy an index in anim.mul so you can use an existing animation with a new gump.

Here's an example. Say I want to add a new type of armor tunic, and I want to use the existing chain tunic for the character animation.

First you need to understand how the client links animations to gumps. Take a look at any animation ID and you will notice that the following formula is used to link animations to gumps:

animation ID + 50,000 = male gump ID
animation ID + 60,000 = female gump ID

(If the female gump ID isn't present, the animation will use the male gump ID for both male and female).

This is how the client knows which animations go with which gumps.

So to add my new armor tunic gump, I need to use a gump ID that has a free (empty) animation ID. In my case, I decided to use the empty animation ID 426, which means I have to put my new gump at gump ID 50426 (hex 0xC4FA) since 426 + 50,000 = 50426. If I want a female gump for the tunic as well, that would go at gump ID 60426 (hex 0xEC0A).

So now I have my new gump, and it is "attached" to an empty animation ID (426). Here is where you modify body.def to assign an existing animation to that ID number.

Open body.def in a text editor. The format for body.def is:

<ORIG BODY> {<NEW BODY>} <NEW HUE>

So for my new tunic, I add this line to body.def:

426 {538} 450

426 is my empty animation ID that attaches to my gump. 538 is the animation ID for a chainmail tunic. 450 is the hue that my new tunic animation will be dyed.

Finally, you need to add an art tile to represent the new tunic, and you set the AnimID Offset flag for that item to 426 (the new animation ID). Don't forget to also set the "wearable" flag and set the layer to the appropriate layer for your item (in this case, layer 13).

As you can see, once you get the hang of it, this is a lot easier than using one of those utilities to duplicate animation numbers for the same purpose.

CAUTION: Body.def assigns new animation ID's but you will not see these as being in use in utilities like InsideUO. So you need to make sure that animation ID's you want to use aren't being used in body.def already.

Hope this info is helpful!

_________________
-= HellRazor =-
Shattered Sosaria is coming!
http://www.shatteredsosaria.com


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 15, 2004 1:15 pm 
Offline
Slayer of Fools
Slayer of Fools
User avatar

Joined: Tue Jul 02, 2002 4:54 pm
Posts: 1289
So if say we wanted to use the 2d client but with all of the 3d monsters we could modify the def files above and do this?
I hate the 3d client, but there are some things, like all the elementals and horses used for monsters that have thier own artwork in the 3d client that I would rather see. The efreeti and seahorse are 2 good examples of this.

_________________
This space for rent.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 15, 2004 2:00 pm 
Offline
Grand Master
Grand Master

Joined: Thu Jul 17, 2003 8:54 am
Posts: 971
I haven't really messed with the 3D client much but I just took a look and it appears the 3D client uses .def files too. So I assume they will work.

I'm pretty sure that the .def files are also what tells the client to substitute certain 2D artwork for certain 3D models (i.e., there are some items that have graphics in the 3D client but in the 2D client they substitute one of the old existing items for them - I think the japanese wearables are an example of that).

_________________
-= HellRazor =-
Shattered Sosaria is coming!
http://www.shatteredsosaria.com


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 15, 2004 2:09 pm 
Offline
Slayer of Fools
Slayer of Fools
User avatar

Joined: Tue Jul 02, 2002 4:54 pm
Posts: 1289
Would be cool if we could do that. Some of the items too, like the dragonscale armor.

_________________
This space for rent.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 15, 2004 4:06 pm 
Offline
Apprentice
Apprentice

Joined: Sun Nov 23, 2003 1:30 pm
Posts: 29
Well 3D clients work a little different, 2D clients actually have one picture for each frame in the animation, while 3D works with models.. You'd have to convert all those models first (which might be a little hard to work).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group