Forums
April 16, 2024, 09:52 PM

Author Topic: wkTerrain  (Read 15658 times)

0 Members and 1 Guest are viewing this topic.

Offline terion

Re: wkTerrain
« Reply #45 on: July 21, 2020, 12:49 PM »
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.

Offline Sensei

Re: wkTerrain
« Reply #46 on: July 21, 2020, 01:18 PM »
Appreciate it!

Offline terion

Re: wkTerrain
« Reply #47 on: August 22, 2020, 05:43 AM »
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.

Offline SiD

Re: wkTerrain
« Reply #48 on: August 22, 2020, 06:30 AM »
Thanks for your continued effort on this terion!

When 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.)
« Last Edit: August 22, 2020, 06:43 AM by SiD »

Offline terion

Re: wkTerrain
« Reply #49 on: August 22, 2020, 07:03 AM »
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.

Offline terion

Re: wkTerrain
« Reply #50 on: August 22, 2020, 10:40 AM »
Here is a static build of wkTerrain38_v2 - use it if you experience WormKit error 7E

Offline Ducky

  • The Water Seeking Missile
  • New Member
  • *

  • Denmark Denmark
  • Posts: 10
  • Quack
    • View Profile
Re: wkTerrain
« Reply #51 on: August 23, 2020, 01:00 AM »

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.

Offline terion

Re: wkTerrain
« Reply #52 on: August 23, 2020, 04:57 AM »
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?
« Last Edit: August 23, 2020, 05:10 AM by terion »

Offline Ducky

  • The Water Seeking Missile
  • New Member
  • *

  • Denmark Denmark
  • Posts: 10
  • Quack
    • View Profile
Re: wkTerrain
« Reply #53 on: August 23, 2020, 06:28 AM »
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?

« Last Edit: August 23, 2020, 06:30 AM by Ducky »

Offline terion

Re: wkTerrain
« Reply #54 on: August 23, 2020, 06:43 AM »
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
« Last Edit: August 23, 2020, 06:46 AM by terion »

Offline Ducky

  • The Water Seeking Missile
  • New Member
  • *

  • Denmark Denmark
  • Posts: 10
  • Quack
    • View Profile
Re: wkTerrain
« Reply #55 on: August 23, 2020, 06:57 AM »
Code: [Select]
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

Offline terion

Re: wkTerrain
« Reply #56 on: August 23, 2020, 07:07 AM »
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?
« Last Edit: August 23, 2020, 07:11 AM by terion »

Offline Ducky

  • The Water Seeking Missile
  • New Member
  • *

  • Denmark Denmark
  • Posts: 10
  • Quack
    • View Profile
Re: wkTerrain
« Reply #57 on: August 23, 2020, 07:14 AM »
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.  ;)

Offline terion

Re: wkTerrain
« Reply #58 on: August 23, 2020, 08:25 AM »
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

Offline King-Gizzard

Re: wkTerrain
« Reply #59 on: September 20, 2020, 03:49 PM »
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?