Mega Man 8-Bit Deathmatch Forum
「SUGGESTION」Sync defined server data to client

Stardust Motion • May. 27, 2025, 11:13 PM
May. 28, 2025, 12:06 AM (Edited by Stardust Motion)
Copy Link
The data used to record ammo weapons, busters and assist (with defineWeapon, defineBusterUpgrade and defineAssistItem), and also training records (defineTrainingEntry),
is stored on an array on server side. This data namely includes tag, icon, or text description, which are interesting for client display (i.e for HUDs / menus).
Since it's only serversided, clients (i.e mods that need this data) must fetch it by calling defineWeapon from a CLIENTSIDE script, to obtain a client-sided copy of the data.
The suggestion is to have vanilla MM8BDM itself additionally call the define functions in CLIENTSIDE context, so mods don't have to do it. It also avoids conflict if two mods already called them
A few v6b mods which would benefit :
- XoverWeps (uses icons/tags for drawing on HUD)
- AllanxWeps (shows current weapon description (training entry) with a bind)
- UI Extensions (uses weapon icons/slot/ammoType for drawing on HUD)
- Another Mayday Binary edit (has a weapon shop menu, draws icons/tags)
Possibly other data structures could be sync'd, but defineWeapon/Buster seems the most prominent.
I can help with the implementation if needed
is stored on an array on server side. This data namely includes tag, icon, or text description, which are interesting for client display (i.e for HUDs / menus).
Since it's only serversided, clients (i.e mods that need this data) must fetch it by calling defineWeapon from a CLIENTSIDE script, to obtain a client-sided copy of the data.
The suggestion is to have vanilla MM8BDM itself additionally call the define functions in CLIENTSIDE context, so mods don't have to do it. It also avoids conflict if two mods already called them
A few v6b mods which would benefit :
- XoverWeps (uses icons/tags for drawing on HUD)
- AllanxWeps (shows current weapon description (training entry) with a bind)
- UI Extensions (uses weapon icons/slot/ammoType for drawing on HUD)
- Another Mayday Binary edit (has a weapon shop menu, draws icons/tags)
Possibly other data structures could be sync'd, but defineWeapon/Buster seems the most prominent.
I can help with the implementation if needed
May. 28, 2025, 7:01 PM
Copy Link
This is something I'd like as well.
Gut reaction, since this does involve a change of standard, is to introduce a function to one of the mod libraries
that handles the logic of checking whether it's a netgame or not.
DTADD seems like a good home for it, but I'm willing to hear out other options.
Something like "CallIfMultiplayer" or something.
Thinking something like:
This prevents the need for the modder to have to really care about whether it's a network game, since otherwise these definitions would end up getting duplicated when playing offline.
The resulting use would look like:
Pretty sure we actually just have a tracker ticket for this internally. Since it involves modding standards and potentially a code change, I saw no real reason to avoid discussing it.
Gut reaction, since this does involve a change of standard, is to introduce a function to one of the mod libraries
that handles the logic of checking whether it's a netgame or not.
DTADD seems like a good home for it, but I'm willing to hear out other options.
Something like "CallIfMultiplayer" or something.
Thinking something like:
function bool CallIfMultiplayer(str name, int arg1, int arg2, int arg3, int arg4)
{
if(!IsMultiplayer())
return false;
ACS_NamedExecuteWithResult(name, arg1, arg2, arg3, arg4);
}
This prevents the need for the modder to have to really care about whether it's a network game, since otherwise these definitions would end up getting duplicated when playing offline.
The resulting use would look like:
script "mymod_open" OPEN
{
DefineWeapon([...]);
DefineBusterAndTake([...]);
}
script "mymod_open_clientside" OPEN CLIENTSIDE
{
CallIfMultiplayer("mymod_open", 0, 0, 0, 0);
}
Pretty sure we actually just have a tracker ticket for this internally. Since it involves modding standards and potentially a code change, I saw no real reason to avoid discussing it.

Trillster Administrator
what's a code
May. 28, 2025, 9:45 PM
Copy Link
My personal plan was to punt the net-game check to a core script, so modders would only be responsible for doing something like below:
It might be worth adding a function to DTADD that does that script call still just for compiler hinting, but I would rather keep the meat of the logic internal just in case it's ever updated.
Either way, I personally wouldn't think it necessary to allow arguments to be passed down, since it'll most often be getting used to call an OPEN script, which wouldn't be able to accept them.
script "mymod_open" OPEN
{
DefineWeapon([...]);
DefineBusterAndTake([...]);
}
script "mymod_open_clientside" OPEN CLIENTSIDE
{
ACS_NamedExecuteWithResult("core_init_client_data", "mymod_open");
}
It might be worth adding a function to DTADD that does that script call still just for compiler hinting, but I would rather keep the meat of the logic internal just in case it's ever updated.
Either way, I personally wouldn't think it necessary to allow arguments to be passed down, since it'll most often be getting used to call an OPEN script, which wouldn't be able to accept them.