I was going to post this in the bug thread (it's in relation with a previous message in it), but as I think this kind of grey areas can only interest crazy modders, and also that Edi risks to commit suicide if he tries to resume my post for the list.... I post it here.
(in the attached files, I've modded monster 602 appearing in all pretender lists - it's the white centaur called "avatar of obad-hai" ; each file is explained in mod description)
Here a report of my experimentations with multiple shapes monsters (pretenders in this case, but the same units called as normal monsters in a map file work the same) :
... First thing I discovered trying to mod a prismatic sphere (the mage uses shapechange to activate the sphere, then a secondshape is used for each color) : Using a succession of secondshapes for a shapechanged monster is bugged if you make the last form able to shapechange to the first (A-B-C-D-E-A), the monster A will shapechange directly to E instead of B, all intermediate shapes will never appear.
See the message #568638.
... The same thing happens for a cycle of shapechanges (A - shapechange B - shapechange C - shapechange D - shapechange A), so it's no longer* possible to create a shape changing unit having more than one other shape and able to change to the one it wants in one turn (like the Jotun Werewolf**, =unit A -> shapechange B -> shapechange C (...) -> shapechange A). If you use a cycle of transformations the first and last shapes become the only ones availables.
I think it may be a side effect of the (ultra useless except if there is a code utility I can't know) "shapeshange order now affect the two creatures" change some patchs ago ; note that unlike what modding.pdf and this patch note may make believe, #shapechange still not usually gives an automatic shapechange order to the second unit (yes in some rare cases no in most common ones ?!***) ; but makes a shapechange command for it not working except...
- if it's a shapechange to the first form, or
- if the change is definitive (unit A -> shapechange B -> shapechange C -> shapechange D works as long as the unit D can't shapechange to form A again ; if the last unit has a #shapechange A all intermediate shapes will be lost.
* iirc multiple shapes modded units worked fine around the end of dom2 / beginning of dom 3 era
** the Jotun Werewolf still works properly, so it's only a mod issue
*** see example in attached mods shapechangebug 1 & 2 ; the shapechange command seem to work as described in modding.pdf only if there are 3 or more units in the shapechange chain (very strange behavior isn't it ?) so to resume....
- "shapechangebug 1" : unit A (shapechange command) -> unit B (with no shapechange command) = unit B gets no shapechange order
- "shapechangebug 2" : unit A (shapechange command) -> unit B -> unit C -> unit D (with no shapechange command) = unit D gets free shapechange order ( to C)
- (and reminder) unit A -> unit B -> unit C -> unit D -> unit A = unit A shapechange become a direct shapechange to D, unit D shapechange doesnt change
... There is a workaround to allow the use of a transformation cycle : using firstshape A instead of shapechange for the last unit (the last monster will take the form A after one turn and be then able to shapechange to intermediate units).
But this workaround also encounters the bug (depend of which units are used, and I find no logic for why it works or not). See an example in attached mods itworks.dm and notworking.dm , same units in the middle of the shapechanges chain, different order, one works as expected the other not.
If someone understand how it works....
--
ps : another strange thing, monster 2134 (second form of 602) appears in the list of pretenders of all nations even if I remove the pathcost command for it (if I remove it, the cost of magic for pretender 602 become 10)
pps : I may have missed something about how it should work,
ppss : or my mod may trigger strange bugs for other reasons (didn't find errors in my code but...)