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.2 + MMEditor v2.1 Level Editor [June 4, 2019]

Unread postby theorclair » 02 Nov 2023, 05:26

This is driving me nuts, but in 7 is there a way to keep the full screen while using the original display and not the borderless one? I had it done at one point but now disabling it just makes it shrink to a small box.

Also, I can't disable the wands sticking around after using all their charges in 7 or the attack spell thing. I put it in the ini and nothing happened.

User avatar
Kinox
Pixie
Pixie
Posts: 100
Joined: 14 Sep 2019

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

Unread postby Kinox » 03 Nov 2023, 16:11

Rodril wrote: 31 Oct 2023, 13:59
Kinox wrote: 28 Oct 2023, 22:36 But, before I get to that branch, I want to at least finish MMMerge Base first (which I have never achieved).
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
Hi; this sounds pretty valuable! Thanks! I'll certainly be trying those 2 features soon enough, in the MMMerge branches; then I'll mention, if I succeed or not. And it's good to know that, there is this additional, alternative possibible event.

It's because, right now, I just got installed MMMerge Redone; but there, unfortunately, I could'nt reproduce anything so far indeed.

vavi
Leprechaun
Leprechaun
Posts: 6
Joined: 25 Dec 2023

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

Unread postby vavi » 26 Dec 2023, 09:21

Hello. I have this error.

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Debug Message at line 5 of ...- Day of the Destroyer\Scripts\Modules\PathfinderDll.lua:
Could not find MMPathfinder.dll - pathfinding disabled.
--------------------------------------------------------------------------------------------------------------------------
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
...y of the Destroyer\Scripts\Global\MonsterPathfinding.lua:473: attempt to index global 'PathfinderDll' (a nil value)

stack traceback:
...y of the Destroyer\Scripts\Global\MonsterPathfinding.lua: in function 'v'
... VIII - Day of the Destroyer\Scripts/Core/EventsList.lua:101: in function <... VIII - Day of the Destroyer\Scripts/Core/EventsList.lua:96>

local variables of 'v':
(*temporary) = nil
(*temporary) = "MonstersProcessed"
(*temporary) = (function: 0x1566ad00)
(*temporary) = "attempt to index global 'PathfinderDll' (a nil value)"

upvalues of 'v':
MonsterWays = (table: 0x158b36a0)
MonStuck = (table: 0x158b36c8)
PathfinderTick = (function: 0x1566b280)
PositionCheck = (function: 0x1566ad00)
IsOutdoor = false
--------------------------------------------------------------------------------------------------------------------------

I have MMPathfinder.dll in ExeMods folder. But game cant find it. How to fix?

Rodril
Swordsman
Swordsman
Posts: 576
Joined: 18 Nov 2016

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

Unread postby Rodril » 26 Dec 2023, 09:59

What is your operation system? Have you installed the game into "Program Files" folder?

vavi
Leprechaun
Leprechaun
Posts: 6
Joined: 25 Dec 2023

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

Unread postby vavi » 26 Dec 2023, 10:05

Rodril wrote: 26 Dec 2023, 09:59 What is your operation system? Have you installed the game into "Program Files" folder?
Win10 x64 LTSC. Game installed in C:\Games\Might and Magic VIII - Day of the Destroyer

Rodril
Swordsman
Swordsman
Posts: 576
Joined: 18 Nov 2016

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

Unread postby Rodril » 26 Dec 2023, 10:33

Please, do the following:
1. Launch the game.
2. On main menu press ctrl+f1 to open debug console.
3. Put this code there:

Code: Select all

print(mem.dll["MMPathfinder"])
print(AppPath)
for i, v in path.find(AppPath .. "ExeMods\\*") do
	print(v.FileName)
end
4. Press ctrl + enter to execute it
5. Send output here.

vavi
Leprechaun
Leprechaun
Posts: 6
Joined: 25 Dec 2023

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

Unread postby vavi » 26 Dec 2023, 10:37

---- Log File Output: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
nil
C:\Games\Might and Magic VIII - Day of the Destroyer\
MMExtension.dll
MMPathfinder.dll

Rodril
Swordsman
Swordsman
Posts: 576
Joined: 18 Nov 2016

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

Unread postby Rodril » 26 Dec 2023, 10:50

That's interesting. Cannot say why it happens. I'll respond later today.

Rodril
Swordsman
Swordsman
Posts: 576
Joined: 18 Nov 2016

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

Unread postby Rodril » 26 Dec 2023, 11:30

vavi wrote: 26 Dec 2023, 10:37 ---- Log File Output: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
nil
C:\Games\Might and Magic VIII - Day of the Destroyer\
MMExtension.dll
MMPathfinder.dll
Apparently, there's unnecessary dependency in pathfinder library.
You need microsoft visual c redistributable to make it work in current state, you can get one here:
https://aka.ms/vs/17/release/vc_redist.x86.exe

vavi
Leprechaun
Leprechaun
Posts: 6
Joined: 25 Dec 2023

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

Unread postby vavi » 26 Dec 2023, 11:36

It's working! Thank you, kind man.

User avatar
Kinox
Pixie
Pixie
Posts: 100
Joined: 14 Sep 2019

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

Unread postby Kinox » 16 Feb 2024, 19:37

Rodril wrote: 31 Oct 2023, 13:59
Kinox wrote: 28 Oct 2023, 22:36 But, before I get to that branch, I want to at least finish MMMerge Base first (which I have never achieved).
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
Hello again;

As I've mentioned before, I'd bring some feedback, as I would restart playing MMMerge Base.

So, in principle, the script works nicely. And that's enough for the playability that I was looking for.

With just 2 caveats:

1) After Training, on this approach, the Time/clock doesn't automatically goes to 09:00 (am) as conventional Training operates. For some reason, it works, instead, as Travelling. E.g., if Trained at 05:59 (pm), then immediately after Training the Party ends up being at 05:59 (pm) on the next Day(s), instead of being at 09:00 (am) on the next Day(s). What I mean is that it would be nice if the original behavior were maintained.
PS: Maybe, a 'switcher' ON/OFF piece of code, that would allow to toggle between the 2 different ways? and that the default would be Time reseted to 09:00 (am)?

2) As I understand, the script (or something not shown behind its functionality) makes it that the Week (or at least the original 8 Days of Training), becomes the "1 Day"; this whole thing, in itself, solves lots of things in my opinion. But it would be even better if we could set/customize the amount of Days through the script. In such sense, for example: if we could play with the system and customize it even more freely (note that this is not about the Taining 'stacking functionality', which you've already rendered possible to customize in the script): 1 Day of Training (which is the default in the script), to 2 Days of Training, ..., or even 8 Days of Training (exactly like the 'Week' or 8 Days of the original), or even more! and, then, on top of that, we'd be still able to regulate the 'stacking functionality'!

I'm not a programmer, so I don't know if a single script, code-block, in the Mod's context for this game, could handle (make it fit) all those different features/functionalities simultaneously; but it would be really nice if it could.
Anyways, thanks for the attention on the Modding upgrades and to the community! :applause:

dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 02 Aug 2024, 13:08

hi everyone,
is there any place where i can download mm extensions 2.3 ?
i tried inside grayface github but it does let me download only version 2.2 that is missing some features...
so, if you have any idea: where can i find the version 2.3 ?

i know that version 2.3 has more options, and is being used by mmerge678, i did download mmerge678 and saw the same options described here: https://grayface.github.io/mm/ext/ref/# ... nformation , but when i check my files those options are simply missing.

for example when someone is being damaged, you cannot know who is the source of damage in version 2.2, but you can know it in version 2.3

dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 04 Aug 2024, 08:22

tinkering with my mod:

i would like, in mm8, to have each new adventurer able to invest a total of 30 creation stat points instead of 15... is it possible ?

i know i can adjust the base attributes... i would like to know if it is possible to change the initial 15 points to distribute into 30

thanks in advance for any help ^^


edit:
also, if i want to remove bodybuilding skill from those that a knight can choose from start, in mm8 what should i write ?

i tried:
Game.ClassKinds.StartingSkills[const.Class.Knight] [const.Skills.Bodybuilding] = 0

but doesn't work :(
Last edited by dremor8484 on 04 Aug 2024, 12:30, edited 1 time in total.

dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 05 Aug 2024, 12:30

hi there, today i found another "problem"

i would like to boost the amount of hitpoints healed using body and spirit spells, but i have no idea how to do it...
is there someone that already figured this out ?

--so far i modded in attribute boosting arcane, divine spell damage and ranged damage:

--intelligence boosts arcane spell damage, while personality boosts divine spell damage
function events.CalcSpellDamage(t)
local data=WhoHitMonster()
if data and data.Player then
if (t.Spell >= 1 and t.Spell <= 44) or (t.Spell >= 78 and t.Spell <= 103) or (t.Spell >= 122 and t.Spell <= 125) then
t.Result = t.Result + math.floor(data.Player:GetIntellect()/5)
end

if (t.Spell >= 45 and t.Spell <= 77) or (t.Spell >= 78 and t.Spell <= 103) or (t.Spell >= 111 and t.Spell <= 114) then
t.Result = t.Result + math.floor(data.Player:GetPersonality()/5)
end
end
end

--accuracy adds damage to ranged
function events.ModifyItemDamage(t)
if t.Slot == const.ItemSlot.Bow then
t.Result = t.Result + math.floor(t.Player:GetAccuracy()/5)
end
end

function events.CalcStatBonusByItems(t)
if t.Stat == const.Stats.RangedDamageMin or t.Stat == const.Stats.RangedDamageMax then
t.Result = t.Result + math.floor(t.Player:GetAccuracy()/5)
end
end
--speed reduces physical damage and luck reduces non-physical damage
function events.CalcDamageToPlayer(t)
local DamageReduction = 0
if t.DamageKind == const.Damage.Phys then
DamageReduction = math.floor(t.Player:GetSpeed()/5)
else
DamageReduction = math.floor(t.Player:GetLuck()/5)
end
t.Result = math.max(0,t.Result-DamageReduction)
end

dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 07 Aug 2024, 08:49

if a character starts with light magic... he learns lvl 1 light spell and gets the lvl 2 identified book in inventory

Code: Select all


--add light magic starting spell and book
function events.BeforeLoadMap()
	if (Game.Time <= 138350) then
		for i=0,Party.High do
			if Party[i].Skills[const.Skills.Light] >= 1 then
				Game.CurrentPlayer = i
				Party[i].Spells[78] = true
				evt[i].GiveItem(1,const.ItemType.Book,478)
				--Mouse.Item.Bonus = 0
				--Mouse.Item.BonusStrength = 0
				Mouse.Item.Identified = true
				evt[i].GiveItem(1,const.ItemType.Book,478) --needed to push the previous item inside inventory
				Mouse.Item.Number = 0
				Game.CurrentPlayer = 0
			end
		end
	end
end


dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 09 Aug 2024, 12:09

Code: Select all


-- bank pays 1% interest once a month
function events.Tick()
	if vars.YearBankPay == nil then
		vars.YearBankPay = Game.Year
	end
	if vars.MonthBankPay == nil then
		vars.MonthBankPay = Game.Month
	end
	if (vars.YearBankPay ~= Game.Year or vars.MonthBankPay ~= Game.Month) then
		local PassedYears = Game.Year - vars.YearBankPay
		local PassedMonths = 12*PassedYears + Game.Month - vars.MonthBankPay
		if PassedMonths > 0 then
			for i=0, PassedMonths-1 do
				evt.Add("BankGold", Party.BankGold /100)
			end
		end
		vars.YearBankPay = Game.Year
		vars.MonthBankPay = Game.Month
	end
end

Last edited by dremor8484 on 09 Aug 2024, 18:07, edited 1 time in total.

Tomsod
Demon
Demon
Posts: 327
Joined: 31 Jul 2020

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

Unread postby Tomsod » 09 Aug 2024, 16:14

dremor8484 wrote: 09 Aug 2024, 12:09

Code: Select all


-- bank pays 1% interest once a month
function events.Tick()
	if vars.MonthBankPay == nil then
		vars.MonthBankPay = Game.Month
	end
	if (vars.MonthBankPay == Game.Month) then
		evt.Add("BankGold", Party.BankGold /100)
		vars.MonthBankPay = vars.MonthBankPay+1
		if (vars.MonthBankPay == 12) then
			vars.MonthBankPay = 0
		end
	end
end

Will break if the party spends two whole months training. Consider using Game.Year * 12 + Game.Month and putting evt.Add into a loop that also increments MonthBankPay by one until it's more than that.

dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 09 Aug 2024, 18:12

Tomsod wrote: 09 Aug 2024, 16:14 Will break if the party spends two whole months training. Consider using Game.Year * 12 + Game.Month and putting evt.Add into a loop that also increments MonthBankPay by one until it's more than that.
ok i rewrote part of the code

it now stores year and month, and it does a check when the stored values are different from current year and month.

suppose that you train during year 1175 during month 11
it is year 1176 month 2

that means 3 passed months: (1176-1175)*12 + 2 - 11 = 3

repeat 3 times: add 1% of gold in bank

my oh my, aren't generous the banks of the planet enroth ?

dremor8484
Leprechaun
Leprechaun
Posts: 7
Joined: 02 Aug 2024

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

Unread postby dremor8484 » 11 Aug 2024, 11:56

a new piece of code:
how to advance the main storyline of mm8, after burial of troll ashes, without having snapfinger in party.

Code: Select all


--no need to recruit snapfinger to advance the main storyline
function events.AfterLoadMap()
	if not evt.Cmp("QBits", 59) and evt.Cmp("QBits", 63) then -- this has not happened already, and Snapfinger rewarded the burial of ashes
		evt.ShowMovie  {DoubleSize = 1, Name = "\"overrept\" "}
		evt.SetNPCTopic  {NPC = 5, Index = 0, Event = 43}         -- "Bastian Loudrin" : "Quest"
		evt.SetNPCGreeting  {NPC = 5, Greeting = 15}         -- "Bastian Loudrin" : "Good day."
		evt.ForPlayer  ("All")
		evt.Add  {"Experience", Value = 10000}
		evt.Add  {"Awards", Value = 5}         -- "Found a witness to the cataclysm in the Ironsand Desert."
		evt.Add  {"History6", Value = 0}
		evt.ForPlayer  ("Current")
		evt.Subtract  {"QBits", Value = 25}         -- "Find a witness to the lake of fire's formation. Bring him back to the merchant guild in Alvar."
		evt.Set  {"QBits", Value = 13}         -- "Form an alliance among the major factions of Jadame."
		evt.Set  {"QBits", Value = 14}         -- "Form an alliance with the Necromancers' Guild in Shadowspire."
		evt.Set  {"QBits", Value = 15}         -- "Form an alliance with the Temple of the Sun in Murmurwoods."
		evt.Set  {"QBits", Value = 16}         -- "Form an alliance with the Dragon hunters of Garrote Gorge."
		evt.Set  {"QBits", Value = 17}         -- "Form an alliance with the Dragons of Garrote Gorge."
		evt.Set  {"QBits", Value = 18}         -- "Form an alliance with the Minotaurs of Ravage Roaming."
		evt.Set  {"QBits", Value = 59}         -- Returned to the Merchant guild in Alvar with overdune. Quest 25 done.
		evt.Add  {"Gold", Value = 4000}
		evt.SetNPCTopic  {NPC = 13, Index = 0, Event = 65}         -- "Masul" : "Alliance"
		-- evt.EnterHouse  {Id = 176}         -- "Merchant Guildhouse" (commented out to avoid game crash)
		-- evt.Exit  {}
	end
end



Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 2 guests