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

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
Pixie
Pixie
Posts: 137
Joined: 25 Jan 2016

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

Postby J. M. Sower » Apr 2 2018, 8:48

Rodril wrote:No, limits of GlobalTxt have not been removed, why would you need it? I have not noticed any special functionality of GlobalTxt items, new lines can be stored in NPCText with same effect, or right in scripts, i think.

It will be usefull because of special polish characters. Sometimes if text isn't loaded from Str, Global.txt etc. special characters are not showed correctly.

Rodril wrote:There is outdated part of script at lines 1252 - 1257, it was supposed to shrink amount of required memory for new dolls by excluding from item-handle mechanics ones that can not use armors at all (like dragons). I have not played with new dolls a lot, can not say if excluding armorless dolls have any sense now.
To make it work: comment or remove 1252-1257 lines of code in RemoveItemsLimits.lua (or download one from mm678 files), don't forget to add extra columns to "Complex items pictures.txt" (t4, t5).

Something is wrong. In lines 1252-1257 in my "RemoveItemsLimits.lua" I have this:

Code: Select all

      local Words, CurId, Am
      local IsCloak = false
      local Counter, CloakCounter = 0, 0

      LineIt()
      LineIt()

... and in "RemoveItemsLimits.lua" from MM678 is this:

Code: Select all

         end
      end
   end

   ---- Items extra
   local ItemsExtraData = mem.StaticAlloc(Game.ItemsTxt.count*4)

If I would remove this parts game will return error at start.
Last edited by J. M. Sower on Apr 2 2018, 9:09, edited 1 time in total.

Rodril
Pixie
Pixie
Posts: 147
Joined: 18 Nov 2016

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

Postby Rodril » Apr 2 2018, 22:59

These lines should be commented, i've done it, redownload script, please, tell if it works.

Code: Select all

   for i = 0, Game.CharacterDollTypes.count - 1 do
      local a = Game.CharacterDollTypes[i]
      if not (a.Armor or a.Helm or a.Belt or a.Boots or a.Cloak) then
         TypesCount = TypesCount - 1
      end
   end

User avatar
J. M. Sower
Pixie
Pixie
Posts: 137
Joined: 25 Jan 2016

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

Postby J. M. Sower » Apr 3 2018, 16:13

Rodril wrote:These lines should be commented, i've done it, redownload script, please, tell if it works.

Code: Select all

   for i = 0, Game.CharacterDollTypes.count - 1 do
      local a = Game.CharacterDollTypes[i]
      if not (a.Armor or a.Helm or a.Belt or a.Boots or a.Cloak) then
         TypesCount = TypesCount - 1
      end
   end

I copied script from newest MM678 and unfortunately it still looks like that:
Image

Rodril
Pixie
Pixie
Posts: 147
Joined: 18 Nov 2016

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

Postby Rodril » Apr 3 2018, 21:32

Have you tried anything besides armors? Boots, helemts? Does these have problems too? Also, have you made image with "v5a" postfix? "a" used for armor variation when character does not have weapon in main hand.

User avatar
J. M. Sower
Pixie
Pixie
Posts: 137
Joined: 25 Jan 2016

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

Postby J. M. Sower » Apr 4 2018, 15:37

Rodril wrote:Have you tried anything besides armors? Boots, helemts? Does these have problems too? Also, have you made image with "v5a" postfix? "a" used for armor variation when character does not have weapon in main hand.

Finally! It works with postfix. Thanks!

User avatar
BTB
Peasant
Peasant
Posts: 71
Joined: 21 Aug 2011
Location: Houston, TX
Contact:

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

Postby BTB » May 24 2018, 8:32

BTB wrote:Hey, everyone... just popping in for my annual checkup on how this utility is progressing. Last I left off, there were a couple of key features that I was interested in that had yet to see implementation:

-Ability to change effects of potions (i.e. make "Restore MP" a compound potion instead of a basic one).
-Ability to edit bonuses on artifacts/relics
-Ability to edit skill levels/schools of spells (i.e. make Charm a basic-level mind spell and make Stun a Mind spell instead of Earth)

Have either of these become possible over the last year or so?


Hmm... doesn't look like Grayface has been around lately and this got buried. Here's to hoping he sees this.
"You don't have to be a vampire to die like one... *****." -Simon Belmont

Rodril
Pixie
Pixie
Posts: 147
Joined: 18 Nov 2016

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

Postby Rodril » May 27 2018, 15:24

BTB wrote:-Ability to change effects of potions (i.e. make "Restore MP" a compound potion instead of a basic one).
-Ability to edit bonuses on artifacts/relics

You can achieve these with existing "RemoveItemsLimits" script ( https://www.dropbox.com/s/7vp7ouh73ugv3 ... s.lua?dl=0 ), put it into "...Scripts\Structs" folder. Here is video explanation of it's capabilities: https://youtu.be/lipriutf3SI (unfortunately i've run out of space in my dropbox).
I don't know the way to directly edit existing bonuses of artifacts, because they are not stored somewhere, it is just special behaivor in casual situations if player wears item. But it is possible to replace them, there is example in video and example of rescripting mm6/7 artifact effects here: https://www.dropbox.com/s/un2t1aw7xzrl0 ... s.lua?dl=0
BTB wrote:Ability to edit skill levels/schools of spells (i.e. make Charm a basic-level mind spell and make Stun a Mind spell instead of Earth)

I don't know how to do it at the moment.
Last edited by Rodril on Jun 1 2018, 0:34, edited 1 time in total.

User avatar
BTB
Peasant
Peasant
Posts: 71
Joined: 21 Aug 2011
Location: Houston, TX
Contact:

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

Postby BTB » May 30 2018, 18:49

Ooh, this is very nice! I can see the relevant snippet in what you posted for potions, but I wouldn't know where to begin editing it. Could you show me an example edit?
"You don't have to be a vampire to die like one... *****." -Simon Belmont

Rodril
Pixie
Pixie
Posts: 147
Joined: 18 Nov 2016

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

Postby Rodril » Jun 1 2018, 0:32

Seems, file host has not handle the video, i've uploaded it to Youtube: https://youtu.be/lipriutf3SI .
I've forgot to mention, this script works only with MM8.
Script generates few new tables in "...Data\Tables folder", one of them is "Potion settings.txt", something can be edit there.
Also there is new array in game - evt.PotionEffects . It consist of functions, indexed according to "Pot Id" column of TXT file. How it works: when player uses potion (drink it or uses on other item), if evt.PotionEffects have function at index of this potion, function will be executed, if function returns "true" original behaivor of potion is bypassed.
Here is example, effect is senseless, just to see it in action:

Code: Select all

-- According to "Potion settings.txt", 1 is item 221 - catalyst potion
evt.PotionEffects[1] = function(IsDrunk, Target, Power)
 -- IsDrunk - true if player drinks potion, false - if potion used on item
 -- Target - Player structure if IsDrunk == true, otherwise Item structure
 -- Power - number - power of potion
   if IsDrunk then
      Target.HP = Target.HP/2
   else
      Item.Broken = true -- note, first you have to allow potion to be used on items in "Potion settings.txt"
   end
   
   return true -- don't execute usual effect
end

More detailed explanation is in video, i'm sure it is possible to watch it now.

seregavlg
Leprechaun
Leprechaun
Posts: 3
Joined: 14 Jun 2018

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

Postby seregavlg » Jun 14 2018, 7:39

Hi, how can i fix that:
Might and Magic VI\Scripts\Global\Hand2Weapon.lua:11: memory at address 412C8D of size 4 cannot be written to

stack traceback:
[C]: in function 'error'
Scripts/Core/RSMem.lua:323: in function 'write_error'
Scripts/Core/RSMem.lua:356: in function 'Protect'
Scripts/Core/RSMem.lua:479: in function '__newindex'
D:\Games\Might and Magic VI\Scripts\Global\Hand2Weapon.lua:11: in function 'SetWeaponOffsets'
D:\Games\Might and Magic VI\Scripts\Global\Hand2Weapon.lua:21: in main chunk

arguments of '__newindex':
t = (table: 0x00ace570)
a = 4271245
v = 593

upvalues of '__newindex':
assertnum = (function: 0x00f3a3c8)
Protect = (function: 0x00ad3b50)
size = 4
ffi = (table: 0x00ae8fa0)
type = "int32_t*"
Unprotect = (function: 0x00adc510)

seregavlg
Leprechaun
Leprechaun
Posts: 3
Joined: 14 Jun 2018

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

Postby seregavlg » Jun 14 2018, 7:40

and after ALT+F1:
Might and Magic VI/Scripts/Core/events.lua:50: attempt to call field 'IgnoreProtection' (a boolean value)

stack traceback:
D:\Games\Might and Magic VI/Scripts/Core/events.lua: in function <D:\Games\Might and Magic VI/Scripts/Core/events.lua:40>
D:\Games\Might and Magic VI/Scripts/Core/events.lua:60: in function 'Switch'
...es\Might and Magic VI\Scripts\Global\Editor Navigate.lua:679: in function 'v'
Scripts/Core/EventsList.lua:68: in function 'docall'
Scripts/Core/EventsList.lua:111: in function 'EditorSelectionChanged'
...es\Might and Magic VI\Scripts\Global\Editor Navigate.lua:111: in function 'SetWorkMode'
D:\Games\Might and Magic VI\Scripts\Global\Editor GUI.lua:219: in function 'Editor'
D:\Games\Might and Magic VI\Scripts\Global\Editor GUI.lua:41: in function 'v'
Scripts/Core/EventsList.lua:68: in function <Scripts/Core/EventsList.lua:63>

arguments of 'D:\Games\Might and Magic VI/Scripts/Core/events.lua':
(*temporary) = false

local variables of 'D:\Games\Might and Magic VI/Scripts/Core/events.lua':
(*temporary) = true
(*temporary) = true
(*temporary) = 1
(*temporary) = nil
(*temporary) = "attempt to call field 'IgnoreProtection' (a boolean value)"

upvalues of 'D:\Games\Might and Magic VI/Scripts/Core/events.lua':
delmem = 11142578
delhook = nil
addr = 4804386
mine = "鋶`\0"
std = "‹F\28öÄ "
size1 = 6

seregavlg
Leprechaun
Leprechaun
Posts: 3
Joined: 14 Jun 2018

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

Postby seregavlg » Jun 18 2018, 7:19

ok, done

User avatar
J. M. Sower
Pixie
Pixie
Posts: 137
Joined: 25 Jan 2016

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

Postby J. M. Sower » Jun 22 2018, 6:27

I wonder if there is a possibility to add some soundtrack to the character selection screen. What do you think?


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 10 guests