Diskussion und Informationen über UO:KR

#76 Beitrag von SiENcE » 24 Jun 2007 17:24

its ok to release the code not with the binary...but if someone wants the code you must give it to him, with all modifications.


#77 Beitrag von MagnusBr » 24 Jun 2007 20:57

Hi. I did that.
I'm Wolfpack developer. But since we're still working on KR support on Wolfpack (and we didnt want to send to WP svn before some more research and implementations) I did this on RunUO to test and to let people log in, since many of you were trying to see the client a little more, and maybe start some work on maps.

As Link_of_Hyrule said, I was making the code a little better and researching a little more on it before send the code, to let you keep developing it (with this code it should be a little harder).
But since people get mad (what is pretty funny when most of people here refuses to share any information about KR - I'm probabilly the third one about KR and the first one about server), I'm sending it the way it actually is.

Quoting from another forum where I first published:
Ok guys...
RunUO binary where you can log and play with an already created character (There are some other things changed like support for 2 ML poisons - but nothing that affects anything that distro core shouldnt affect).
Latest RunUO SVN needed.

Keep in mind that its just a fast job, enough to log in and do anything that is compatible with legacy client. ContextMenus are messed, spellbooks too, custom gumps, etc etc...
You can't create a character too... what means that you need to create a character from Legacy client and just after created, play with KR client.
It's working fine for Legacy clients, but I'm not sure you can connect from a non-local computer with KR. You need to test and tell me ::Smile::

One last thing: It should work just to client So, update to this client (actually the latest one) and backup.

Actually I'm working to support KR things with Wolfpack (I'm Wolfpack developer) but, since we're still researching and implementing things the best way we can before commit to Wolfpack SVN, I did this in RunUO to let you guys at least log in and walk around... and maybe start some research on maps, that is what me, and a lot of people, needs Razz
Like I said, I was not pretending to start a real development - its what I'm doing on Wolfpack - but my intention was just to let people log in. So I just replied and was not worried about research on packets.

Just remember: It's messed and just replying packets. I spent a really little time doing this. You'll have a lot of work to do something good using this base.

Good luck and I really expect to see, after this all, people sharing information here instead of just say "I have information, but you should try to find it on your own".


#78 Beitrag von nazghul » 24 Jun 2007 22:32

Well, Magnus, I guess this was pointed at me :)

First thing is: I'm not entitled to publish internal Sphere information. What's not a matter of what-I-want but of contract.

Second: As I said the information I have I received, and what are the foundation on what I did my personal researches, came under non disclosure. So I have to find some way between asking questions, and not betray ppl. I gave my word to.

Of course, I just could have shut up, telling nothing at all. Perhaps this would have been better. Personally, I can't understand the "tell us everything or tell us nothing", but hey, if you prefer...

Oh, just one thing - As far as I know in KR all dialogs are kinda "Clilocs", meaning that there are no more old fashioned dialog packets anymore, but just a number (and eventual textual arguments), while the client then assembles the dialog from this data, some LUA scripts and some XML. Am I right that this in fact will make custom dialogs as we are used to use will be impossible, or, in other words: If a "scripter" of some kind wants to create a custom dialog he has to send a client patch? I've not discovered some kind of "ingame update packet" so far...

Moderator (Sphere)
Beiträge: 828
Registriert: 13 Jan 2004 12:00

#79 Beitrag von Torfo » 24 Jun 2007 22:54

I don't know if anyone remembers uo.elitecoder.net? It has been a famous reverse engineering board for a long time but died some years ago. Since that time i'm hosting a backup of the forum and from time to time someone still posts :)

So if you want to share your reversing results feel free to post on http://reverse.torfo.org The board is hosted on a server outside the USA so you don't have to be afraid :p

Btw. Folko released his UOLog Source Code yesterday -> http://reverse.torfo.org


#80 Beitrag von MagnusBr » 24 Jun 2007 23:10

No, really didnt point at you :)
Although I still believe that informations should be always shared regarding KR support - what is different from share code from emulators - I know people from Menasoft since a long time ago... so dont worry to explain that you cant share most of informations.
I'm talking about it in a generic way. General informations that a lot of people have and are not sharing, but commenting here and there all the time.
It's basically why we're progressing so slow to offer some KR support.

I believe that if people started to share information as long as they got them, we would have a better support not for Sphere, RunUO, Wolfpack or any other emulator, but for all of them.


#81 Beitrag von SiENcE » 24 Jun 2007 23:54

@MagnusBr: ack.

It only a matter of time until all infos are open.


#82 Beitrag von Link_of_Hyrule » 26 Jun 2007 01:21

well you cant connect to the server from an external source only with in the lan can you connect im hoping Magnusbr and I can figure it out later today if hes online.

I have merged the code he sent with 2.0 and made a version with ml incorpated in it with spellweaving and what not but im not going to release it untill we fix a few problems including gumps on kr and connecting from the internet of course so just be pation and im sure ill have it to you very soon. :D

Here is a rar with the moded exe and the latest svn if you want to try it out on your lan

http://rapidshare.com/files/39050082/Ru ... t.rar.html


#83 Beitrag von Dantalion » 26 Jun 2007 04:32

Da ich vorhin mal ein bissl Zeit hatte hier 2 von den neuen "Kingdom Reborn" Paketen, dank dem Server von Link_of_Hyrule sollte diese beiden jeder kennen der mal damit rumgespielt hat. Da nur keiner was postet dachte ich mir ich mache den ersten Schritt ^^

Bei mir ist
Char= 1Byte
WChar = 2 Byte
nur damit keine Verwirrung aufkommt ^^

Sender: Client
PacketUse: Character Creation with KR
PacketID: 0x8D
PacketLength: 0x0092
0: Byte - PacketID
1: Word - PacketLength
3: DWord - Unknown (0xEDEDEDED)
7: DWord - CharSlot
11-40: Char[30] - CharName
41-70: Char[30] - Unknown ("Unknown.......")
1: Byte - Profession
72: Byte - Unknown (0x41)
73: Byte - Gender & Race
74: Byte - Unknown (0x00)
75: Byte - Strength
76: Byte - Intel.
77: Byte - Dexterity
78: Word - Char Hue
80: DWord - Unknown
84: DWord - Unknown
88: Byte - Skillnumber 1
89: Byte - SkillValue 1
90: Byte - Skillnumber 2
91: Byte - SkillValue 2
92: Byte - Skillnumber 3
93: Byte - SkillValue 3
94: Byte - Skillnumber 4
95: Byte - SkillValue 4
96: Char[26] - Unknown
122: Word - Hair Hue
124: Word - Hair Nr
126: Char[12] - Unknown
138: Word - Copy of Hue (?)
140: Word - Face Number
142: Word - Beard Hue
144: Word - Beard Number

Sender: Client
PacketUse: Bug Report
PacketID: 0xE0
PacketLength: 0x07D9
0: Byte - PacketID
1: Word - PacketLength
3: Char[3] - Client Language
7: Word - Bug Category
9: WChar[1000] - Text

Und für die, die es mal testen wollen hier noch der Code für die Character Creation. Bitte die Kommentare ignorieren, hatte keine Lust die zu entfernen.

Code: Alles auswählen


static PacketHandlers()
// KR Client - Character Creation
            Register(0x8D, 0, false, new OnPacketReceive(CreateCharacterKR));

public static void CreateCharacterKR(NetState state, PacketReader pvSrc)
            int flags = 0;

            //0-2 Packet Stuff (PackedID,Length)

            //3-6 - Unknown Immer 0xEDEDEDED - Analog zum "Normalen" Char Packet

            int charSlot = pvSrc.ReadInt32();
            //Console.WriteLine("Char Slot:{0}", charSlot);

            string name = pvSrc.ReadString(30);
            //Console.WriteLine("Charname:{0}", name);

            //41 - Unknown Immer 0x00

            //42-70 - Text? Unknown ..... IP? Interface? Clienthack? Golfball?
            string unknown30 = pvSrc.ReadString(29);

            int prof = pvSrc.ReadByte();
            //Console.WriteLine("Prof:{0}", prof);

            //72 - Unknown Immer 0x41 ..

            int genderRace = pvSrc.ReadByte();
            //Console.WriteLine("Gender/Race:{0}/{1}", (genderRace % 2), (Byte)(genderRace / 2));

            //74 - Unknown Immer 0x00

            int str = pvSrc.ReadByte();
            //Console.WriteLine("Str:{0}", str);
            int dex = pvSrc.ReadByte();
            //Console.WriteLine("Dex:{0}", dex);
            int intl = pvSrc.ReadByte();
            //Console.WriteLine("Int:{0}", intl);

            int hue = pvSrc.ReadUInt16();
            Console.WriteLine("Hue:{0}", hue);

            //80-81 - Unknown

            //82-83 - Unknown

            //84-85 - Unknown

            //86-87 - Unknown

            int is1 = pvSrc.ReadByte();
            int vs1 = pvSrc.ReadByte();
            Console.WriteLine("Skill 1:{0} - Value:{1}", is1, vs1);
            int is2 = pvSrc.ReadByte();
            int vs2 = pvSrc.ReadByte();
            Console.WriteLine("Skill 2:{0} - Value:{1}", is2, vs2);
            int is3 = pvSrc.ReadByte();
            int vs3 = pvSrc.ReadByte();
            Console.WriteLine("Skill 3:{0} - Value:{1}", is3, vs3);
            int is4 = pvSrc.ReadByte();
            int vs4 = pvSrc.ReadByte();
            Console.WriteLine("Skill 4:{0} - Value:{1}", is4, vs4);

            string unk5 = pvSrc.ReadString(24);

            //120+121 - Unknown
            int unk5_1=pvSrc.ReadInt16();

            //122+123 - Fixed
            int hairHue = pvSrc.ReadInt16();

            //124+125 - Fixed
            int hairVal = pvSrc.ReadInt16();

            //126-127 - Unknown

            //128-129 - Unknown

            //130-131 - Unknown

            //132+133 - Unknown

            //134+135 - Unknown

            //136+137 - Unknown

            int hue2 = pvSrc.ReadInt16();

            //140-141 - Fixed
            int face = pvSrc.ReadInt16();

            //142+143 - Fixed
            int hairHuef = pvSrc.ReadInt16();

            //144+145- Fixed
            int hairValf = pvSrc.ReadInt16();

            int cityIndex = 0;
            Console.WriteLine("City Index:{0}",cityIndex);
            int shirtHue = 0;
            int pantsHue = 0;

            bool female = ((genderRace % 2) != 0);

            Race race = Race.Races[(byte)(genderRace / 2)];

            if (race == null)
                race = Race.DefaultRace;

            CityInfo[] info = state.CityInfo;
            IAccount a = state.Account;

            if (info == null || a == null || cityIndex <0>= info.Length)
                // Check if anyone is using this account
                for (int i = 0; i < a.Length; ++i)
                    Mobile check = a[i];

                    if (check != null && check.Map != Map.Internal)
                        Console.WriteLine("Login: {0}: Account in use", state);
                        state.Send(new PopupMessage(PMMessage.CharInWorld));

                state.Flags = flags;

                CharacterCreatedEventArgs args = new CharacterCreatedEventArgs(
                    state, a,
                    name, female, hue,
                    str, dex, intl,
                    new SkillNameValue[4]
						new SkillNameValue( (SkillName)is1, vs1 ),
						new SkillNameValue( (SkillName)is2, vs2 ),
						new SkillNameValue( (SkillName)is3, vs3 ),
                        new SkillNameValue( (SkillName)is4, vs4 ),
                    shirtHue, pantsHue,
                    hairVal, hairHue,
                    hairValf, hairHuef,

                state.BlockAllPackets = true;


                Mobile m = args.Mobile;

                if (m != null)
                    state.Mobile = m;
                    m.NetState = state;

                    state.BlockAllPackets = false;
                    DoLogin(state, m);
                    state.BlockAllPackets = false;

Code: Alles auswählen

private static bool ValidSkills( SkillNameValue[] skills )
 return ((total == 100) || (total == 120)); // KR Clients erlauben (Skillsum=120)
Wer Fehler/Anmerkungen hat, was das ganze Unbekannte sein könnte, ist hiermit zum posten eingeladen.


#84 Beitrag von Link_of_Hyrule » 26 Jun 2007 05:24

I cant read your post but thanks a lot im sure that we can use this information


#85 Beitrag von nazghul » 26 Jun 2007 10:31

Dein Code weicht an einigen Stellen von der Paketbeschreibung ab


#86 Beitrag von Link_of_Hyrule » 26 Jun 2007 11:56

I added that code to the core along with the one distro mode the core compiled but I haven't had time to test if it works ill probly do that later today I created an svn to keep track of all the mods that are going to be made for kr it seems the road ahead is long but I'm sure if I get enough ppl to help out we can get this new client playable :D


#87 Beitrag von nazghul » 26 Jun 2007 13:01

you are aware of the restrictions you can only circumvent if you are patching the client itself (for example: Dialogs, what now seem to be completely client defined)?


#88 Beitrag von g4borg » 26 Jun 2007 17:06

nice ... the ex-pol-hookers... well, only bad thing in that forum is, i cant get search to work :) however, that goes way off topic here.


#89 Beitrag von Dantalion » 26 Jun 2007 17:48

nazghul hat geschrieben:Dein Code weicht an einigen Stellen von der Paketbeschreibung ab
kannst du mir mal ein beispiel geben, ich habe die paketbeschreibung eigentlich direkt aus dem code erzeugt :))
nazghul hat geschrieben:you are aware of the restrictions you can only circumvent if you are patching the client itself (for example: Dialogs, what now seem to be completely client defined)?
Nagel mich nicht drauf feste, aber ich GLAUBE man kann die lua scripte (die z.b. zum erzeugen/modifizieren der Dialogs [zusammen mit den XML Datein] verwendet werden) durch kopien im Data Ordner überladen.



Interface_b3_70.raw -> Source\ActionEditWindow.xml (verdammt sicher)
Passende Lua Datei aus der Exe -> Source\ActionEditWindow.lua (keinerlei zweifel)
Interface_b9_18.raw -> ..\..\Interface.xsd (vermutung)


#90 Beitrag von MagnusBr » 26 Jun 2007 18:16

Just to estimulate more people to contribute with informations:

http://rapidshare.com/files/39473214/Ru ... t.rar.html

Binary + code

Including Dantalion finding about Character Creation (I analyzed half of the packet and didnt had time to keep testing to finish. Since there are some different things like Race and Gender packets and etc, I merged the second half of the packet with Dantalion findings. Its working pretty well right now. Many thanks man!!!).
Remember that you have to edit CharacterCreation.cs script with the thing Dantalion wrote.

Things we really need to know:

- What in the hell are faces? New bodies? New packet to show character and face?
- Anyone knows about this new packet or the values of new bodies?

And, just old things:

- Anyone knows anything about 0xE3 and 0xE4 packets?

Packet structure is something that I believe nazghul can contribute too, since they're UO packets and not Menasoft's

Ah... if anyone have time, the 0xFF packet on code is related to Seed I think, but I still didnt had time to make it the way it should be on code :)