Where can I find the current QOTM? - Charriu

Create an account  

 
Real-Time Game Tweaker

Previously I started a new thread on dragonsword.com (before it was unexpectedly discontinued) for my ideas of an application that monitors and changes a MoM game in progress.

In this thread I keep track of methods of hacking a MoM game and of developing a Real-Time Game Tweaker program.


DOWNLOADS

The current version of the Tweaker is in the following folder (for Windows and for Linux):
thumbsuphttp://momrtgt.sourceforge.net/
I could describe all the features, but for now I'll leave that up to you to discover. jive
The Linux tar-file contains MoMTweaker.sh that gets you up and running regardless of your Linux distribution, as long as it supports 32 bits.

Furthermore, here is the update I made on Eljay's SaveGam.html file describing the SAVEn.GAM format.
thumbsup SaveGam2.html
This version covers the savegame almost completely, although I still have a couple of blank spots. Feel free to tell us what those blank spots are! huh

Here's an analysis (excel) how the layout of the MoM memory works.
thumbsup MoMMemoryLayout.xls


IDEAS

Thanks to Jtm for recovering the original thread.
Let me repost my original ideas.

1. Change e.g. a hero in every way possible (in the game in progress).
This includes the changes related to memory addresses in WIZARDS.EXE, changes related to memory addresses defined by the SaveGame layout, and possibly changes to related LBX files.
I've already tested it and it works! You can change e.g. Torin to have a Ranged magical attack, Arcane Power, boost his XP, give him a new item, etcetera. ALL WHILE YOU'RE PLAYING!!! lol.

2. Randomly reseed lairs (in different locations) while the game progresses. Or perhaps simply to repop all lairs, perhaps with more challenging creatures!

3. Create a new savegame format that includes changes to WIZARDS.EXE and SAVEn.GAM, which you can interactively save and load.

4. "All units are heroes".
Whenever you build a unit, detect the completion and change the unit to a hero (using a mapping from regular units to heroes). It turns out that you can have more than 6 heroes, although you can not show them all in the Hired-Heroes display (which shows only 6 heroes).
All your opponents can have this feature too, to make the game balanced.

5. Boost the heroes of your opponents.
As it is, the heroes of our opponents are sadly lacking.
They're not properly trained, they hardly create or collect items, and they hardly bunch together.
This could be changed! For instance by letting them gain experience more quickly, and by randomly creating and assigning new artifacts!
This would give YOU the opportunity to conquer your opponent's heroes in a satisfying way, and gain artifacts in the process ;D! (Or lose them ;-((().

6. Manage Build queues for your cities.
You might manage a number of custom-made build-queue-types and assign them to your cities.



COMPLETED REQUESTS
  1. Repeat search for "dosbox" application until MoM is found [Jtm].
  2. Adjust the number of units in battle when for instance a unit is summoned [Jtm].
  3. Make the fortress location editable [Question].
  4. Show ds:offset or relative memory addresses of any data point [Jtm].
  5. Change research bonus with number of books [letsdance].
  6. Edit number of common/uncommon/rare spells [Pax Empyrean].
  7. Editable unrest table [letsdance].
  8. Add a graphical interface rendering the map and displaying cities, and units and the battle map (the momem project has GPLv2+ Java source that can load LBXs and draw the main MoM screen and game creation screen) [Ayu].
  9. Add combat/herostats/node-owner fields and no-icons checkbox [Asfex].
  10. Combat advisor which will show you how much damage you should expect to  inflict and suffer if you were to attack the unit you mouse over [Catwalk].
  11. Save/restore battle [FrancoK]
  12. Change the level-up bonuses [Anthony]
  13. Repop lairs only if unoccupied [Question]
Reply

Hey I Like Serena,
You mentioned elsewhere that sound settings affect memory locations. Can you tell more about your research?

I've written a program which not only repopulates the lairs but spawns them in random location in which there is no city and the terrain type allows relocation. I'm currently working on creature/treasure budget system to make it possible to spawn new enemies with appropriate rewards (however I do not agree to do the generation like the vanilla MoM does on world creation because that way inhabitants always favor the strongest and it is not very versatile). Anyway, if the memory locations are different when sounds are on or off, then my program is pretty much broken, right?
Reply

Jtm Wrote:Hey I Like Serena,
You mentioned elsewhere that sound settings affect memory locations. Can you tell more about your research?

I've written a program which not only repopulates the lairs but spawns them in random location in which there is no city and the terrain type allows relocation. I'm currently working on creature/treasure budget system to make it possible to spawn new enemies with appropriate rewards (however I do not agree to do the generation like the vanilla MoM does on world creation because that way inhabitants always favor the strongest and it is not very versatile). Anyway, if the memory locations are different when sounds are on or off, then my program is pretty much broken, right?

Cool!smoke Are you anywhere near a working version?

And sure, I can tell you a little (or too much yikes) about my research.

The layout of MoM in memory consists of static data and dynamic data.
The static data has a zero point (called DS) at the Borland-identifier.
The dynamic data is allocated beyond the static data, but its zero point (which I call SEG0) is before the static data. The actual location of the dynamic data may shift depending on configuration.
Note that enabling or disabling sound within the game won't influence the memory, but changing the sound-driver outside of the game will.

Some data is allocated only once, like the Cities, the Units, and the Lairs, so their position will remain fixed throughout the game.
Other data, like the Battle unit data, is only allocated during a battle and has a different address each battle.

Depending on the configuration of MoM (read: sound driver), how MoM was started (with magic.exe or with wizards.exe), and which DOSBox version / OS version you use, the zero points are mapped on different places in OS memory.

I explain in more detail in the following excel workbook, although I have to admit that it is a bit hard to read (high information density, sigh bang).
http://www.xs4all.nl/~kaarsen/download/MoMMemoryLayout.xls
At the bottom of the third sheet I have written an algorithm to find the location of the Cities in memory based on the location of the Borland-identifier. Equivalently you can find the Lairs.
If you want, I can put a snippet of code here to reliably find the Lair data.

Does this help?
Reply

Very interesting, and looks highly useful. Could you upload an attachment to this thread that I can link to?
Reply

Catwalk Wrote:Very interesting, and looks highly useful. Could you upload an attachment to this thread that I can link to?

Sure. Here it is.
[ATTACH]1477[/ATTACH]
Reply

Thanks. You may want to edit that into the first post of this thread as well.
Reply

I think a better name for this thread and project is Interactive Savegame Tweaker.
Reply

b0rsuk Wrote:I think a better name for this thread and project is Interactive Savegame Tweaker.

I understood that the program would allow the tweaking of not only the savegame, but also the game's resource files, and the memory of a game in progress.

I Like Serena: This sounds like a very interesting project, especially with regard to things that could be done with it in the long term. Do you plan to use it "only" as a tool for testing, or have you also considered to use it as a shell from which special modded MoM versions can be played (and which provides more freedom in changing things in MoM)?

Also, a ton of thanks for the datamining. I already encountered a couple of values that were apparently wrong in the sources I used for Plight, so the next version will have some corrections.
Reply

b0rsuk Wrote:I think a better name for this thread and project is Interactive Savegame Tweaker.
Incorrect since this is project for REALTIME game hacking program or tweaker. Meaning if you do something in this program, you can see results instantly in-game (game is running while tweaking the content in it)! 1st EDIT: Thanks Psyringe said it all smile

2nd EDIT: For instance the lair wizard program I've been working on is capable of editing lair data in real-time. At this moment it currently only repopulates and spawns lairs in new positions. This real-time hacking introduces many possibilities. For instance it would be possible to make the program to create a lair which inhabitants gain strength over time and upgrade themselves to better (treasures could update at the same pace). Real-time hacking could also aid game AI to do things more elegantly (such as transporting those ships faster to new continents). Everything that is editable can be used in real-time hacking. You name it.
Reply

So I Like Serena, how's your project faring anyway? smile I take it you were working on a real-time hero editor, right? Any binaries to share for testing yet?

By the way, thanks for your research file! It helped a lot. But you were right, it was quite a information BOOM! yikes At first your search code was difficult to understand since there were seemingly random additions (+1 or +2) and binary shifts. It took me a while to grasp the idea behind your C-code but finally got it (had to follow it a line at the time because I wanted to know why this worked the way it did). Based on your search code, I've an idea to reverse it so that it could be turned into code, which allows us to find a pointer to any known array (assuming all arrays have pointers in DS). I need such a function to determine the pointers for Arcanus/Myrror ½MP datas for instance. Working on the function code now. If you want it, let me know.
Reply



Forum Jump: