| Welcome Guest ( Log In | Register ) | Resend Validation Email |
|
|
|
![]() ![]() ![]() |
![]() |
XmlTitle Attachment, customize player/creature titles
|
![]() |
| Lord Hog Fred |
Posted: August 08, 2006 07:02 pm
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 91 Member No.: 172 Joined: June 17, 2006 |
Hello, it's me again with another idea. Sorry, I've just been really motivated on ideas and stuff for UO in general lately and thought I'd let you know my ideas
Anyway, how about an XmlTitle attachment that when attached to a mobile would give them an added beneath their name, so not like a normal title that would appear next to their name such as "Eric, The Custom Titled" but it would appear in their 'properties list' (if mobiles have properties lists) as: "Eric" "The Custom Titled" Could possibly be used for items as well to give them special titles to mark them as being from a particular event or quest such as "Christmas 2006" or "First Place Scavenger Hunter 2/11/06". Ok I'm done now, sorry about going on about all these additions -------------------- |
| ArteGordon |
Posted: August 08, 2006 08:28 pm
|
||||
![]() God of XMLSpawner ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 2,899 Member No.: 2 Joined: December 26, 2005 |
Here is an XmlTitles attachment that will allow you to add a title to a target player or creature. You can also add multiple titles just by adding multiple attachments. It has the following constructors public XmlTitle(string name) public XmlTitle(string name, string title) public XmlTitle(string name, string title, double expiresin) so for example adding the following attachments [addatt xmltitle ranking "First Class" [addatt xmltitle type Basketweaver would result in a display of playername First Class Basketweaver You could also spawn creatures with titles with spawn entries like orc/ATTACH/XmlTitle,title,Master Chef this would spawn an orc with the name and title displayed as orcname Master Chef You can also specify an expiration time (just like with any other attachment) for time limited titles. [addatt xmltitle type Basketweaver 30 would assign the title of Basketweaver to the target for 30 minutes. You might want to hand out time-limited titles as rewards for quests, for example, by specifying the XmlTitle attachment in the AttachmentString property of questholders. Note that the 'name' of the attachment isnt really important unless you plan on adding multiple XmlTitle attachments and you want to keep them separate (in general if you add an attachment with the same type and name as an existing one, then it will replace the existing one). To use this attachment you need to make the following mod to the AddNameProperties method in Playermobile.cs
and if you want to apply it to creatures, you need to make this mod to the AddNameProperties method in basecreature.cs
You could also mod scripts such as BaseArmor.cs or BaseWeapon.cs in the same way to add title support to those items as well. Attached File ( Number of downloads: 71 )
XmlTitle.zip-------------------- ![]() |
||||
| Lord Hog Fred |
Posted: August 08, 2006 09:46 pm
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 91 Member No.: 172 Joined: June 17, 2006 |
Cool thanks Arte, you're hero.
I looked at the script and it seems to ahve a check for being added to items so I added the XmlTitle check to basearmor and added a title, only prob is that it replaces the name of the item and shifts everything down. No biggy as I wasn't really gonna use it for items but just thoguth I'd let you know. Again thanks a lot -------------------- |
| ArteGordon |
Posted: August 08, 2006 09:52 pm
|
![]() God of XMLSpawner ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 2,899 Member No.: 2 Joined: December 26, 2005 |
yeah, I just made a little change to fix up the formatting a bit.
The name replacement you saw with the item is because items typically have null names, so it interprets the title string as the name. If you give the item a name, I dont think that it will do that. -------------------- ![]() |
| koluch |
Posted: March 08, 2008 02:53 am
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 53 Member No.: 279 Joined: August 30, 2006 |
The latest release doesnt have a AddNameProperties in Playermobile.
Is there another place to address this now that it is changed? (sorry to bug ya Thanks, Koluch |
| ArteGordon |
Posted: March 08, 2008 05:41 am
|
||||
![]() God of XMLSpawner ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 2,899 Member No.: 2 Joined: December 26, 2005 |
instead of modding the existing one, just add the entire posted override to playermobile.cs
-------------------- ![]() |
||||
| koluch |
Posted: March 09, 2008 04:10 pm
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 53 Member No.: 279 Joined: August 30, 2006 |
how can you remove a title given to a player using the addatt xmltitle thingee?
|
| ArteGordon |
Posted: March 09, 2008 05:56 pm
|
![]() God of XMLSpawner ![]() ![]() ![]() ![]() ![]() Group: Admin Posts: 2,899 Member No.: 2 Joined: December 26, 2005 |
just remove the attachment and the title will go away.
-------------------- ![]() |
| Hanse46 |
Posted: April 06, 2008 04:39 am
|
||||
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 31 Member No.: 608 Joined: March 08, 2008 |
I added the XmlTitles to base create and have this error, any help anyone?
and here is the section is added this:
|
||||
| Greystar |
Posted: April 06, 2008 02:36 pm
|
||||||
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 54 Member No.: 37 Joined: January 20, 2006 |
Did you remember to add using Server.Engines.XmlSpawner2; to the top of basecreature.cs? -------------------- |
||||||
| Hanse46 |
Posted: April 06, 2008 08:41 pm
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 31 Member No.: 608 Joined: March 08, 2008 |
Thank you Greystar, I overlooked that part, now it works.
|
| Greystar |
Posted: April 07, 2008 03:46 pm
|
||
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 54 Member No.: 37 Joined: January 20, 2006 |
Nah you didn't overlook it. It's not included in all postings I just know it's needed in whatever file MIGHT access anything to do with XMLSpawner. -------------------- |
||
![]() |
![]() ![]() ![]() |