Version 1.5.7, sometimes result return from CityOnTile() is stuck at value "1" and lead to wrong result in script.
Edited: further test show that CITYONTILE() does not flush or store correctly at the beginning of combat. This sometimes cause value return as 1 (player's first city). This causing script related to attacker units (sometimes defending units too but much less often) to operate wrongly. I currently circumvent this by make such check occur later on first attacker turn instead. But I still think this could considered as bug and must be reported.
(December 11th, 2024, 20:37)Suppanut Wrote: Version 1.5.7, sometimes result return from CityOnTile() is stuck at value "1" and lead to wrong result in script.
Edited: further test show that CITYONTILE() does not flush or store correctly at the beginning of combat. This sometimes cause value return as 1 (player's first city). This causing script related to attacker units (sometimes defending units too but much less often) to operate wrongly. I currently circumvent this by make such check occur later on first attacker turn instead. But I still think this could considered as bug and must be reported.
Thanks for pointing out and a workaround! I was recently just wondering what went wrong on a particular occasion.
I keep getting an exception in this game. No mods.
Load it, select only Ninja, and attack the tower.
-- Avoiding all units and not casting spells does not crash.
-- Cast Blur. Cast Web on Great Drake. Cast Web on an Efreet. Attack Efreet and move away. Cast Web on another Efreet. I get spotted, "Efreet casts Lightning Bolt" >> crash.
-- The above but doesn't case Web on Great Drake. Get spotted, Lightning Bolt is cast, Warp Lightning is cast, battle over.
-- Web Great Drake. Move next to Efreet. Lightning, Lightning, battle over.
-- Blur. Web Great Drake. Web Efreet. Move next to Efreet. Efreet moves away, 1 of the 3 Efreets casts Lightning Bolt, crash.
-- Web Efreet #1. Web second Efreet, attack and stay next to Efreet #1. Lightning Bolt and crash.
(November 22nd, 2024, 04:10)GMBarak Wrote: Bug: Supreme light does not grant +2 range attack to arrow units (specifically, didn't work on my longbowmen).
Supreme light only applies to life creatures -- and magic users (spell casters or magical ranged attacks)
Are your bowmen life creatures (e.g. destiny)?
1. I attacked 6 Stag Beetles and 3 KL Halberdiers with 1 Night Stalker. With Possession I killed 5 of them and I lost my 1 Night Stalker. I lost 1 Fame for this. I think this should not result in Fame loss, since this is not bad result. Reproduce from FameLoss.Sav
2. Doom Bolt caused 12 damage to hero who had Invulnerability. Reproduce from FameLoss.Sav. Next turn Invisible War Monk will attack together with Draconian hero.
3. I think passing around Pathfinding item to multiple heroes for free should not be allowed. Any item that a hero used for a single move should be locked in for that turn.
4. 5 out of my 6 figure Werewolves were Petrified by spell. The last figure was killed by Fire Bolt. I won the battle. But they did not regenerate. They stayed dead. Reproduce from PartialPetrifyWere.sav. Attack the Light Blue Druid hero with stack from boat on NE.
5. When AI lands a stack of 8 units trying to attack me, it never moves further. Its pathfinding only targets a land next to shore, but fails to move more towards its target.
6. AI lands large army next to my poorly defended town. But it could just attack and take my town from boat too. I have never seen that.
7. Barbarian Swordsmen Thrown not shown. Reproduce from Thrown.sav
8. Pink AI Merlin attacked my town but this act did not result in War. Maybe it still considered it neutral town, since I captured it from neutrals 8 turns earlier. Reproduce from BeforeAttack.sav, AfterAttack.sav. Then it attacked my outpost too. Still no war.
9. Why is the Wizard pact 1 sided? AI routinely violates it and stations huge stacks next to my towns, while if I go 2 tiles to its town it immediately complains and breaks pact if I continue for 3 turns. Reproduce from NAP.sav
10. I cast Wraith Form in battle. First move to cross wall was not allowed. Once I moved 1 tile it became available. Reproduce from WraithForm.sav Attack the Pink town on the SW with 8 Werewolves.
11. AI apparently lost its Unknown hero due to summoning Shadow Demons and since its town was surrounded by my units the hero was placed outside and removed from the game immediately. Reproduce from UnknownHeroBefore.sav, UnknownHeroAfter.sav. See Green town on SE of my Blue empire
12. Flame Blade text says: “Units whose original unit type is a normal unit are a valid target, even if they have been converted to fantastic by another spell”. This is not true for Werewolves. Flame Blade cannot be cast on them. Reproduce from FlameWere.sav
13. With drought on my town, and 12K current population with 7K max population, I still get the +90 Race and +50 Farmer’s Market pop growth. I think those should be 0, since if the current pop = max pop then they are 0 already. Reproduce from Drought.sav. See town 15 2E5
14. Outpost growth formula does not seem to be accurate. With max pop 12, barbarian race it should have grown to >1000 with 100% chance from 1513Sep to 1514Jun, but it displays only 8 houses, so it is <900. Reproduce from BeforeGrowth.sav, AfterGrowth.sav, No spell and no resources. Manual’s formula is also wrong on this due to parentheses do not match.
15. I Possessed an enemy Halberdiers who took melee damage. Then I cast Healing on them with my Shamans and it returned 0 hearts to them. Reproduce from PossessedCantBeHealed. Press next turn. Horus will attack. Cast Possession on the best Halberdiers. Flame Blade by my Wizard worked on the same unit though.
16. AI possessed my Spellserkers that did not have any spell on it. Then I used Life Drain only to kill it. I won the battle but it did not raise as Undead for me. Reproduce from PossessLifeDrain.sav. Attack the 3 Zombies of Rjak with 9 Spellserkers on Myrror.
17. When AI hero had Lionheart, Heroism, and Endurance it raised its HP from 13 to 26. I killed it with Dispel Magic, Fire Bolts, and Possessed Slingers. AI cast Raise Dead on it, but it only came to life with 2HP. Apparently the spells bugged the calculation of new HP. Reproduce from LionheartRaiseDead.sav. Press End Turn and Red AI should attack with Golden One.
18. When I was offered to cast Wraith Form, I clicked on a town to check units. It also cast it on one of my units that was not my intention. Need clear UI to select unit too. Not just town.
19. Was Destiny casting changed to 360 mana? It displays 400 mana.
20. My Knight hero had Logistics skill. I moved then cast Call to Arms. Then I cast Heroism on it and gained 1 more movement point in that turn and I was able to attack after casting. Intended feature or bug? Reproduce from HeroismActAgain.sav. Attack purple town with Knight, 2 Unicorns and 6 Spellserkers with Bless on them.
21. Road building bug on tower. I gave road building order. It displayed 5 turns to complete. I had another unit standing there. I changed plane so I can move it. It cancelled the road building order. Reproduce from TowerRoad.sav. Find Spellerserks with Engineer next to my town D17
22. AI killed my hero with repeat Wave of Despair but I won the combat. I lost all artifacts on the hero. Intended feature or bug? Reproduce from DespairItemLoss.sav. Attack Node with Knight and 7 Werewolves.
23. Remaining Mana of Spellersekers is not updated after casting a spell on Chaos Node. Their remaining movement points are updated immediately, but their remaining mana only in next turn. Reproduce from UpdateMana.sav. Attack Chaos node on Myrror with 9 Spellserkers.
24. Engineers do not display correct number of turns to complete road building. If I try to build road to next tile with forest on it and current tile already has road then it shows 4 or 5 turns. If I move to that tile then it shows 2 turns. So it is overall 3 turns. Reproduce from RoadTurns.sav. For example there is one on Myrror under the Nature node.
25. After an AI already cast Armageddon, a second AI (Merlin) also cast Armageddon. But it is not displayed. Did he immediately turn it off? Or is there a bug here? Reproduce from Before2ndArmageddon.sav. After2ndArmageddon.sav
26. AI bug. AI cast Mislead 5 times on my resistance = 13 unit. It only had 1 fantastic unit so it was 0% chance to succeed.
27. Add to Armageddon that second instance only gives +1 unrest.
28. Bug: Fireball on sleeping 4 figure full HP unicorns only does fixed 12 damage. Less than if it was awake. Reproduce from SleepFireBall.sav. Horus will attack. But Fire Bolt does 24 damage as it should.
(December 11th, 2024, 20:37)Suppanut Wrote: Version 1.5.7, sometimes result return from CityOnTile() is stuck at value "1" and lead to wrong result in script.
Edited: further test show that CITYONTILE() does not flush or store correctly at the beginning of combat. This sometimes cause value return as 1 (player's first city). This causing script related to attacker units (sometimes defending units too but much less often) to operate wrongly. I currently circumvent this by make such check occur later on first attacker turn instead. But I still think this could considered as bug and must be reported.
Thanks for pointing out and a workaround! I was recently just wondering what went wrong on a particular occasion.
Finding update, It seem to related to finding target mechanism at the beginning of turn, it run on several target that include several times of entercombat.cas. Different from later combat, the first one does not reset and reload entercombat.cas that why if one of the target include script that manipulate attacker units through city-related attribute, it is manipulated and not reset properly. I could not find any proper way to working around this, it is either you make check from unitcalc.cas or unitcalcpre.cas to make it occur after combat technically started or just wait for Seravy to fix this. For now I decide to change building from curses attacker to buffs defender instead.
Quote:See attached saves from 2 consecutive turns.BeforeTrollMove.sav, AfterTrollMove.sav Dark Green AI (Freya) has town Rotwood on Myrror North. You can explore it with Efreets. It has 5 Shadow Demons and 4 Troll Magicians defending it. Next turn it has 5 Shadow Demons and 3 Troll Magicians, and 1 Great Lizard defending it. Also, 2 of its Troll Magicians who have 2 Movement Points are now 3 tiles S of that town. Apparently no other Troll Magicians in the area, no boats, no Wind Walking, no spells, no events, etc. So how did they make 3 moves in 1 turn? My hypothesis is that this AI built 1 more Troll Magicians that spawned to the South and Summoned a Great Lizard in the same turn that instead of spawning outside it displaced one of its existing Troll Magicians also to the South from inside the town. If this is intended feature then it would be good to apply the same rule to human players. Human players get the new Summon outside of town if full. Not inside. I think it would be better if humans and AIs played by the same rule on this issue and in general they should play by the same rules as much as possible. I understand that due to AI weakness some rules were made to help it play better that the humans do not get, such as the AI can see the map, but humans cannot.
This is intended behavior. The lowest garrison priority unit is pushed outside (as far as I remember, in the original it was the lowest cost unit as garrison priority didn't exist).
However human players (including myself) do get annoyed if summoning a new unit can push one of their garrisons out and they have to move it back so an exception was made to always push out the newly summoned unit for the human player instead for a more consistent and smoother gameplay experience.
Quote:5. Current spell description of Disenchant Area: “Attempts to dispel all enemy curses”… But it does not work on Corruption nor Raise Volcano spells. Please add these to this spell’s description.
Spells that aren't enchantments but one time effects cannot be dispelled, including but not limited to those, Change Terrain, Transmute, Earthquake, Firestorm, Blizzard, etc.
I think this is common sense and intuitive enough.
Quote:9. Terror caused -10% to hit to my units with Death Immunity. Bug or intended feature? It was surprising.
Probably intended feature, Weakness also works against Death Immunity and the realm definitely needs at least a few spells it can use against itself.
Quote:11. I cast Raise Volcano on my own Outpost. It destroyed its Smithy and gave me control of the Outpost allowing me to buy buildings there. Reproduce from RaiseVolcanoOwnOutpost.sav
While it's possible to do that, buildings in outposts have no effect so I can't see any reason why anyone would want to do that. Anyway, it should be easy to fix by removing outposts for destroyed buildings reports.
Quote:12. Food production bug. Apparently related to Wild Game tile. Reproduce from FoodBug.sav See town 13Jan. 1 Forest with Wild Game = 4.5,
Why 4.5? Wild Game always has been +2 MaxPop? Only food has been doubled to 4.
Quote:From version 1.05.07, for some reason, "CITYONTILE( (GETSTAT(U,SPlane,0),(GETSTAT(U,SOLX,0),(GETSTAT(U,SOLY,0) )" return different value from "CITYONTILE(U)" especially when using inside "FOR U=1 TO MAXUNIT();" and "NEXT;". It end up that "CITYONTILE( (GETSTAT(U,SPlane,0),(GETSTAT(U,SOLX,0),(GETSTAT(U,SOLY,0) )" return correct value while value from "CITYONTILE(U)" sometimes return false positive as this lead to trigger of script outside the city.
The inconsistency comes from base vs current unit. CITYONTILE(U) uses Plane,X,Y of the base unit. In general, unit location is always set and read from the base unit as there aren't (and shouldn't be) any effects that provide temporal enchantments to these numbers. It would be weird to buff a unit by "position shifts to left by one tile while enchanted" and would break plenty of things in the game.
Quote:Bug: Supreme light does not grant +2 range attack to arrow units (specifically, didn't work on my longbowmen).
That spell only affects spellcasters and Life creatures, so unless you enchanted your bowmen with Destiny it shouldn't do anything to it. I looked at the code but it does seem to buff ranged attacks regardless of type, it's not limited to magical attacks. However bowmen are not spellcasters (no MP or magic attacks) so they have to be a Life creature to qualify.
Quote:Does unit for monster outbreak event have any condition apart from being fantastic creature?
Units with the Transport ability can't be chosen.
Sailing units should be possible to choose.
They also have to be fantastic and the cost has to be in the range for the event budget.
However, units are spawned only on land tiles that are at most 3 tiles away from a non-neutral city.
This is inconsistent, I'll need to fix it by excluding Sailing units.
I don't think rampaging monsters (or stacks containing sailing units in general) can function on the sea as they wouldn't find a city they can attack.
Quote:Edited: further test show that CITYONTILE() does not flush or store correctly at the beginning of combat. This sometimes cause value return as 1 (player's first city). This causing script related to attacker units (sometimes defending units too but much less often) to operate wrongly. I currently circumvent this by make such check occur later on first attacker turn instead. But I still think this could considered as bug and must be reported.
This sounds like the previous problem, inconsistently using unit vs base unit positions in scripts. It's not entirely impossible the game itself has a similar bug somewhere but I expect we'd have seen crashes or other problems if that was the case so 99% it's a script problem.
Entering combat has no ability to move or reposition cities so the city location cache not refreshing shouldn't matter.
(December 17th, 2024, 00:31)Fringe Wrote: I keep getting an exception in this game. No mods.
Load it, select only Ninja, and attack the tower.
-- Avoiding all units and not casting spells does not crash.
-- Cast Blur. Cast Web on Great Drake. Cast Web on an Efreet. Attack Efreet and move away. Cast Web on another Efreet. I get spotted, "Efreet casts Lightning Bolt" >> crash.
-- The above but doesn't case Web on Great Drake. Get spotted, Lightning Bolt is cast, Warp Lightning is cast, battle over.
-- Web Great Drake. Move next to Efreet. Lightning, Lightning, battle over.
-- Blur. Web Great Drake. Web Efreet. Move next to Efreet. Efreet moves away, 1 of the 3 Efreets casts Lightning Bolt, crash.
-- Web Efreet #1. Web second Efreet, attack and stay next to Efreet #1. Lightning Bolt and crash.
No crash for me even if they cast Lightning Bolt. Are you playing on 30 FPS mode or a different version than the latest?
Quote:1. I attacked 6 Stag Beetles and 3 KL Halberdiers with 1 Night Stalker. With Possession I killed 5 of them and I lost my 1 Night Stalker. I lost 1 Fame for this. I think this should not result in Fame loss, since this is not bad result. Reproduce from FameLoss.Sav
I'm assuming the Fame loss was triggered by the Night Stalker exceeding the required EXP gain to count for a major victory or the production cost to count as losing a significant unit.
If you lose the battle, no fame or EXP is gained based on the total exp value of enemy units killed, those are only awarded to the winning side. Not a bug.
Quote:2. Doom Bolt caused 12 damage to hero who had Invulnerability. Reproduce from FameLoss.Sav. Next turn Invisible War Monk will attack together with Draconian hero.
Where is the bug? I'm pretty sure Doom Bolt was buffed to deal 12 damage. It's Doom damage so it can't be reduced by anything, not even Invulnerability.
Quote:4. 5 out of my 6 figure Werewolves were Petrified by spell. The last figure was killed by Fire Bolt. I won the battle. But they did not regenerate. They stayed dead. Reproduce from PartialPetrifyWere.sav. Attack the Light Blue Druid hero with stack from boat on NE.
Petrify does irrecoverable damage. They majority of the damage was irrecoverable so the unit did not regenerate. Not a bug, works as intended.
Quote:5. When AI lands a stack of 8 units trying to attack me, it never moves further. Its pathfinding only targets a land next to shore, but fails to move more towards its target.
This is because there is no land movement phase after the sea movement phase.
In theory this could be fixed by adding a second land movement phase but I have no idea what unexpected side effects that might have so I rather not, this is one of those things that should have been fixed in early versions.
Quote:6. AI lands large army next to my poorly defended town. But it could just attack and take my town from boat too. I have never seen that.
Sounds like a bug, the AI should be able to attack cities from ships directly (and I remember that took quite a lot of work to implement too), can I have a save file?
Quote:8. Pink AI Merlin attacked my town but this act did not result in War. Maybe it still considered it neutral town, since I captured it from neutrals 8 turns earlier. Reproduce from BeforeAttack.sav, AfterAttack.sav. Then it attacked my outpost too. Still no war.
Unless you lose the battle and a city swaps control, it's not a war.
Quote:9. Why is the Wizard pact 1 sided?
This has been explained a million times already, go and look it up.
Quote:10. I cast Wraith Form in battle. First move to cross wall was not allowed. Once I moved 1 tile it became available. Reproduce from WraithForm.sav Attack the Pink town on the SW with 8 Werewolves.
Sounds like Wraith Form doesn't refresh the target's move matrix when cast. This should be easy to fix, I remember it was a problem with other similar spells in the past too.
Quote:11. AI apparently lost its Unknown hero due to summoning Shadow Demons and since its town was surrounded by my units the hero was placed outside and removed from the game immediately. Reproduce from UnknownHeroBefore.sav, UnknownHeroAfter.sav. See Green town on SE of my Blue empire
That's unfortunate but not a bug. Shadow Demons have higher Garrison priority than the Unknown hero (as it's one of those heroes the AI prefers to send outside to conquer things).
Quote:12. Flame Blade text says: “Units whose original unit type is a normal unit are a valid target, even if they have been converted to fantastic by another spell”. This is not true for Werewolves. Flame Blade cannot be cast on them. Reproduce from FlameWere.sav
The Lyncanthrope spell pretty much destroys the target unit and creates a new one that has the base type of Werewolf. It's not a unit enchantment, and works more like Zombie Mastery for example.
Quote:16. AI possessed my Spellserkers that did not have any spell on it. Then I used Life Drain only to kill it. I won the battle but it did not raise as Undead for me. Reproduce from PossessLifeDrain.sav. Attack the 3 Zombies of Rjak with 9 Spellserkers on Myrror.
Units affected by a control changing enchantment die at the end of the battle irrecoverably. Even if they were already killed. Not a bug.
Quote:19. Was Destiny casting changed to 360 mana? It displays 400 mana.
Yes, it is 360 in spells.ini, I'll update the description.
Quote:20. My Knight hero had Logistics skill. I moved then cast Call to Arms. Then I cast Heroism on it and gained 1 more movement point in that turn and I was able to attack after casting. Intended feature or bug? Reproduce from HeroismActAgain.sav. Attack purple town with Knight, 2 Unicorns and 6 Spellserkers with Bless on them.
Unsure. If Quick Casting didn't exist, I'd have said this is a bug and spells should work like ranged attacks (consume the unit's turn entirely) or doing 2 melee attacks. However as Quick Casting makes spells used move points instead of "attack opportunities", from that viewpoint it makes sense to be able to cast again if you gained extra movement points...but only if the unit had the Quick Casting ability. So I guess I'll do that then.
Quote:22. AI killed my hero with repeat Wave of Despair but I won the combat. I lost all artifacts on the hero. Intended feature or bug? Reproduce from DespairItemLoss.sav. Attack Node with Knight and 7 Werewolves.
Intended.
Quote:25. After an AI already cast Armageddon, a second AI (Merlin) also cast Armageddon. But it is not displayed. Did he immediately turn it off? Or is there a bug here? Reproduce from Before2ndArmageddon.sav. After2ndArmageddon.sav
Maybe they didn't cast Armageddon but Spell Binding, targeting Armageddon? They shouldn't turn spells off unless they have severe mana problems and can't afford the maintenance. It's also possible another AI dispelled it?
The remaining bug reports will be investigated further.