Forums
March 29, 2024, 11:59 AM

Author Topic: wkTerrainSync  (Read 12058 times)

0 Members and 1 Guest are viewing this topic.

Offline nizikawa

Re: wkTerrainSync v 1.2.0 released - play custom missions online!
« Reply #15 on: July 18, 2021, 08:52 AM »
Version 1.2.0 introduces support for custom .WAM files to be played in both offline and online multiplayer games.

A custom mission consists of 3 files:
- Map file in .img/.png/.bit format, for example: missionname.img
- WAM script with mission configuration with the same name as Map file, for example: missionname.wam
- [Optional] .WSC scheme to be used by the mission, with the same name as Map file, for example: missioname.wsc

More info regarding .WAM file format: https://worms2d.info/Worms_Armageddon_mission_file

Usage
To play a mission, enter Map Editor and select .img/.png/.bit map file. If a .wam file with the same name exists, it will be automatically loaded. If .a .wsc scheme file with the same name exits, it will also be automatically loaded.

After exiting map editor, mission details will be displayed in chat (online multiplayer) or in a message box (offline multiplayer).
Add your teams to match what's displayed in mission description (in the exact same team order) and start the game. You don't need to set the number of worms in team and alliances - the module will do it automatically when you start the game.

If you've added less teams than the mission expects, CPU teams will be added automatically to match the requirement. If you add too many teams, they will be automatically removed.
To reset mission configuration and play a regular game simply generate or load a new map.

For your convenience the module will automatically copy default WA mission files to User/SavedLevels/Mission/WA/ folder (and slightly fix them).
Most WWP missions should be playable in WA - some might be broken because certain events are not present in WA.

By default, the mission files use an empty .WSC scheme file that is later populated by .WAM script when the mission begins - it will be labeled as [ Default mission scheme ]. This scheme can be edited by changing basic parameters such as turn time, round time, etc. It is also possible to enable 3.8 scheme extended options.
Mission files can also provide own .WSC scheme, it will be labeled as [ Mission-provided scheme ].
Note: not all scheme settings are preserved - some values are overwritten by .WAM file.

Replay compatibility
Custom mission replay files are fully supported by wkTerrainSync.

Unmodded WA has almost full support for such replays. Online multiplayer missions will raise checksum errors, because all teams will be assigned to the first player in the list. This will be probably fixed in future WA updates.
However, unmodded game will only playback mission replays containing Scheme files in version 1 format. Replays created with this module that contained v2 or v3 schemes probably won't be supported in future WA updates.

Extended WAM options
The module adds some custom fields to WAM file format:

Code: [Select]
[HumanTeam] or [CPUTeamX]
Ammo_SkipGo=1
Delay_SkipGo=2
Ammo_Surrender=3
Delay_Surrender=4

[CPUTeamX]
Optional = 1 ; a CPU team will not be spawned if no player team is added to cover this team
TeamNameValue=Team Name Text ; sets custom team name instead of one specified by TeamNameNumber
WormX_NameValue=Worm Name Text ; sets custom worm name instead of one specified by WormX_NameNumber

[EventXXXX]
TypeOfEvent=10 ; show text event
Text_String_Value=Custom text message to be displayed ; sets custom text message instead of one specified by Text_String_Index

Lobby commands
The module implements some commands available in online lobby:
- /mission - show status of currently set mission
- mission attempts 5 - set attempt number of custom mission (used for activation gold/silver/bronze alternative events
- /mission reset - cancel currently loaded mission
- /terrains - send your wkTerrainSync version
- /terrains list - send your wkTerrainSync version and a list of installed terrains
- /terrains query - query wkTerrainSync version used by other players
- /terrains rescan - rescan terrain directory for new terrains
- /scale - show current map scale
« Last Edit: August 18, 2021, 07:25 AM by nizikawa »

Offline nizikawa

Re: wkTerrainSync v 1.2.1 released - play custom missions online!
« Reply #16 on: August 18, 2021, 07:35 AM »
Version 1.2.1a has been released to fix known bugs and introduce some features:

New features:
- Custom terrains can now be used in Quick CPU and Deathmatch games. You can also hold Ctrl while clicking the Quick CPU/Start buttons to force custom terrain to be used or hold Alt to force standard terrain. This feature can be completely disabled in .ini file.
- The terrain name is now displayed when hovering on map thumbnail in both offline and online multiplayer
- You can force random map style by holding 1,2,3...8 keys and clicking on the map thumbnail to generate a new map

Bug fixes:
- Map scale dropdowns no longer steal window focus
- CD editions no longer require wkFileOverride
- Fixed Skip Go/Surrender Ammo/Delay settings bug in custom missions [Note: this change might desynchronize the game if a mix of 1.2.0 and 1.2.1 players use a WAM file with these settings]
- General bug fixes
« Last Edit: August 22, 2021, 01:59 PM by nizikawa »

Offline nizikawa

Re: wkTerrainSync v 1.2.2 released - play custom missions online!
« Reply #17 on: August 22, 2021, 02:08 PM »
wkTerrainSync v. 1.2.2 has been released to fix some existing bugs and ones introduced in 1.2.1a release.

New features:
- Scanned function offsets are now stored in wkTerrainSync.cache file for significantly faster module startup. This feature can be disabled in .ini file by adding UseOffsetCache=0 under [general] section.

Bug fixes:
- Patched replay loader to allow playback of custom mission replays with CPU Teams with skill level beyond 100
- Fixed custom map sizes in online games (this feature was broken with 1.2.1 release)
- Fixed custom map sizes compatibility with wkMultiInstance
« Last Edit: January 05, 2022, 06:40 PM by nizikawa »

Offline nadiya8040

  • Nadiya Bloby Origia
  • Jr. Member
  • **

  • United States United States
  • Posts: 50
  • I'm Nadiya, Nice to meet you!
    • View Profile
Re: wkTerrainSync v 1.2.2 released - play custom missions online!
« Reply #18 on: August 29, 2021, 12:17 AM »
Um, I've been thinking... It would be neat for you to include "Max Objects eligible in the terrain" (also includes custom PNG pics) feature, So that i can know how many worms, mines, oil drums and any other stuffs that can be randomly placed in a terrain (Example: If small, few objects; If large, more objects). I'm kinda bothered when i have to teleport-in if have the participating worms beyond the max objects can be randomly placed. So it'll be nice to have that QOL feature.

Also, I suggest you could tweak map generations when generating bigger-scaling map, especially when cavern maps doesn't have right exit while the left have exit.
« Last Edit: August 29, 2021, 06:20 AM by Orange_Ball »

Offline Ashtar

Re: wkTerrainSync v 1.2.4 released - play custom missions online!
« Reply #19 on: January 24, 2022, 11:15 PM »
Well made. I chose, however, to uninstall it when not playing with others who have the module installed. Most of the time, with other words.

Reason: when players without the module installed join my game, they often see "Invalid map file" because the automatically generated terrain is often custom. Therefore, I must make certain to hold down the Control key and click to generate normal terrain nearly every time I host a game, or others will not be able to play.

Solution: making the module so that custom terrain is never generated, unless we hold down the Control key while clicking. I have seen others with this module hosting a game and wondering why people see "Invalid map file," without the host even being aware of it. Sometimes people leave because of it.
« Last Edit: January 24, 2022, 11:21 PM by Ashtar »

Offline Lancelot

Re: wkTerrainSync
« Reply #20 on: September 03, 2022, 08:37 AM »
The module is great, I'm waiting for its integration in the next patch :)

It worked for me for the first time without problems, but recently I had to delete it, because when I enter the map editor, WA gives an error. It doesn't matter if it's a pirated version or a Steam license. I can't figure out why or what landscape this is happening. Maybe because of the little things, I would not refuse help in this matter. Thank you.

I'll attach the error file to the post.



   

Offline nizikawa

Re: wkTerrainSync
« Reply #21 on: September 03, 2022, 08:52 AM »
.
« Last Edit: July 25, 2023, 05:17 AM by nizikawa »

Offline Lancelot

Re: wkTerrainSync
« Reply #22 on: September 03, 2022, 09:02 AM »
It worked for me for the first time without problems, but recently I had to delete it, because when I enter the map editor, WA gives an error. It doesn't matter if it's a pirated version or a Steam license. I can't figure out why or what landscape this is happening. Maybe because of the little things, I would not refuse help in this matter. Thank you.

I'll attach the error file to the post.
Hi. Try removing Camping terrain from your installed terrains and see if it helps.
In general, if the game crashes when loading terrain data, edit wkTerrainSync.ini and enable the following options:
EnableDevConsole = 1
LogToFile = 1
DebugSpriteImgLoading = 1
Then launch the game and try to load the terrain. There should be a new file named wkTerrainSync.log created in WA directory and it should list the last loaded .img/.spr files. Usually the last line contains the name of .img/.spr file that crashed the game.

Yes, I could just use the list of new terrains on tus, and by gradually removing them, I would find the source of the error.

Breaking Bad terrain is the source of the error. I will write in the comments so that the author does not forget to correct the error in the future

Thank you for your prompt response, to you and Echiko :)
   

Offline Doctor Proteus

Re: wkTerrainSync
« Reply #23 on: July 28, 2023, 05:55 AM »
Would anybody be so kind as to tell me where the wkTerrain38.dll is located? I want to use custom terrains but I do not know where the file is located that I need to replace.

Offline SIBASA

Re: wkTerrainSync
« Reply #24 on: July 28, 2023, 07:38 AM »
Would anybody be so kind as to tell me where the wkTerrain38.dll is located? I want to use custom terrains but I do not know where the file is located that I need to replace.
wkTerrain38 is an outdated version and if you haven't installed it before, you won't have it. Just place wkTerrainSync.dll and wkTerrainSync.ini in your WA directory and ensure that "Load WormKit modules" in the Advanced options section of the game is enabled  ;)
« Last Edit: July 28, 2023, 07:41 AM by SIBASA »

Offline Doctor Proteus

Re: wkTerrainSync
« Reply #25 on: July 28, 2023, 09:02 AM »
Would anybody be so kind as to tell me where the wkTerrain38.dll is located? I want to use custom terrains but I do not know where the file is located that I need to replace.
wkTerrain38 is an outdated version and if you haven't installed it before, you won't have it. Just place wkTerrainSync.dll and wkTerrainSync.ini in your WA directory and ensure that "Load WormKit modules" in the Advanced options section of the game is enabled  ;)
Thank you. I originally had a problem getting the custom terrains working but it seems I put them in the wrong folder.
« Last Edit: July 28, 2023, 09:07 AM by Doctor Proteus »

Offline Plutonic

Re: wkTerrainSync
« Reply #26 on: January 20, 2024, 11:43 AM »
Hey! Is there support for PNG maps using specific custom terrains? MapGEN currently sets up the WA chunks using the default ID's, but would be cool to support this as well if possible.

Offline TheWalrus

Re: wkTerrainSync
« Reply #27 on: January 20, 2024, 06:07 PM »
Hey! Is there support for PNG maps using specific custom terrains? MapGEN currently sets up the WA chunks using the default ID's, but would be cool to support this as well if possible.
I was gonna ask this pluto, been using mapgen alot lately and thought it would be cool to use the new terrains with mapgen!

Offline Jago

Re: wkTerrainSync
« Reply #28 on: February 20, 2024, 04:26 PM »
Does anyone know of any kind of tutorial for creating terrain? It would be great if someone did it to create their own.

Offline Sensei

Re: wkTerrainSync
« Reply #29 on: February 20, 2024, 09:13 PM »
Does anyone know of any kind of tutorial for creating terrain? It would be great if someone did it to create their own.

I was just linking this today to Runaway.
King Gizzard made few video tutorials. They are pinned in W:A Discord.

1. https://discord.com/channels/416225356706480128/691342271861358592/795653643557928991
2. https://discord.com/channels/416225356706480128/691342271861358592/795669452473237514
3. https://discord.com/channels/416225356706480128/691342271861358592/800808885589245962

In case you get stuck, just comment in #workshop-discussion channel and people will help you out. Most of the terrain creators regularly speak there about this and other projects.