I am once again asking for the quote of the month to be changed as it is now a new month - Mjmd

Create an account  

 
"how to mod" questions

is there any way to make each city produce one food automatically? i'm still trying to find alternatives to granary being the first building in each city. i'd like to weaken it to +1 food without changing balancing.
dance!
Reply

(September 5th, 2015, 11:20)Seravy Wrote: Make mana and gold treasure picks actually spend the amount of treasue points as the amount of gold/mana added instead of a fixed 100 for a random amount between 10-200 (magic.exe)
39E81-39E95
2B 7E FA 90 90 90 ... fill the rest with 90
39EC7-39EDC
2B 7E FA 90 90 90 ... fill the rest with 90
can we also make it spend only half the amount of treasure points? i would like to increase lair rewards in general (double or triple), to a point where you actually clear lairs for loot before you can conquer a capital. so far we can mod values for items, spells and retorts. that leaves money/mana and prisoners. prisoners would also be nice, but they are uncommon. money would be more important.
dance!
Reply

Does someone know how to remove or halve a specific gold reward we get when we conquer an enemy city equal to wizard's gold reserves multiplied by ratio of (city population / entire population)?

For example, if wizard has 4000 gold (they usually have lots of gold in hard difficulties), 10 cities and 180 population and you conquer a city with 18 population ... you automatically get 400 gold by this feature.

Later on, if wizard has 2000 gold, 2 cities and 25 population, and you conquer the capital with 20 population ... you get 1600 gold!

Additionally, you get wizard's mana when you conquer the capital, usually an amazing amount. Sometimes it feels the rewards are too great and would be nice to cut them in half.

Reply

(September 27th, 2015, 16:10)zitro1987 Wrote: Does someone know how to remove or halve a specific gold reward we get when we conquer an enemy city equal to wizard's gold reserves multiplied by ratio of (city population / entire population)?

For example, if wizard has 4000 gold (they usually have lots of gold in hard difficulties), 10 cities and 180 population and you conquer a city with 18 population ... you automatically get 400 gold by this feature.

Later on, if wizard has 2000 gold, 2 cities and 25 population, and you conquer the capital with 20 population ... you get 1600 gold!

Additionally, you get wizard's mana when you conquer the capital, usually an amazing amount. Sometimes it feels the rewards are too great and would be nice to cut them in half.

Hmm...I was thinking about removing that "feature" too. On higher difficulties the AI can amass 30k gold and you get like 3k after each city. Besides...who would keep their gold reserves spread evenly among their cities, ready to be stolen?

Okay, I did this :

Gold looted = Gold production of captured city times two but no more than 50% of the owner's gold reserve
9DFE7 : overwrite everything from here with 26 8A 4F 60 32 ED D1 E1 26 8A 47 12 98 BA C8 04 F7 EA 8B D8 8B 87 20 A2 D1 E8 3B C8 7E 02 8B C8 8B C1 89 46 FE

Now let's try to find the mana.
Hmm I seem to have rearranged code around the mana looting to insert the new diplomatic relations from banishment.
Not sure if this will be compatible with the original game but it most likely will be :
6F566 : 8B C6 -> EB 34 no mana is lost or gained when raiding a fortress.

btw Zitro, many of the hex codes I got from your thread have problems
"the higher mana for shots" changes values that seem to belong to the minimum mana needed for casting spells, and also mana leak's "if mana is below this much it becomes 0" check, this was the "05" which was marekd in the text as a "bug" in the original game, well it was not, Mana Leak does drain 5.
The marketplace change has a typo, one of the addresses has a "9" instead of a "8" in the hundreds.
The "half food for army" change does not halve the food taken for the purpose of gold generated by leftover food.
Reply

does anyone know how to mod the value of books/retorts in lairs? i thought we had that info, but we only have item substitute values.
dance!
Reply

(September 27th, 2015, 16:13)Seravy Wrote: Gold production of captured city times two but no more than 50% of the owner's gold reserve
9DFE7 : overwrite everything from here with 26 8A 4F 60 32 ED D1 E1 26 8A 47 12 98 BA C8 04 F7 EA 8B D8 8B 87 20 A2 D1 E8 3B C8 7E 02 8B C8 8B C1 89 46 FE

That didn't work well with me. I captured a small town and got ~3000 gold. Good luck if it works for you, it'd be a great addition to your mod.

Reply

(September 28th, 2015, 17:22)zitro1987 Wrote:
(September 27th, 2015, 16:13)Seravy Wrote: Gold production of captured city times two but no more than 50% of the owner's gold reserve
9DFE7 : overwrite everything from here with 26 8A 4F 60 32 ED D1 E1 26 8A 47 12 98 BA C8 04 F7 EA 8B D8 8B 87 20 A2 D1 E8 3B C8 7E 02 8B C8 8B C1 89 46 FE

That didn't work well with me. I captured a small town and got ~3000 gold. Good luck if it works for you, it'd be a great addition to your mod.

That really sounds as if that small town had a gold production of 1500 due to another bug. Check the town data in the tweaker.
The other option is that you already changed code around there and it's incompatible. I'm sure I copy-pasted the numbers from the actual complied asm file so there cannot be a typo.
Also make sure it is at the correct address, as I didn't list the original bytes, so easy to slip up by one or two bytes and then it won't work.
Reply

Just an observation, this whole thread with modding questions and answers is not readily accessible.
Wouldn't it make sense to categorize the information in a dedicated page?
A forum is not really the best place for something like that, so perhaps the Master of Magic wikia is more suitable.
--I like ILSe
Reply

I think the wiki should be for official (and insecticide) information related to playing the game only.
Modding should be kept separately.
I agree a better way for keeping the information is needed, though.
Even I'm keeping all the hex code info in a dedicated .doc file to be able to easily find what I need, and I collected that from like 3+ threads and who knows how many downloaded attachments.

Although...some of the hex code posted is not even correct, typos and oversights often happen. We should avoid spreading info too much, especially as applying hex code without knowing the exact effects can have unexpected results (on the displays, on the AI, or any related other game feature), most of them are safe for generic use, some might not.
Those that change stuff where editors overwrite the data are especially risky. (I've had heals healing 505h instead of 5 when I modded my healing spell because the 05 byte was moved in the code and the editors kept rewriting to the old location)
I think the best would be Tiltowait's suggestion of forking Insecticide and adding all the newly done fixes (and convenience changes) to it...but I still don't have a proper text based binary patch tool to even try (not to mention being busy with modding). I'm definitely not going to copy over all those fixes manually, I fixed like 20 bugs of various severity including many that would need like 50-100 bytes of code, and I keep doing more and more every day.
Reply

A wikia allows fixing stuff in place by anyone when more information comes up, or otherwise mark stuff as unreliable.
In a forum corrections tend to get lost, or information cannot be found due to all the posts that are in between gems of information.
My mind is not particularly set to what is supposed to be in a wikia. I believe a page title and how it is categorized and linked to the other pages sets what it is for.

As for combining changes, the simplest form is converting a binary file to hex form and publishing a diff.
The problem comes when there is a merge conflict. Those are almost impossible to resolve.
One step further is to disassemble the code and publish diffs on that. Then it becomes possible to resolve conflicts.
In particular because most fixes and changes have to be localized in 1 function that is currently set in stone due to the problems in shifting, resizing, and refactoring it.
The downside is that I haven't figured out yet how to recreate the binaries from the disassembled code.
--I like ILSe
Reply



Forum Jump: