|  | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 08:46 PM |  |  |  
 
| I am only designing custom templates, didn't yet match with data from game. Must design 7 different for 7 possibilities. ____________
 Era II mods and utilities
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:10 PM |  |  |  
 
| Regarding an upgaded stack, its position is [N/2], counting from 0, of course. 
 2Salamandre: you may also show how many monsters are in each stack.
 |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 09:19 PM |  |  |  
 
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:21 PM |  |  |  
 
| Quote:1/compliant, 10/savage
 
 Btw, Compliant is actually -4, not 1.
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:24 PM |  | Edited by AlexSpl at 21:25, 17 Dec 2014. |  
 
| Quote:Upgraded is always the second stack, starting from up?
 
 Nope, it's [N/2]. For 7 stacks it's #4, for 6 stacks it's #4, for 5 stacks it's #3, and so on.
 |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 09:29 PM |  |  |  
 
| ok thanks. For compliant/savage, the # will change color to show when join and when not. Erm calculates compliant as zero, savage as 10. This is what we have: 
 Internal Heroes values:
 Savage = 10
 Hostile = Random from 4 to 10
 Aggressive = Random from 1 to 10
 Friendly = Random from 1 to 7
 Compliant = 0
 ____________
 Era II mods and utilities
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:29 PM |  |  |  
 
| Here is how you can find how many monsters are in each stack: 
 m := nNeutrals / nStacks;
 b := nStacks * (m + 1) - nNeutrals;
 a := nStacks - b;
 
 a stand for how many stacks will contain (m + 1) creatures,
 b - how many stacks will contain m creatures.
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:32 PM |  |  |  
 
| Quote:Erm calculates compliant as zero, savage as 10.
 
 And I don't know why. Check the "Diplomacy internals" thread.
 
 |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 09:32 PM |  |  |  
 
| Can you please give me an example of calculations for each stack if total number is 40 and 7 stacks? 
 
 AlexSpl said:
 And I don't know why. Check the "Diplomacy internals" thread.
 
 
 
 Don't worry about this, erm just calculates them differently, but they match, already tested.
 ____________
 Era II mods and utilities
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:35 PM |  |  |  
 
| Quote:Can you please give me an example of calculations for each stack if total number is 40 and 7 stacks?
 
 
 m := nNeutrals / nStacks;
 b := nStacks * (m + 1) - nNeutrals;
 a := nStacks - b;
 
 nNeutrals = 40, nStacks = 7
 
 Here we go:
 
 m = 40 / 7 = 5
 b = 7 * (5 + 1) - 40 = 2
 a = 7 - 2 = 5
 
 So, we have a = 5 stacks with m + 1 = 6 monsters, and b = 2 stacks with m = 5 monsters:
 
 6 6 6 6 6 5 5
 |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 09:39 PM |  |  |  
 
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 09:58 PM |  | Edited by AlexSpl at 22:07, 17 Dec 2014. |  
 
| Here's a non-trivial trivia  How many stacks will you see when attacking 67 elves, standing at 17:12:0, with the army of 100 elves? 
 Edited, I'm talking about 0.67 ratio here
   |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 10:02 PM |  |  |  
 
| it says 2 stacks but I have a problem, numbers do not match. There are 101 elves, if I give to my hero 180 elves, then there are 104 neutrals. wtf? ____________
 Era II mods and utilities
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 10:11 PM |  | Edited by AlexSpl at 22:11, 17 Dec 2014. |  
 
| Quote:There are 101 elves, if I give to my hero 180 elves, then there are 104 neutrals. wtf?
 
 It's weird. Try to set numbers with the map editor
   |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 10:12 PM |  |  |  
 
| Sorry, forgot option in wog about # stacks bonuses on first day. Got 2 stacks, numbers ok. 
 Meh, you edited values, with 100 vs 67 I get 3 stacks.
 ____________
 Era II mods and utilities
 |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 10:15 PM |  | Edited by AlexSpl at 22:15, 17 Dec 2014. |  
 
| So, how many stacks do you see when attacking 100 elves with 67 elves? Just wanna check if your script is flawless. |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 10:16 PM |  |  |  
 
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 10:17 PM |  |  |  
 
| Quote:Meh, you edited values, with 100 vs 67 I get 3 stacks.
 
 It's inaccurate, check it out. They are splitting to 4 stacks actually
   |  
 | 
 
| AlexSpl 
  
     
      Responsible
 Supreme Hero
 
 | 
|  posted December 17, 2014 10:20 PM |  |  |  
 
| Oh, I'm sorry. Move the elves to 18:12:0   |  
 | 
 
| Salamandre 
  
       
         Admirable
 Omnipresent Hero
 Wog refugee
 
 | 
|  posted December 17, 2014 10:24 PM |  |  |  
 
 | 
|  |