MMExtension v2.2 + MMEditor v2.1 Level Editor [June 4, 2019]

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
User avatar
theorclair
Peasant
Peasant
Posts: 66
Joined: 18 Jun 2013

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby theorclair » 01 Jan 2017, 22:26

When I look at the chest scripts on the map, I don't see anything about the contents. How do you change that?

User avatar
Anubis
War Dancer
War Dancer
Posts: 371
Joined: 08 Sep 2011
Location: Canada

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Anubis » 02 Jan 2017, 11:30

@ TheOrcLair: http://i.imgur.com/UZfC20P.jpg
I think this is the method you'd use to view/alter the contents of a chest if you wanted to add/remove specific items. That particular chest is from one of those two chests in Q's room @ Temple of the Snake. As for the coding aspect, I can't help you there, but I'm also curious as to how one would code in order to change chest contents around.
Last edited by Anubis on 02 Jan 2017, 11:30, edited 1 time in total.

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 02 Jan 2017, 13:31

Hello.
J. M. Sower wrote:Uhh... I forgot there are also restrictions for hostile.txt. Removing them is the last thing I really need.
Have not played with hostile.txt before, but tried after you said, and yes, they are. Problem is .exe use byte variables instead of words or dwords to define hostile.txt bounds, so i did few injections, code looks horrid, but it works. I've merged all monsters and hostile limits removal for mm7 and mm8 in one "00 structs.lua" file, link:
https://www.dropbox.com/s/i5nlfy077fe3y ... 8.zip?dl=0

Also there are new test tables and readme file.

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 02 Jan 2017, 18:11

GrayFace, can you reupload "MM8 Choose party script", please? Link in first post seem to be broken and i can not find it anywhere on your site. I'm wondering how custom buttons were added there to interface.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 02 Jan 2017, 19:57

Rodril wrote:
J. M. Sower wrote:Uhh... I forgot there are also restrictions for hostile.txt. Removing them is the last thing I really need.
Have not played with hostile.txt before, but tried after you said, and yes, they are. Problem is .exe use byte variables instead of words or dwords to define hostile.txt bounds, so i did few injections, code looks horrid, but it works. I've merged all monsters and hostile limits removal for mm7 and mm8 in one "00 structs.lua" file, link:
https://www.dropbox.com/s/i5nlfy077fe3y ... 8.zip?dl=0

Also there are new test tables and readme file.
Thanks, I will test it.
Rodril wrote:GrayFace, can you reupload "MM8 Choose party script", please? Link in first post seem to be broken and i can not find it anywhere on your site. I'm wondering how custom buttons were added there to interface.
I have it on my hard disk, so:
http://www.mediafire.com/file/6hij7g1qc ... Editor.zip
Last edited by J. M. Sower on 02 Jan 2017, 19:58, edited 2 times in total.

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 03 Jan 2017, 03:01

Has it been done by old MM8LevelEditor? I thought it was .lua script.

I missed one number somewhere in script for hostile.txt removal, so it was impossible to start new game in mm8 (crash), and at last i've found purpose of those 0x668c and 0x5b49, code corrected, indirect result - PlaceMon.txt now unlimited too. :bug: Redownload archive, please, link is same:
https://www.dropbox.com/s/i5nlfy077fe3y ... 8.zip?dl=0
Last edited by Rodril on 03 Jan 2017, 03:01, edited 1 time in total.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 03 Jan 2017, 06:55

Rodril wrote:
Has it been done by old MM8LevelEditor? I thought it was .lua script.
This is an instalator. I have also unpacked script if you want. ;)

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 03 Jan 2017, 07:25

I've fixed the link in the first post.

J. M. Sower, Rodril wasn't asking for MM8LevelEditor.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 03 Jan 2017, 07:37

J. M. Sower wrote:Can you tell me more about IdaAddr and FR/FR1? I can understand the best on the basis of examples. ;) I can't open your databases because I have only free 5.0 version of IDA, but I have my own databases.
For example, FR(0x5E9530, 0x5E9530 + 0x60*2) would find references to monsters array in MM8 as well as some false positives (why *2? Because one function starts counting from monster 1, not monster 0). Then you and copy one of Ref{...} strings and press paste in IdaAddr. Then switch to IDA and use Ctrl+Left/Right to navigate, Ctrl+"+" to include the address, Ctrl+"-" to exclude and Ctrl+"*" to (don't remember). It simulates mouse clicks and currently coordinates are hard-coded for 125% DPI. It was never meant for release obviously :)
The Ref{} comes from WoG when I used it to find stuff to add new town (still haven't added it), I have this function there. The 2nd Ref{} that is usually empty contains more suspicious commands.
Ideal way to find things would probably be a combination of static FR() approach and debugging with a memory breakpoint.

Rodril, I haven't looked at your scripts, but sounds really cool! You can avoid changing 00 structs.lua like I do in Scripts\Structs\After\Remove2DEventsLimit.lua and similar scripts. (it also reads the text table to determine array size needed.
Last edited by GrayFace on 03 Jan 2017, 08:00, edited 4 times in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 03 Jan 2017, 07:52

GrayFace wrote:I've fixed the link in the first post.

J. M. Sower, Rodril wasn't asking for MM8LevelEditor.
Uhh... I must upload wrong package. ;P

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 03 Jan 2017, 08:01

J. M. Sower wrote:I'm not sure, but I think that Repairing and Perception in MMExt don't work correctly (it works always - character skill is unimportant).
Weird. In what game?
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 03 Jan 2017, 10:10

GrayFace wrote:
J. M. Sower wrote:I'm not sure, but I think that Repairing and Perception in MMExt don't work correctly (it works always - character skill is unimportant).
Weird. In what game?
I'm not sure, but I think it is in MM8. I must to check this precisely.

Ps. I think I must to reinstall my WinXP, so will stop my work for a few days. ;P
Last edited by J. M. Sower on 03 Jan 2017, 16:34, edited 2 times in total.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 04 Jan 2017, 17:37

Rodril wrote:I missed one number somewhere in script for hostile.txt removal, so it was impossible to start new game in mm8 (crash), and at last i've found purpose of those 0x668c and 0x5b49, code corrected, indirect result - PlaceMon.txt now unlimited too. :bug: Redownload archive, please, link is same:
https://www.dropbox.com/s/i5nlfy077fe3y ... 8.zip?dl=0
Game is crashing on start (MM7). :/

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 04 Jan 2017, 19:01

J. M. Sower wrote:Game is crashing on start (MM7). :/
Have not you forgot to put following tables into related .lod archives?

Here is last fixes i've added:
https://www.dropbox.com/s/i5nlfy077fe3y ... 8.zip?dl=0

Restore original structs.lua (from MMExt archive), hostile.txt and Monsters.txt tables (from data\*archivename*backup folder) and put "RemoveHostileTxtLimit.lua" and "RemoveMonstersAndPlacemonLimits.lua" into your \Scripts\Structs\After folder.

Edit: Forgot to say. New scripts do not need tables with defined number of lines anymore, numbers copmuted automatically now.
Last edited by Rodril on 04 Jan 2017, 20:29, edited 2 times in total.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 05 Jan 2017, 15:04

Rodril wrote:Here is last fixes i've added:
https://www.dropbox.com/s/i5nlfy077fe3y ... 8.zip?dl=0
Finally works. :D

Edit: There is weird situation. When I write Game.HostileTxt[89][40] it is good, but when I write Game.HostileTxt[40][89] then I have this:

Code: Select all

[string ""]:1: array index (89) out of bounds [0, 88]

stack traceback:
	[C]: in function 'error'
	Scripts/Core/RSMem.lua:1342: in function '__index'
	[string ""]:1: in main chunk
	[C]: in function 'pcall'
	...Files\3DO\Might and Magic VII ENG/Scripts/Core/Debug.lua:89: in function 'DoDebug'
	...Files\3DO\Might and Magic VII ENG/Scripts/Core/Debug.lua:131: in function 'debug'
	...ht and Magic VII ENG\Scripts\General\DebugConsoleKey.lua:6: in function 'v'
	Scripts/Core/EventsList.lua:68: in function <Scripts/Core/EventsList.lua:63>

local variables of '[string ""]:1':
	(*temporary) = (table: 0x0cca1bc0)
	(*temporary) = 2.5589883581662e-260
Last edited by J. M. Sower on 05 Jan 2017, 15:14, edited 1 time in total.

Rodril
Swordsman
Swordsman
Posts: 556
Joined: 18 Nov 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Rodril » 05 Jan 2017, 17:24

J. M. Sower wrote:Edit: There is weird situation. When I write Game.HostileTxt[89][40] it is good, but when I write Game.HostileTxt[40][89] then I have this
Damn, i've encountered this, fixed in console, but forgot to add to script... Redownload archive please, link is same.

User avatar
J. M. Sower
Scout
Scout
Posts: 188
Joined: 25 Jan 2016

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby J. M. Sower » 06 Jan 2017, 15:36

Rodril wrote:
J. M. Sower wrote:Edit: There is weird situation. When I write Game.HostileTxt[89][40] it is good, but when I write Game.HostileTxt[40][89] then I have this
Damn, i've encountered this, fixed in console, but forgot to add to script... Redownload archive please, link is same.
It works now. :D

BTW, I have a problem with "function events.KeyDown(t)". When I use condition "t.Key == const.Keys.LBUTTON" it doesn't work (it works for other keys). :/
Last edited by J. M. Sower on 06 Jan 2017, 15:40, edited 1 time in total.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 07 Jan 2017, 09:04

I haven't added a mouse click event yet. There is however a WindowMessage(t) event.
t = {Window = wnd, Msg = msg, WParam = wp, LParam = lp, Handled = false}
And here is click messages handling from Knytt Stories Ex (e.g. 0x0201 is the value of Msg to compare against):

Code: Select all

local function ParseMCoords(a)
	local x = a % 0x10000
	local y = (a - x) / 0x10000
	return (x >= 0x8000 and x - 0x10000 or x), (y >= 0x8000 and y - 0x10000 or y)
end

-- left

win.ExportMessage(0x0201, function(wp, lp)
	local x, y = ParseMCoords(lp)
	event("MouseDown", x, y)
	--!(x, y, IsDoubleClick)
	event("MouseClick", x, y, false)
end)

win.ExportMessage(0x0202, function(wp, lp)
	event("MouseUp", ParseMCoords(lp))
end)

-- double click
win.ExportMessage(0x0203, function(wp, lp)
	local x, y = ParseMCoords(lp)
	event("MouseClick", x, y, true)
end)
I'll probably add them to MMExt.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.

Ryock
Leprechaun
Leprechaun
Posts: 1
Joined: 18 Jan 2017

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby Ryock » 18 Jan 2017, 03:39

This may be a dumb question but how do you actually get mmextension to run? There are only .ddl files (and there are three of them not sure which one starts the actual program). I have looked up instructions for running ddl files but they say you need to provide and entry point and not sure what that would be for this.

User avatar
GrayFace
Round Table Hero
Round Table Hero
Posts: 1660
Joined: 29 Nov 2005

Re: MMExtension v2.1 + MMEditor v2.1 Level Editor [Apr 22, 2016]

Unread postby GrayFace » 18 Jan 2017, 05:00

You don't "run" them. My patch hooks it up when you run the game.
Last edited by GrayFace on 18 Jan 2017, 05:01, edited 1 time in total.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 58 guests