EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Not All AA Displayed (https://www.eqemulator.org/forums/showthread.php?t=39980)

Cilraaz 09-01-2015 03:40 PM

Not All AA Displayed
 
I'm attempting to create a PoP-era server. I've managed to get most of the core functionality working, so now I'm working on tailoring the content to be correct. I logged in to a test character and noticed that Luclin-era AAs are visible and available, but PoP-era AAs are not visible. This occurs in both the Titanium and SoF client.

Here's an example of an AA that should be displayed, but is not. This is the Ferocity AA (melee archetype AA):

aa_abilities table:
Code:

/truncated as requested
altadv_vars table:
Code:

/truncated as requested
I checked rule_values for anything specific to AA and didn't really find anything other than xp per AA, max slots, and "stacking". Are there any specific settings I should look for or further information that would be helpful? Please let me know.

Edit: Oops. This was intended for general support, not Windows support. I was digging around for the answer and must have forgotten to swap forums.
Edit2: Side note while talking about AA. Is the "BotAAExpansion" rule a reference to the raw expansion number (8=OoW) or bitmask (8=PoP)?

Cilraaz 09-16-2015 04:00 PM

Bump?

My World:ExpansionSettings value is 15 on all rulesets.

I'm still scratching my head on this one.

Edit: This happens on the Titanium, SoF, and UF clients with a max level character.

AdrianD 09-16-2015 04:43 PM

Quote:

My World:ExpansionSettings value is 15 on all rulesets.
I can say for certain this setting is a bitmask. I've read a few threads where people say it can act kinda funny but, that could be dated info.

All enabled up to:
Code:

Expansion Value        All Expansions       
0        Original0        Original
1        Kunark        1        Kunark
2        Velious        3        Velious
4        Luclin        7        Luclin
8        PoP        15        PoP
16        Ykesha        31        Ykesha
32        LDoN        63        LDoN
64        GoD        127        GoD
128        OoW        255        OoW
256        DoN        511        DoN
512        DoD        1023        DoD
1024        PoR        2047        PoR
2048        TSS        4095        TSS
4096        TBS        8191        TBS
8192        SoF        16383        SoF
16384        SoD        32767        SoD
32768        UF        65535        UF
65536        HoT        131071        HoT
131072        VoA        262143        VoA
262144        RoF        524287        RoF
524288        CoF        1048575        CoF
1048576        tDS        2097151        tDS

* I read you wrong - couldn't get over needing 4 screens to fit the thread in =p

maybe this will help more http://wiki.eqemulator.org/p?Server_Rules&frm=Main

Noport 09-16-2015 05:00 PM

Expansion Value:
Hot 10,118
CtoF 60,182
TDS 90,780

demonstar55 09-16-2015 05:29 PM

We revamped the AA system to be more inline with how live is. This means that the pop ranks were merged into other ranks. I'm guessing you see for example Innate Strength having 15 ranks instead of 5?

annarchy 09-16-2015 10:46 PM

sorry to ask this in an unrelated thread, but if we are talking about world:expansionsettings and say we wanted to allow up to TDS

There's 3 different values listed in just this one thread...how do we decide which is right
1048576
2097151
90,780

?

Shendare 09-16-2015 11:01 PM

The 1048576 is the bitmask value in ExpansionSettings for -just- the TDS expansion.

The 2097151 is the bitmask value for all expansions up to and including the TDS expansion.

Not sure what the values Noport linked are for.

Noport 09-16-2015 11:40 PM

Shaendare
I don't use numbers pulled out the air for World and Client Expansion
Expansion Value: you can use what you posted if you want too
Hot 10,118
CtoF 60,182 Recivied from client produced a string error 6,082
TDS 90,780

Shendare 09-16-2015 11:54 PM

I'm still lost there. You're clearly talking about something other than World:ExpansionSettings in the rule_values table.

I have no doubt that it has something to do with the expansions, though, Opcode Ninja.

Noport 09-17-2015 12:06 AM

Shaendare
I don't use numbers pulled out the air for World and Client Expansion
CtoF Client produced a string error code 6,082 was change after fixed 60,182
Expansion Value TDS: you can use what you posted if you want too
player_tables
rule_values
variables
(5,'World:ExpansionSettings','90780','Expansion settings. Affects client features related to expansions.')
('Expansions','90780','Accessible expansions for each player','2010-09-06 15:03:51')

AdrianD 09-17-2015 12:19 AM

Interesting, so either one will work? Maybe this has something to do with the "funny" thing about this setting people noticed some time ago, unless they were mistaken. I use the bitmask and it works so far and that's as much as I remember about it. It was a post from at least a couple/few years ago.

Only one way to find out.

Cilraaz 09-17-2015 01:17 AM

Quote:

Originally Posted by demonstar55 (Post 243252)
We revamped the AA system to be more inline with how live is. This means that the pop ranks were merged into other ranks. I'm guessing you see for example Innate Strength having 15 ranks instead of 5?

The innates in General are 5 ranks in my current setup.

Side note, if a mod wanted to chop up the text within code tags in the OP, that's fine with me to stop the left-to-right scrolling. I guess we have a time limit on being able to edit our own posts.

Shendare 09-17-2015 10:34 AM

Quote:

Originally Posted by Noport (Post 243268)
Shaendare
I don't use numbers pulled out the air for World and Client Expansion
CtoF Client produced a string error code 6,082 was change after fixed 60,182
Expansion Value TDS: you can use what you posted if you want too
player_tables
rule_values
variables
(5,'World:ExpansionSettings','90780','Expansion settings. Affects client features related to expansions.')
('Expansions','90780','Accessible expansions for each player','2010-09-06 15:03:51')

Ohhhh, so these are values the client expects to receive from the server regarding which expansions are enabled, and they don't follow the bitmask pattern we use in the server code with 1 bit per expansion.

I think ima have to experiment a bit!

Cilraaz 09-17-2015 03:25 PM

I had UseClientBasedExpansionSettings disabled in ruletypes.h prior to compiling. I've since disabled it properly via an entry in the rule_values table (or should it be in the variables table instead?). I assume the setting was working when altered in ruletypes.h, since the AAs are being limited to SoL instead of the expansions of the client. I just figured I should do it properly so something doesn't screw up on a future git pull.

I've been digging around the code and I can't quite nail down where the expansion limit comes into play. I'll try upping the expansion limit a bit and see what happens when.

Cilraaz 09-17-2015 04:01 PM

Well, setting the ExpansionSettings variable to 31 (LoY and all prior) made PoP AA appear. Just to see what would happen, I set it to 16 (LoY only). It showed only PoP AA. I'm even more confused now.

Edit: 24 gave me SoL and PoP AA. It's almost like the bitmask values are being doubled.
Edit2: Well, not doubled, but shifted. 1=Vanilla, 2=Kunark, 4=Velious, etc. If that's correct, then 24 was SoL/PoP and 23 should be Vanilla/Kunark/Velious/PoP (so no SoL AA should show). I'm trying that now... and 23 shows only PoP AA. I have no idea where this shift would have come from.
Edit3: The only changes I had made to source was a hack for old-time race xp penalties in zone/exp.cpp, some default rules changes in common/ruletypes.h, and a hack to try to limit client types on the server (still not sure about this one). To be safe, I've hard reset back to HEAD and am recompiling. We'll see what happens on the new binaries in a few.
Edit4: Recompiled. Same result. Thoughts?
Edit5: Yes, I like edits, apparently. So AA is acting as if the expansion bitmask is shifted, but other things tied to ExpansionSettings aren't (such as Frogloks being allowed when set to 31). This is really confusing.

Cilraaz 09-18-2015 04:22 PM

I might have just found the issue (though I'm SUPER rusty with C++ and terrible with bitmasks in general). In zone/aa.cpp, on line 1421, there is the following code:

Code:

        if(IsClient()) {
                if(!(CastToClient()->GetPP().expansions & (1 << rank->expansion))) {
                        return false;
                }
        } else {
                if(!(RuleI(World, ExpansionSettings) & (1 << rank->expansion))) {
                        return false;
                }
        }

If I'm reading this right, it's checking the expansion value (forced by World:ExpansionSettings in the rule_values table) against the expansion for the AA. If we use the example that I'd originally quoted, Ferocity, that expansion value is 4. So the bitwise left would be "1 << 4", which is 1*4^2 or 16. That would evaluate "0" after the bitwise & against an expansions variable of 15. As such, shouldn't the code be:

Code:

if(!(CastToClient()->GetPP().expansions & (1 << (rank->expansion - 1)))) {
This would be 1 << (4-1) or 1*3^2, which is 9, which would evaluate "9" after the bitwise & against an expansions value of 15.

I made this change and recompiled zone. The AA's showed up properly (SoL and PoP together) when using an ExpansionSettings value of 15. I changed it to 8, restarted the server, and only PoP AA showed up, as expected.

Could a dev take a look and see if I'm correct here or let me know if I'm a complete idiot?

Cilraaz 09-20-2015 06:15 PM

After today's update to eqemu_update.pl, I tried updating my AA tables via the script and recompiling zone without the above modification. They again showed an expansion behind. I was hoping maybe my AA table having the old data was the problem, but apparently not.

Any thoughts on the above code modification being right or completely wrong?

Shendare 09-20-2015 06:21 PM

Guess there aren't a lot of people working on expansion limiting AAs after the revamp to chime in. :/

AdrianD 09-20-2015 07:27 PM

I'm definitely interested and would help if I could.

Noport 09-20-2015 09:06 PM

you might have to bush up on your c++ programing and work with eq_packet_structs

AdrianD 09-20-2015 09:43 PM

Quote:

Originally Posted by Noport (Post 243365)
you might have to bush up on your c++ programing and work with eq_packet_structs

There's no brushing up possible. It's strictly learning from the ground up. =P

Cilraaz 09-23-2015 09:37 PM

So I took a look at this again today and I think I was right above, but for the wrong reason.

I looked into bit shifting a bit more and realized I was calculating it wrong above (though still coming up with kinda the right answer). I think my logic needs to look at what possibilities should evaluate true. I'm going to do a bit of rambling just to get thoughts down into the thread. Feel free to pick any of it apart.

Earlier, AdrianD posted the expansion value chart:
Code:

Expansion Value        All Expansions       
0        Original0        Original
1        Kunark        1        Kunark
2        Velious        3        Velious
4        Luclin        7        Luclin
8        PoP        15        PoP
16        Ykesha        31        Ykesha
32        LDoN        63        LDoN
64        GoD        127        GoD
128        OoW        255        OoW
256        DoN        511        DoN
512        DoD        1023        DoD
1024        PoR        2047        PoR
2048        TSS        4095        TSS
4096        TBS        8191        TBS
8192        SoF        16383        SoF
16384        SoD        32767        SoD
32768        UF        65535        UF
65536        HoT        131071        HoT
131072        VoA        262143        VoA
262144        RoF        524287        RoF
524288        CoF        1048575        CoF
1048576        tDS        2097151        tDS

If we convert that to the bitmask values, we get (inclusively, it would be all bits after the initial 1 also being 1 instead of 0, but that wouldn't really change anything):
Code:

SoL  - 00000100
PoP  - 00001000
LoY  - 00010000
LDoN - 00100000
GoD  - 01000000
etc

Now, if we look at bitshifted values of expansions from the AA table (results after the "1 << rank->expansion" calculation), we have:
Code:

SoL  - 00001000
PoP  - 00010000
LoY  - 00100000
LDoN - 01000000
GoD  - 10000000
etc

So in the code now, isn't it comparing SoL (0100, or inclusively 0111) to the bitshifted AA expansion variable for SoL (1000)? If so, then wouldn't this always evaluate false, making the code correction posted earlier correct?
Code:

if(!(CastToClient()->GetPP().expansions & (1 << (rank->expansion - 1)))) {
Again, I'd kind of like a dev (or anyone who knows this code, C++, bitmasks, bitshifting, etc better than I do) to take a peek and let me know if I'm insane or not.

Uleat 09-24-2015 01:25 PM

I haven't been ignoring this one..my online time is limited and I've attempted twice to respond to it - without luck...


You can set bitmasks up to represent just about anything..but, looking specifically at the expansion value chart posted (re-posted) above:

Kunark has a bit value of 1 and a bitmask of 1.


A standard ordinal bitmask will usually exclude 0 from its rankings due to the fact that the lowest provable ranking value is 1 - there is no 0's column
in bit representation.

To convert an ordinal bit ranking to bit position, yes, a simple (1 << (ord_val - 1)) should be used. For cases of 0, you would simple prove it by
checking (bool)ord_val == false or ord_val == 0.

SIDENOTE: You can create a positive mask for validating greater than the ordinal ranking by using (~0 << ord_val). C++ doesn't implement bit rotations,
so there is no chance of a wrap-around with a standard bit shift.


In the case of Kunark, converting the 'value' to a bit position in the coded example does indeed produce 0x02 where the mask is 0x01.

However, look at what is being considered: CanUseAlternateAdvancementRank

Since the transformation reflects a greater than positional value, and there is a 'false' return methodology, you really don't want that condition
to be true for an exclusionary check.


There's a lot of systems that I'm not up-to-speed with - this being one of them.

But, looking at what is defined and what is being checked, I think that particular code snippet is correct. That's not to say that there may not be
issues elsewhere (these guys are pretty sharp and usually catch logic errors pretty quick.)

Cilraaz 09-24-2015 02:07 PM

Quote:

Originally Posted by Uleat (Post 243498)
Kunark has a bit value of 1 and a bitmask of 1.

Kunark would be the oddity. I hadn't considered it, since Kunark didn't have any AA availability.

Quote:

Originally Posted by Uleat (Post 243498)
However, look at what is being considered: CanUseAlternateAdvancementRank

Since the transformation reflects a greater than positional value, and there is a 'false' return methodology, you really don't want that condition
to be true for an exclusionary check.

Perhaps I'm misunderstanding your intended message, but since it returns false on a not true, the result from the bitwise & should be true if the AA is to be visible to the player. Using SoL as an example, since I can break the comparison down to just a nibble, we currently have the bitwise & of the expansion bitmask (0100) and the shifted rank->expansion value (1000):
Code:

0100
1000
----
0000

Throwing a not on that then evaluates true and in turn returns false, even though we obviously want SoL AA to be used if SoL is the enabled expansion

Quote:

Originally Posted by Uleat (Post 243498)
There's a lot of systems that I'm not up-to-speed with - this being one of them.

But, looking at what is defined and what is being checked, I think that particular code snippet is correct. That's not to say that there may not be
issues elsewhere (these guys are pretty sharp and usually catch logic errors pretty quick.)

Which snippet do you believe is correct? The one I posted or the one in source. Perhaps the above bit in this reply is wholly unnecessary.

Uleat 09-24-2015 02:40 PM

[Still think I'm missing something here...]


Let me ask around on this one..it's very possible that we need to adjust some things.

Cilraaz 09-24-2015 02:42 PM

Quote:

Originally Posted by Uleat (Post 243507)
No, looks like you're correct.

I didn't catch the bool flip when I was scanning over the function today...


Let me ask around on this one..it's very possible that we need to adjust some things.

From my limited testing and logically, it should work. I'm not intimately knowledgeable of the source, though, so I wasn't sure if anything else needed modified accordingly.

Thanks for taking a look!


All times are GMT -4. The time now is 09:37 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.