this simple wormkit module allows you to use custom terrains without replacing the original ones
usage: put new terrain folder in Data/Level (for example: Domestic or Dino from WWP)
note: terrain lists and files are NOT synchronized in online multiplayer games! if you want to play online with your friends, ensure that you have the exact same terrains installed.
tested on steam 3.7.2.1, probably works on cd version too.
edit: updated to newer version - you can use now up to 127 terrains total
download: wkTerrain.dll
source code: dllmain.cpp
examples:
(http://imgur.com/P8h9qhWm.jpg) (http://imgur.com/P8h9qhW.jpg) - dinos from WWP
(http://imgur.com/TiOFZ2Em.jpg) (http://imgur.com/TiOFZ2E.jpg) - domestic from WWP
This is really awesome. Looking forward to trying it. Can you play online with custom terrain without syncing files if you, as host, right click to convert the random map to an image?
Sounds interesting.
Joe, image is image, no other files needed.
Nice as a concept, but really only becomes useful when it's usable online.
Nice work!
If I generate a random map (without going into the map editor), can the custom terrains still be chosen? or must they always be selected manually?
Some sort of lobby notification could be good. e.g. wkTerrain: this server is using custom terrain 'Dinos'
I've updated the module to fix a minor bug. Now you can use up to 127 terrains.
SiD, custom terrains must be selected manually in terrain editor
lobby notifications and file synchronization are planned to be released as bigger module in the future. this module is just a simple extract from my old mod I did back in november.
Can you provide the Dinos and Domestic themes for us as an example/template?
EDIT1: Also, it would be nice to get a theme compiler, just so sharing and using these themes wouldn't a problem.
TheMadCharles, unfortunately I am not allowed to share those files, as they are copyrighted material. Someone would have to ask Team17 for their permission to make those files public.
You can use http://worms2d.info/WA_directory_editor to create new terrains based on existing ones. Make sure to use the same palette as the original files. SiD has already created a Tetris themed terrain.
As maintaining up to date list of terrains is bothersome, I would suggest to create a new category of files on TUS and create a simple xml/json list of terrain names + direct urls to files. A simple update to the module/separate program would query the list on regular basis and download new terrains.
Quote from: xKoweKx on June 21, 2016, 10:10 AM
SiD has already created a Tetris themed terrain.
Where is it?
Quote from: TheMadCharles on June 21, 2016, 12:17 PM
Quote from: xKoweKx on June 21, 2016, 10:10 AM
SiD has already created a Tetris themed terrain.
Where is it?
https://www.tus-wa.com/forums/worms-armageddon/how-to-create-new-terrain-types-if-possible-29448/msg246195/#msg246195
WA has function to convert bit maps to png. Can we create a custom terrain map, convert it to png and use it online?
Either way, this is an awesome module and I think it should be an official feature on next WA update. You know maps and schemes are extractable from replays. I think same thing should be for custom terrains.
I've attached my Tetris theme for anyone wanting to try it.
Unzip and place Tetris folder in Worms Armageddon\Data\Level
xKoweKx's wkterrain.dll needs to be in your Worms folder.
and yeh Triad, you can convert to png in map editor with no problems (But of course you won't see my non gradient background, and idiotic wind debris)
I like it! 8)
Well the Tetris background is a little bit higher and falling tetris is below the clouds, but still good. :-*
Keep it up!
Great work. The only thing I found strange though was that it opens the WA.exe file to get the version. You could instead get the needed data from the data section of the already loaded executable module. (And, of course, it should first check the version via GetFileVersionInfo - I have some wrappers for that ready, if needed). I might make some adjustments to the module soon, if I find the opportunity.
Added to the WormKit (https://worms2d.info/WormKit) page; if it needs a separate page I can create it.
After a fresh install of Windows 10, this module seems to be causing my game to crash when loading a custom terrain.
Error log:
wa caused a Microsoft C++ Exception (0xe06d7363)
in module KERNELBASE.dll at 0023:76a3dad8.
"Land data read error"
Exception parameters: 19930520 00196384 00654670
Version 3.7.2.1
I think the falling blocks should have 4 possible angles, not 4 dozens.
Quote from: SiD on July 18, 2016, 11:12 PM
After a fresh install of Windows 10, this module seems to be causing my game to crash when loading a custom terrain.
Error log:
wa caused a Microsoft C++ Exception (0xe06d7363)
in module KERNELBASE.dll at 0023:76a3dad8.
"Land data read error"
Exception parameters: 19930520 00196384 00654670
Version 3.7.2.1
It seems if you're using the CD version, wkfileoverride is required for this module to work. (thanks artec)
Quote from: XanKriegor on July 19, 2016, 06:40 AM
I think the falling blocks should have 4 possible angles, not 4 dozens.
lol that would be awesome
https://youtu.be/SX4MgS_2ESs
For your satisfaction.
Seemed like a good idea, but looks a bit (more) silly.
ahaha thats awesome, very tetris-like
Zero wind for full effect :D
words :-*
(worms-nerds)
Quote from: SiD on July 19, 2016, 09:14 AM
Quote from: SiD on July 18, 2016, 11:12 PM
After a fresh install of Windows 10, this module seems to be causing my game to crash when loading a custom terrain.
Error log:
wa caused a Microsoft C++ Exception (0xe06d7363)
in module KERNELBASE.dll at 0023:76a3dad8.
"Land data read error"
Exception parameters: 19930520 00196384 00654670
Version 3.7.2.1
It seems if you're using the CD version, wkfileoverride is required for this module to work. (thanks artec)
now it works! thanks! and awesome work!
We need more terrains.
Like I said, we need something to easily compile our themes.
removed.
*sid is afraid of his humoristic side!
I don't see too much of an issue uploading the Dinos and Domestic terrains, so I did.
https://www.tus-wa.com/files/file-1276
Thank you SiD :)
Quote from: xKoweKx on June 20, 2016, 11:15 PM
note: terrain lists and files are NOT synchronized in online multiplayer games! if you want to play online with your friends, ensure that you have the exact same terrains installed.
Is this mean game will desynchronize if I generate ingame aerial map with one of these 2 terrains?
yes, unless you convert it to PNG, which I think you do anyway. So you might like these.
Yep, I always convert to PNG. Awesome!
Also expecting your tetris terrain in here. Guess that's a bit harder to achieve?
Would be great if W:A gets workshop for textures in next update, so ppl can just pick the ones they like made by community and generate them in games. Am I wrong or those custom textures would also be able to avoid pixelated roofs? All these originals can't, unfortunately.
Quote from: Sensei on October 19, 2017, 12:10 AM
Also expecting your tetris terrain in here. Guess that's a bit harder to achieve?
It is in here: https://www.tus-wa.com/forums/worms-armageddon/wkterrain-29504/msg247265/#msg247265
You can install it the same way.
Quote from: Sensei on October 19, 2017, 12:10 AM
Am I wrong or those custom textures would also be able to avoid pixelated roofs? All these originals can't, unfortunately.
Not sure what you mean by pixelated roofs.
Quote from: SiD on October 19, 2017, 10:57 AM
Not sure what you mean by pixelated roofs.
None of the original textures have smooth roofs. It's really annoying feature when jetpacking or boom racing through map. Worm gets rejected and pushed back cause roof is not flat. It's also pain for some other schemes I bet.
Personally don't think it's a skill thing in most of the cases. More of a luck really. Would be good if we're able to host some terrains without roof spikes.
ah gotcha. Yeh you're right they all have unsmooth ceilings, except tetris.
Time to make your own boom race maps sensei.
thx.
Quote from: SiD on October 19, 2017, 03:03 PM
Time to make your own boom race maps sensei.
We should ask plutonic to put tetris texture in MapGEN, cause that program is able to generate lot bigger maps than 1920x696. Sad thing is that they're not complex enough like ingame.
This is great! Looking forward to play some games on new terrains. Hope to see more soon.
I can't open the tetris soil in my image editor. Just wanted to see what dimensions custom soils have to be. There's tons of nice stuff on Google Images that could be used if you search "tile gif".
My WA crashes when im trying to choose a map in a dropdown list, if Tetris theme is in Levels folder.
Maybe you need to have wk_terrain in main folder, xan? I didn't have any problems.
Btw, joe. Dunno what you're trying to do, but atm best option is to make all maps to .png (no background soil), cause otherwise it would cause desynchs. With .bit everyone would need to have terrain in level folder.
All wk's should be in main folder, yes.
That's great
Does it work on WA 3.6 and custom maps ?
Quote from: j0e on October 21, 2017, 12:20 AM
I can't open the tetris soil in my image editor. Just wanted to see what dimensions custom soils have to be. There's tons of nice stuff on Google Images that could be used if you search "tile gif".
I'm also trying to create custom terrain use Minecraft textures but don't know how to open it
check out King-Gizzard's guide:
https://worms2d.info/Terrain_Creation_Guide
Making custom terrains
Download:
http://worms2d.info/WA_directory_editor
The program has a lot of bugs so good luck.
The game's Level.dir files are located in DATA/Level
Open an existing Level.dir file and click "Extract, convert, log" and select a folder.
All the img files and spr files will be converted to img.bmp and spr.bmp.
Inf files: There is one for each map object, and they specify properties of the object:
10 //Unkown
0 //Specifies whether object is in front or behind the terrain. 0 = behind, 1 = in front
0 //Specifies whether destroyed soil (soil.img) appears when the object is destroyed.
1 //Enables or disables collision for object
1 //Specifies whether other objects can be placed onto this one. 1 = no in this case.
3 //Location type of object (0/1 = sides of map, 2 = hanging from ceiling, 3 = standing on floor)
Spd files: There is one for each spr file (animated sprites), open with text editor. They're self explanatory.
index.txt: A list of all the objects.
Level.dir.txt: is the log file that sprite editor uses when you click the "Reconstruct from log" button.
All bmp files should use a 113 colour palette (including black).
When creating/editing bmp files, you should save them as 8 bit OS/2, and make sure black is indexed 1.
After you've created your bmps and written your spds and infs.. make sure the img, spr and inf files are listed in level.dir.txt, then use sprite editor to reconstruct from log, and save the DIR file.
The process is a bit of a headache but doable. Any problems feel free to message me.
If you want to try something else to generate your own terrains: http://worms2d.info/MapGEN
Quote from: SiD on October 24, 2017, 09:27 AM
Making custom terrains
Download:
http://worms2d.info/WA_directory_editor
The program has a lot of bugs so good luck.
Open an existing Level.dir file and click "Extract, convert, log" and select a folder.
All the img files and spr files will be converted to img.bmp and spr.bmp.
Inf files: There is one for each map object, and they specify where on the map they can be placed (on the grass, hanging from ceiling, sides)
Spd files: There is one for each spr file (animated sprites), open with text editor. They're self explanatory.
index.txt: Just lists all the objects.
Level.dir.txt: is the log file that sprite editor uses when you click the "Reconstruct from log" button.
All bmp files should use a 113 colour palette (including black).
When creating/editing bmp files, you should save them as 8 bit OS/2, and make sure black is indexed 1 (I only know how to do this in Photoshop)
After you've created your bmps and written your spds and infs.. make sure the img, spr and inf files are listed in level.dir.txt, then use sprite editor to reconstruct from log, and save the DIR file.
The process is a bit of a headache but doable. Any problems feel free to message me.
If you want to try something else to generate your own terrains: http://worms2d.info/MapGEN
It did not work on non steam WA 3.6
Guess I'll try to replace some current terrain
We now need a wkTerrain version of the Egyptian Theme by ARTemych.
BTW, this WormKit Module is awesome!! We also need a tutorial to make custom terrains.
Someone with brains, get on it pls! We need wk_terrain for 3.8 but xKowekx is gone for 2 years. He was a fine soldier.
I've ported it to 3.8 - works with Steam version. It will probably work with CD release too, but it will definitely require wkFileOverride.
Appreciate it!
I've updated the module to fix issues with signature scanner and listing terrain directories.
I've also added a lobby command /terrains to show wkTerrain38 version and a list of installed terrains. When playing online make sure that all players have exactly the same list of terrains, or the game will desynchronize on start.
Thanks for your continued effort on this terion!
Quote from: terion on August 22, 2020, 05:43 AMWhen playing online make sure that all players have exactly the same list of terrains, or the game will desynchronize on start.
Any plan to make this work better? Ideally players should only require the terrain that is used and not need to have the same list.
This also affects replay playback; replays with custom terrains will only play if the same terrains are present that were present when the replay was created.
(Perhaps in the future, W:A could detect custom terrains and embed them in the replay and maybe even send them over the network.)
When map data is sent to players, the terrain texture is specified as an id number in the terrain list instead of a terrain name. This makes it quite difficult to synchronize the terrain when players have mismatched lists - for example terrain #30 for one player might be "Dinos" and for other player "Candy".
Some ideas:
a) Negotiate a common subset of terrains that everyone has installed - I can force the game to print the list of installed terrains when joining the lobby. The host would automatically read those lists and keep track of all terrains installed by all players and find a common subset, then send a common terrain list to all players who will temporarily disable specific terrains. This approach would require the least amount of hacking, but will not work with replays and might introduce problems in some edge cases.
b) Hook the protocol, so a text name of the terrain is sent before map data. If the terrain id in map data is bigger than standard terrain ids, the terrain name will be fetched from the text name instead of terrain list. Lots of hacking involved, still won't work with replays.
c) Change the protocol message to use a text name instead of ids - even more hacking, will break compatibility with all other WA versions and people without wkterrain.
d) Ask game maintainers to make this feature a standard part of the game.
Here is a static build of wkTerrain38_v2 - use it if you experience WormKit error 7E
(https://i.imgur.com/LwkjSHa.png)
Just a little preview on the theme I am working on.
Terion for some reason replays don't want to work with my theme, though I've heard that others haven't got the same issue with it.
Replays with the other themes work fine, it's only replays with this theme and apparently only for me.
Very cool theme, Ducky.
Can you share your current theme file with me so I can try to replicate this issue?
My wild guess is that you're actively working on the theme and modifying it frequently, so replay files could reference an older version of the theme than you currently have installed. But it is more likely that there is some bug with the module and some important code was left unpatched.
Edit: I've tested my theory by swapping level.dir files - the game reported checksum mismatch but still played the replay file with different terrain.
Another guess - I've renamed the most recent dll files to _v2 and _v2-static to differentiate revisions. Just to make sure, you don't have two different wkTerrain*.dll files in your WA directory?
I did get an error on loading replays because wkterrain had the _v2 appendage, but the other error was there before.
Also I've tried making a quick replay, and then playing it back right away and it just won't play. (without having touched themes in between)
I see the grey loading prompt and then it just closes, no errors or nothing.
Attached is the theme, thanks for checking it out.
-EDIT- would sending one of the broken replays help anything?
I've quickly tested your theme - it works fine with replays on my machine (and looks quite good).
Please attach a sample replay and output of /terrains command in lobby so I can match the exact same setup as you.
For reference, here is what it shows on my machine:
terion is using wkTerrain38_v2: Candy Dinos Domestic Tetris Win95
and I've attached a sample replay
Ducky is using wkTerrain38_v2: Candy Dinos Domestic Tetris Win95
Yep same thing happening with your replay, I just recorded a new one just to be safe and it's also happening there.
I'll attach the replay but it really feels like the error is on my side somehow
-ninja edit- Thanks for the nice words by the way, even though it is a bit gaudy :P
Your replay plays fine on my machine (you waited for a few seconds and then used surrender).
I'm really sorry, but I don't know what might be the cause of this issue and I cannot test it. It's weird that you are not seeing any error - normally you would see an error about crash caused by WormKit module or "Worms Armageddon 3.8 has stopped working" message.
Edit: do you have any files other than Level.dir and text.img in your Win95 terrain directory?
Yeah it's really odd, I just see the small grey loading prompt and then nothing.
I'm just glad it's working everywhere else honestly, it's been quite the battle getting all the kinks out of the theme.
No worries though, hopefully I'll figure it out. ;)
Try this:
a) disable the module and replace one of existing themes (for example: tentacle) with your terrain.
b) enable the module, but run it with only Win95 theme enabled
I'm not sure if this is even possible, but to get around the issue with everyone needing the same list of custom terrains installed, could wkTerrain have a command to temporarily mask all installed custom terrains apart from the one everyone agrees to play? So for example, if all players ran something like : /Terrain Tetris, each player's game would think it only had the Tetris custom terrain installed and everyone could play?
Sorry Terion for the late reply (You should really join the discord :P) but I managed to figure out what was happening with my replays.
I've had installed a second version of WA (GOG) to test on and didn't realize it had associated all replays with that version of the game, which didn't have the terrains in its files.
This was the cause of all my replay weirdness and is fixed now, no fault of the module.
To anyone who wants to try the themes available now check out:
https://worms2d.info/WkTerrain
New Ganja theme for use with wkTerrain: https://www.tus-wa.com/files/file-2162/
Quote from: Ducky on September 22, 2020, 01:42 PM
Sorry Terion for the late reply (You should really join the discord :P) but I managed to figure out what was happening with my replays.
I've had installed a second version of WA (GOG) to test on and didn't realize it had associated all replays with that version of the game, which didn't have the terrains in its files.
This was the cause of all my replay weirdness and is fixed now, no fault of the module.
To anyone who wants to try the themes available now check out:
https://worms2d.info/WkTerrain
If anyone's wondering, the fix for this is in WA's advanced options. Click "register associations" and un-check "auto register" because that auto-reg setting is global for all WA installs.
Quote from: Ducky on September 22, 2020, 01:42 PM
To anyone who wants to try the themes available now check out:
https://worms2d.info/WkTerrain
Greetings, Ducky I tried all of the Themes and they are really good, especially the HD version of "
Worms Director's Cut- Forest"* and for the Windows 95 theme you should make the Start button as an object and leave the ground all grey, just to make the theme more clean and less confusing if you want (there's copy of the ground and the start button).
*I modified the "index.txt" file to make only Trees and Rocks appears just like the original Worms game from the 1995.
Good luck for your next Themes!
P.S.: We really need a tutorial to the
WA Directory Editor and making
.img and
.spt files.
Quote from: Edoardo Moretti on November 01, 2020, 11:33 PM
Quote from: Ducky on September 22, 2020, 01:42 PM
To anyone who wants to try the themes available now check out:
https://worms2d.info/WkTerrain
Greetings, Ducky I tried all of the Themes and they are really good, especially the HD version of "Worms Director's Cut- Forest"* and for the Windows 95 theme you should make the Start button as an object and leave the ground all grey, just to make the theme more clean and less confusing if you want (there's copy of the ground and the start button).
*I modified the "index.txt" file to make only Trees and Rocks appears just like the original Worms game from the 1995.
Good luck for your next Themes!
P.S.: We really need a tutorial to the WA Directory Editor and making .img and .spt files.
Thanks for the feedback, if I start messing with it again I'll keep that in mind.
Oh and by the way you might want to save your modified versions as separate themes, to avoid any conflicts in case you play someone with the original one, not sure what kind of funny business that could do.
In regards to a guide I was hoping SiD would make one on the wiki, but not sure he is going to. Would be even better if someone made an updated version of Dir Editor as well.
Quote from: Ducky on November 06, 2020, 01:09 PM
Thanks for the feedback, if I start messing with it again I'll keep that in mind.
Oh and by the way you might want to save your modified versions as separate themes, to avoid any conflicts in case you play someone with the original one, not sure what kind of funny business that could do.
In regards to a guide I was hoping SiD would make one on the wiki, but not sure he is going to. Would be even better if someone made an updated version of Dir Editor as well.
Thanks for the useful hint, I keep the original custom Terrain "DIY" and my modified version called "Worms DC - Forest". I'm started to learn to export the images, If you want I can the
MapGen version of "DIY", "Win95" and "Ganja".
Meanwhile I'm trying to open the Terrain files from "
Worms Open Warfare 1-2" and "
Worms Battle Island" and a help will be useful.
P.S.: There's my modified version of the Terrain and other
HD themes from
Worms Director's Cut like that will be nice.
I've created a new Cosmic-themed terrain for use with wkTerrain. You can find it here : https://www.tus-wa.com/files/file-2208/
For those interested in creating their own custom terrains, a guide has been created here : https://worms2d.info/Terrain_Creation_Guide
Hello! Sorry for the late posting. Is there a way to get working wkTerrain locally in WA version V3.00?
Thank you!!!
Quote from: videogamesmusix on June 16, 2024, 09:03 AMIs there a way to get wkTerrain working in WA version V3.00?
Quote from: WKB link=https://worms2d.info/WkTerrainSupported W:A version: 3.8.x
I'm afraid that's not how programming works, buddy