Page 1 of 1

Change Max Level

Posted: Wed Nov 19, 2014 6:39 pm
by HappyLDE
L2JServer Rev: 6652
DP Revision: 10449

I want to increase max character level. What i did so far:
- Changed experience.xml's maxLevel value and added rows for more levels.
- Changed experience.xsd's maxLevel value.

Now i can set my level higher than 85. Everything works great except hp, mp and cp! They get down to 700 or something!

Please don't tell me i have to change all files in data\stats\chars\baseStats.

Any idea?

Re: Change Max Level

Posted: Wed Nov 19, 2014 6:41 pm
by Sdw
You do have to do that :D

Re: Change Max Level

Posted: Wed Nov 19, 2014 8:32 pm
by Zoey76
Not only that, but it requires core changes I guess.

Re: Change Max Level

Posted: Wed Nov 19, 2014 8:51 pm
by Sdw
Nop

Re: Change Max Level

Posted: Wed Nov 19, 2014 9:49 pm
by HappyLDE
Ok indeed that worked! Actually one more thing had to be done DP side:
- Change charTemplate.xsd's level max there too.

Thanks!

Re: Change Max Level

Posted: Wed Nov 19, 2014 11:27 pm
by HappyLDE
Ofcourse i had to create a small php script to update all those 103 files and each of their respective hp, mp, cp increases after lv85!

In case someone needs (uses phpQuery):

Code: Select all

$files = new DirectoryIterator('temp/baseStatsOld');         foreach($files as $file)        {            if($file->isDot()) continue;             phpQuery::newDocumentXML( file_get_contents("temp/baseStatsOld/".$file->getFilename()) );             $xml = '<?xml version="1.0" encoding="UTF-8"?>                    <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/charTemplate.xsd">                        <classId>'.pq('classId')->text().'</classId>'.PHP_EOL;             $xml .= pq('staticData').PHP_EOL;             $xml .= '<lvlUpgainData>'.PHP_EOL;             foreach ( pq('lvlUpgainData level') as $level )            {                $lvl = pq($level)->attr('val');                 if ($lvl <= 85)                {                    $hp = pq($level)->find('hp:first')->text();                    $mp = pq($level)->find('mp:first')->text();                    $cp = pq($level)->find('cp:first')->text();                    $hpRegen = pq($level)->find('hpRegen:first')->text();                    $mpRegen = pq($level)->find('mpRegen:first')->text();                    $cpRegen = pq($level)->find('cpRegen:first')->text();                }                else                {                    $hp += 50;                    $mp += 20;                    $cp += 50;                }                 $xml .= '<level val="'.$lvl.'">'.PHP_EOL;                    $xml .= '<hp>'.$hp.'</hp>'.PHP_EOL;                    $xml .= '<mp>'.$mp.'</mp>'.PHP_EOL;                    $xml .= '<cp>'.$cp.'</cp>'.PHP_EOL;                    $xml .= '<hpRegen>'.$hpRegen.'</hpRegen>'.PHP_EOL;                    $xml .= '<mpRegen>'.$mpRegen.'</mpRegen>'.PHP_EOL;                    $xml .= '<cpRegen>'.$cpRegen.'</cpRegen>'.PHP_EOL;                $xml .= '</level>'.PHP_EOL;            }             $xml .= '</lvlUpgainData>'.PHP_EOL;            $xml .= '</list>';             // Now let's output a well indented and formatted xml            $doc = new DOMDocument();            $doc->preserveWhiteSpace = false;            $doc->formatOutput = true;            $doc->loadXML($xml);            $doc->save("temp/baseStats/".$file->getFilename());        }

Re: Change Max Level

Posted: Sat Dec 13, 2014 12:32 am
by HappyLDE
Ok well it necessitates lots of changes, like Giant's codex masteries, Scrolls of Recovery, fixing karma lost calculations etc etc :P so rolling back to normal :p

Re: Change Max Level

Posted: Sat Dec 13, 2014 12:29 pm
by JMD
Theres also issues when you change max level to 80 for example. The server doesnt load and it stops at an error.