EL formula help...

Valdier

Explorer
Valdier

Sorry I hadn't replied earlier, I actually figured once I corrected myself that nobody would look at the thread again :)

Glad to see people are doing so. One major thing I need to do with this is the CR < 1 calculations... that is a real pain.

When I wrote the EL calculations I originally was thinking only mixed pairs within 1 CR of each other mattered but I now see I was wrong ;)

I will post my final EL calculation when I update it.
 

log in or register to remove this ad

Valdier

Explorer
Ok, here we go...

This is the latest version, not handling EL < 1. Didn't take too much, just another if/else. As a note, I am destroying the object each time rather than caching it because it makes debugging 100x easier. I will start caching all the data once I am sure everything works right :)

public static Integer calculateEL(ArrayList list){

int current;
int next;
int temp;

while(list.size() > 1){
java.util.Collections.sort(list);

current = ((Integer)list.get(0)).intValue();
next = ((Integer)list.get(1)).intValue();

if((current == next) || (current + 1 == next)){
temp = current;
list.remove(0);
list.remove(0);

if(temp < 2){
if(next == 1){
list.add(new Integer(temp+1));
}
else{
list.add(new Integer(temp+2));
}
}
else{
list.add(new Integer(temp+2));
}
}
else if((current + 2) == next){
temp = current;
list.remove(0);
list.remove(0);

list.add(new Integer(temp+3));

}
else{
list.remove(0);
}
}
return (Integer)list.get(0);
}
 

Valdier

Explorer
reply to Dvvega

'1) your monster list "screws up" under certain conditions ... '

Should be fixed now... it was an early thing I had in there when I was still adding "features" now the list for whatever you searched for "should stay" and should stay in the same sort order you had. I know the name sort arrow doesn't always highlight but that is intentional actually.

'2) the EL calculation is wrong, in some cases. In particular for mixed pairs of CRs (pg 101, DMG).'

Fixed also, the feedback from you and monkeyboy let me know I was doing the math wrong :)

thanks :)

*As a note, the reason I don't have it let you add a number next to a monster is because it's too hard to parse html responses to match the check box array that is returned by the browser. I suppose it is "technically" possible, I just don't have the patience to do it :)
 

Valdier

Explorer
reply to Leopold

'now if only there were a way to add in manual CR's and come out with the total. I LOVE the breakdown of xp by classes. Is there a way to space it out even more? LIke get a chart from 1-10 and than go forward to 11-20?'

I'm not sure exactly what you mean by this... do you mean, allow a text field that lets people enter X cr's and then spit out the final EL for them? I could do that fairly easy I suppose.

As far as the experience chart goes, as far as I can tell, I cannot reproduce the actual chart or the formulas for obtaining the numbers, but I can reproduce what the final value would be for that grouping of CR's. Are you just asking for a wider range than the standard +/- 4 that I have right now?

I just picked that range based off the DMG suggestion of level ranges and what they should be for encounters.

'I like it very nice just add some customizations and it will be a staple of my gaming computer!!'

Let me know what all else I can add, I am doing it mostly as a hobby currently so anything reasonable I will throw in. You can either drop suggestions here or email from the link on the page.
 

Leopold

NKL4LYFE
thanks for adding in the CR window! Now if only you could make it portable for us laptop users who need to travel around and not require it to be hooked up to the web to use!
 

Valdier

Explorer
Leopold said:
thanks for adding in the CR window! Now if only you could make it portable for us laptop users who need to travel around and not require it to be hooked up to the web to use!

Well... I will see what I can do... biggest problem is having to emulate my own DB for doing searches of the data, I will see what I can come up with although it will be a while.

Have to convert it to a swing app instead of a JSP/web app.
 

Geoff Watson

First Post
One way of working out EL, is to add all the XP values of the monsters together, and look at the closest CR to the total, and use that as the EL.

It doesn't work exactly, but will usually be close enough, as well as being a lot easier to write code for.

Geoff.
 

Valdier

Explorer
That is a possibility also Geoff, other than CE's <1 I have the formula working now, I could do CR's < 1 if I had any desire to actually spend the 30 minutes it would take to add the if/elses and update the database :)
 

Leopold

NKL4LYFE
Valdier said:
That is a possibility also Geoff, other than CE's <1 I have the formula working now, I could do CR's < 1 if I had any desire to actually spend the 30 minutes it would take to add the if/elses and update the database :)

please do as this incorporates goblins, orcs, kobolds and all othe manner of small critters my pc's like to kill
 

Remove ads

Top