Multiplayer for MMMerge [beta 30.09.2024/1]

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
User avatar
Mercs
Peasant
Peasant
Posts: 61
Joined: 19 Sep 2020

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Mercs » 07 Aug 2023, 05:29

I'd say instead of "MMO" think of Diablo 2 MP implementation (early battle.net). There will never be a lot of people in a single game server, can even limit 5 artificially. People have characters of various levels that persist through games. The characters enter a lobby w/ chat and a server hoster/browser. You can browse character portraits in the bottom of the screen and maybe see their paperdolls to the right. Desirable level range can be specified for a server, but it is just a visual tip for players and not a strict condition.

With this system, an optional setting to manually refuse/approve entry when player connects to your game, while being able to see at least their Name, Level and Class can be a nice touch to sorta manually block entry for characters that you can SEE are cheaters or otherwise wouldn't fit.

At the same time, should focus on how "game state" works (as opposed to "player character state", or in other words their save data). Basically, once again, I recommend a look at D2, but with a touch more persistant world. The gist of it is Diablo 2 is very easy to pop into the server with others to trade items or do basically whatever quest, since everyone starts at cities and state of every location is refreshed, so everyone can technically do any quest when they join despite of what others are doing anyway, limited only by which "Acts" players have unlocked.

Here, instead can just refill locations at a ludicrous pace (like maybe just 2 game weeks or 1 month) so that everything in a version of the world saved by host can respawn soon anyway, including quest items for other players, so that players can catch up or ask others for carry when catching up. Tho I am still not even sure how time works if players can travel separately through locations. Bolstering should also be recalculated every time a player joins or leaves the game.

-- UPD. Last MP video for 6.

User avatar
Macros the Black
Druid
Druid
Posts: 898
Joined: 21 May 2008
Location: Elemental Plane of Air

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Macros the Black » 08 Aug 2023, 19:46

Yeah, I was also thinking more along the lines of a Diablo 2 implementation where you can keep your characters across multiple games. Maybe time could work individually, per player. If not for time of day, then at least for the date? So traveling costs you 5 days, but for everyone else it doesn't. If that's possible.
You'd think Darkmoor was a ghost town, but instead there's plenty of life among the dead.

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Malekitsu » 09 Aug 2023, 01:05

Ok, Diablo2 design actually that makes sense (and might be even easier to do overall).
Having it diablo 2 like (with offline mode) will make harder to catch cheaters, but overall is a plus.
Hopefully Rodril will be able to implement that.

As for endgame I'm planning to add a PoE-like form of content, with mapping, crafting system, entire maps dedicated to bosses that drops unique items, item sets, legendaries etc..
What else would you think it would benefit the game? Some skills on keybinds or talent tree? A cow level? :P

User avatar
Mercs
Peasant
Peasant
Posts: 61
Joined: 19 Sep 2020

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Mercs » 09 Aug 2023, 08:57

Crazy wishlist:
- casting scrolls from spellbook, casting spells with alchemy from spellbook
- more effects for alchemy and better scaling
- Scroll and Wand (!) effect scaling with some skill (Magic school or some item skill like ID Item, maybe renaming the skill), such functionality exists in Revamp branch of Merge
- stack scrolls, stack potions of same power value
- forbid certain spells when making a class via MMExtention (a tool for players to use a table and forbid spells to certain classes, for roleplay reasons), such functionality exists in Revamp branch of Merge
- hotkey to drink red/blue potions
- melee cleave attacks unless Rodril is already on it (discussed above)
- ranged/melee only is incredibly dull to play because you literally only press 1 button. so I might have been wrong before when I said all the cleaves and etc should be done through autocasts, maybe actually introduce some form of tab of physical feats to spellbook, or maybe do autocasts as well anyway (rodril have proposed a tab with tank skills in conversation above)
- threat/aggro system unless Rodril is already on it (discussed above)
- skill actualization (make the likes of Disarm Trap, ID Monster or Perception actually useful, where possible at least, maybe expand the skills somehow to provide passive bonuses, dramatically increase trap dmg/effects, etc.)

But first of all, get more players to play this, everything else is secondary, imo.

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Malekitsu » 10 Aug 2023, 12:44

cool, will keep in mind ;)
Mercs wrote: 09 Aug 2023, 08:57 But first of all, get more players to play this, everything else is secondary, imo.
Speaking about this, I'm all for making something cool first and then getting more people to join in.
We could also consider reaching out to some YouTubers to let more people know about what we're up to here.

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Malekitsu » 12 Aug 2023, 22:48

As we are playing merge online I had 2 errors, number 1:

Code: Select all

...\Scripts\Modules\Multiplayer\Synchronization/MapLoad.lua:185: array index (63) out of bounds [0, 40]

stack traceback:
	[C]: in function 'error'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1366: in function 'check'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1113: in function '__index'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:840: in function '__newindex'
	...\Scripts\Modules\Multiplayer\Synchronization/MapLoad.lua:185: in function 'map_facet_bits'
	...\Scripts\Modules\Multiplayer\Synchronization/MapLoad.lua:197: in function 'map_data'
	...\Scripts\Modules\Multiplayer\Synchronization/MapLoad.lua:238: in function 'process_map_data'
	...\Scripts\Modules\Multiplayer\Synchronization/MapLoad.lua:491: in function 'v'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:66: in function 'docall'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:126: in function 'Call'
	...\Scripts\Modules\Multiplayer\Synchronization/MapLoad.lua:558: in function 'v'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:101: in function <...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:96>

arguments of '__newindex':
	o = 28
	obj = (table: 0x1f301868)
	_ = "Bits"
	val = 34616328

local variables of '__newindex':
	(*temporary) = (table: 0x03b489b8)
	(*temporary) = 899034180
	(*temporary) = 3.2815649545185e-294

upvalues of '__newindex':
	arr = (table: 0x03b489b8)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
Which happens when changing map sometimes. Save and reload fix the issue.

And number 2 here:

Code: Select all

...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:842: array index (3) out of bounds [0, 0]

stack traceback:
	[C]: in function 'error'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1366: in function 'check'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1113: in function '__index'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1115: in function '__index'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:842: in function '__index'
	...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:391: in function 'v'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:66: in function 'docall'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:126: in function 'call'
	...Might and Magic 8 ONLINE\Scripts\General\ExtraEvents.lua:221: in function 'f'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1992: in function <...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1990>
	[C]: in function 'pcall'
	...Desktop\Might and Magic 8 ONLINE\Scripts/Core/Common.lua:203: in function 'pcall2'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1779: in function <...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1776>
	[C]: in function 'def'
	...Desktop\Might and Magic 8 ONLINE\Scripts/Core/events.lua:2367: in function 'CallDefault'
	...Desktop\Might and Magic 8 ONLINE\Scripts/Core/events.lua:2374: in function 'f'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:2215: in function <...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:2213>
	[C]: in function 'pcall'
	...Desktop\Might and Magic 8 ONLINE\Scripts/Core/Common.lua:203: in function 'pcall2'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1779: in function <...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1776>

arguments of '__index':
	o = 12
	obj = (table: 0x21827790)
	_ = "Bonus2"
	val = nil

local variables of '__index':
	(*temporary) = (table: 0x032b6710)
	(*temporary) = (table: 0x21827790)
	(*temporary) = 3.2816246833901e-294

upvalues of '__index':
	arr = (table: 0x032b6710)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
This happened when I tried to loot ratmen and made the game crash.
Also Appearance doesn't seem to be saved, need to change that everytime

I kinda fixed the crash issue with this:
in Multiplayer/Synchronization/Object.lua

Code: Select all

function events.BeforeGotGold(t)
    if Game.CurrentScreen == 0 or Game.CurrentScreen == 20 then
        if t.ObjectId>Map.Objects.High then
            t.ObjectId=Map.Objects.High
        end
        local Object = Map.Objects[t.ObjectId]
        local Item = Object.Item
        local Gold, Owner = Item.Bonus2, bit.And(Object.Owner, 7)
        if (Owner == REMOTE_PLAYER_REF or Owner == 4) and Item.Number >= 187 and Item.Number <= 189 then
            t.Amount = Gold
            NPCFollowers.LastGoldTaken = 0
        end
    end
end

Rodril
Swordsman
Swordsman
Posts: 579
Joined: 18 Nov 2016

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Rodril » 13 Aug 2023, 15:18

I've added fix for posted issues.
Malekitsu wrote: 12 Aug 2023, 22:48 This happened when I tried to loot ratmen and made the game crash.
This one should be gone.
Malekitsu wrote:number 1:
Does it happen every time on map load? Maybe on some specific map?
Malekitsu wrote: Also Appearance doesn't seem to be saved, need to change that everytime
It should be saved on both host's side and client's side, do you have character selection option, when joining the game?

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023]

Unread postby Malekitsu » 13 Aug 2023, 16:33

Rodril wrote: 13 Aug 2023, 15:18 It should be saved on both host's side and client's side, do you have character selection option, when joining the game?
Sorry, it's saved and other players see me correctly, but if I go to appearance tab it isn't selected to current showing one
thanks for fixes ;)
To update I just need to download same file as in the link in the 1st post?

I'll check better the map issue to give more info.
So far it was in the garrote gorge.

User avatar
Anerag
Leprechaun
Leprechaun
Posts: 32
Joined: 20 Jan 2019

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Anerag » 14 Aug 2023, 16:05

Still getting frequent crashes when looting corpses and gold (object index out of bounds). But besides that, I've had lots of fun with this so far!

Other bugs:
  • Loading a save while another player is dead. (Not sure if this resulted in a crash or what, just remember it being no good.)
  • Quest NPCs remain in party if turned in by another player.
  • Error spam when drinking potions while getting hit (index -1 out of bounds).
  • Crashes related to evt.SetSprite (apple tree, sword in stone, etc), index out of bounds again.
Some ideas our group came up with:
  • Display SP on the remote player UI, just like HP.
  • Cast torch light on other players.
  • Loot dead players for their gold.
  • Make guild memberships shared between players.
  • Make instruments audible for other players (MM6 flute, etc).
Last edited by Anerag on 14 Aug 2023, 18:45, edited 2 times in total.

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Malekitsu » 14 Aug 2023, 16:22

Code: Select all

——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:298: array index (5137) out of bounds [0, 87]

stack traceback:
	[C]: in function 'error'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1429: in function '__index'
	...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:298: in function 'notify_object_picked'
	...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:309: in function 'v'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:66: in function 'docall'
	...top\Might and Magic 8 ONLINE\Scripts/Core/EventsList.lua:126: in function 'call'
	...Might and Magic 8 ONLINE\Scripts\General\ExtraEvents.lua:253: in function 'f'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:2025: in function <...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:2023>
	[C]: in function 'pcall'
	...Desktop\Might and Magic 8 ONLINE\Scripts/Core/Common.lua:203: in function 'pcall2'
	...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1779: in function <...\Desktop\Might and Magic 8 ONLINE\Scripts/Core/RSMem.lua:1776>

arguments of 'notify_object_picked':
	i = 5137

local variables of 'notify_object_picked':
	(*temporary) = (table: 0x2239f0d8)
	(*temporary) = 0
	(*temporary) = (function: builtin#4)
	(*temporary) = (table: 0x1e2b4d90)
	(*temporary) = nan
	(*temporary) = 2.6717283935879e-188

upvalues of 'notify_object_picked':
	REMOTE_PLAYER_REF = 6
	PICKED_BY_PLAYER_BIT = 8192
	fill_state = (function: 0x18fdd770)
	waiting_for_send = (table: 0x18fd8a30)
	packets = (table: 0x18fde4b8)
	cond_same_map = (function: 0x031ce1a0)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
with latest update I'm constatly getting this error everywhere I try to go, even houses (array index changes everytimes)

Also last time I played I went from garrote gorge to alvar and all monsters and objects from garrote gorge got copied into alvar

Rodril
Swordsman
Swordsman
Posts: 579
Joined: 18 Nov 2016

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Rodril » 14 Aug 2023, 21:55

Hey. Makes me sad, this bug was there all the time since 23.07, when i thought, version is somewhat stable.
I've updated mod files once more. Please redownload it and update me, whether crash on items pickup still hapenning or not. It happens specificaly, when using spacebar to pick up the item, I did not notice it due to habit of mouse usage. Also i've added logging to potential wrong map data transfer, could not reproduce the issue, though. Thanks for reports.

Anerag wrote: 14 Aug 2023, 16:05 [*] Loot dead players for their gold.
This is very good idea. Did not come to my mind. Way to save at least gold, when saving party member is not possible. I'l try to add it in next update.
SP and HP bars for remote players are technicaly hard to implement in mm engine, so i keep delaying this task.
Anerag wrote: Quest NPCs remain in party if turned in by another player.
Error spam when drinking potions while getting hit (index -1 out of bounds).
Crashes related to evt.SetSprite (apple tree, sword in stone, etc), index out of bounds again.
If you'll encounter these errors again, send me error logs, please. Also name NPCs, who are not leaving party (it requires manual fix for every instance, thought, I've done all of them).

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Malekitsu » 14 Aug 2023, 23:22

Rodril wrote: 14 Aug 2023, 21:55 Hey. Makes me sad, this bug was there all the time since 23.07, when i thought, version is somewhat stable.
I've updated mod files once more. Please redownload it and update me, whether crash on items pickup still hapenning or not. It happens specificaly, when using spacebar to pick up the item, I did not notice it due to habit of mouse usage. Also i've added logging to potential wrong map data transfer, could not reproduce the issue, though. Thanks for reports.
Thanks! Tested already and so far looks good.
I'll report if we found other bugs!

User avatar
Anerag
Leprechaun
Leprechaun
Posts: 32
Joined: 20 Jan 2019

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Anerag » 15 Aug 2023, 10:26

Rodril wrote: SP and HP bars for remote players are technicaly hard to implement in mm engine, so i keep delaying this task.
I meant like this, hacked it in myself but would be nice to have it in by default:
Image
Rodril wrote: NPCs, who are not leaving party
I think it happened with at least Sharry, Melody Silver and the prince of thieves. Only remember the prince bugging out for certain, but wouldn't hurt to double check all MM6 NPCs. Might have also been related to not being on the same map as the player handing in.

And just for the record, the version all this happened with was downloaded on 2023-08-12.

Potion error:

Code: Select all

... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1472: array index (-1) out of bounds [0, 0]

stack traceback:
	[C]: in function 'error'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1429: in function '__index'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1472: in function '__index'
	...Magic Merge\Might and Magic VIII\Scripts/Core/events.lua:2018: in function 'f'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:2215: in function <... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:2213>
	[C]: in function 'pcall'
	...Magic Merge\Might and Magic VIII\Scripts/Core/Common.lua:203: in function 'pcall2'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1779: in function <... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1776>

arguments of '__index':
	t = (table: 0x047dc838)
	a = -1

local variables of '__index':
	(*temporary) = (table: 0x21002bc8)
	(*temporary) = 3.5158934710833e-287

upvalues of '__index':
	name = "Players"
Sprite error 1

Code: Select all

...erge\Might and Magic VIII\Scripts\General\MiscTweaks.lua:424: array index (339) out of bounds [0, 109]

stack traceback:
	[C]: in function 'error'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1366: in function 'check'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1113: in function '__index'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:904: in function '__newindex'
	...erge\Might and Magic VIII\Scripts\General\MiscTweaks.lua:424: in function 'f'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1992: in function <... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1990>
	[C]: in function 'pcall'
	...Magic Merge\Might and Magic VIII\Scripts/Core/Common.lua:203: in function 'pcall2'
	... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1779: in function <... Magic Merge\Might and Magic VIII\Scripts/Core/RSMem.lua:1776>
	[C]: in function 'co_resume'
	...erge\Might and Magic VIII\Scripts\Core\ErrorFunction.lua:212: in function 'coroutine_resume'
	...Magic Merge\Might and Magic VIII\Scripts/Core/Common.lua:219: in function 'cocall2'
	...c Merge\Might and Magic VIII\Scripts/Core/EventsList.lua:96: in function 'cocallPart'
	...c Merge\Might and Magic VIII\Scripts/Core/EventsList.lua:155: in function 'cocalls'
	...Magic Merge\Might and Magic VIII\Scripts/Core/timers.lua:300: in function <...Magic Merge\Might and Magic VIII\Scripts/Core/timers.lua:283>

arguments of 'f':
	d = (table: 0x2244c1a8)

local variables of 'f':
	DecName = "swrdstx"
	(*temporary) = (table: 0x22433e08)
	(*temporary) = false
	(*temporary) = 1.5780304275472e-276
Sprite error 2

Code: Select all

...ames\Might and Magic VIII\Scripts\General\MiscTweaks.lua:424: array index (298) out of bounds [0, 81]

stack traceback:
	[C]: in function 'error'
	...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:1366: in function 'check'
	...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:1113: in function '__index'
	...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:904: in function '__newindex'
	...ames\Might and Magic VIII\Scripts\General\MiscTweaks.lua:424: in function 'f'
	...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:1992: in function <...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:1990>
	[C]: in function 'pcall'
	...ments\Games\Might and Magic VIII\Scripts/Core/Common.lua:203: in function 'pcall2'
	...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:1779: in function <...uments\Games\Might and Magic VIII\Scripts/Core/RSMem.lua:1776>
	[C]: in function 'co_resume'
	...ames\Might and Magic VIII\Scripts\Core\ErrorFunction.lua:212: in function 'coroutine_resume'
	...ments\Games\Might and Magic VIII\Scripts/Core/Common.lua:219: in function 'cocall2'
	...s\Games\Might and Magic VIII\Scripts/Core/EventsList.lua:96: in function 'cocallPart'
	...s\Games\Might and Magic VIII\Scripts/Core/EventsList.lua:155: in function 'cocalls'
	...ments\Games\Might and Magic VIII\Scripts/Core/timers.lua:300: in function <...ments\Games\Might and Magic VIII\Scripts/Core/timers.lua:283>

arguments of 'f':
	d = (table: 0x0d1facc8)

local variables of 'f':
	DecName = "6tree06"
	(*temporary) = (table: 0x10ff4a70)
	(*temporary) = false
	(*temporary) = 5.3790328860275e-295

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Malekitsu » 15 Aug 2023, 11:19

Anerag wrote: 15 Aug 2023, 10:26 I meant like this, hacked it in myself but would be nice to have it in by default:
Image
love that, may I have the code? :P

User avatar
Anerag
Leprechaun
Leprechaun
Posts: 32
Joined: 20 Jan 2019

Re: Multiplayer for MMMerge [beta 23.07.2023/3]

Unread postby Anerag » 15 Aug 2023, 11:42

Malekitsu wrote: 15 Aug 2023, 11:19 love that, may I have the code? :P
For version 23.07.2023/4: https://rekurs.io/files/jfvps.zip
Extract into game folder and overwrite. No guarantees that there aren't any side effects as I'm not at all familiar with lua, use at your own risk!

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023/4]

Unread postby Malekitsu » 15 Aug 2023, 13:25

thanks ;)

edit:
we played more today!
overall was smooth but we had some errors:
1) fail to connect error:
I'm usually hosting and sometimes players are not able to connect; usually closing and restarting game fix the problem.

2)

Code: Select all

—————————————————————————————————————————————————————————————
...\Might and Magic 8\Scripts\Modules\Multiplayer\Utils.lua:584: Could not exit to screen 0 after 10 attempts.

stack traceback:
	[C]: in function 'error'
	...\Might and Magic 8\Scripts\Modules\Multiplayer\Utils.lua:584: in function 'f'
	...\Might and Magic 8\Scripts\Modules\Multiplayer\Utils.lua:482: in function 'v'
	...laxy\Games\Might and Magic 8\Scripts/Core/EventsList.lua:101: in function <...laxy\Games\Might and Magic 8\Scripts/Core/EventsList.lua:96>

upvalues of 'f':
	After = (function: 0x1fcb67f8)
	AfterParam = (table: 0x212633d8)
	attempt = 11
	f = (function: 0x220b63c8)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
this happened twice after my teammate connected to the game

User avatar
Anerag
Leprechaun
Leprechaun
Posts: 32
Joined: 20 Jan 2019

Re: Multiplayer for MMMerge [beta 23.07.2023/4]

Unread postby Anerag » 15 Aug 2023, 20:08

Crashed again looting a gold pile with spacebar in hall of the fire lord. However this was the only crash related to gold I ran into last session.

Code: Select all

... Merge Multiplayer\Scripts\Global\NPCFollowersSkills.lua:203: attempt to perform arithmetic on field 'Amount' (a nil value)

stack traceback:
  ... Merge Multiplayer\Scripts\Global\NPCFollowersSkills.lua:203: in function 'v'
  ... and Magic Merge Multiplayer\Scripts/Core/EventsList.lua:66: in function 'docall'
  ... and Magic Merge Multiplayer\Scripts/Core/EventsList.lua:126: in function 'call'
  ... Magic Merge Multiplayer\Scripts\General\ExtraEvents.lua:221: in function 'f'
  ...Might and Magic Merge Multiplayer\Scripts/Core/RSMem.lua:1992: in function <...Might and Magic Merge Multiplayer\Scripts/Core/RSMem.lua:1990>
  [C]: in function 'pcall'
  ...ight and Magic Merge Multiplayer\Scripts/Core/Common.lua:203: in function 'pcall2'
  ...Might and Magic Merge Multiplayer\Scripts/Core/RSMem.lua:1779: in function <...Might and Magic Merge Multiplayer\Scripts/Core/RSMem.lua:1776>

arguments of 'v':
  t = (table: 0x19dcde30)

local variables of 'v':
  (*temporary) = nil
  (*temporary) = nil
  (*temporary) = 0
  (*temporary) = 8.9145534010457e-313
  (*temporary) = "attempt to perform arithmetic on field 'Amount' (a nil value)"

upvalues of 'v':
  NPCBonuses = (table: 0x6a080e78)
  CountGoldBonus = (function: 0x72e70270)

More bugs:
  • SP is set to zero if you die but get revived by another player.
  • If you're looking inside a chest while another player leaves the map, then you leave and they return the chest will remain "locked" until you return.
  • Using town portal can kill you. Not exactly sure how passing time in different maps works but my theory is the game fast forwards a bunch and the caster starves.
  • Bought spellbooks reappear in guild if another player enters/exits. Not a big deal I guess.
More ideas:
  • Show other players/parties in quick reference. It could either show up to 5 players if everyone is solo or make it paged to cycle between players' parties.
  • Make "listen for connections" work until turned off, even after leaving the menu.
  • Make host session code not random, or is there a technical reason why the (host) port is always different?
Edit: appended more ideas.

User avatar
Arr
Lurker
Lurker
Posts: 2
Joined: 15 Aug 2023

Re: Multiplayer for MMMerge [beta 23.07.2023/4]

Unread postby Arr » 16 Aug 2023, 12:23

Game crashes when I try to open chests in multiplayer in Hardware mode.

Crash log.
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:298: array index (7233) out of bounds [0, 227]

stack traceback:
: in function 'error'
...x86)\GOG.com\Might and Magic VIII\Scripts/Core/RSMem.lua:1429: in function '__index'
...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:298: in function 'notify_object_picked'
...\Scripts\Modules\Multiplayer\Synchronization/Objects.lua:309: in function 'v'
...GOG.com\Might and Magic VIII\Scripts/Core/EventsList.lua:66: in function 'docall'
...GOG.com\Might and Magic VIII\Scripts/Core/EventsList.lua:126: in function 'call'
...com\Might and Magic VIII\Scripts\General\ExtraEvents.lua:253: in function 'f'
...x86)\GOG.com\Might and Magic VIII\Scripts/Core/RSMem.lua:2025: in function <...x86)\GOG.com\Might and Magic VIII\Scripts/Core/RSMem.lua:2023>
[C]: in function 'pcall'
...86)\GOG.com\Might and Magic VIII\Scripts/Core/Common.lua:203: in function 'pcall2'
...x86)\GOG.com\Might and Magic VIII\Scripts/Core/RSMem.lua:1779: in function <...x86)\GOG.com\Might and Magic VIII\Scripts/Core/RSMem.lua:1776>

arguments of 'notify_object_picked':
i = 7233

local variables of 'notify_object_picked':
(*temporary) = (table: 0x1e1cfb88)
(*temporary) = 0
(*temporary) = (function: builtin#4)
(*temporary) = (table: 0x20f6dd00)
(*temporary) = nan
(*temporary) = 6.3833498862942e-176

upvalues of 'notify_object_picked':
REMOTE_PLAYER_REF = 6
PICKED_BY_PLAYER_BIT = 8192
fill_state = (function: 0x1b903fa8)
waiting_for_send = (table: 0x1b8ff6b8)
packets = (table: 0x1b904cf0)
cond_same_map = (function: 0x0ffde4e8)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>

Rodril
Swordsman
Swordsman
Posts: 579
Joined: 18 Nov 2016

Re: Multiplayer for MMMerge [beta 23.07.2023/5]

Unread postby Rodril » 16 Aug 2023, 18:03

Updated mod archive. It contains fixes for potion usage, sprites interaction and gold pickup. Thanks for reports and suggestions.
Anerag wrote: For version 23.07.2023/4: https://rekurs.io/files/jfvps.zip
Extract into game folder and overwrite. No guarantees that there aren't any side effects as I'm not at all familiar with lua, use at your own risk!
I have not changed UI yet, but neither I changed these files in today's update, so just reextract them again, to keep the effect.
Anerag wrote: [*] Make host session code not random, or is there a technical reason why the (host) port is always different?
I'll add option to set fixed port in multiplayer settings. Currently mod asks OS for free port. There's no real reason, except little chance that fixed port can interfere with one already being used by other app.

User avatar
Malekitsu
Pixie
Pixie
Posts: 128
Joined: 25 May 2022

Re: Multiplayer for MMMerge [beta 23.07.2023/5]

Unread postby Malekitsu » 17 Aug 2023, 11:05

I'm trying scripting some events for mmmerge, but variables like vars and mapvars doesn't seem to be shared between players.
Do you have any advice/guide on how to do that?


Return to “Might and Magic”

Who is online

Users browsing this forum: No registered users and 1 guest