(October 22nd, 2015, 11:07)I like Serena Wrote: We did some investigation on action codes.
See for instance: http://realmsbeyond.net/forums/showthrea...#pid284476
You mean those?
Nope, this is overland and I assume it is for stacks of units, not individual units. It's an array of 3Ch(60) elements per wizard.
Valid values seem to be 0-6 or something around that.
An example where it is used is E9756h.
It comes with several other related arrays of same structure at different addresses, 7734h and 7770h being X and Y coordinates, probably the location of the unit stack. There might be more but there are so many variables and arrays related to overland movement that it's really hard to make progress.
I still try to figure out how to make those units stuck guarding a node actually participate in the game. Sky Drakes and heroes carrying 3 artifacts being locked to a node doing nothing no matter what is just wrong.
btw, about those combat ones you mention, I've added 0x99h for "stay idle" in my mod because there wasn't one for that and I really needed sprites to not melee my 10 times stronger troops
Sadly it still gets overruled by the AI every once in a blue moon but 90% of the time flying units now avoid getting themselves hurt if the other side has an overwhelming advantage.
oh, and a question do you know if Kryub had any good reason for the changes I found and posted here?
http://realmsbeyond.net/forums/showthread.php?tid=7846
He actually lowered the priority of "War" targets compared to "nonwar" ones and also made the AI consider player units 4 times weaker than units of any other possible target...at least that's how I interpret the code, but still haven't found where and how those priorities are used.
Also, if you are interested, one thing I did find out.
[bx-636Ch] refers to a matrix which contains the calculated army strength on every map cell, encounter zones included (and the topmost two bits are flags which I assume are "Need to defend this location" and "controlled by ally" or something similar)