Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Real-Time Game Tweaker

(October 20th, 2015, 15:10)I like Serena Wrote:
(October 20th, 2015, 08:09)Seravy Wrote: Thanks for the quick reply.

For the record, I'm still quite interested in taking MoM apart, changing it, and making it possible to make mods.
I'm less interested in the actual mods, of which, just like TWSTAPP, I generally feel they make the game feel less authentic...
Crash fixes, yes, improvements to the interface, yes, improving AI, yes, improving broken functionality, yes.
On the other hand, I don't find rebalancing or blocking exploits particularly interesting.

I'm doing both at the same time. I'm planning to gather the fixed bugs into a "modless" release eventually, there is even a topic for that.
The bugs I fixed just keep piling up, I wonder if it'll ever end :D

Today's bug fixes :
-Invisibility spell and item power actually makes the unit invisible by turning on the unit ability flag too, this finally fixes invisible heroes not appear invisible to the player owning them (even when the AI recognizes the invisibility), and who knows what else, there are invisibility checks in like a hundred places in the code.
-AI create artifact now checks if the AI has the spell before picking an item containing spell charges
-The changes we talked about above to fix which item category the AI selects from
-Gift of Gods now generates type 0 items instead of type 2 to get rid of the spellbook check. Cost is set high to make sure the event won't give people garbage items. This is more of a feature than a fixed bug but Kyrub did the same for dungeon treasure so I think it's worth changing.

Speaking of bugs...there are two major parts in the exe I'm not too familiar with yet, player overland unit movement, and AI overland unit movement. Both are full of bugs so if you can help with information on these, that would be nice. Especially data formats used by the AI to move, it seems to use a lot of arrays and it's a bit hard to figure out what's what as there are also several dozens of procedures related to this.
I've changed the procedure that assigns values to units (these are both used in combat and overland) which most likely improves AI decisions as the calculated value is a better representation of how strong the unit is, but there are big flaws in how units are assigned to places, regardless of their "rating". For example once a unit, even a hero with 3 artifacts, starts to guard a node it'll stay there and not move an inch even if they are needed to defend the wizard's capital in the next map cell or retake a city I conquered but left poorly defended. Or at least I have never seen it happen yet.
Reply

Thanks, managed to edit those files and they are working fine.

Got a couple more questions though :

-I tried to use the spell picker, but life spells are invisible (See screenshot) and it won't allow me to pick the actual number of spells i should have. For example with 8 nature spellbooks, the spell picker is only letting me pick "1 starting, 3 guaranteed" common nature spells which definately isn't correct. The game gave me 6 possible very rare nature spells that i can research, but the spell picker refuses to let me pick even a single very rare spell. What's going on?

-One of my heroes died, is there a way to use the tweaker to bring the hero back to life? Everytime i try to re-summon it using the tweaker, the tweaker just CTDs.

-Is there a way to repop lairs EXCEPT for nodes? Repoping lairs so that low level heroes can gain xp (or else they get one shotted in end game fights) is important, but repopping lairs causes huge problems when they are already occupied by units.

-I noticed the tweaker will let me load TERRSTAT.LBX, i'm guessing this contains the terrain stats, but i can't find anything in the tweaker to edit those. Does the tweaker have that functionality?

Also is insecticide 1.40n the latest unofficial bug fix patch or is there a newer one out there?


Attached Files Thumbnail(s)
   
Reply

(October 21st, 2015, 10:11)Question Wrote: Thanks, managed to edit those files and they are working fine.

Got a couple more questions though :

-I tried to use the spell picker, but life spells are invisible (See screenshot) and it won't allow me to pick the actual number of spells i should have. For example with 8 nature spellbooks, the spell picker is only letting me pick "1 starting, 3 guaranteed" common nature spells which definately isn't correct. The game gave me 6 possible very rare nature spells that i can research, but the spell picker refuses to let me pick even a single very rare spell. What's going on?

It's an experimental feature, which effectively restores MoM-1.1 spell selection functionality.
I started it as part of the Catnip mod (elsewhere on this forum), but it's not properly finished.
It should allow you to pick 1 starting spell, and will guarantee you'll be able to research 3 more common spells that you can select. That's it - no rare spells.

You can select the spells you have and can research in the main tree view.


Quote:-One of my heroes died, is there a way to use the tweaker to bring the hero back to life? Everytime i try to re-summon it using the tweaker, the tweaker just CTDs.

What's a CTD?
It should work, I think.

Quote:-Is there a way to repop lairs EXCEPT for nodes? Repoping lairs so that low level heroes can gain xp (or else they get one shotted in end game fights) is important, but repopping lairs causes huge problems when they are already occupied by units.

Nope. Not unless I create something like that.
Or perhaps I should tweak it so that it only repop's lairs that are not occupied by units or spirits?


Quote:-I noticed the tweaker will let me load TERRSTAT.LBX, i'm guessing this contains the terrain stats, but i can't find anything in the tweaker to edit those. Does the tweaker have that functionality?

The game makers put the race penalties in there - that's what you can edit and save.


Quote:Also is insecticide 1.40n the latest unofficial bug fix patch or is there a newer one out there?

Kyrub created 1.40o fairly recently, but it's not quite stable.
--I like ILSe
Reply

Any chance the spell picker will be completed then?

CTD means crash to desktop. I ended up temporarily giving myself the resurrection spell to do it.

Yea, only repopping lairs that are unoccupied and have no spirits/units on it sounds like the best solution if its possible to do.

Strange, the tweaker isn't displaying any race related stuff after i load TERRSTAT.LBX though?

How is 1.40o unstable?

Some more questions :

-Is it possible to change the healing rate of units? It seems to be 1 hp per turn, which takes forever for anything with more than 1 or 2 HP.

-I tried to change it so that undead could heal, but there doesn't seem to be an option to do that...i'm guessing it's hard coded into the undead race or something?

-Is it possible to change accessories so that they don't have a creation penalty, or change stuff like swords to allow you to give up to +6 attack, etc?

-How do you use the build queue thing to automatically apply a build queue to newly created cities?
Reply

v1.4o has bugs in the production queue, random units will show up for no reason.

Healing rate of units is 5% per turn or 10% if in a city. 25% if stacked with a unit with the healing ability. Have you read through the official strategy guide?
Reply

(October 21st, 2015, 19:09)Question Wrote: -I tried to change it so that undead could heal, but there doesn't seem to be an option to do that...i'm guessing it's hard coded into the undead race or something?

Yes, it's hardcoded. If race=Death or unit has "Undead" enchantment on it, healing is skipped. I changed this in my mod so that only zombies, skeletons, wraiths and created undead cannot heal.

Quote:-Is it possible to change accessories so that they don't have a creation penalty, or change stuff like swords to allow you to give up to +6 attack, etc?
The former is hardcoded (easy to change though, only 1 or 2 bytes).
The latter can be changed by the tweaker I believe, there is an "Item Powers" table. The file is, I guess, Itempow.lbx? I changed mine with another editor so not 100% sure but it can be changed.

Quote: 25% if stacked with a unit with the healing ability.
This actually is only 20%, the description of the ability is wrong. It's hardcoded to [unit health/5] rounded down.
Reply

(October 21st, 2015, 19:09)Question Wrote: Any chance the spell picker will be completed then?

I think it works as it is now. It's just not very user friendly.
My own interest in it waned and no one else has shown any particular interest.

Quote:CTD means crash to desktop. I ended up temporarily giving myself the resurrection spell to do it.

Just checked. I let Serena (pun intended) die, and then summoned her again with the tweaker.
No crash. Serena is back in my capital.

Can someone check if dead heroes can be summoned again?
I've always been rather prissy of not allowing any crashes to creep into the tweaker, and I don't want any in there now.


Quote:Yea, only repopping lairs that are unoccupied and have no spirits/units on it sounds like the best solution if its possible to do.

I'll implement that.

Quote:Strange, the tweaker isn't displaying any race related stuff after i load TERRSTAT.LBX though?

Not general race related stuff. Just the unrest table.


Quote:-Is it possible to change accessories so that they don't have a creation penalty, or change stuff like swords to allow you to give up to +6 attack, etc?
(October 22nd, 2015, 03:38)Seravy Wrote: The former is hardcoded (easy to change though, only 1 or 2 bytes).
The latter can be changed by the tweaker I believe, there is an "Item Powers" table. The file is, I guess, Itempow.lbx? I changed mine with another editor so not 100% sure but it can be changed.

You can change an existing attack bonus into a different one.
Adding new attack bonuses, or change bonuses from one type to another is almost certain not to work though.
The tweaker allows you to change stuff like that in ITEMPOW.LBX, but in the game you'll see that it will usually not quite work as intended. Lots of stuff around how those item powers behave, is hard coded.

Haven't looked into creation penalties.


Quote:-How do you use the build queue thing to automatically apply a build queue to newly created cities?

That should already work. confused
--I like ILSe
Reply

"I've always been rather prissy of not allowing any crashes to creep into the tweaker, and I don't want any in there now."

I actually get crashes regularly. Not while using the tweaker, don't think that ever happened, but when I don't use it for a while and leave it open, and then start a game and hit connect later, it crashes about half the time. Opening a fresh one always works without a problem.
The connect button also seems to not like it when the game was running for a long time, then it simply fails to connect, and I have to restart the game to be able to.
Reply

Some info.

Unknown 49A for wizards contains, from bytes 4 to 9, an array for diplomatic relations.
It can have values up to 4 I think and is in direct relation to how much the AI wants to attack that player.
Attacking a wizard first will automatically set this value to 2 against them.
An alliance automatically sets it to zero.
Any new treaty resets it to zero.
After turn 100, there is a random chance the AI will get angry for no reason at all, and set this to 2, 3 or 4 depending on personality, relations and random chance.
(this is "bx-5C98h" in memory)
I've done a test, when this was set to 0 the AI did not attack my town with their nearby stack. When it was 2 (triggered by me retaking my node from their army), they immediately attacked the town next turn. Note that I did turn off lawful wizards attacking my towns in what seems to be another attack system. It might not have such an obvious effect if that one is unchanged.

Still in that Unknown area, at "bx-5C8C", I think this would be bytes 12-13 in the tweaker array, is what I call "Reevaluate Agression Counter". This decreases by one each turn and if it hits zero and it's turn 100 or later, the AI runs the process that randomly set the previous value to 2-4. After that, or whenever any diplomatic action is taken, this counter resets to 15-25 randomly.

"bx-5C72", I think is also marked as unknown in the tweaker is the Primary realm of the wizard, 5C70 the secondary. These are set to the one with the most, and second most books when starting the game.
Mostly used by AI for example when casting Spell Ward.

If I figure out the effect of any other "Unknown" data, I'll post them.
Reply

I read through the official strategy guide ages ago, probably forgot most of the stuff in it. I just found out there was a mod that updates the help text though, so that should help a lot.

I loaded up itempow.lbx but i dont see anything that is preventing swords from getting up to +6 attack...im guessing its hardcoded somewhere?

Can someone please explain how to change the accessories creation penalty? I'm looking at the "how to mod" thread but it's a bit confusing.

Quote:2.2. base cost to enchant items (sword, mace, axe etc.)
itemmake.exe beginning with 29B46 and wizards.exe beginning with 2F078, 2 bytes each, low order byte first. same order as in the create item interface.

I'm using cheat engine, how should i search for the exact address?

I think people would be interested in the spell picker because it would be a lot more user friendly than the current option of changing spells after starting a game.

For example, if i want to change my spells, i have to first use the tweaker to check which spells are either researchable or knowable. Then i have to check which spell levels they are in. Then i have to update the research candidates as well, and in order to do that i need to look up the code for the spells as well (which i have to open the tables for). Its a lot of going back and forth compared to ticking some check boxes.

I dont understand how to use the build queue thing though, can someone please explain it?

I guess that explains why even peaceful wizards will suddenly randomly declare war on you....

I noticed one possible problem with the exe customizer when editing magic.exe. It only contains landmass data for small, medium and large, but insecticide 1.40n has world options up to huge. Editing the values in the tweaker (such as by changing the min landmass tiles to 20) causes the game to freeze a lot while creating a new map. Is there an incompatability?

The unit data in wizards.exe also seems to have incorrect numbers for upkeep. For example, dwarven swordsmen are listed as having 2 upkeep, which can't be true since they have 0 upkeep except for food....
Reply



Forum Jump: