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

(March 8th, 2020, 06:37)Seravy Wrote: Nice!

One bug report/feature request : Spells Known still shows the hardcoded original spell names, even if I load Spelldat.lbx before the save file. It doesn't matter for functionality but it will be confusing to users who don't know which original spell slot belongs to which CoM spell.

Just realized that the spell names don't work yet after loading a save game.
No worries, I'll fix it!
--I like ILSe
Reply

Meanwhile I noticed the difficulty levels also don't work, in CoM there are 7 of them instead of 5 and the "outpost growth" field is for "overland costing cost" instead. It was after using the Connect button.
I might as well look through everything instead of reporting things one at a time. Everything below applies to Caster of Magic only, unless I specifically mention it does not.

Game Data : I see Difficulty 2(Advanced) there, that seems outdated. Currently Difficulty 2 is Fair, 3 is Advanced and so on.  Fair was a new addition last year...or the year before, something like that.

Buildings : while the building table does have the fields listed most of them never had any of the listed effects. Like the "produces veterans", Mana, research and so on fields. These effects are all hardcoded so anything in the building table doesn't matter. Might be best to remove them as they only confuse the users. This applies to all versions of the game, even 1.31.
Only the prerequisite, replaces, upkeep, cost and building category fields have any effect, the last one only for the AI (including the Vizier) and I don't think that one is being used in CoM anymore.

Tax table : the unrest amount is correct but the gold amount is different for CoM. I guess this one isn't important and maybe displaying "Tax level 1" to 7 could be used as a generic solution, everyone will know what that means.

Races : This is the same in all versions and works fine.

Wizards : There are a few new fields of data here for CoM like number of turns left for Spell Binding recharge, or maintenance counter for Time Stop. I can provide a list if you want to include them, they use the Unk 33A block, most of them are not particularly important.

Lairs : No changes here either so it's perfect.

Cities : This does have changes : some of the previously unused bytes are now used as the upper byte to extend Gold and Power production to a word value. $17 is for power, $1B for gold.
Building status has been changed, the "Destroyed" was moved to a different number (think -2?) and larger negative values indicate a queued building.
Building names shown are still the original, Armory, Temple and Ship Yard are different buildings in CoM now. Likewise the spell names are wrong here as well.

Heroes : the new hero abilities are missing. Some of them use the byte marked "garbage".

Unit types : Zero 19 and Zero 1D are now used for AI production priority and garrison priority. Zero 19 is also the fame requirement for heroes because they have no production priority. There is a new attack flag : Supernatural, replacing the unused 20h, and a new ability, Quick Casting replaces the... I think it was Land Corruption originally?

Items : Again this has the original item powers but several were replaced in CoM. Inner Fire, Divine Protection, Necromancy, Pandora's Box are the new ones. Oh and Teleportation.

Spell data : Spell Desirability is a single byte field, not a word. The other byte is for the AI's spell category, to determine which type of spells are already known at research. This applies to all versions.

EXE misc : many of these are at different addresses in CoM so changing them will likely break the executable. In particular the casting and research cost modifiers look wrong.
Reply

Tweaker version 0.3.2 is out!

You can find it in the usual location on sourceforge:
https://sourceforge.net/projects/momrtgt/

Changes
  • Fixed problem that Tweaker did not properly connect to the Steam version
    of MoM and CoM.

  • New graphical view of the Building Tree, which is generated from the
    dependencies. It will also show unit requirements and prohibited races,
    but only if the corresponding information is available, e.g. when
    connected to the game.
    Available in the Tools window.

  • Refer to actual names instead of old hard coded names in more places.
    So that if a spell has been renamed by a modder, that it actually shows up
    with the new name.
    Currently does not work yet if the spell name is a label in a sub tree view.
    So e.g. the Known Spells of a player are still shown with the wrong label
    in the main window.

  • Cosmetic: eliminate the question marks in the caption bars.

  • For the record, not all features of Tweaker will work correctly with
    Caster of Magic - yet. They may even crash. Work In Progress...
--I like ILSe
Reply

For COM, the units have been changed a bit too. Nomad settlers are now War Trolls, for example. On the map, hunter's lodge is Orihalcon. Retorts are changed too. Only minor confusion, and even a bit satisfying to figure out what's what.
Reply

(March 12th, 2020, 19:06)JustOneMoreTurn Wrote: For COM, the units have been changed a bit too.  Nomad settlers are now War Trolls, for example.  On the map, hunter's lodge is Orihalcon.  Retorts are changed too.  Only minor confusion, and even a bit satisfying to figure out what's what.

Unit names should already show up correctly in the table views and the map now.
They have the same problem with the labels in sub tree views in the main window though. Those labels are still the old hard coded names. Same for retorts.

I already changed the name for the Hunter's lodge to Orihalcon Ore. Didn't check it though. Did it work?
Ariphaos mentioned it in the Discord channel (link here).
--I like ILSe
Reply

I can't test the new version. I've been using the last version on Windows Vista, since that's the last Windows version I have a functioning copy of...and I have no desire to ever buy Windows again. The new version doesn't work on Vista; some module is missing. I'm not surprised that it no longer works on such an old OS. I'll use the older version until a linux64 version is available.
Reply

(March 10th, 2020, 17:39)Seravy Wrote: Meanwhile I noticed the difficulty levels also don't work, in CoM there are 7 of them instead of 5 and the "outpost growth" field is for "overland costing cost" instead. It was after using the Connect button.
I might as well look through everything instead of reporting things one at a time. Everything below applies to Caster of Magic only, unless I specifically mention it does not.

Game Data : I see Difficulty 2(Advanced) there, that seems outdated. Currently Difficulty 2 is Fair, 3 is Advanced and so on.  Fair was a new addition last year...or the year before, something like that.

Fixed.

Quote:Buildings : while the building table does have the fields listed most of them never had any of the listed effects. Like the "produces veterans", Mana, research and so on fields. These effects are all hardcoded so anything in the building table doesn't matter. Might be best to remove them as they only confuse the users. This applies to all versions of the game, even 1.31.
Only the prerequisite, replaces, upkeep, cost and building category fields have any effect, the last one only for the AI (including the Vizier) and I don't think that one is being used in CoM anymore.

I've removed them from the table, and I've replaced the occurrences in the main tree view by 'No Effect XX'.
You didn't mention it explicitly, but what about 'Produces Magic Weapon'? Is it used or not?

Quote:Tax table : the unrest amount is correct but the gold amount is different for CoM. I guess this one isn't important and maybe displaying "Tax level 1" to 7 could be used as a generic solution, everyone will know what that means.

Replaced by Tax Rate 1-7, which then shows the unrest percentages.
Can we get the gold percentage somewhere?

Quote:Races : This is the same in all versions and works fine.

Wizards : There are a few new fields of data here for CoM like number of turns left for Spell Binding recharge, or maintenance counter for Time Stop. I can provide a list if you want to include them, they use the Unk 33A block, most of them are not particularly important.

Lairs : No changes here either so it's perfect.

Good. I'll leave them be for now.
We may revisit them later, but let's focus on the more important stuff first.

Quote:Cities : This does have changes : some of the previously unused bytes are now used as the upper byte to extend Gold and Power production to a word value. $17 is for power, $1B for gold.
Building status has been changed, the "Destroyed" was moved to a different number (think -2?) and larger negative values indicate a queued building.
Building names shown are still the original, Armory, Temple and Ship Yard are different buildings in CoM now. Likewise the spell names are wrong here as well.

I've marked the new ones as CoM specific.
I've added CoM_Destroyed=-2 for now. Let me know if it is different after all if I don't discover it myself already.
What happened to the original 2 value for Destroyed? Does it have a different meaning now?

I've fixed the names everywhere (I think) - except where they are labels in a sub tree view of the main window.
I'm still thinking what to do with those labels...

Quote:Heroes : the new hero abilities are missing. Some of them use the byte marked "garbage".

I've renamed 'garbage' to 'CoM Special' for now.

Quote:Unit types : Zero 19 and Zero 1D are now used for AI production priority and garrison priority. Zero 19 is also the fame requirement for heroes because they have no production priority. There is a new attack flag : Supernatural, replacing the unused 20h, and a new ability, Quick Casting replaces the... I think it was Land Corruption originally?

Relabeled 19, 1D, 20h accordingly.
Replaced 'Land Corruption' with 'CoM Quick Casting' for now. Let me know if it should be different.

Quote:Items : Again this has the original item powers but several were replaced in CoM. Inner Fire, Divine Protection, Necromancy, Pandora's Box are the new ones. Oh and Teleportation.

As already mentioned, should be okay now - except as labels in the main tree view.

Quote:Spell data : Spell Desirability is a single byte field, not a word. The other byte is for the AI's spell category, to determine which type of spells are already known at research. This applies to all versions.

Fixed Spell Desirability.
Can you elaborate on the spell category?
Till now they were nicely consecutive numbers. If I include the previous byte as the least significant byte, they would jump by 256. That seems... strange.

Quote:EXE misc : many of these are at different addresses in CoM so changing them will likely break the executable. In particular the casting and research cost modifiers look wrong.

There seem to be quite a few that are still valid.
Can you elaborate?

I guess I'll remove the ones that are wrong if CoM is active.
That seems to be: City Wall Defense, Turns before AI aggressive, all casting and rp modifiers (to be safe), Max books.

The leaves: Broken Wall, Large Shield, Noble, Max spells of colored unit, Max City Size, Wild game, Granary food, Farmer's market, Forester's guild, Animist's guild, Race with Animist's guild, Max spell pump, Max skills, Chance book.

Alternatively I might of course remove all of them for CoM.
That would make sense if you intend to modify them in the near future. Do you consider that?

Btw, what did you do with the city wall defense? Both when active and when broken?
Kyrub changed them in 1.40j, although I feel they were not fixed properly.
Did you revert? Put in a better fix? Or what?
I'm currently only making the distinction as before 1.40j and after, but that is likely not correct.
--I like ILSe
Reply

(March 13th, 2020, 16:17)JustOneMoreTurn Wrote: I can't test the new version.  I've been using the last version on Windows Vista, since that's the last Windows version I have a functioning copy of...and I have no desire to ever buy Windows again.  The new version doesn't work on Vista; some module is missing.  I'm not surprised that it no longer works on such an old OS.  I'll use the older version until a linux64 version is available.

Awww...
Indeed I put in a dependency on a particular Windows feature (GetModuleFileNameA from psapi.dll) to get the executable filename of DOSBox, which is used to figure out in which directory the game is.
That feature has actually already been deprecated by Microsoft.
I thought it would be portable to all previous versions of Windows, but I couldn't be sure since I am not in a position to test it.
Either way, there are alternatives that do not require that feature.
Hmm... perhaps I'll implement a different solution... I would like it to work on all versions of Windows...

As for Linux, I was already thinking of creating and uploading a new version.
I actually intended to make it a 32-bit version to - hopefully - achieve maximum backward portability.
Of course I can also make it a 64-bit version.
Do you have a specific reason to prefer linux64?
--I like ILSe
Reply

Quote:You didn't mention it explicitly, but what about 'Produces Magic Weapon'? Is it used or not?
No, it's not.

Quote:Can we get the gold percentage somewhere?
Sadly not. It uses a formula. So the only way to change the amount of gold per population is to change the code that calculates it.

Quote:What happened to the original 2 value for Destroyed? Does it have a different meaning now?

Completely unused. I wanted to have the numbers that mean the building exists to be non-negative while negatives mean it's not an existing building. In the end this was completely unnecessary though, the game checks for buildings as "value equals 0 or 1" pretty much everywhere. But in the future it could be useful that we can use "building>=0" instead.

Quote:Fixed Spell Desirability.
Can you elaborate on the spell category?
Till now they were nicely consecutive numbers. If I include the previous byte as the least significant byte, they would jump by 256. That seems... strange.

Spell category is a number the AI uses, it's below 100. For example all "powerful summons" have the same code, or all "spells that deal combat direct damage" and so on.
I think it's easier if I show the table :
Quote:"None"                                                ,   0,   0,  -1,  -1,  -1,   0,   0,     0,     0,   0,   0,   0,   0,   0,   0;
"Earth to Mud 1"                                      ,  17,   3,   5,   0,   0,  -2,   0,    20,   380,  69,   0,   0,   0,   0,   0;
"Resist Elements 2"                                   ,   7,   4,   1,   4,   0,   2,   0,     5,   440,  28,   0,   0,   2,   0,   0;
"Nature's Eye 3"                                      ,   8,   7,   2,   3,   0,   1,   0,    40,   200,  28,   0,  14,   0,   0,   0;
"Wild Boars 4"                                        ,  16,  10,   0,   1,   0,  -1,   0,    15,   320, 107,   0, 152,   0,   0,   0;
"Web 5"                                               ,  39,  20,  14,   4,   0,  -2,   0,    10,   480, 236,   0,   0,  16,   0,   0;
"War Bears 6"                                         ,  13,   4,   0,   1,   0,   1,   0,    55,   320,   5,   0, 179,   0,   0,   0;
"Fairy Dust 7"                                        ,   2,   5,   4,   5,   0,  -1,   0,    12,   320,  23,   0,   7,  48,   1,  16;
"Water Walking 8"                                     ,   7,  10,   1,   4,   0,   1,   0,    20,   260,  28,   0,   0,   1,   0,   0;
"Sprites  9"                                           ,  13,  10,   0,   1,   0,   1,   0,    80,   320,   5,   0, 180,   0,   0,   0;
This is for CoM, the first number is the category, the second is the trade desirability. Trade desirability in CoM goes from 0 to 55 while in MoM it was from -2 to +3. Categories have the same meaning although the AI was heavily rewritten so some spells were moved to another category.
For example Resist Elements and Water Walking are both in category 7 "minor buffs". Web has an outstanding trade value of 20, etc.

In other words, instead of 2,5 as two fields in tweaker you had $205 (or 502 not sure) as one field on Fairy Dust for example.

Quote:There seem to be quite a few that are still valid.
Can you elaborate?
It's fairly obvious if you look at the data so yes that works, if you don't see what you expect and instead see random larger numbers especially $90 for NOP then that's wrong. The easiest way to tell apart is if you compere by content (in total commander for example) the original and the CoM wizards.exe and if the byte you modify for that feature and the general area around it is changed then that one is unsafe.

Quote:That would make sense if you intend to modify them in the near future. Do you consider that?
No, most likely not. I'm quite happy with how the mod works at the moment.

Quote:Btw, what did you do with the city wall defense? Both when active and when broken?
Kyrub changed them in 1.40j, although I feel they were not fixed properly.
Did you revert? Put in a better fix? Or what?
I'm currently only making the distinction as before 1.40j and after, but that is likely not correct.
Uh umm I think I kept that though after this many years not sure what was the original and insecticide version. It's +3 everywhere including center tiles and +1 on broken walls. It's most likely not the same in 1.5x and CoM considering 1.52 aims to be close to the original.
Reply

(March 13th, 2020, 17:19)Seravy Wrote: Spell category is a number the AI uses, it's below 100. For example all "powerful summons" have the same code, or all "spells that deal combat direct damage" and so on.
I think it's easier if I show the table :
Quote:"None"                                                ,   0,   0,  -1,  -1,  -1,   0,   0,     0,     0,   0,   0,   0,   0,   0,   0;
"Earth to Mud 1"                                      ,  17,   3,   5,   0,   0,  -2,   0,    20,   380,  69,   0,   0,   0,   0,   0;
"Resist Elements 2"                                   ,   7,   4,   1,   4,   0,   2,   0,     5,   440,  28,   0,   0,   2,   0,   0;
"Nature's Eye 3"                                      ,   8,   7,   2,   3,   0,   1,   0,    40,   200,  28,   0,  14,   0,   0,   0;
"Wild Boars 4"                                        ,  16,  10,   0,   1,   0,  -1,   0,    15,   320, 107,   0, 152,   0,   0,   0;
"Web 5"                                               ,  39,  20,  14,   4,   0,  -2,   0,    10,   480, 236,   0,   0,  16,   0,   0;
"War Bears 6"                                         ,  13,   4,   0,   1,   0,   1,   0,    55,   320,   5,   0, 179,   0,   0,   0;
"Fairy Dust 7"                                        ,   2,   5,   4,   5,   0,  -1,   0,    12,   320,  23,   0,   7,  48,   1,  16;
"Water Walking 8"                                     ,   7,  10,   1,   4,   0,   1,   0,    20,   260,  28,   0,   0,   1,   0,   0;
"Sprites  9"                                           ,  13,  10,   0,   1,   0,   1,   0,    80,   320,   5,   0, 180,   0,   0,   0;
This is for CoM, the first number is the category, the second is the trade desirability. Trade desirability in CoM goes from 0 to 55 while in MoM it was from -2 to +3. Categories have the same meaning although the AI was heavily rewritten so some spells were moved to another category.
For example Resist Elements and Water Walking are both in category 7 "minor buffs". Web has an outstanding trade value of 20, etc.

In other words, instead of 2,5 as two fields in tweaker you had $205 (or 502 not sure) as one field on Fairy Dust for example.

Okay, I'm looking at Fairy Dust.
It looks as if Tweaker previously reported $502 for spell desirability, and $4 for the spell category (fixed damage).
I'm confused now. $4 for spell category 'fixed damage' seems correct isn't it?
I guess 5 is the trade desirability, which is a signed 1-byte number?
So what is the 2? It sounds as if it is a different type of category? If so, what are the categories?

Quote:
Quote:Btw, what did you do with the city wall defense? Both when active and when broken?
Kyrub changed them in 1.40j, although I feel they were not fixed properly.
Did you revert? Put in a better fix? Or what?
I'm currently only making the distinction as before 1.40j and after, but that is likely not correct.
Uh umm I think I kept that though after this many years not sure what was the original and insecticide version. It's +3 everywhere including center tiles and +1 on broken walls. It's most likely not the same in 1.5x and CoM considering 1.52 aims to be close to the original.


Kyrub wanted to counter the exploit that people could shoot at the center tiles with +1 defense instead of the +3 at the walls.
As it is now (1.40j+, 1.50+, 5.0+), I guess that even if all walls have been broken, that units in the center still benefit from a +3 defense?


Noble seems to be 20 gold/turn now instead of 10 gold/turn.
Is that intended? Or should I just remove it if CoM is active?
--I like ILSe
Reply



Forum Jump: