vladimir-maestro wrote: ↑18 Jan 2024, 18:01
is there a way to replace standart monster sprites into new ones that won't copy existing monsters and looks unique?
can't find where to edit it.
There' s no convenient way to do it. Multiplayer uses standart MM monsters with disabled AI to mimic remote player actions. Each monster have set of frames assigned, which we can change on the fly via script (i.e. Map.Monsters.Frames[0-8]). But there's no adequate method of adding new unique
sets of frames in runtime, because all of them are predifined in "SFT.txt" from "Data\Tables" folder, which lists sprites from sprites.lod and palettes from bitmaps.lod. Game.SFTBin cannot be extended in runtime.
What can possibly be done:
1. Append bunch of placeholder lines to SFT.bin
2. Create addtional sprites.lod archive with frames and bitmaps.lod with palettes for these frames, load these as custom lods in runtime (same as additional UI is loaded)
3. Alter placeholder lines of Game.SFTBin via script to represent loaded archives
4. Apply new frames by "Map.Monsters:SetCustomFrames" method, which accepts 9 arguments - strings - group names from SFTBin.
There're still problems with method of selection unique names for new palettes, frames and archives, to avoid overlapping with existing ones. Also LoadFrames method will reload original frames every call, so it should be hooked somehow.
Sending these lods to remote players and initializing them there also should be implemented.
I won't be able to do all of that in nearest future.