|
|
AlexSpl
Responsible
Supreme Hero
|
posted December 17, 2014 10:26 PM |
|
|
Should be 4 Your script has a flaw.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 17, 2014 10:27 PM |
|
|
|
AlexSpl
Responsible
Supreme Hero
|
posted December 17, 2014 10:30 PM |
|
Edited by AlexSpl at 22:30, 17 Dec 2014.
|
Quote: well no, because in battle I get 3 stacks too.
How this is possible? 67 elves attack 100 elves which stand at 18:12:0. You should get 4 stacks!
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 17, 2014 10:33 PM |
|
|
|
AlexSpl
Responsible
Supreme Hero
|
posted December 17, 2014 10:38 PM |
|
|
Now it seems to be OK. I wanted to check if you have correct precision when calculating k.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted December 17, 2014 10:43 PM |
|
|
You'll probably want to check out the following situations as well:
a) 669 against 1000 elves;
b) 670 against 1000 elves;
c) 671 against 1000 elves.
Neutrals should stand at 18:12:0.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 17, 2014 10:57 PM |
|
|
a) 669 against 1000 elves; 5/5
b) 670 against 1000 elves; 4/4
c) 671 against 1000 elves. 4/4
They match.
____________
Era II mods and utilities
|
|
AlexSpl
Responsible
Supreme Hero
|
posted December 17, 2014 10:58 PM |
|
Edited by AlexSpl at 23:01, 17 Dec 2014.
|
OK. Now it seems your script is correct.
Just a side note: a 4-bytes floating point number isn't equal to a 8-bytes floating point number
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 20, 2014 01:33 AM |
|
|
Every other thing is ready except those damnt stacks quantity. I am unable to erm code this:
m := nNeutrals / nStacks;
b := nStacks * (m + 1) - nNeutrals;
a := nStacks - b;
The problem is that when erm does those calculations, the result is not known by me, so I must script all possibilities. Every stack quantity must be put separately in z (string) variable, then placed in dialog item (1-7). For example, let's look at the part which codes when there are 7 stacks.
!!if&x4=7:; SEVEN STACKS
[...yada yada calculations for upgrade/not upgrade, this is done]
;now every stack quantity part, following your example
!!VRy11:Sx3:7; y11=m
!!VRy12:Sy11+1; y12=m+1
!!VRy13:S7*y12-x3; y13=b
!!VRy14:S7-y13; y14=a
;now I have to find how many possibilities there are, as I don't know the result of neither m, b or a. And I am stuck here, my maths are terrible.
Because I will have to place in item 1=first stack#, item 2=second stack#, item 3=third stack# and so on, until 7. And those must be vars storing integers.
!!en:;
To give you an example on how it looks, here is my code when there are 2 stacks (obviously very simple).
;x3= total number of neutrals
!!VRy11:Sx3:2; divide neutrals by 2 and store in y11
!!VRy12:Sx3-y11; Subtract y11 now from neutrals number and store in y12, now y12+y11=x3
!!VRz2:S^%Y12^; !!VRz3:S^%Y11^; set z2/z3 var (strings) to y12/y11
!!DL561:A1/3/z2/1; !!DL561:A2/3/z3/1; place z2/z3 vars in special dialog #561 items 1/2, so the player sees this:
Also maybe we should move all this to a separate thread, as we kill Rainalcar's valuable thread.
|
|
kicferk
Known Hero
|
posted December 20, 2014 12:40 PM |
bonus applied by angelito on 21 Dec 2014. |
Edited by kicferk at 14:31, 20 Dec 2014.
|
There is an easier way, provided you can use some kind of loops.
a=number of monsters % number of stacks
b=number of monsters / number of stacks
c=number of stacks
for i from c to 1
if a>0 then
stack_i=b+1
a=a-1
else
stack_i = b
end if
end loop
Writing it in ERM can be tough, but I think there are some basic blocks like loops, if's and arrays in ERA 2.
Examples of such things are here: ERM
It's all in Polish, so if you can't figure out what is what with google translate let me know.
The reason it would work is this:
number of monsters = k*number of stacks + remainder. Remainder is divided into upper stacks, 1 to each. k=b in my case, remainder =a.
Also, I think discussion can be moved, but the part about calculating whether stacks are upgraded and how they split is perfect for this thread
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 20, 2014 02:01 PM |
|
|
That polish example only gives an example of using if/en/el, which I am using since ages. That is not helping me at all, there are only basic commands any beginner can do.
Ok, I will hold on this for the moment, as this area where I have to understand klingon (what is the meaning of "for i from c to 1"???) is way over my head. Will see later if I get something more understandable, thanks for help.
____________
Era II mods and utilities
|
|
kicferk
Known Hero
|
posted December 20, 2014 02:16 PM |
|
Edited by kicferk at 14:30, 20 Dec 2014.
|
I think you can write "for i from c to 1" as a function with a variable(i) ranging from another variable(c) to 1 So much for foreign languages
!?FU1;
if a>0 then
stack_i=b+1
a=a-1
else
stack_i = b
end if
!!DO1/c/1/-1;
This should do it, provided you translate part "if..." into ERM, and implement an array to hold number for stacks
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 20, 2014 03:00 PM |
|
|
|
Warmonger
Promising
Legendary Hero
fallen artist
|
posted December 25, 2014 10:27 AM |
|
|
|
Vampire_Rush
Adventuring Hero
|
posted March 21, 2015 02:04 AM |
|
|
I think someone should add the maxiimum distance for full damage ranged attack is 10. For a 2-hex shooter it's the front square that counts. Also for shooting at 2-hex creatures it won't matter if you hit the front at distance 10 or backside for distance 11, both deal same damage. I've been looking very long time for someone saying this but at last I had to spend an hour testing of my own. Also I have yet to find out what the obstacle penalty means, seems its just to shoot through. Perhaps siege walls only?
|
|
kicferk
Known Hero
|
posted March 21, 2015 10:36 AM |
|
|
As far as I know, obstacle penalty means only walls during siege.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted April 05, 2015 03:29 AM |
|
|
Here's two old pictures that are supposed to be compared, and illustrate an interesting peculiarity regarding siege rules.
|
|
AlexSpl
Responsible
Supreme Hero
|
posted April 05, 2015 03:46 AM |
|
Edited by AlexSpl at 04:14, 05 Apr 2015.
|
Quote: As far as I know, obstacle penalty means only walls during siege.
Another nice picture to explain how the siege penalty actually works.
To put it simply, if the line of fire crosses a section of the wall which is still intact, there will be a siege penalty, otherwise won't. Though, in some cases, you still can shoot without a penalty when the line of fire goes through a "touch point" of two sections.
Quote: Also for shooting at 2-hex creatures it won't matter if you hit the front at distance 10 or backside for distance 11, both deal same damage.
You didn't say anything about penalties.
|
|
Laser70
Adventuring Hero
|
posted October 10, 2015 02:47 AM |
|
Edited by Laser70 at 03:16, 10 Oct 2015.
|
By studying the game details you can become better at it, but by studying it at the lowest possible level is not making anyone a better player, because the AI doesn't learn side by side with your own learning, and the AI is adapted for specific difficulty settings.
When you study the numbers, let's say logistics for example, and study the numbers to a much deeper level than what is described in the manual and this leaves you in great advantage and maybe you can use it against the AI in a very strong way, you're fooling yourself and destroying the game.
Here is the reality:
AI: No learning since the game was made
Human: Studies the game to the deepest level every single day
You would expect that the human player is becoming a better player as it learns more about the technical details, but the opposite is true, despite how bizarre that may sound. You should learn the basic strategy about the game, but to study the numbers, the untold numbers you can't find in the manual is probably not a good idea.
For example, I could place my unit stacks in specific slots right before a battle, just to waste the AI's unit movement points (because I know which unit it will attack with what unit he has got) but when you go down to that kind of study, it's probably ruining the game, because I am not studying strategy, I am studying how the game limits the AI player, I am not studying how the AI may move, I am studying how the AI _WILL_ move, which is a very different thing, and it's cheating.
In a real battle in the real world, it would not be cheating, but in this game, you're studying stupid robot, which is stone gazed and doesn't learn anything new, unless the game is patched to improve on the AI.
You should probably limit your strategy and tactics to what the manual tells you, anything beyond that isn't good.
The numbers that makes up game mechanics are meant to simulate situations that would otherwise not be numbered, when you learn the numbers, you're ruining the effects that was meant to not rely in numbers. The numbers are the hidden secrets, when you learn those numbers, you're not learning strategy, but you are learning how to cheat, simply because numbers can direct you into information you would otherwise not have access to in a real battle because real battles does not need to be simulated with numbers, therefore there are no numbers.
Studying the numbers in a game is like becoming God and, hardly need to tell you, isn't a good thing.
If you played the game since (Year 2000 for example), you've studied the numbers for 15 years, and the AI has studied it for 0 years. Can you see what is wrong with that, unless this was a real battle and both were learning at the same pace. The exception would be if both were human players.
After a specific amount of years and the game isn't patched anymore, it becomes unplayable, your knowledge has gone way beyond that of the AI.
This is one of the reasons I am for not only randomizing the damage value within a constant damage range, but also randomizing the min/max damage range within a small spectrum, and then randomizing the damage value (Including other things in the game, and keeping some information unknown, but predictable to some degree) AI randomization can also help against this problem, a learning AI can also help. This type of game (Heroes) is perfect for learning AI's, it's not too complex and it has excellent potential for analysing its own battle statistics (because the game is turn based, there is room for it)
|
|
bloodsucker
Legendary Hero
|
posted October 10, 2015 05:12 AM |
|
|
I agree, when I found out that Santa didn't exist it totally ruinned Christmas.
|
|
|
|