shirts Wrote:Could you explain these bugs a bit more, and how they were (wrongly) affecting the game?
- [bug] instable data preventing early mercenary offers to the human player
The routine was working with a non-set variable, quite a dangerous thing. This variable was being compared to turn_number. Basically, if that memory address was set to a high number when the routine started, you'd never get a mercennary offer. With increasing turn number, this fault was (probably) less likely. -- It's hard to say how much this actually influenced the 1.31 game, but it was really dangerous at the very least. It would be nice if anybody compared a game with Charismatic Famous wizard, with large treasue, and see how it pans out.
- [bug] arcane spells clutter the research options for player and AIs, due to incorrect choice mechanics.
This is incredibly nasty and somewhat hard to explain. There is a routine that fills the research book with research options. It works +- like this:
a) choose all coloured spell(s) from the lowest rarity brackets and throw them in a poll
b) choose all arcane spells from the lowest rarity bracket and add them to that poll
c) choose randomly 1 spell and add it to the book
d) check if the book is full? if not go to a)
There seems nothing wrong with this, doesn't it? Now, let's take a 10 white book wizard. He owns 9 common white spells at the start, let's say he misses Bless spell. ROUTINE: a) adds Bless to the poll. b) adds 2 arcane common spells. c) has 66% chance to get you arcane; let's say it gets you one. Round 2: a) adds Bless, b) adds the other arcane c) has 50% chance to get you arcane, let's say it does. Round 3: a) adds Bless, b) adds 4 uncommon arcane spells, c) has 80% chance to get you arcane !!! etc.
Bottom line: There is about 1/8 chance that you start your game with a research book FILLED with 8 arcane spells. The other bad side: you get very quickly to things like Summon Champion in this setup.
What did I do against it? I put a cap of maximum 3 arcane spells in a research book. 3 or 4 is the number of arcane spells in a rarity bracket, so it fits the game design. No more Rare arcane spells combined with a Comon coloured spell in a book... -- It works miracles for the game, and it helps the AI opponents since they often start with 9-10 books in a colour.
- [bug] AI will now always attack aggressively
This is a strange case. There is an AI combat mechanics, I'd call it "cautious attack", that was burried under unfonctional "AI assessment" code. It never triggered (exception? Phantom beasts with Phantom warriors seemed to have this behaviour in 1.31). I solved the bugs, which freed up the fonctionnality. Sadly, the AI mechanics proved to be extremely poor to the point where many players asked me to revert the mechanics. Which I did later. End of story.