MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
- theorclair
- Peasant
- Posts: 66
- Joined: 18 Jun 2013
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
If I wanted to start a new game in 6 with the clock set to 6AM rather than 9AM, how would I do that?
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Get disassembled code of MM6, grep it for 'mov <reg>, 0x21C00', make an asmpatch (in Scripts/General) changing that line to 'mov <reg>, 0x16800'. For MM8 it will be:theorclair wrote: ↑20 Aug 2023, 19:47 If I wanted to start a new game in 6 with the clock set to 6AM rather than 9AM, how would I do that?
Code: Select all
mem.asmpatch(0x490602, "mov eax, 0x16800")
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
I think something like
would be simpler.
Code: Select all
events.NewGameMap = function() Game.Time = 6 * const.Hour end
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
LastRegenerationTime is set to the same value in proc. I wonder whether all calculations care for negatives or not.Tomsod wrote: ↑24 Aug 2023, 14:37 I think something likewould be simpler.Code: Select all
events.NewGameMap = function() Game.Time = 6 * const.Hour end
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
This is the code I gave author on discord:
Yes, it adds 3 hours, I misunderstood it as well but if you change it to subtract 3 hours, it apparently works. Game.Time is signed integer. Not sure if after extended testing it will work correctly in all cases, though.
EDIT: okay, now seen that game time actually starts with some value above 130000, then it will work for sure
Code: Select all
function events.BeforeNewGameAutosave(t)
Game.Time = Game.Time + 3 * const.Hour
end
EDIT: okay, now seen that game time actually starts with some value above 130000, then it will work for sure
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.
-
- Lurker
- Posts: 1
- Joined: 10 Sep 2023
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Hi.
Im not sure, what Im doing wrong..but Im just unable to install MMextensions to my MM7. Im stucked with error popup after game start:
"Failed to load "debugDialog" function from "(mypath)\MMextDialogs.dll".
I use:
1)W10
2)Gog version of game
3)clean instalation of gog directly patched by Grayface 2.5.7 (tried both custom language or classic)
4) game folder is taken D:\(somefolder)\...(to avoid problem with program files folder). MMExtension folder is set to separate folder in D:\ root partition. MM7.ini have set right path to MMExt i hope.
5)administrative rights allowed for MM exe files, to be sure
Im running OK with just Grayface, but MMextensions are problem for me. And there is a lot of things and reinstalls i tried, But Im still lost. Thanks for help if possible
Im not sure, what Im doing wrong..but Im just unable to install MMextensions to my MM7. Im stucked with error popup after game start:
"Failed to load "debugDialog" function from "(mypath)\MMextDialogs.dll".
I use:
1)W10
2)Gog version of game
3)clean instalation of gog directly patched by Grayface 2.5.7 (tried both custom language or classic)
4) game folder is taken D:\(somefolder)\...(to avoid problem with program files folder). MMExtension folder is set to separate folder in D:\ root partition. MM7.ini have set right path to MMExt i hope.
5)administrative rights allowed for MM exe files, to be sure
Im running OK with just Grayface, but MMextensions are problem for me. And there is a lot of things and reinstalls i tried, But Im still lost. Thanks for help if possible
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Have run into same problem. It turned out that these are "expected exceptions" generated by lua scripts (for example, to test if lua version supports operators like "&" or "//", if not an exception is thrown and caught by lua), so just need to not break when they're thrown and let debuggee handle them. I had to ignore 0xE24C4A02 and 0xE24C4A03.Tomsod wrote: ↑11 May 2023, 17:23 For some reason whenever I run MM7 with the MMExt 2.3 (from git) in a debugger (winedbg/gdb), it always crashes early while loading. gdb complains about "Unknown exception code 0xe24c4a03" in kernelbase.dll, and if I detach it, MM7 then exits with MMExt error "return a//a". Without a debugger the game runs fine, but it's a bummer for me as I depend both on gdb and MMExt for my modmaking.
For now I can use MMExt 2.2, but I'd rather update if I could. Any idea which change causes this?
Unfinished mod by me: MM7 Rev4 mod, MMMerge version.
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Hello ! My last post here was more than 5 years ago, time flies ! In MM6, I'd like to edit healing spell value, the exemple provided here does indeed work ! Would it possible to make it do damage depending on your bow skill ? I'd also like to edit axes so you can dual wield them, is that even possible ? I can't seem to make the simple dagger skill modification example from the same link work when changing GM to Expert.
Also I'd like to change mp cost. Grayface said, a long time ago :
More importantly, if anyone could explain how I could have learned it by myself so in the future I may, it would be fabulous !
Edit : I was able to change spell cost (and fix flying fist damage type!) in spells.txt.
Also digging the skill emphasis mod I found this to edit healing from spells (My hope is I'll eventually be able to make that dagger example thanks to the mod maker):
But I wasn't able to implement a random function to make it roll dice for healing. Wasn't able either to edit the *4 by a number above 8 to mulitply skill level by more for healing result without having a ptr error. ( [string ""]:2: asm:1: invalid address ) I'm really confused !
Also I'd like to change mp cost. Grayface said, a long time ago :
Does that mean it's editable ? how ?
More importantly, if anyone could explain how I could have learned it by myself so in the future I may, it would be fabulous !
Edit : I was able to change spell cost (and fix flying fist damage type!) in spells.txt.
Also digging the skill emphasis mod I found this to edit healing from spells (My hope is I'll eventually be able to make that dagger example thanks to the mod maker):
Code: Select all
Cure Wounds
mem.asmpatch(0x00427FA2, "lea edx, [ecx+ecx*4]", 4)
mem.asmpatch(0x00427F94, "lea eax, [edx+edx*4]", 4)
mem.asmpatch(0x00427F86, "lea ecx, [eax+eax*4]", 4)
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Because 'lea' doesn't use arbitrary multiplier. Use 'imul' (like 'imul edx, ecx, 6'), check the size of instruction (rewriting asmpatch if it becomes bigger than 4) and be aware it changes flags (so you have to inspect instructions after asmpatch and rewrite them if necessary).lyeus wrote: ↑24 Sep 2023, 08:30Wasn't able either to edit the *4 by a number above 8 to mulitply skill level by more for healing result without having a ptr error. ( [string ""]:2: asm:1: invalid address ) I'm really confused !Code: Select all
mem.asmpatch(0x00427FA2, "lea edx, [ecx+ecx*4]", 4)
To quickly check the size of instruction you can use online assembler/disassembers like one at https://defuse.ca/online-x86-assembler.htm
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Thank you for your answer !
I'm not familiar at all with this language I should check some documentation, moreover I don't know what data I'm editing, I wasn't able to find my way in the .exe data and didnt know how to make sense of any data.
Also I tried some imuls swaps but it crashed the game everytime. What should I check with defuse ? the whole instruction or only what's in "" in the mem.asmpatch function ?
I'm not familiar at all with this language I should check some documentation, moreover I don't know what data I'm editing, I wasn't able to find my way in the .exe data and didnt know how to make sense of any data.
Also I tried some imuls swaps but it crashed the game everytime. What should I check with defuse ? the whole instruction or only what's in "" in the mem.asmpatch function ?
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Hi! I`ve got a quest bug, tryed to solve that with MMExtension guide, but i am not able to understand the guidance .
I`ve got a problem with wizzard quest promotion in MM7, i assembled all 6 parts of the golem but the NPC says i did not (talked to the golem ofc) Could you please help me with that?
I`ve got a problem with wizzard quest promotion in MM7, i assembled all 6 parts of the golem but the NPC says i did not (talked to the golem ofc) Could you please help me with that?
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Who's saying you didn't assemble the golem, the golem itself or Thomas Grey the wizard promoter? If the golem NPC has no dialog topics left but you still can't promote then something is indeed very wrong, but if you still can click on "Golem Parts" then you either missed one, or need to click one more time to finalize the process. Try going to the Judge if you're sure you had each golem part at some point.brookch wrote: ↑07 Oct 2023, 19:52 Hi! I`ve got a quest bug, tryed to solve that with MMExtension guide, but i am not able to understand the guidance :(.
I`ve got a problem with wizzard quest promotion in MM7, i assembled all 6 parts of the golem but the NPC says i did not (talked to the golem ofc) Could you please help me with that?
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Yeah, Tomas says i need to asseble the golem. but the golem says i dont have any other parts to assemble (tho i still have torso not used)Tomsod wrote: ↑07 Oct 2023, 21:28Who's saying you didn't assemble the golem, the golem itself or Thomas Grey the wizard promoter? If the golem NPC has no dialog topics left but you still can't promote then something is indeed very wrong, but if you still can click on "Golem Parts" then you either missed one, or need to click one more time to finalize the process. Try going to the Judge if you're sure you had each golem part at some point.brookch wrote: ↑07 Oct 2023, 19:52 Hi! I`ve got a quest bug, tryed to solve that with MMExtension guide, but i am not able to understand the guidance .
I`ve got a problem with wizzard quest promotion in MM7, i assembled all 6 parts of the golem but the NPC says i did not (talked to the golem ofc) Could you please help me with that?
I tryed to retake the torso at the man who gives you missed stuff but it didnt help (forgot his name)
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Sorry, just rechecked the inventory and i`ve got 2 hands, 2 legs, 2 heads and 2 torsos. So as i assemble the golem, i still have torso and head.
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
You do seem to have everything (and more). If the golem still says that "you have no (other) parts to assemble yet" then something is indeed broken! As a quick fix, this console (Ctrl-F1) command should force-assemble the golem (in vanilla MM7):
Then you can go to Thomas.
Code: Select all
evt.Add("QBits", 74)
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
I'm super late to reply, but I just got around to upgrading to 2.3 for real and it's indeed as easy as this! Thank you.Eksekk wrote: ↑11 Sep 2023, 09:29 Have run into same problem. It turned out that these are "expected exceptions" generated by lua scripts (for example, to test if lua version supports operators like "&" or "//", if not an exception is thrown and caught by lua), so just need to not break when they're thrown and let debuggee handle them. I had to ignore 0xE24C4A02 and 0xE24C4A03.
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
TrainPerWeek(n) Function Question
Hello,
Here and back again, I can go back playing MMMerge; I'll be playing both MMMerge Redone and MMMerge Base.
But, for a customized playthrough, I would like to have an automation that scales down the Training Time --because I'll be using multiple Parties.
I suspect MMExtension could easily handle this feature (in some way).
I first looked at the Reference Manual, and found a function named "TrainPerWeek(n)", that perhaps could hold a valid solution --for both Mods?
The problem is that I have no experience with MMExtension. Last time I tried (on MMMerge Redone), I just opened the Ctrl+F1 window during an on-going game, and tried to run "TrainPerWeek(5)"; but whatever value I put there seems to return some invalid sentences, and always something referring to "nil" values; and it doesn't seem to change the Training Time anyways, as I checked.
I already know how to get to the file responsible for that function ("Core\npc.lua") and find the function data there, but nothing apparently changes (if it was supposed to change anyways); I also am not sure if that requires manual tweaking (like usually we can do, by handily changing simple properties directly in some of the .ini files).
Originally, I was looking for a solution that would reduce conventional Training Time, of 8 days, to 1 day only; however, after looking at the MMExtension information, it seemed that this Modding's way to go to the problematic would be different: giving a maximum amount of Levels able-to-stack (per training session) before leaving the Training Hall and passing 8 days at least; which is a nice solution also that would work for me, if I could set it to 5 Levels stacking or 10 Levels stacking for example --and of course, if I could manage to run he function properly. I suspect I'm just missing elementary steps.
[MM7+] Set number of levels the party can train per training session. 0 means any number of levels, as in MM6. 1 is MM7+ default. If n isn't specified, returns current setting.
Thanks in advance! Any help is appretiated.
Hello,
Here and back again, I can go back playing MMMerge; I'll be playing both MMMerge Redone and MMMerge Base.
But, for a customized playthrough, I would like to have an automation that scales down the Training Time --because I'll be using multiple Parties.
I suspect MMExtension could easily handle this feature (in some way).
I first looked at the Reference Manual, and found a function named "TrainPerWeek(n)", that perhaps could hold a valid solution --for both Mods?
The problem is that I have no experience with MMExtension. Last time I tried (on MMMerge Redone), I just opened the Ctrl+F1 window during an on-going game, and tried to run "TrainPerWeek(5)"; but whatever value I put there seems to return some invalid sentences, and always something referring to "nil" values; and it doesn't seem to change the Training Time anyways, as I checked.
I already know how to get to the file responsible for that function ("Core\npc.lua") and find the function data there, but nothing apparently changes (if it was supposed to change anyways); I also am not sure if that requires manual tweaking (like usually we can do, by handily changing simple properties directly in some of the .ini files).
Originally, I was looking for a solution that would reduce conventional Training Time, of 8 days, to 1 day only; however, after looking at the MMExtension information, it seemed that this Modding's way to go to the problematic would be different: giving a maximum amount of Levels able-to-stack (per training session) before leaving the Training Hall and passing 8 days at least; which is a nice solution also that would work for me, if I could set it to 5 Levels stacking or 10 Levels stacking for example --and of course, if I could manage to run he function properly. I suspect I'm just missing elementary steps.
[MM7+] Set number of levels the party can train per training session. 0 means any number of levels, as in MM6. 1 is MM7+ default. If n isn't specified, returns current setting.
Thanks in advance! Any help is appretiated.
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
Scripts/General/Learning.lua in Revamp. Look at ReduceTrainingTime().Kinox wrote: ↑27 Oct 2023, 06:25 Here and back again, I can go back playing MMMerge; I'll be playing both MMMerge Redone and MMMerge Base.
But, for a customized playthrough, I would like to have an automation that scales down the Training Time --because I'll be using multiple Parties.
I suspect MMExtension could easily handle this feature (in some way).
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
That looks interesting feature, from the Revamp branch. Seems it would do exactly the kind of reduction Training Time I was referring to.cthscr wrote: ↑27 Oct 2023, 09:29Scripts/General/Learning.lua in Revamp. Look at ReduceTrainingTime().Kinox wrote: ↑27 Oct 2023, 06:25 Here and back again, I can go back playing MMMerge; I'll be playing both MMMerge Redone and MMMerge Base.
But, for a customized playthrough, I would like to have an automation that scales down the Training Time --because I'll be using multiple Parties.
I suspect MMExtension could easily handle this feature (in some way).
But, before I get to that branch, I want to at least finish MMMerge Base first (which I have never achieved).
Re: MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]
I did not try it in Redone. It current version of Base TrainPerWeek(n) is functional: TrainPerWeek(2) correctly sets it to 2 levels per week. Also there is event related to training time, put this script into General or Global folder to see it in action:
Code: Select all
function events.CalcTrainingTime(t)
-- t.Time - time taken
-- t.House - house, where current character is about to train
t.Time = const.Day -- spend one day, instead of one week
end
Who is online
Users browsing this forum: Google [Bot] and 4 guests