Page 1 of 1

Custom Max Level Problem

Posted: Thu Oct 01, 2015 4:41 pm
by JMD
I want to make a custom gameplay server. I want to set the max level to 78, however i get all these errors:

http://pastebin.com/EuHxQpcd

I know a way to fix these errors but they involved editing all those files in the error.

Is there a better way to do it? Supressing these errors or ignoring everything above the set level on experience.xml?

P.S: In the past i used to do this kind of changes without problems.

Re: Custom Max Level Problem

Posted: Thu Oct 01, 2015 4:50 pm
by Sdw
Well you need to edit them all.

Maybe use Ertheia branch data which goes up to 99.

Re: Custom Max Level Problem

Posted: Thu Oct 01, 2015 4:55 pm
by JMD
I dont want to increase the level, i want to decrease it.

Re: Custom Max Level Problem

Posted: Thu Oct 01, 2015 6:03 pm
by Sdw
Sorry, misread.

you gonna need core editing to do so. Char template xml are parsed, whatever level there is in there, even though it limits the size of the array to maxLevel - 1.

I would rework it all, drop all additional level, or a quick one in PlayerTemplate

int level = parseInteger(attrs, "val");

if(level > ExperienceData.getInstance().getMaxLevel())
break;

Re: Custom Max Level Problem

Posted: Thu Oct 01, 2015 6:37 pm
by JMD
i added this

Code: Select all

if(level > ExperienceData.getInstance().getMaxLevel())
break;
after int level = parseInteger(attrs, "val"); in PlayerTemplateData.java in core.

However it didnt change anything, i still get the errors unless it included editing the xmls (you said edit the xmls or add the code).

P.S: The above problem i soved it doing that: instead of level>ExperienceData i did it level<ExperienceData

Now i only get this:
[01/10 19:32:39] InitialShortcutData: Loaded 4 Initial Shortcuts data.
[01/10 19:32:39] InitialShortcutData: Loaded 0 Macros presets.
[01/10 19:32:39] ExperienceData: Loaded 79 levels.
[01/10 19:32:39] ExperienceData: Max Player Level is: 78
[01/10 19:32:39] ExperienceData: Max Pet Level is: 79
[01/10 19:32:39] PlayerXpPercentLostData: Could not parse file playerXpPercentL
st.xml
java.lang.ArrayIndexOutOfBoundsException: 80
at com.l2jserver.gameserver.data.xml.impl.PlayerXpPercentLostData.parse
ocument(PlayerXpPercentLostData.java:62)
at com.l2jserver.util.data.xml.IXmlReader.parseDocument(IXmlReader.java
185)
at com.l2jserver.util.data.xml.IXmlReader.parseFile(IXmlReader.java:89)
at com.l2jserver.util.data.xml.IXmlReader.parseDatapackFile(IXmlReader.
ava:63)
at com.l2jserver.gameserver.data.xml.impl.PlayerXpPercentLostData.load(
layerXpPercentLostData.java:47)
at com.l2jserver.gameserver.data.xml.impl.PlayerXpPercentLostData.<init
(PlayerXpPercentLostData.java:41)
at com.l2jserver.gameserver.data.xml.impl.PlayerXpPercentLostData$Singl
tonHolder.<clinit>(PlayerXpPercentLostData.java:90)
at com.l2jserver.gameserver.data.xml.impl.PlayerXpPercentLostData.getIn
tance(PlayerXpPercentLostData.java:85)
at com.l2jserver.gameserver.GameServer.<init>(GameServer.java:221)
at com.l2jserver.gameserver.GameServer.main(GameServer.java:449)
and ingame my hp and mp etc. is 1

Re: Custom Max Level Problem

Posted: Sat Oct 03, 2015 3:10 pm
by JMD
Ingame so far these not parsing warnings dont seem to break anything, characters get their stats from the xmls just fine.

If the stats are not breaking why arent those warnings supressed?