Page 1 of 1

[fixed for 098] CharacterSlots setting in pol.cfg

Posted: Mon Sep 08, 2008 8:35 am
by Pierce
This new setting doesn't seem to work. At least for me.
I set it to

Code: Select all

CharacterSlots=6
and tried to login. I get a "white client screen" after a few seconds and
nothing happens anymore.
After setting back to 5 everthing work normally.
Clients tested: 5.0.9.1 and 6.0.1.1


[Core version: pol-core-097-2008-09-01 -- Nando]

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Mon Sep 08, 2008 9:41 am
by Sadahar
What about seting to lower than 5??

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Mon Sep 08, 2008 7:34 pm
by OldnGrey
Hmm. does changing UOFeatureEnable to 0x20 help?

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Tue Sep 09, 2008 3:19 am
by Pierce
@Sadahar:
I didn't test that because in that case you could script that on
character creation even if it don't work with the CharacterSlot setting.

@OldnGrey:
No it doesn't. But that one made me found the error.

The server sends Packet 0xA9 in a wrong way to enable the sixth slot.
The space for a sixth character is available but a flag is missing:

CharacterSlot=5
(just giving the part from Char 5 named Tora to end)

Code: Select all

00F0: 00 00 00 00 54 6F 72 61 00 00 00 00 00 00 00 00 ->....Tora........
0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0130: 09 00 59 65 77 00 00 00 00 00 00 00 00 00 00 00 ->..Yew...........
0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0150: 00 54 6F 77 6E 20 43 65 6E 74 65 72 00 00 00 00 ->.Town Center....
0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0170: 01 4D 69 6E 6F 63 00 00 00 00 00 00 00 00 00 00 ->.Minoc..........
0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0190: 45 61 73 74 20 42 72 69 64 67 65 00 00 00 00 00 ->East Bridge.....
01A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 ->................
01B0: 42 72 69 74 61 69 6E 00 00 00 00 00 00 00 00 00 ->Britain.........
01C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 43 ->...............C
01D0: 61 73 74 6C 65 20 42 72 69 74 61 6E 69 61 00 00 ->astle Britania..
01E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 4D ->...............M
01F0: 6F 6F 6E 67 6C 6F 77 00 00 00 00 00 00 00 00 00 ->oonglow.........
0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 6F ->..............Do
0210: 63 6B 73 00 00 00 00 00 00 00 00 00 00 00 00 00 ->cks.............
0220: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 54 72 ->..............Tr
0230: 69 6E 73 69 63 00 00 00 00 00 00 00 00 00 00 00 ->insic...........
0240: 00 00 00 00 00 00 00 00 00 00 00 00 00 57 65 73 ->.............Wes
0250: 74 20 47 61 74 65 00 00 00 00 00 00 00 00 00 00 ->t Gate..........
0260: 00 00 00 00 00 00 00 00 00 00 00 00 05 4D 61 67 ->.............Mag
0270: 69 6E 63 69 61 00 00 00 00 00 00 00 00 00 00 00 ->incia...........
0280: 00 00 00 00 00 00 00 00 00 00 00 00 44 6F 63 6B ->............Dock
0290: 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->s...............
02A0: 00 00 00 00 00 00 00 00 00 00 00 06 4A 68 65 6C ->............Jhel
02B0: 6F 6D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->om..............
02C0: 00 00 00 00 00 00 00 00 00 00 00 44 6F 63 6B 73 ->...........Docks
02D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
02E0: 00 00 00 00 00 00 00 00 00 00 07 53 6B 61 72 61 ->...........Skara
02F0: 20 42 72 61 65 00 00 00 00 00 00 00 00 00 00 00 -> Brae...........
0300: 00 00 00 00 00 00 00 00 00 00 44 6F 63 6B 73 00 ->..........Docks.
0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0320: 00 00 00 00 00 00 00 00 00 08 56 65 73 70 65 72 ->..........Vesper
0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0340: 00 00 00 00 00 00 00 00 00 44 6F 63 6B 73 00 00 ->.........Docks..
0350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0360: 00 00 00 00 00 00 00 00 00 00 01 A0             ->............
CharacterSlot=6
(just giving the part from Char 5 named Tora to end)

Code: Select all

00F0: 00 00 00 00 54 6F 72 61 00 00 00 00 00 00 00 00 ->....Tora........
0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0160: 00 00 00 00 00 00 00 00 00 00 00 00 09 00 59 65 ->..............Ye
0170: 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->w...............
0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 54 6F 77 ->.............Tow
0190: 6E 20 43 65 6E 74 65 72 00 00 00 00 00 00 00 00 ->n Center........
01A0: 00 00 00 00 00 00 00 00 00 00 00 00 01 4D 69 6E ->.............Min
01B0: 6F 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->oc..............
01C0: 00 00 00 00 00 00 00 00 00 00 00 00 45 61 73 74 ->............East
01D0: 20 42 72 69 64 67 65 00 00 00 00 00 00 00 00 00 -> Bridge.........
01E0: 00 00 00 00 00 00 00 00 00 00 00 02 42 72 69 74 ->............Brit
01F0: 61 69 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 ->ain.............
0200: 00 00 00 00 00 00 00 00 00 00 00 43 61 73 74 6C ->...........Castl
0210: 65 20 42 72 69 74 61 6E 69 61 00 00 00 00 00 00 ->e Britania......
0220: 00 00 00 00 00 00 00 00 00 00 03 4D 6F 6F 6E 67 ->...........Moong
0230: 6C 6F 77 00 00 00 00 00 00 00 00 00 00 00 00 00 ->low.............
0240: 00 00 00 00 00 00 00 00 00 00 44 6F 63 6B 73 00 ->..........Docks.
0250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0260: 00 00 00 00 00 00 00 00 00 04 54 72 69 6E 73 69 ->..........Trinsi
0270: 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->c...............
0280: 00 00 00 00 00 00 00 00 00 57 65 73 74 20 47 61 ->.........West Ga
0290: 74 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->te..............
02A0: 00 00 00 00 00 00 00 00 05 4D 61 67 69 6E 63 69 ->.........Maginci
02B0: 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->a...............
02C0: 00 00 00 00 00 00 00 00 44 6F 63 6B 73 00 00 00 ->........Docks...
02D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
02E0: 00 00 00 00 00 00 00 06 4A 68 65 6C 6F 6D 00 00 ->........Jhelom..
02F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0300: 00 00 00 00 00 00 00 44 6F 63 6B 73 00 00 00 00 ->.......Docks....
0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0320: 00 00 00 00 00 00 07 53 6B 61 72 61 20 42 72 61 ->.......Skara Bra
0330: 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->e...............
0340: 00 00 00 00 00 00 44 6F 63 6B 73 00 00 00 00 00 ->......Docks.....
0350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0360: 00 00 00 00 00 08 56 65 73 70 65 72 00 00 00 00 ->......Vesper....
0370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
0380: 00 00 00 00 00 44 6F 63 6B 73 00 00 00 00 00 00 ->.....Docks......
0390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ->................
03A0: 00 00 00 00 00 00 01 A0                         ->........
In case of 6 slots space for this character is added after "Tora" and the
packet ends with the ML flag 0x1A0.
The flag for the sixth slot is missing imho.

Code: Select all

Flags for 0xA9 (each flag is for each feature, if you need to combine features, you need to summ flags):
0x2 = overwrite configuration button; 0x4 = limit 1 character per account; 0x8 = enable context menus; 0x10 = limit character slots; 0x20 = paladin and necromancer classes (aos); 0x40 = 6th character slot; 0x80 = samurai and ninja classes; 0x100 = elven race; 0x200 = KR support flag1; 0x400 = KR support flag2
So i think in my case 0x1A0 (ML) and 0x40 (6th slot) has to be summed as last 2 bytes giving 0x1E0.

I tried to set UOFeatureEnable=0x1E0 while CharacterSlots=6 is set, but it stays at 0x1A0 on logon :D

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Fri Dec 12, 2008 4:20 pm
by Nando
Do this bug still exists?

There's a line when setting the flags for 0xA9 packet:

ssopt.uo_feature_enable & ~MSGA9_START_FLAGS::FLAG_UPTO_SIX_CHARACTERS

so it's removing the flag of six characters regardless of CharacterSlots, but never setting it somewhere else...

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Sat Dec 13, 2008 5:34 am
by Pierce
Yes, the bug still exists in POL098beta-2008-12-08.

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Sat Dec 13, 2008 6:15 am
by Nando
What would be the most interesting behavior:

1) Don't change the flag from UOFeaturesEnabled at all (independent of CharacterSlots..)

2) Change the flags according to CharacterSlots: if (Char... == 6) { flags = flags | Enable_Six; } elseif (Char == 1) { flags = flags | enable_siege;}

3) Change flag (disabling six characters) if CharacterSlots != 6, and the siege flag if CharacterSlots != 1. So you'd still need to set it in the ssopt config.

I think (2) is the best as there's no need to still place something in UOFeaturesEnable. It's an easy fix, though, if the problem is only the flag not being set.

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Sat Dec 13, 2008 7:01 am
by Pierce
Yes i also think this would be the best and easiest way.
Just add 0x40 to the UOFeaturesEnabledFlag if CharacterSlots=6 is set and
add 0x04 if CharacterSlots=1 is set.
This way nobody has to recalculate the UOFeaturesEnabledFlag for their
different installations.

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Sat Dec 13, 2008 10:39 am
by Nando
Hmm... are those flags correct? They just don't work the way it's expected. When I set CharacterSlots=1 or 6 (and send the respective flags 0x04 and 0x40), the following things happen:

1) If CharacterSlots = 1, there's a 'ghost' character beneath the one that already exists. Taking a look at the packet logger, there's no char sent and the number of characters is correct. And there's still a "New" option.
2) If CharacterSlots = 6, when you reach 5 characters there's no "New" option.
3) In both cases, if you choose "New", the Character Creation packet is sent with a wrong(?) start loc. It's always: 01 FF, regardless of chosen location.

Do you have any way to check it? If you wish, I can send the updated POL for tests.

[edit]
By the way: at least I didn't get a white screen :)
[/edit]

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Sun Dec 14, 2008 9:37 am
by MuadDib
Unless I am mistaken, 6th slot was a AOS added feature, which means you will probably need the other AOS flags enabled (at least, after 3.0.8z was it? or was it 4.0.1 that they changed how the flags was handled?) They changed the flag methods after the first few clients to work completely different. I think I documented that somewhere in one of my LBRAOS addin packages in the custom scripts forum.

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Sun Dec 14, 2008 1:54 pm
by Nando
I got it! POL was sending the wrong 0xA9 packet:

[...]
BYTE[1] number of characters (slots 5 or if activated 6 slots)
[...]

This byte was being set to the number of chars in the acct. Besides that, POL didn't send the (minimum) 5 characters name/password, only sending CharacterSlots times. If CharacterSlots was less than what the client expected (1, for example), it got junk readings. Corrected that. This byte will now be set to Max(character_slots_depending_on_acct_expansion, 5). Where if Characterslots > 5,

Code: Select all

if (client.acct.expansion >= AOS) {
        character_slots_depending_on_acct_expansion = CharacterSlots;
}
else {
        character_slots_depending_on_acct_expansion = 5;
}
This way it won't break older clients, if the expansion is right. Now POL sends the feature enable packet in 0xB9 to allow the 6th character, too. My tests didn't show the need to have UOFeatureEnabled with AOS / ML / etc flags.

By the way: implemented the 7th character flag, too, for the ones with a client version 6.0+. :D
Be careful, though, as this may have adverse results on older clients. (Didn't have a 6.0+ to test :()

Re: [pol-core-097-2008-09-01] CharacterSlots setting in pol.cfg

Posted: Mon Dec 15, 2008 11:13 am
by Pierce
For those who run already one of the last 2 cores (98beta or 97-2008-09-01) i'll post
a small packethook to fix that with UOFeatureEnable=0x1A0 and CharacterSlots=6 set.

uopacket.cfg

Code: Select all

Packet 0xB9
{
  Length 3
  SendFunction ClientFeature:SendFeatures
}

Packet 0xA9
{
  Length variable
  SendFunction ClientFeature:CharList
}

ClientFeature.src

Code: Select all

use uo;
use polsys;

program ClientFeatureHook()
	Print("INSTALLING: Client Feature Hook...");
	return 1;
endprogram

exported function SendFeatures(prechar, byref packet)

 print("Packet " + packet);
 packet.SetInt8(2, 0xFB); // 0xB980DB (ML) + 0x20
 print("changed to new 0xB9 packet: " + packet + " on account " + prechar.account);
 return 0;
endfunction

exported function CharList(prechar, byref packet)

 packet.SetInt8(3, 0x6); //max. slots
 packet.SetInt8(packet.GetSize()-1, 0xE0); //UOFeatureEnable 0x1A0 (ML) + 0x40 = 0x1E0
 return 0;
endfunction

Re: [fixed for 098] CharacterSlots setting in pol.cfg

Posted: Thu Dec 18, 2008 11:52 pm
by Yukiko
I am so jazzed that these bugs in the core are getting fixed!
You guys rock!