Forums > Wormkit Modules

wkTerrainSync

(1/7) > >>

nizikawa:
wkTerrainSync is an improved version of wkTerrain38 that fixes limitations of the original module. It implements custom network protocol to automatically synchronize terrain data, download missing terrain files from host player and more. With this module players are able to use custom terrains online without limitations and desynchs. On top of that, wkTerrainSync adds extra visual customization features to terrain files to overhaul how the game looks.

Data synchronization features:
   - Custom network protocol integrated with WA's original network code - this module works seamlessly with WormNAT2 and direct hosting
   - Terrains are now referenced by their MD5 hash instead of ID - play online games regardless of your terrain list order and terrain directory names
   - File transfers - missing terrain files are automatically downloaded from the host player
   - Terrain metadata is embedded directly in .wagame replay files - replay files will work even when terrain list changes or files are renamed

Terrain customization features:
   - Terrain files can include additional parallax sprites - back2.spr displayed in far distance behind regular back.spr ; front.spr displayed in front of the map
   - Removed sprite loader limitations when handling back.spr, back2.spr and front.spr - sprites are no longer limited to 640x160px size and can be animated like regular sprites
   - Since v1.0.2: To use extended sprite loader with back.spr rename the file as _back.spr . If _back.spr is not present, the game will load back.spr with the default sprite loader
   - Terrains can override any sprite in the game, including worm animations, weapon projectiles and clouds - place gfx0/spritename.spr (normal palette) and gfx1/spritename.spr (colorblind palette) within terrain.dir to override any sprite
   - Terrains can override water.dir for custom water color and animations - place water.dir next to level.dir in terrain directory. Use https://worms2d.info/Water_color_editor to generate custom water.dir

Installation:
   1) Remove your existing wkTerrain38.dll
   2) Place wkTerrainSync.dll and wkTerrainSync.ini in your WA directory

Usage:
   - wkTerrainSync does not require any special configuration or user interaction.
   - If you are joining an online game that uses a new terrain file that you currently don't have installed, you will see an "Invalid map file" in map thumbnail and multiple messages about terrain data download will appear in lobby chat. This means the terrain file is being downloaded from the host and a proper map thumbnail will appear once the terrain is downloaded. This should take few seconds depending on network speed.
   - When generating a random map by clicking on map thumbnail, the game selects a random terrain from all available terrains.
      To limit this selection to only custom terrains, hold CTRL key and click on the thumbnail.
      To limit this selection to only default terrains, hold ALT key and click on the thumbnail.
   - Online play with a mix of wkTerrain38 and wkTerrainSync players is not supported. In such case both wkTerrain38 and wkTerrainSync will refuse to load custom terrain maps and wkTerrainSync will print warning messages in lobby chat
   - Downloaded terrain directories are stored as "Name #MD5checksum" to avoid file conflicts
   - Incomplete file transfers are stored with .part suffix to prevent adding incomplete downloads to the terrain list
   - To troubleshoot the module, enable dev console in .ini file and examine the logged messages
   - To print the version of the module and a list of available terrains, use /terrains command in lobby

Current version: 1.2.6.0
Source code is available at: https://github.com/nizikawa-worms/wkTerrainSync
Download: https://github.com/nizikawa-worms/wkTerrainSync/releases/latest/download/wkTerrainSync-release.zip

h3oCharles:
you have no idea how much of a godsend you are

oScarDiAnno:
This opens a whole new world for terrain customization, and it also removes the hassle of keeping strict same files in order to play with other people, as before I had to keep sending zip updates with the new terrains to my friends and it was a mess when one skipped something.
Again, thanks a lot for your work! ;D

nizikawa:
.

mozzribo:
Hi! I'm getting the following error (on Linux):




--- Code: ---recursive_directory_iterator::recursive_directory_iterator:
File not found.: "data\level\"
--- End code ---

I'm sure I'm doing something wrong. Any ideas what that might be? DevConsole shows no output (possibly because I'm in Linux).

I've put the two files in the WA root directory and the terrain folders into DATA/Level... WormKIT is enabled, of course.

The old wkTerrain38 also doesn't seem to work anymore (I get the same error). However, I remember that it did (on the same installation). I haven't been using it in a while, though, due to the desync.

I'm not using a CD version but the GoG one, yet I tried the wkFileOVerride just in case, and of course, it didn't help (unless I used that one improperly as well).

Update: I now (after removing all the terrain files and folders and the wkTerrainSync files) actually encounter a fatal error within the game:



I cannot load customs maps, while generated maps don't load to the game setup screen. When I start the game, it crashes. I can provide the error log if needed.

If I install another instance of the game, I have the same problem. I suppose this has something to do with the registry (not that I have an idea)?

Navigation

[0] Message Index

[#] Next page

Go to full version