Newbie Spellweaver
- Joined
- Feb 18, 2015
- Messages
- 36
- Reaction score
- 2
@zeldasmokes Indeed you can change the value quite easily, the Proprieties file change the value in the Channel handling. As long you keep it a whole number, it react fines. When you try to add a decimal, it starts to freak out.
After further studies I noticed that what I require is a double and that the problem is indeed deeper than just changing a few values as the exp value for say a snail will become 1.5 which is not an integer. So I am unsure if the client will freak out or not..
zeldasmokes Indeed you can change the value quite easily, the Proprieties file change the value in the Channel handling. As long you keep it a whole number, it react fines. When you try to add a decimal, it starts to freak out.
After further studies I noticed that what I require is a double and that the problem is indeed deeper than just changing a few values as the exp value for say a snail will become 1.5 which is not an integer. So I am unsure if the client will freak out or not..
why would u make it a decimal when it's an integer O.O
java can't parse an integer as a decimal only a static number between 0~2.147b.. if you want double, change the exp rate within the source globally to a double
Yes @zeldasmokes that would work. But there is 3300 mobs to change. I'd rather find a way to modify it server side if possible. But I have no clue where it could be other than channel handling.:
maybe he's not trying to make a normal server o.oMy question is why would you want a .5 rate server when 1x is already terrible. Also, why would you make a decimal a integer when a integer is not a decimal or a fraction it's a whole number. I don't see how making a integer a decimal is possible?
You shouldn't need to edit exp in the XMLs. In ChannelServer just initialize and parse exprate from world.properties as a double, and then when exp is given out... e.g. when a mob is killed and your server needs to read the exp as an int, do something like (int) Math.ceil(mobexp * exprate).