Where can I find the current QOTM? - Charriu

Create an account  

 
New year, New Master of Magic! v1.5 fan patch

(January 14th, 2016, 02:13)spottedshroom Wrote: Possible new bug: when attempting to cast Mass Healing in a lair combat against (the few remains of) four Death Knights and some Night Stalkers, I get the error "That combat enchantment is already in effect." Combatants are Torin, Malleus, and Shuri, and the only actual enchantment up is True Light.

Oh, so that bug exists for the player too? I fixed it for the AI. All global effects use the same spell type id as global enchantments, so the check for enchantments is done for them.

Quote:In the save below, the units on the Trireme cannot disembark onto the desert square to the south. RC5.
thx, will check
...interesting, if I move the ship to the cell right from that desert, I can disembark, but not from the other direction. Bug for sure, and it's not with the map generation, either. This will take time to figure out, I haven't yet investigated overland movement for the player much.

Edit : the nagas can leave the ship so somehow the pathfinding algorithm thinks going through water is necessary I suspect.
Edit 2 : I now know the procedure at 723F5 is responsible.
Edit 3 : If I remove the part that prevents walking into enemy units, I can leave the ship. I wonder why that happens.
Okay I'm pretty confused. water movement units can enter, but if I disable the check for enemy units, anything can. And these two have nothing to do with each other! On top of that, entering from a different map cell also works.

By killing units one by one in the tweaker, I pinpointed the source of the problem to be the Halfling Sligers unit at 26,13 (11 cells to the left from your ship, owned by the blue player). How it can block the movement of your units I have no idea, but that one is the one doing it. Moving it, either vertically or horizontally fixes the problem. Which is even more odd, because the entire row was blocked by that one unit, Other than that desert square, the node next to it (where enemies were before I removed them) and even the cell on the other side of the node are impossible to enter. Unless you try from a different direction.
This has to be a bug in the shortest path calculation.
Reply

Well, I didn't find the bug, the shortest path selection was too complicated for that (like 2k bytes long), but I wrote a new one that does the same thing in 200 bytes.
The downside is, this one isn't optimized so movement for the human player is noticeably slower (takes like an entire second for the stack to move).
The upside, no bug, I was able to leave the ship!
So whatever caused the bug was in there indeed.

The AI movement, surprisingly, isn't slower, because it disables a pretty large part of the map before moving for some reason, in other words it prefers to avoid straying too far from the straight line, even if that would be shorter.
I wouldn't be surprised if this bug was the one preventing the AI from entering/leaving ships for no reason at all in some test games.

Edit : I managed to improve the code a bit, now there is no noticeable amount of lag, it's like 1/4th of a second at most.

I wonder if this was also the bug that made ships go onto land in rare cases...
Reply

Good work! That was fast! So shortest movement is fixed? Does it still choose a longer path for units that move 1? Making them avoid mountains even though it takes fewer turns to get through?
Reply

(January 14th, 2016, 20:08)Tiltowait Wrote: Good work! That was fast! So shortest movement is fixed? Does it still choose a longer path for units that move 1? Making them avoid mountains even though it takes fewer turns to get through?

Yes. Finding the shortest path is based on the cost of the movement. The "long" way is actually shorter, but takes more turns despite that.
Being able to move through a terrain that costs 4 without spending 4 is, well, let's just say a design flaw, or lazyness from the developers.
They could have made it like engineers that it takes more turns to finish the move.

I guess it's possible to add an extra adjustment to the cost matrix, prior to searching for the shortest path, like "no cell can cost more than the remaining moves of the stack", I believe that would fix the problem. In fact I actually saw code that was doing something like that, but it only triggers if the stack has exactly 0.5 movement left. And the procedure explicitly overrides the remaining moves to be 8 first so it never happens anyway.
Edit : ...nope, can't do it. 2 out of the 3 movement procedures calling this don't pass the actual remaining movement of the stack in the parameter. So automoving at the new turn would still take the longer road no matter what. And I bet those procedures don't even know the movement parameter of the stack : why would they? Only manual player movement needs to display that on the screen, and the stack stops when any unit is out of moves individually anyway, no need to calculate that in advance. So there is no parameter to pass. I rather not create inconsistency like the unit starting to go through the mountains (first step is manual) then turning around and going the long way the next turn.
Reply

Uploaded RC6, contains everything fixed in these previous 3 days, as well as fixes for problems caused by the new way of AI overland movement handling (specifically, settlers got stuck over water instead of crossing it).
Reply

In the save below, the hero stack contains two orc magicians. One of them is wounded. This wounded magician unit will never heal while it is stacked with the shaman. As soon as the shaman is removed, the unit heals normally. RC5.


Attached Files
.zip   SAVE3.zip (Size: 11.06 KB / Downloads: 0)
Reply

Engineers commanded to build a road to the node. Upon finishing the road on top of the node, the road also extended into the ocean without me building it there. Road can be moved on like any other road. RC5.


Attached Files Thumbnail(s)
   

.zip   SAVE2.zip (Size: 11.13 KB / Downloads: 0)
Reply

My magic spirit attacked by trireme, I cast confusion on the trireme, and after a turn or two it fled. If it had kept around it could have eventually killed me.

I put it on patrol off the coast right next to an enemy capital, in order to keep an eye on things, and I incessantly suffered attacks from triremes of the two players I was at war with. How'd they know my spirit was there to attack?

My Phantom Warriors were able to walk on water, were they able to do that before?

Does war weariness still exist? Some of my wars seemed to go on far beyond any use in the game. We had stopped fighting and it was time for peace, but the CP just wouldn't accept it.

With all these new diplomacy screens the CP initiates, I have trouble remembering which wizard is in which color! The screen only shows me Horus, and I don't know if he's blue or green. He offers peace, I decline because I think it's the green bastard who just took my city and is trying to make it legitimate, and DOH! He was the CP I wanted to make peace with.

I did see a wave of zombies crash into a computer city and disappear. It was my city until recently, though, so I don't know when the zombies were spawned and how long they took to get there.

When I summoned a magic spirit, the game suddenly started playing music even though I had only event music on, background music off. It wouldn't stop. I had to 'reset' it by turning background music on, let it start playing, and then go back in and turn it off again.

Ss'sra, who was on my home continent, exhibited extreme turtling behavior. I killed off all his stacks outside his capital. But in his capital was 9 basilisks, and there they stayed. He didn't do anything for ages. I couldn't attack because I couldn't take 9 basilisks, not by a long shot.

While the capital may be fiercely defended, the other cities are not. They have ordinary units, which I suppose is intentional. I mean, he has basilisks in his capital but spearmen/swordsmen/cavalry/shamans as garrisons in the other cities.

Suggestion: in the combat screen, reverse the location of the Info and Auto buttons. This prevents Auto from being clicked accidentally when trying to click Done.

Units came out from behind a wall of fire to engage my besieging units in the field. They'd have been better off behind the fire.

I beat a tower and got 40 mana and an amulet instead of a spell. Aren't towers supposed to be guaranteed a spell?

In general, summons aren't any fun. I propose a 25% to 33% across the board reduction in all summoning and maintenance costs. Make Conjurer a 1/3 advantage rather than 1/4.
Reply

Quote:My magic spirit attacked by trireme, I cast confusion on the trireme, and after a turn or two it fled. If it had kept around it could have eventually killed me.
The AI saw you have a trireme and they don't so they are in a hopeless situation. Might be worth adding confusion as an exception to there.

Quote:I put it on patrol off the coast right next to an enemy capital, in order to keep an eye on things, and I incessantly suffered attacks from triremes of the two players I was at war with. How'd they know my spirit was there to attack?
The AI only has "scouting" for cities, more specifically only for selecting cities as spell targets. Aside from that, they see the entire map and this cannot be changed (and would not really work well if it was possible, anyway). The original code for attacking on land also sees everything so I made the new code for sea attacks work the same.

Quote:My Phantom Warriors were able to walk on water, were they able to do that before?
Yes, they can, they are noncorporeal.

Quote:Does war weariness still exist? Some of my wars seemed to go on far beyond any use in the game. We had stopped fighting and it was time for peace, but the CP just wouldn't accept it.
I think I explained that in some earlier posts.
It exists, but only if your total army strength is at least 75% of theirs. Otherwise they consider their war successful and worth continuing. Making peace is not a good idea in a successful invasion when a lot of resources and time has to be committed to transporting the armies to the right continent. If you really want peace without building up a proper army, consider offering tributes.

Quote:With all these new diplomacy screens the CP initiates, I have trouble remembering which wizard is in which color! The screen only shows me Horus, and I don't know if he's blue or green. He offers peace, I decline because I think it's the green bastard who just took my city and is trying to make it legitimate, and DOH! He was the CP I wanted to make peace with.
That's unfortunate, the leader of an empire is expected to at least know who the leaders of the other major empires are.

Quote:Ss'sra, who was on my home continent, exhibited extreme turtling behavior. I killed off all his stacks outside his capital. But in his capital was 9 basilisks, and there they stayed. He didn't do anything for ages. I couldn't attack because I couldn't take 9 basilisks, not by a long shot.
He didn't have the resources to do much and he can only get a few new units a turn so there is no chance to build up a large stack if you stay there and hunt them down. If you want him to actually do something, make peace and let him. But don't expect the AI to commit suicide and let you win faster by downsizing the garrison, this is no longer that kind of game.

Quote:While the capital may be fiercely defended, the other cities are not. They have ordinary units, which I suppose is intentional. I mean, he has basilisks in his capital but spearmen/swordsmen/cavalry/shamans as garrisons in the other cities.
Other cities can also have anything, but the resources are limited so it's unlikely to fill them all up with basilisks. Also, normal cities contribute to building offensive stacks so unless a lot of strong units are summoned in the same place, they are unlikely to stay there for the entire game. Offensive stacks select the strongest unit(s) available, otherwise the AI could not make progress in their conquest.

Quote:Suggestion: in the combat screen, reverse the location of the Info and Auto buttons. This prevents Auto from being clicked accidentally when trying to click Done.
I use the D button on the keyboard, it's safe and faster.

Quote:Units came out from behind a wall of fire to engage my besieging units in the field. They'd have been better off behind the fire.
They don't do that in normal situations, but some effects can override staying inside. Any damage over time effects, or significant enough ranged superiority does it. Did you cast Mana Leak for example?

Quote:I beat a tower and got 40 mana and an amulet instead of a spell. Aren't towers supposed to be guaranteed a spell?
The old system forced the spell in the tower and ignored costs. The new one starts with adding a spell too, but if the rolled spell is too expensive, it won't be added. Finding a Great Drake spell for killing 2 skeletons is just not right.

Quote:In general, summons aren't any fun. I propose a 25% to 33% across the board reduction in all summoning and maintenance costs. Make Conjurer a 1/3 advantage rather than 1/4.
That would be a mod, and I already made one. Play Caster of Magic :D

Quote:Engineers commanded to build a road to the node. Upon finishing the road on top of the node, the road also extended into the ocean without me building it there. Road can be moved on like any other road. RC5.
The road tile was already there most likely. Did the AI have any waterwalking, flying or planeshifting engineers?

Quote: This wounded magician unit will never heal while it is stacked with the shaman. As soon as the shaman is removed, the unit heals normally.
Interesting. I thought "healer" is in addition to normal healing, not instead of it.
Healer can't heal magicians because it heals 20% and 20% of 4 hearts is 0 (rounded down).
Reply

(January 15th, 2016, 06:37)Seravy Wrote:
Quote:My magic spirit attacked by trireme, I cast confusion on the trireme, and after a turn or two it fled. If it had kept around it could have eventually killed me.
The AI saw you have a trireme and they don't so they are in a hopeless situation. Might be worth adding confusion as an exception to there.

I had the magic spirit, the computer had the trireme.

Quote:
Quote:Does war weariness still exist? Some of my wars seemed to go on far beyond any use in the game. We had stopped fighting and it was time for peace, but the CP just wouldn't accept it.
I think I explained that in some earlier posts.
It exists, but only if your total army strength is at least 75% of theirs. Otherwise they consider their war successful and worth continuing. Making peace is not a good idea in a successful invasion when a lot of resources and time has to be committed to transporting the armies to the right continent. If you really want peace without building up a proper army, consider offering tributes.

See, I don't agree with this. After a certain time, the two of you simply stop fighting. A city has been taken, or lost, and the body count climbs and time goes on, and it's just time to stop the war. Even I do this, to opponents I clearly outnumber, where I have all the advantage. It doesn't really matter who's winning and who's not. It's just a matter of the war outliving its usefulness. The diplomatic state as reflected in the diplomacy screen does not reflect the situation on the ground, which is lack of conflict.

Quote:
Quote:Units came out from behind a wall of fire to engage my besieging units in the field. They'd have been better off behind the fire.
They don't do that in normal situations, but some effects can override staying inside. Any damage over time effects, or significant enough ranged superiority does it. Did you cast Mana Leak for example?

I suppose they came out because of my shamans. They would have been better off hunkered down waiting for my ammo to run out, though. They broke cover and ran into the open where my melee units slaughtered them.

Quote:
Quote:Engineers commanded to build a road to the node. Upon finishing the road on top of the node, the road also extended into the ocean without me building it there. Road can be moved on like any other road. RC5.
The road tile was already there most likely. Did the AI have any waterwalking, flying or planeshifting engineers?

Not that I ever saw. Looking at the map, my roads are the only ones existing in the world.

Quote:
Quote: This wounded magician unit will never heal while it is stacked with the shaman. As soon as the shaman is removed, the unit heals normally.
Interesting. I thought "healer" is in addition to normal healing, not instead of it.
Healer can't heal magicians because it heals 20% and 20% of 4 hearts is 0 (rounded down).

This is what I was informed as well. 5% healing per turn, healer adds 20%, for a total of 25%. I thought the space just used the healing value of whatever was highest: healer, city, or open terrain. I don't know where I learned that, but it's what I always thought.

So the program takes 20% of 4, which is 0.8, and rounds that down to 0? Shouldn't it get rounded up to 1.0?
Reply



Forum Jump: