Journal customization - How To

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 098.

Moderator: POL Developer

Post Reply
Pericolo
New User
Posts: 3
Joined: Fri Apr 21, 2017 11:52 pm

Journal customization - How To

Post by Pericolo » Sat Apr 22, 2017 1:01 am

Hi there guys,

I want to apologize for my english that could be not that good, and also if it is the wrong section to write.

I'm working on a highly customized shard based on pol 098, and I would like to make some changes on the journal behavior.

In this shard the character name attribute is actually is race, while his name is saved on a cprop, don't ask me why, and I can't switch them because there are a lot of script based on this configuration, but it makes really hard to read the journal because you only see the race and the speech color of who is speaking.

Anyway every character has the way to assign someone an alias, always saved on a cprop, and what I've tried to do is to hook the unicode speech message packet [0xAE] and overwrite "name" filed with this alias, so that when someone you have assigned a name is talking you can recognize him in the journal. It didn't work. I think this is not the rule "name" field is made for.

I figured out that I can't obtain my purpose with escript, and I should consider the idea to customize pol source code and compile it, but I can't find on git pol 098 suorce code.

Any suggestions? I'm also thinking about to upgrade everything to pol 099, but I'm not entirely sure of the retrocompatibility.


Thank you for reading and for help!

Pericolo
New User
Posts: 3
Joined: Fri Apr 21, 2017 11:52 pm

Re: Journal customization - How To

Post by Pericolo » Sun Apr 23, 2017 2:25 am

My bad guys, I was reading and writing "Name" field as a unicode string (also with wrong offset), but it is not. Now it is working!

Harley
Grandmaster Poster
Posts: 297
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: Journal customization - How To

Post by Harley » Sun Apr 23, 2017 1:57 pm

Can you show example how did u do this?
For future and someone else, who maybe have this goal.

Johantore
New User
Posts: 1
Joined: Wed Apr 19, 2017 2:42 pm

Re: Journal customization - How To

Post by Johantore » Mon Apr 24, 2017 3:55 pm

Yeah, sharing solution to your problem would be an awesome idea, I'd love to read it.

I hate when somebody is having issue similar to me and than he's just posting 'nvm, fixed' and I am still struggling :cheesy:
Do not take life too seriously. You will never get out of it alive.

Pericolo
New User
Posts: 3
Joined: Fri Apr 21, 2017 11:52 pm

Re: Journal customization - How To

Post by Pericolo » Thu Apr 27, 2017 7:34 am

Yep sorry guys, you are right!


The problem was that I was writing the "name" field of the 0xAE packet with GetUnicodeString, but it is not treated as a unicode string by the client.

All you have to do is use this:

packet.SetString(18, name, 1);

Where name is the var where I've previously stored the name with which the receiver knows the sender.

Let me know if you need to know more, I did this update in the SendFunction packet hook.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest