Log in

View Full Version : Expansion Disable Not Working?


Silentrath
07-06-2015, 09:30 PM
Is the setting in the Variable table, "Expansions" not working? I've set this to 0 and still can create all classes. I also tried setting, "World:ExpansionSettings" inside the rule_values to 0 and still doesn't restrict Vah Shir, Froglok, etc.. I locked out the non classic zones, just not sure why its not locking out those.

Another quick question is, why is the setting to disable tutorial button still allowing people to go to tutorial?

Thanks,

Silentrath

EDIT: I am all up to date with the latest changes.

Kingly_Krab
07-06-2015, 09:39 PM
Do you have this rule disabled?: World:UseClientBasedExpansionSettings

Silentrath
07-06-2015, 10:30 PM
Got it working! Had it set to on another ruleset! My bad, thank you!

Kingly_Krab
07-06-2015, 10:35 PM
Ah okay, I don't know if what I said helped or not if it was on another ruleset, but you're welcome? Haha.

Silentrath
07-06-2015, 10:37 PM
Ah okay, I don't know if what I said helped or not if it was on another ruleset, but you're welcome? Haha.

Yep it was the setting you said! Sorry didn't specify that did it!

Kingly_Krab
07-06-2015, 10:38 PM
Haha, okay. You're welcome, glad you got it working.

hurikaNe
01-04-2016, 05:17 AM
Do you have this rule disabled?: World:UseClientBasedExpansionSettings

How do I check this?

Figback65
01-23-2016, 10:56 PM
I wonder how to check it also, I have installed a fresh database etc etc, and that value is not in my variables or rule_values. Now I cannot lock expansions out. Does it need to be added manually?

EDIT : Ok I added 1 World:UseClientBasedExpansionSettings false manually and it worked other than the gnome pal/sk and Halfling rng/pal those you can still make even if you set expansion setting to 0. Any idea on those?

provocating
01-24-2016, 11:35 AM
I wonder how to check it also, I have installed a fresh database etc etc, and that value is not in my variables or rule_values. Now I cannot lock expansions out. Does it need to be added manually?

EDIT : Ok I added 1 World:UseClientBasedExpansionSettings false manually and it worked other than the gnome pal/sk and Halfling rng/pal those you can still make even if you set expansion setting to 0. Any idea on those?

Which client, a client like Titanium I do not believe follows normal rules.

Figback65
01-24-2016, 01:03 PM
Titanium Client is the one I'm using.

provocating
01-24-2016, 01:25 PM
Yeah that is probably why. Try with UF and just see what happens.

Shin Noir
01-24-2016, 04:35 PM
Generic howto:

Assuming you are using ruleset 1 (default).

SELECT * from rule_values WHERE ruleset_id = 1 AND (rule_name = "World:ExpansionSettings" OR rule_name = "World:UseClientBasedExpansionSettings");

This should result in 2 records.
World:ExpansionSettings's rule_value should be set to your highest expansion, with a number like: 1=Classic, 2=Kunark, 3=Velious, 4=Luclin, 5=PoP, etc.
World:UseClientBasedExpansionSettings rule_value should be set to false. If you're using a freshly copied PEQ database, this record will likely NOT exist.

If the UseClientBasedExpansionSettings rule does not exist, run this:
INSERT INTO rule_values (ruleset_id, rule_name, `rule_value`) VALUES (1, "World:UseClientBasedExpansionSettings", "false");

If the expansion is set incorrectly, you can run this command, changing the rule_value from 2 (kunark) to the expansion of your choice noted above:
UPDATE rule_values SET rule_value=2 WHERE ruleset_id=1 AND rule_name="World:ExpansionSettings" LIMIT 1;

Once you finish updating these values, run the SELECT on the top again to verify the results are what you want. Restart all your server executables. Profit.

As far as the non-classic class combos: Unsure that has been addressed but a ruleset could be created for this specific option to be toggled, if the client does select a bad combination and tries to create, it could reject at that point. Unsure that's in yet though.

Figback65
01-25-2016, 03:39 AM
Weird when I set it to 1 for clientbasedexpansionsettings, that's kunark for me, I can make an iksar. But setting it to 0 is classic. Eitherway theres still gnome pal/sk and hlf rng/pal. Its ok though, just not 100% classic, which I don't think will matter that much, unless it would be an easy fix.

I would make a ruleset but I'm still not proficient in how to set it up. Entering in the table is np, but maken sure it can talk to the code is another story for me lol. I am not good with c++

chrsschb
01-25-2016, 10:42 AM
Weird when I set it to 1 for clientbasedexpansionsettings, that's kunark for me, I can make an iksar. But setting it to 0 is classic. Eitherway theres still gnome pal/sk and hlf rng/pal. Its ok though, just not 100% classic, which I don't think will matter that much, unless it would be an easy fix.

I would make a ruleset but I'm still not proficient in how to set it up. Entering in the table is np, but maken sure it can talk to the code is another story for me lol. I am not good with c++

Key word there is CLIENT based.

If you want to change race/class combos then edit the table char_create_combinations and change the required expansions for those combinations.

provocating
01-25-2016, 10:57 AM
I could be wrong but I am fairly sure that Titanium clients can make certain combinations no matter what the setting in char_create_combinations

chrsschb
01-25-2016, 12:10 PM
I could be wrong but I am fairly sure that Titanium clients can make certain combinations no matter what the setting in char_create_combinations

It's tricky and I haven't used Titanium in a long time, but there's several places where everything needs to be set a certain way and it's easy to overlook one.

Kingly_Krab
01-25-2016, 12:19 PM
Titanium's race-class combinations are actually set separately in the source code. world/client.cpp contains this: bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc)
{
uint32 bSTR, bSTA, bAGI, bDEX, bWIS, bINT, bCHA, bTOTAL, cTOTAL, stat_points; //these are all uint32 in CharCreate_Struct, so we'll make them uint32 here to make the compiler shut up
int classtemp, racetemp;
int Charerrors = 0;


// if this is increased you'll have to add a column to the classrace
// table below
#define _TABLE_RACES 16

static const int BaseRace[_TABLE_RACES][7] =
{ /* STR STA AGI DEX WIS INT CHR */
{ /*Human*/ 75, 75, 75, 75, 75, 75, 75},
{ /*Barbarian*/ 103, 95, 82, 70, 70, 60, 55},
{ /*Erudite*/ 60, 70, 70, 70, 83, 107, 70},
{ /*Wood Elf*/ 65, 65, 95, 80, 80, 75, 75},
{ /*High Elf*/ 55, 65, 85, 70, 95, 92, 80},
{ /*Dark Elf*/ 60, 65, 90, 75, 83, 99, 60},
{ /*Half Elf*/ 70, 70, 90, 85, 60, 75, 75},
{ /*Dwarf*/ 90, 90, 70, 90, 83, 60, 45},
{ /*Troll*/ 108, 109, 83, 75, 60, 52, 40},
{ /*Ogre*/ 130, 122, 70, 70, 67, 60, 37},
{ /*Halfling*/ 70, 75, 95, 90, 80, 67, 50},
{ /*Gnome*/ 60, 70, 85, 85, 67, 98, 60},
{ /*Iksar*/ 70, 70, 90, 85, 80, 75, 55},
{ /*Vah Shir*/ 90, 75, 90, 70, 70, 65, 65},
{ /*Froglok*/ 70, 80, 100, 100, 75, 75, 50},
{ /*Drakkin*/ 70, 80, 85, 75, 80, 85, 75}
};

static const int BaseClass[PLAYER_CLASS_COUNT][8] =
{ /* STR STA AGI DEX WIS INT CHR ADD*/
{ /*Warrior*/ 10, 10, 5, 0, 0, 0, 0, 25},
{ /*Cleric*/ 5, 5, 0, 0, 10, 0, 0, 30},
{ /*Paladin*/ 10, 5, 0, 0, 5, 0, 10, 20},
{ /*Ranger*/ 5, 10, 10, 0, 5, 0, 0, 20},
{ /*ShadowKnight*/ 10, 5, 0, 0, 0, 10, 5, 20},
{ /*Druid*/ 0, 10, 0, 0, 10, 0, 0, 30},
{ /*Monk*/ 5, 5, 10, 10, 0, 0, 0, 20},
{ /*Bard*/ 5, 0, 0, 10, 0, 0, 10, 25},
{ /*Rouge*/ 0, 0, 10, 10, 0, 0, 0, 30},
{ /*Shaman*/ 0, 5, 0, 0, 10, 0, 5, 30},
{ /*Necromancer*/ 0, 0, 0, 10, 0, 10, 0, 30},
{ /*Wizard*/ 0, 10, 0, 0, 0, 10, 0, 30},
{ /*Magician*/ 0, 10, 0, 0, 0, 10, 0, 30},
{ /*Enchanter*/ 0, 0, 0, 0, 0, 10, 10, 30},
{ /*Beastlord*/ 0, 10, 5, 0, 10, 0, 5, 20},
{ /*Berserker*/ 10, 5, 0, 10, 0, 0, 0, 25}
};

static const bool ClassRaceLookupTable[PLAYER_CLASS_COUNT][_TABLE_RACES]=
{ /*Human Barbarian Erudite Woodelf Highelf Darkelf Halfelf Dwarf Troll Ogre Halfling Gnome Iksar Vahshir Froglok Drakkin*/
{ /*Warrior*/ true, true, false, true, false, true, true, true, true, true, true, true, true, true, true, true},
{ /*Cleric*/ true, false, true, false, true, true, true, true, false, false, true, true, false, false, true, true},
{ /*Paladin*/ true, false, true, false, true, false, true, true, false, false, true, true, false, false, true, true},
{ /*Ranger*/ true, false, false, true, false, false, true, false, false, false, true, false, false, false, false, true},
{ /*ShadowKnight*/ true, false, true, false, false, true, false, false, true, true, false, true, true, false, true, true},
{ /*Druid*/ true, false, false, true, false, false, true, false, false, false, true, false, false, false, false, true},
{ /*Monk*/ true, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true},
{ /*Bard*/ true, false, false, true, false, false, true, false, false, false, false, false, false, true, false, true},
{ /*Rogue*/ true, true, false, true, false, true, true, true, false, false, true, true, false, true, true, true},
{ /*Shaman*/ false, true, false, false, false, false, false, false, true, true, false, false, true, true, true, false},
{ /*Necromancer*/ true, false, true, false, false, true, false, false, false, false, false, true, true, false, true, true},
{ /*Wizard*/ true, false, true, false, true, true, false, false, false, false, false, true, false, false, true, true},
{ /*Magician*/ true, false, true, false, true, true, false, false, false, false, false, true, false, false, false, true},
{ /*Enchanter*/ true, false, true, false, true, true, false, false, false, false, false, true, false, false, false, true},
{ /*Beastlord*/ false, true, false, false, false, false, false, false, true, true, false, false, true, true, false, false},
{ /*Berserker*/ false, true, false, false, false, false, false, true, true, true, false, false, false, true, false, false}
};

if (!cc)
return false;

Log.Out(Logs::Detail, Logs::World_Server,"Validating char creation info...");

classtemp = cc->class_ - 1;
racetemp = cc->race - 1;
// these have non sequential race numbers so they need to be mapped
if (cc->race == FROGLOK) racetemp = 14;
if (cc->race == VAHSHIR) racetemp = 13;
if (cc->race == IKSAR) racetemp = 12;
if (cc->race == DRAKKIN) racetemp = 15;

// if out of range looking it up in the table would crash stuff
// so we return from these
if (classtemp >= PLAYER_CLASS_COUNT) {
Log.Out(Logs::Detail, Logs::World_Server," class is out of range");
return false;
}
if (racetemp >= _TABLE_RACES) {
Log.Out(Logs::Detail, Logs::World_Server," race is out of range");
return false;
}

if (!ClassRaceLookupTable[classtemp][racetemp]) { //Lookup table better than a bunch of ifs?
Log.Out(Logs::Detail, Logs::World_Server," invalid race/class combination");
// we return from this one, since if it's an invalid combination our table
// doesn't have meaningful values for the stats
return false;
}

// add up the base values for this class/race
// this is what they start with, and they have stat_points more
// that can distributed
bSTR = BaseClass[classtemp][0] + BaseRace[racetemp][0];
bSTA = BaseClass[classtemp][1] + BaseRace[racetemp][1];
bAGI = BaseClass[classtemp][2] + BaseRace[racetemp][2];
bDEX = BaseClass[classtemp][3] + BaseRace[racetemp][3];
bWIS = BaseClass[classtemp][4] + BaseRace[racetemp][4];
bINT = BaseClass[classtemp][5] + BaseRace[racetemp][5];
bCHA = BaseClass[classtemp][6] + BaseRace[racetemp][6];
stat_points = BaseClass[classtemp][7];
bTOTAL = bSTR + bSTA + bAGI + bDEX + bWIS + bINT + bCHA;
cTOTAL = cc->STR + cc->STA + cc->AGI + cc->DEX + cc->WIS + cc->INT + cc->CHA;

// the first check makes sure the total is exactly what was expected.
// this will catch all the stat cheating, but there's still the issue
// of reducing CHA or INT or something, to use for STR, so we check
// that none are lower than the base or higher than base + stat_points
// NOTE: these could just be else if, but i want to see all the stats
// that are messed up not just the first hit

if (bTOTAL + stat_points != cTOTAL) {
Log.Out(Logs::Detail, Logs::World_Server," stat points total doesn't match expected value: expecting %d got %d", bTOTAL + stat_points, cTOTAL);
Charerrors++;
}

if (cc->STR > bSTR + stat_points || cc->STR < bSTR) {
Log.Out(Logs::Detail, Logs::World_Server," stat STR is out of range");
Charerrors++;
}
if (cc->STA > bSTA + stat_points || cc->STA < bSTA) {
Log.Out(Logs::Detail, Logs::World_Server," stat STA is out of range");
Charerrors++;
}
if (cc->AGI > bAGI + stat_points || cc->AGI < bAGI) {
Log.Out(Logs::Detail, Logs::World_Server," stat AGI is out of range");
Charerrors++;
}
if (cc->DEX > bDEX + stat_points || cc->DEX < bDEX) {
Log.Out(Logs::Detail, Logs::World_Server," stat DEX is out of range");
Charerrors++;
}
if (cc->WIS > bWIS + stat_points || cc->WIS < bWIS) {
Log.Out(Logs::Detail, Logs::World_Server," stat WIS is out of range");
Charerrors++;
}
if (cc->INT > bINT + stat_points || cc->INT < bINT) {
Log.Out(Logs::Detail, Logs::World_Server," stat INT is out of range");
Charerrors++;
}
if (cc->CHA > bCHA + stat_points || cc->CHA < bCHA) {
Log.Out(Logs::Detail, Logs::World_Server," stat CHA is out of range");
Charerrors++;
}

/*TODO: Check for deity/class/race.. it'd be nice, but probably of any real use to hack(faction, deity based items are all I can think of)
I am NOT writing those tables - kathgar*/

Log.Out(Logs::Detail, Logs::World_Server,"Found %d errors in character creation request", Charerrors);

return Charerrors == 0;
}

chrsschb
01-25-2016, 02:50 PM
Damnit Titanium, y u so difficult

provocating
01-25-2016, 02:53 PM
I never knew that was there Kingly, I am to the understanding I can true/false those out?

Kingly_Krab
01-25-2016, 04:28 PM
I'm not sure, I don't use Titanium, it may be client-sided, too, which would explain why we have it there, I guess just to serve as a reference. You'd have to change it and find out.

Figback65
01-26-2016, 07:33 AM
Cool thanks for all the info, I am going to work on it and ill post results unless someone beats me to it.

I prefer to use a different client than Titanium but I want classic Highpass and you can only get that in titanium because its client forced.

Zoid13erg
05-26-2019, 10:02 PM
Sorry this is not helpful but more so dumb question. Will locking expansions out just lock content but keep the DB more or less the same?

- I.E If I want a server just to go up to PoP and I am currently using the most up to date PEQ DB, Am I still going to get tacky issues when loading up Titanium client like the Tradeskill stations stuff like Kilns still not show up (currently they appear as dropped bags)

- Or removing all the merc/ random updated NPCs in PoP or any zone for that matter.

- Or of I want to have buffs stick to any level chara like Kei or Virt on a lvl 15 chara. Currently it tells me my lvl is too low.


For the past 6 months or so Ive been on/off trying to make something that is more or less PoP/LDoN like server. Are there not any archived PEQ databases that are titanium friendly/ Expansion relevant?