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).

Moderator: Moderators

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

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

Postby J. M. Sower » Dec 30 2016, 11:31

..coninuing, I use monsters spawns placed in editor and evt.SummonMonsters to summoning them. I also tried to use "local mon = SummonMonster mon.Hostile = true" but this works only for hostile to player and it is reseted during party respawn. In the past I used skeleton archers and they are hostile, but when I added skeleton warriors from MM7 (as new creature) in their place and I set them the same values in Hostile.txt (also I tried other values) they are always friendly for player. Also I changed AI Type and Hostile in Monsters.txt but it didn't help. It is weird because some of my older new monsters (eg. zombies or angels) have properly attitude. At this time I solved this problem by replacing skeletons archers and warriors places. ;P Maybe I will try with reinstalling game.

Ps. I even delete hostile.txt from game archives and game have no reaction. ;P Everything works as before.

Ps2. When I reinstalling the game I found in old version in Scripts/General that scripts in file Hostile.lua:

Code: Select all

local i4, i2, i1, u4, u2, u1, call = mem.i4, mem.i2, mem.i1, mem.u4, mem.u2, mem.u1, mem.call

local Count = 89

local BytePatch = {0x4011D7+2, 0x4011DC+2, 0x452017+3, 0x45203D+2, 0x45204D+3}

mem.IgnoreProtection(true)
for _, p in ipairs(BytePatch) do
   u1[p] = u1[p] + Count - 67
end
mem.IgnoreProtection(false)

In reinstaled game all works as before (I haven't used above script).
Last edited by J. M. Sower on Dec 30 2016, 16:48, edited 16 times in total.

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

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

Postby J. M. Sower » Dec 30 2016, 13:00

I use Game.HostileTxt[][] and I notice that the numbers are other than in Hostile.txt file and when I assign my values with script everything works good. :D

User avatar
Anubis
Conscript
Conscript
Posts: 241
Joined: 08 Sep 2011
Location: Canada

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

Postby Anubis » Dec 30 2016, 16:20

Maybe you aren't starting a new game after making changes.

That did the trick. I never knew I had to do that. Thanks!

User avatar
Anubis
Conscript
Conscript
Posts: 241
Joined: 08 Sep 2011
Location: Canada

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

Postby Anubis » Dec 30 2016, 17:31

Code: Select all

--[[Game.MonstersTxt[].SpellSkill
N - Novice; E - Expert; M - Master; GM - GrandMaster
2   N 2
3   N 3
4   N 4
65   E 1
66   E 2
67   E 3
68   E 4
69  ?   E 5
70   E 6
71   E 7
72   E 8
73   E 9
136   M 8
138   M 10
140   M 12
266   G 10
268   G 12
271   G 15
272   G 16
]]--
Game.MonstersTxt[103].Spell = 84 -- Prismatic Light
Game.MonstersTxt[103].SpellChance = 15 -- chance to cast spell
Game.MonstersTxt[103].SpellSkill = 73 -- E 9

function events.LoadMap()
   Game.MonstersTxt[103].Spell = 84 -- Prismatic Light
   Game.MonstersTxt[103].SpellChance = 15 -- chance to cast spell
   Game.MonstersTxt[103].SpellSkill = 73 -- E 9
end
function events.LeaveMap()
   Game.MonstersTxt[103].Spell = 0
   Game.MonstersTxt[103].SpellChance = 0
   Game.MonstersTxt[103].SpellSkill = 0
end

I'm confused. Am I supposed to copy all this code and save it to T8.lua in Scripts/Maps folder? I don't really get what the first part is supposed to accomplish. Also, Q isn't in Monsters.Txt so I kind of get why GrayFace suggested Map.Monsters. Also, when I look at Q's text file in MMEditor, I see his ID as "104". Does that mean anything? I also tried GrayFace's code:

Code: Select all

for i, a in Map.Monsters do
  if a.Spell == 95 then
    return i
  end
end

I put that in the debug console and all I get is 0 as a return. I dunno if that's right, but I still tried this following code and it didn't do anything. Do I have to start a new game or something?

Code: Select all

function events.LoadMap()
   Map.Monsters[0].Spell = 84
   Map.Monsters[0].SpellChance = 15
   Map.Monsters[0].SpellSkill = 73
end
function events.LeaveMap()
   Map.Monsters[0].Spell = 0
   Map.Monsters[0].SpellChance = 0
   Map.Monsters[0].SpellSkill = 0
end

What am I missing?

Rodril
Demon
Demon
Posts: 312
Joined: 18 Nov 2016

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

Postby Rodril » Dec 30 2016, 20:16

Hello.
Happy Christmas and New Year for everyone.

I played with MonstersTxt (mm8) few days ago and have found that i can not add monster with index above 267. Did not find any workaround, so tried to solve it myself. I am not sure if it is in best state at mean time, but you can test it: https://www.dropbox.com/s/xwglo3lu37u67 ... s.zip?dl=0 . In short words: no limits there anymore.

1. Replace "00 structs.lua" in ...Scripts\Structs with one from archive (dont worry, there are not many changes, it will not affect your current game anyhow).
2. Put MonList.txt from archive to your ...Data\Tables folder.
3. Replace MONSTERS.txt from your EnglishT.lod with one from archive.

Dont launch game between steps - it will not start.

As result, max number of monsters will be increased to 397. I just doubled all existing monsters in mm8 and added one more. You can see them and place on any map in MMEditor: create new monster, press "Type" button. Of course, you can change MONSTERS.txt and MonList.txt as you wish, but watch for indexes in MONSTERS.txt, game will crash if there are less of them then number in "00 structs.lua" at line 80 (also, you can increase this number if you want more slots).

Notice! Monsters.txt and MonList.txt from my archive are ready only for clear version of MM8 (MM7 and MM6 are not supported) with latest version of MMExt (MMExt temporary 2.2 version).

I have few dull questions, but i cant even formulate them now. I did try to keep my code outside of "00 structs.lua", except replacing predefined numbers with variables, but at some points functions from "00 structs.lua" did not see global variables, even after i changed "_KNOWNGLOBALS" at line 13. Maybe it is because of environment system of lua? My code starting at line 77 and ends at line 140, it is inserted between "else" and "define...", nothing more is changed.

User avatar
theorclair
Peasant
Peasant
Posts: 55
Joined: 18 Jun 2013

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

Postby theorclair » Dec 30 2016, 21:48

I'm trying to fix the accuracy boost well in Harmondale so it works. This is the script in game.

evt.hint[228] = evt.str[4] -- "Drink from the Well"
evt.map[228] = function()
if evt.Cmp("PlayerBits", 2) then
evt.StatusText(11) -- "Refreshing!"
else
evt.Add("BaseAccuracy", 2)
evt.Add("PlayerBits", 2)
evt.StatusText(71) -- "+2 Accuracy (Permanent)"
end

Can I just copy the missing bit from another one of those fountains, or does it have to be customized?

Thank you so much for the written scripts!

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

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

Postby J. M. Sower » Dec 30 2016, 22:49

Anubis wrote:I'm confused. Am I supposed to copy all this code and save it to T8.lua in Scripts/Maps folder? I don't really get what the first part is supposed to accomplish. Also, Q isn't in Monsters.Txt so I kind of get why GrayFace suggested Map.Monsters. Also, when I look at Q's text file in MMEditor, I see his ID as "104". Does that mean anything? I also tried GrayFace's code:

Code: Select all

for i, a in Map.Monsters do
  if a.Spell == 95 then
    return i
  end
end

I put that in the debug console and all I get is 0 as a return. I dunno if that's right, but I still tried this following code and it didn't do anything. Do I have to start a new game or something?

Code: Select all

function events.LoadMap()
   Map.Monsters[0].Spell = 84
   Map.Monsters[0].SpellChance = 15
   Map.Monsters[0].SpellSkill = 73
end
function events.LeaveMap()
   Map.Monsters[0].Spell = 0
   Map.Monsters[0].SpellChance = 0
   Map.Monsters[0].SpellSkill = 0
end

What am I missing?

I think it will be good if you save only this in T8.lua.

Code: Select all

function events.LoadMap()
for i, a in Map.Monsters do
  if a.Spell == 95 then
   Map.Monsters[i].Spell = 84
   Map.Monsters[i].SpellChance = 15
   Map.Monsters[i].SpellSkill = 73
  end
end
end

But...
GrayFace wrote:However, I doubt Prismatic Light would work, because not all spells can be cast by monsters. Would be interesting to find out
Last edited by J. M. Sower on Dec 30 2016, 22:57, edited 2 times in total.

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

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

Postby J. M. Sower » Dec 30 2016, 23:02

Rodril wrote:Hello.
Happy Christmas and New Year for everyone.

I played with MonstersTxt (mm8) few days ago and have found that i can not add monster with index above 267. Did not find any workaround, so tried to solve it myself. I am not sure if it is in best state at mean time, but you can test it: https://www.dropbox.com/s/xwglo3lu37u67 ... s.zip?dl=0 . In short words: no limits there anymore.

1. Replace "00 structs.lua" in ...Scripts\Structs with one from archive (dont worry, there are not many changes, it will not affect your current game anyhow).
2. Put MonList.txt from archive to your ...Data\Tables folder.
3. Replace MONSTERS.txt from your EnglishT.lod with one from archive.

Dont launch game between steps - it will not start.

As result, max number of monsters will be increased to 397. I just doubled all existing monsters in mm8 and added one more. You can see them and place on any map in MMEditor: create new monster, press "Type" button. Of course, you can change MONSTERS.txt and MonList.txt as you wish, but watch for indexes in MONSTERS.txt, game will crash if there are less of them then number in "00 structs.lua" at line 80 (also, you can increase this number if you want more slots).

Notice! Monsters.txt and MonList.txt from my archive are ready only for clear version of MM8 (MM7 and MM6 are not supported) with latest version of MMExt (MMExt temporary 2.2 version).

I have few dull questions, but i cant even formulate them now. I did try to keep my code outside of "00 structs.lua", except replacing predefined numbers with variables, but at some points functions from "00 structs.lua" did not see global variables, even after i changed "_KNOWNGLOBALS" at line 13. Maybe it is because of environment system of lua? My code starting at line 77 and ends at line 140, it is inserted between "else" and "define...", nothing more is changed.

That sounds good! I need that script in MM7. I will try to adapt it there.
Last edited by J. M. Sower on Dec 30 2016, 23:05, edited 1 time in total.

User avatar
Anubis
Conscript
Conscript
Posts: 241
Joined: 08 Sep 2011
Location: Canada

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

Postby Anubis » Dec 31 2016, 9:40

@ Sower - Thanks! I finally figured out what I was doing wrong. The changes weren't even being applied at all. After making the script change[s], this is what I neglected to do:

- If already in-game, exit MM6 and start it up again
- Use the Internal Map feature in MMEditor to go to the desired map & location in the map
- Toggle out of MMEditor and save
- Load save
- Check to see if change worked as intended

Is there an easier way to test changes, or is this as good as it gets?

Btw, Prismatic light, as well as other AOE spells, didn't work. Go figure. =]

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

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

Postby J. M. Sower » Dec 31 2016, 11:39

Rodril, I write it like this (for MM7) and I have made changes in monlist.txt and monsters.txt in the same way as you for MM8, but the game crashes at start. What should be corrected? I see, I must to find all adresses for mem.i4 commands. I know how to use HexEditor and deasembler so can you tell me how to search all of that values?

Code: Select all

   if mmver == 6 then
      define[0x56C188].array{174, lenA = i4, lenP = 0x56C188 + structs.MonstersTxtItem["?size"]*174}.struct(structs.MonstersTxtItem)  'MonstersTxt'
   elseif mmver == 7 then

      -- This bunch of lines removing Monsters.txt limits. Variable's names speaking for themselves. Need testing for possible bugs. - Rod.

      local MonstersTxtLength = 397
      local ExtraSize = MonstersTxtLength*96 + 0x668c

      local NewStartPos = mem.hookalloc(ExtraSize)

      for i = NewStartPos, NewStartPos + ExtraSize - 1 do
         u1[i] = 0x0
      end

      local NewPlaceMonStart = NewStartPos + (MonstersTxtLength + 1)*96

      mem.u4[NewPlaceMonStart] = 0x0

      mem.IgnoreProtection(true)

      mem.i4[0x453bd1 + 2] = MonstersTxtLength + 1
      mem.i4[0x45289a + 6] = MonstersTxtLength + 1

      mem.i4[0x45278f + 2] = (MonstersTxtLength + 1)*96 + 4

      mem.i4[0x420779 + 2] = NewStartPos
      mem.i4[0x44cf47 + 1] = NewStartPos
      mem.i4[0x44cf65 + 1] = NewStartPos
      mem.i4[0x44d2a1 + 2] = NewStartPos + 96
      mem.i4[0x44d532 + 1] = NewStartPos + 96
      mem.i4[0x44e3e5 + 2] = NewStartPos
      mem.i4[0x45466a + 1] = NewStartPos
      mem.i4[0x456e89 + 2] = NewStartPos
      mem.i4[0x456ec3 + 2] = NewStartPos + 96
      mem.i4[0x45eba5 + 2] = NewStartPos + 96
      mem.i4[0x4b16b9 + 2] = NewStartPos
      mem.i4[0x4b6076 + 2] = NewStartPos
      mem.i4[0x4ba10c + 2] = NewStartPos
      mem.i4[0x4ba522 + 1] = NewStartPos + 96 + 8

      mem.i4[0x401331 + 3] = NewStartPos + 17
      mem.i4[0x401bce + 2] = NewStartPos + 80
      mem.i4[0x401d9f + 2] = NewStartPos + 17
      mem.i4[0x402008 + 2] = NewStartPos + 17
      mem.i4[0x403853 + 2] = NewStartPos + 88
      mem.i4[0x403a33 + 2] = NewStartPos + 88
      mem.i4[0x403c02 + 2] = NewStartPos + 88
      mem.i4[0x403e17 + 2] = NewStartPos + 88
      mem.i4[0x404058 + 2] = NewStartPos + 88
      mem.i4[0x406bd9 + 2] = NewStartPos + 88
      mem.i4[0x406c9c + 2] = NewStartPos + 88
      mem.i4[0x40702b + 3] = NewStartPos + 88
      mem.i4[0x43754a + 2] = NewStartPos + 64
      mem.i4[0x437D10 + 2] = NewStartPos + 64
      mem.i4[0x4381ab + 2] = NewStartPos + 64
      mem.i4[0x4b9D4f + 3] = NewStartPos + 8
      mem.i4[0x4b9d94 + 3] = NewStartPos + 8
      mem.i4[0x4bae04 + 3] = NewStartPos + 8
      mem.i4[0x4bae4b + 3] = NewStartPos + 8

      mem.i4[0x420766 + 3] = NewPlaceMonStart
      mem.i4[0x456e77 + 3] = NewPlaceMonStart

      mem.IgnoreProtection(false)

      ---------------------------------------------
      
      define[NewStartPos].array{MonstersTxtLength + 1, lenA = i4, lenP = NewStartPos + 23444}.struct(structs.MonstersTxtItem)  'MonstersTxt'
      [NewPlaceMonStart].array{31, lenA = i4, lenP = NewStartPos + 23448}.EditPChar  'PlaceMonTxt'
   else
      define[0x5E9530].array{268, lenA = i4, lenP = 0x5E9530 + 6563*4}.struct(structs.MonstersTxtItem)  'MonstersTxt'
      [0x5EF9B0].array{131, lenA = i4, lenP = 0x5E9530 + 6564*4}.EditPChar  'PlaceMonTxt'
   end


Edit: I found one equivalent adress but I do not know how you determined that in MM8 number 25732 is 268*96+4. :wall: It must be 265*88+4?

Code: Select all

mm8 MonstersTxtLength = 268
0x45278f + 2   25732(268*96+4)   84 64

mm7 MonstersTxtLength = 265
0x454FA8 + 2   23324(265*88+4?)   1C 5B


Edit2: When I'am searching MM7 values I found defect in your script. In line 102 must be this(you forgot "+ 96"):

Code: Select all

mem.i4[0x44e3e5 + 2] = NewStartPos + 96
Last edited by J. M. Sower on Dec 31 2016, 14:25, edited 8 times in total.

Rodril
Demon
Demon
Posts: 312
Joined: 18 Nov 2016

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

Postby Rodril » Dec 31 2016, 15:55

J. M. Sower wrote:Edit2: When I'am searching MM7 values I found defect in your script. In line 102 must be this(you forgot "+ 96")

Checked it, you are right. I've fixed it in my archive, thank you.
J. M. Sower wrote:Edit: I found one equivalent adress but I do not know how you determined that in MM8 number 25732 is 268*96+4. :wall: It must be 265*88+4?

MM8 deafult monsters.txt limit is 267 (unlike 264 in MM7) i'm adding 1 to it to let mm7-8.exe save space between monsters.txt and PlaceMon.txt pointer blocks which are near in memory, then i multiplying it by 96 because mm8 uses 96(dec) bytes for subblock of pointers to one moninfo (unlike 88(dec) in mm7). Last 4 bytes i'am adding there because first item of PlaceMon.txt should be empty, dont know exactly why, but i guess cause is conditon somewhere like: if defined monname = "", then use standart name.

Adapting it to MM7 require replacing all addresses with related in mm7.exe. After digging in mm8.exe it was not very hard, so i did. Here is link: https://www.dropbox.com/s/ut5ta2mmz4yc3 ... 7.zip?dl=0 .

I've included test MonList and monsters.txt for mm7 into this archive and also technical information, it could be usefull if you'll decide to check or improve code somehow.

Admit!!! You should put monsters.txt into "00 patch.events.lod", not into "events.lod".

J. M. Sower wrote:I know how to use HexEditor and deasembler so can you tell me how to search all of that values?

I'm using OllyDbg debugger v1.10 for this. It allow you to start program in debug mode and monitor all dependencies of code, find referenses and set breakpoints into code to stop game while marked command is executed or on access to address. Can not describe proccess because for me it often based on guesswork.
Last edited by Rodril on Dec 31 2016, 16:05, edited 1 time in total.

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

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

Postby J. M. Sower » Dec 31 2016, 16:20

Rodril wrote:Adapting it to MM7 require replacing all addresses with related in mm7.exe. After digging in mm8.exe it was not very hard, so i did. Here is link: https://www.dropbox.com/s/ut5ta2mmz4yc3 ... 7.zip?dl=0 .

I've included test MonList and monsters.txt for mm7 into this archive and also technical information, it could be usefull if you'll decide to check or improve code somehow.

Admit!!! You should put monsters.txt into "00 patch.events.lod", not into "events.lod".

Thank you very much! It will open my possibilities in modding of MM7. :D

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

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

Postby J. M. Sower » Dec 31 2016, 18:58

Uhh... I forgot there are also restrictions for hostile.txt. :wall: Removing them is the last thing I really need.

User avatar
Anubis
Conscript
Conscript
Posts: 241
Joined: 08 Sep 2011
Location: Canada

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

Postby Anubis » Jan 1 2017, 9:18

I've been trying to comprehend this SpellSkill value. This is what makes the damage from spells stronger, yes? Looking at the table Sower provided:

Code: Select all

2   N 2
3   N 3
4   N 4
65   E 1
66   E 2
67   E 3
68   E 4
69   E 5
70   E 6
71   E 7
72   E 8
73   E 9
136   M 8
138   M 10
140   M 12
266   G 10
268   G 12
271   G 15
272   G 16

I thought 60 was the cap for player spell values. I guess it's 64 for monsters?

Am I correct in assuming this:

64 = N 64
128 = E 64
192 = M 64
So...there are no values for 193-266?
257 = G 1 (For MM7/MM8)
320 = G 64 (For MM7/MM8)
Over 320 = Irrelevant values

[Edit]
I've been playing around with Q having Fireball. Even if I give Q different SpellSkill values, the fireball damage taken with my level 1 party doesn't even kill me...

[Edit 2]

Speaking of obtaining values, how do you even find out what values do what, such as...

Finding out SpellSkill values (e.g. SpellSkill 65 really means Expert w/ Skill of 1)
Finding out HostileType values (0 = Wimp?, 4 = Aggressive?)
And so on...
Last edited by Anubis on Jan 1 2017, 9:46, edited 2 times in total.

User avatar
GrayFace
Dragon
Dragon
Posts: 1456
Joined: 29 Nov 2005

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

Postby GrayFace » Jan 1 2017, 11:21

Anubis wrote:I'm confused. Am I supposed to copy all this code and save it to T8.lua in Scripts/Maps folder? I don't really get what the first part is supposed to accomplish. Also, Q isn't in Monsters.Txt so I kind of get why GrayFace suggested Map.Monsters. Also, when I look at Q's text file in MMEditor, I see his ID as "104". Does that mean anything?

It means Q is based on monster 104 - has the same look and sound. Since Q is placed on the map and not spawned with a Spawn Point, his attributes aren't taken from Monsters.txt.

Anubis wrote:I also tried GrayFace's code:

Code: Select all

for i, a in Map.Monsters do
  if a.Spell == 95 then
    return i
  end
end

I put that in the debug console and all I get is 0 as a return.

Yes, that's the correct index.

Anubis wrote:I dunno if that's right, but I still tried this following code and it didn't do anything. Do I have to start a new game or something?

Code: Select all

function events.LoadMap()
   Map.Monsters[0].Spell = 84
   Map.Monsters[0].SpellChance = 15
   Map.Monsters[0].SpellSkill = 73
end
function events.LeaveMap()
   Map.Monsters[0].Spell = 0
   Map.Monsters[0].SpellChance = 0
   Map.Monsters[0].SpellSkill = 0
end

What am I missing?

The effect should be him not using Finger Of Death anymore. Also, you don't need the events.LeaveMap part.

Anubis wrote:@ Sower - Thanks! I finally figured out what I was doing wrong. The changes weren't even being applied at all. After making the script change[s], this is what I neglected to do:

- If already in-game, exit MM6 and start it up again
- Use the Internal Map feature in MMEditor to go to the desired map & location in the map
- Toggle out of MMEditor and save
- Load save
- Check to see if change worked as intended

Is there an easier way to test changes, or is this as good as it gets?

No, you shouldn't save game after loading a map with the editor.
To test changes in scripts from Maps or Global folders:
- reload saved game
If you want to go to a map, write this in the console:

Code: Select all

evt.MoveToMap{Name="T8.blv"}
Last edited by GrayFace on Jan 1 2017, 11:37, edited 2 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
GrayFace
Dragon
Dragon
Posts: 1456
Joined: 29 Nov 2005

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

Postby GrayFace » Jan 1 2017, 11:25

Anubis wrote:I've been trying to comprehend this SpellSkill value. This is what makes the damage from spells stronger, yes? Looking at the table Sower provided

SplitSkill and JoinSkill functions do the conversion in MMExt, e.g. JoinSkill(9, const.Expert) = 73
Last edited by GrayFace on Jan 1 2017, 11:38, 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.

User avatar
GrayFace
Dragon
Dragon
Posts: 1456
Joined: 29 Nov 2005

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

Postby GrayFace » Jan 1 2017, 11:35

J. M. Sower wrote:I see, I must to find all adresses for mem.i4 commands. I know how to use HexEditor and deasembler so can you tell me how to search all of that values?

Here's the script I use (in Scripts\General): http://pastebin.com/cq8XiMXt
FR finds references to a range of addresses. FR1 finds uses of a range of numbers which aren't necessarily 4-byte. I also have a program to go over these addresses in IDA and .idb databases for the games. Here they are: https://dl.dropboxusercontent.com/u/447 ... MM6idb.rar https://dl.dropboxusercontent.com/u/447 ... mm7idb.rar https://dl.dropboxusercontent.com/u/447 ... MM8idb.rar https://dl.dropboxusercontent.com/u/447 ... DAAddr.rar
Last edited by GrayFace on Jan 1 2017, 11:38, 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.

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

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

Postby J. M. Sower » Jan 1 2017, 13:55

GrayFace wrote:Here's the script I use (in Scripts\General): http://pastebin.com/cq8XiMXt
FR finds references to a range of addresses. FR1 finds uses of a range of numbers which aren't necessarily 4-byte. I also have a program to go over these addresses in IDA and .idb databases for the games. Here they are: https://dl.dropboxusercontent.com/u/447 ... MM6idb.rar https://dl.dropboxusercontent.com/u/447 ... mm7idb.rar https://dl.dropboxusercontent.com/u/447 ... MM8idb.rar https://dl.dropboxusercontent.com/u/447 ... DAAddr.rar

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.
Last edited by J. M. Sower on Jan 1 2017, 18:47, edited 1 time in total.

User avatar
Anubis
Conscript
Conscript
Posts: 241
Joined: 08 Sep 2011
Location: Canada

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

Postby Anubis » Jan 1 2017, 17:05

Wow. I guess tweaking a monster's SpellSkill values in any way simply doesn't affect the increase/decrease of spell damage cast by monsters. Maybe it just affects spell recovery times? *Shrug* I've even played around with it in Monsters.TXT; I gave a Goblin King a spell mastery of 60 in Lightning Bolt, and it still didn't affect any damage increase/decrease whatsoever, lol. Oh, well.

Anyway, I just wanted to thank you again for your help, GrayFace & Sower. I'll be playing around with MMExtension/MMEditor some more since you helped me establish a better understanding of how to use these programs. I'll be sure to ask more questions in the future!
Last edited by Anubis on Jan 1 2017, 17:06, edited 1 time in total.

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

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

Postby J. M. Sower » Jan 1 2017, 19:03

Anubis wrote:Wow. I guess tweaking a monster's SpellSkill values in any way simply doesn't affect the increase/decrease of spell damage cast by monsters. Maybe it just affects spell recovery times? *Shrug* I've even played around with it in Monsters.TXT; I gave a Goblin King a spell mastery of 60 in Lightning Bolt, and it still didn't affect any damage increase/decrease whatsoever, lol. Oh, well.

Weird. I will look for that in MM7/MM8. Maybe MMExt have omission.

I'm not sure, but I think that Repairing and Perception in MMExt don't work correctly (it works always - character skill is unimportant).
Last edited by J. M. Sower on Jan 1 2017, 19:07, edited 1 time in total.


Return to “Might and Magic”

Who is online

Users browsing this forum: Google [Bot] and 4 guests