You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello y’all, I tried my hand at moving Loggy’s understanding of the executables without any background understanding of javascript. So yeah, failed, though not sure how. Like once I got it to stop crashing when I run it on localhost, a couple of ways of trying to do it loaded everything except the unit cards, and a couple ways got it stuck perpetually downloading data even when it had already done that according to cmnd.
Anyway, that was about two months ago and I’ve not returned to it since, so I’m making this Issue incase anyone else looking at this repository wants to take a stab at javascripting it in, here are my notes.
COPIED FROM LOGGY’S ILLWIKI PAGE:
Recpoint autocalc - applies to non-commanders, or commanders with a set RP cost of <7. Those with 7+ use different rules I don't understand yet
If set RP is less than 500, use that and don't do any more of this.
A = (RPcost + 500)/1000, rounded down, to a minimum of 1.
A2 = A, unless it is less than 1, in which case A2 = 1.
B = (unit's base gold cost, not autocalced) - 10000
if unit's base gold cost ⇐ 5000, B = the base gold cost instead
C = ((B - A2)*100)/A2, to a maximum value of 100
If the unit has the Standard ability, C instead has a maximum value of 50
D = sqrt(unit's start age, modified by unknown stuff * 4)
E = 1 + D + base RP cost - (A * 1000) + (C * 20)/100
If the unit is undisciplined, divide E by 2.
If the unit is a slave (but not also undisciplined), subtract E/4 rounded down.
If the unit is mounted, add 15 to E.
If the unit is slow to recruit, multiply E by 2.
If E is less than 2, set it to 2.
E is the final RP cost.
.
MY DRAFT OF UNDERSTANDING IT WITH CONSISTENT VARIABLES
Final RPcost = (RPcost) if the listed RPcost is less than 500, otherwise proceed with calculating variables A,B,C,D,E
A = ((RPcost + 500)/1000), rounded down, to a minimum of 1
B = (base gold cost) if the unit's base gold cost < 5000, otherwise: B = ((unit's base gold cost, not autocalced) - 10000)
C = (((B - A)*100)/A), rounded down, to a maximum value of 100, if the unit has the Standard ability the maximum value is 50
D = (sqrt(unit's start age (modified by unknown stuff) * 4))
E = (1 + D + base RP cost - (A * 1000) + (C * 20)/100) rounded down, then (in this order) divide by 2 if undisciplined, subtract (E/4) rounded down if slave and not undisciplined, add 15 if Mounted, multiply by 2 if Slow to Recruit, then if E has a minimum value of 2
Final RPcost = (E)
Hello y’all, I tried my hand at moving Loggy’s understanding of the executables without any background understanding of javascript. So yeah, failed, though not sure how. Like once I got it to stop crashing when I run it on localhost, a couple of ways of trying to do it loaded everything except the unit cards, and a couple ways got it stuck perpetually downloading data even when it had already done that according to cmnd.
Anyway, that was about two months ago and I’ve not returned to it since, so I’m making this Issue incase anyone else looking at this repository wants to take a stab at javascripting it in, here are my notes.
COPIED FROM LOGGY’S ILLWIKI PAGE:
Recpoint autocalc - applies to non-commanders, or commanders with a set RP cost of <7. Those with 7+ use different rules I don't understand yet
If set RP is less than 500, use that and don't do any more of this.
A = (RPcost + 500)/1000, rounded down, to a minimum of 1.
A2 = A, unless it is less than 1, in which case A2 = 1.
B = (unit's base gold cost, not autocalced) - 10000
if unit's base gold cost ⇐ 5000, B = the base gold cost instead
C = ((B - A2)*100)/A2, to a maximum value of 100
If the unit has the Standard ability, C instead has a maximum value of 50
D = sqrt(unit's start age, modified by unknown stuff * 4)
E = 1 + D + base RP cost - (A * 1000) + (C * 20)/100
If the unit is undisciplined, divide E by 2.
If the unit is a slave (but not also undisciplined), subtract E/4 rounded down.
If the unit is mounted, add 15 to E.
If the unit is slow to recruit, multiply E by 2.
If E is less than 2, set it to 2.
E is the final RP cost.
.
MY DRAFT OF UNDERSTANDING IT WITH CONSISTENT VARIABLES
Final RPcost = (RPcost) if the listed RPcost is less than 500, otherwise proceed with calculating variables A,B,C,D,E
A = ((RPcost + 500)/1000), rounded down, to a minimum of 1
B = (base gold cost) if the unit's base gold cost < 5000, otherwise: B = ((unit's base gold cost, not autocalced) - 10000)
C = (((B - A)*100)/A), rounded down, to a maximum value of 100, if the unit has the Standard ability the maximum value is 50
D = (sqrt(unit's start age (modified by unknown stuff) * 4))
E = (1 + D + base RP cost - (A * 1000) + (C * 20)/100) rounded down, then (in this order) divide by 2 if undisciplined, subtract (E/4) rounded down if slave and not undisciplined, add 15 if Mounted, multiply by 2 if Slow to Recruit, then if E has a minimum value of 2
Final RPcost = (E)
.
MOST RECENT FAILED ATTEMPT AT CODING IT IN
(replace that which is above with:)
The text was updated successfully, but these errors were encountered: