Forums
May 09, 2024, 10:24 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - terion

Pages: [1] 2
1
Wormkit Modules / Re: wkFlamingHealthBars
« on: September 24, 2020, 02:32 PM »
Thanks for positive feedback. I've updated the module with new features:
- Now you can create your own custom animations
- Teams that do not match any name in .ini file will use a default file specified for alliance color .ini or display normal health bar if filename is empty
- %COLOR% macro in filename will automatically match the alliance color of the team


How to create your own animations:
Health bar animations are regular IMG files with all animation frames stacked on top of each other. One frame is 128px wide and 13px tall. For example, if your animation has 10 frames, then the file dimensions must be 128x130px. The module will automatically determine animation type (flame/custom) based on image dimensions.

1) Create a 128x13px movie with your animation
2) Download ImageMagick and ffmpeg binaries ( https://imagemagick.org/download/binaries/ImageMagick-7.0.10-30-portable-Q8-x86.zip )
3) Extract all frames from your movie to png files:
ffmpeg.exe -i movie.mp4 img%04d.png
4) Merge all frames vertically:
magick.exe img*.png -append animation.png
5) Convert your animation.png to compatible IMG format, as explained here: https://www.tus-wa.com/forums/worms-armageddon/wkflaminghealthbars-32931/msg276949/#msg276949
6) If animation plays too fast, add AnimationDelay=1 or AnimationDelay=2 to your team in wkFlamingHealthBars.ini


2
Wormkit Modules / Re: wkFlamingHealthBars
« on: September 20, 2020, 02:17 PM »
The healthbar image is just a simple 256x8px gradient image which is warped by the game to imitate a flame effect.

I've attached a template pack to create your own health bars. Load "template/gradient template without palette.bmp" in Photoshop and draw something on the gradient. Then use Image -> Mode -> Indexed Colors. In the "palette" combo box select "Custom..." palette, then click "Load" and specify "template/photoshop palette gfx0.act". Then click "OK" and play around with dithering (None/Pattern/Diffusion/Noise) method and levels. Then save the image as "fire-whatever-gfx0.img.bmp". Repeat this step with gfx1.act for colorblind palette.

Next, put your "fire-whatever-gfx0.img.bmp" and "fire-whatever-gfx1.img.bmp" next to "healthbars.dir.txt". Open "healthbars.dir.txt" in notepad, add those two files to the list and save the file.
Launch "SpriteEditor.exe", then click "Reconstruct from log" button and specify "healthbars.dir.txt" file.  The files will be converted to IMG format. Simply copy the img files to your WA/healthbars/ directory and edit wkFlamingHealthBars.ini file to use the new images.

Important note: Do not use gfx0 (normal colors) and gfx1 (colorblind colors) images at the same time. If you do so, you will reach the palette colors limit and the images will turn white.

3
Wormkit Modules / wkFlamingHealthBars
« on: September 20, 2020, 09:29 AM »
This wormkit module brings back famous flaming team health bars to WA 3.8.

Usage:
1) Extract wkFlamingHealthBars.dll, wkFlamingHealthBars.ini and healthbars/ to your WA installation directory.
2) Edit wkFlamingHealthBars.ini config to match your team names. More teams can be added by copy&pasting [team#] section. Up to 128 teams can be configured.
3) Launch the game. If the configured team name is matched and the game was able to load the specified IMG file, the flame should be visible.

Notes:
If you are using colorblind settings, then use files with "gfx1" suffix. Otherwise use "gfx0" suffix.
Custom healthbars can be created with sprite editor - make sure you use exactly the same palette colors.
The animated bars are only visible locally and other players do not see the flames (unless you agree to use the same .ini file settings and files).

4
Wormkit Modules / Re: wkmacros
« on: September 03, 2020, 09:18 PM »
...I've tested it more and it doesn't print all lines from the text files. In my files the 1st line is empty, so I assume it shows 3 first lines of each file (the picture attached)

This is an intentional limitation of the module to minimize the risk of being automatically muted by other players, as WA has built-in anti-flood mechanism. If you send multiple in-game chat messages in short time period, you will be automatically muted without any warning and your chat messages will be ignored by other players until the round ends or other players use /unignore command.

5
Wormkit Modules / Re: wkmacros
« on: September 03, 2020, 01:26 PM »
wkTextMacros-v1
This module implements automatic text macros in both lobby and in-game chat.

Usage:
1) Upon first launch, the module will create a macros/ directory inside your WA installation dir.
2) Inside macros/ directory create a .txt file with the name of your desired command (for example, macros/rules.txt will be available as /rules command)
3) Edit this file with notepad and fill it with your desired text macro (save it as plaintext, ascii file)
4) When in lobby or in-game, type /macros to see a list of all available commands
5) Type the name of your command to send the text to all players

Notes:
- The text files are scanned and read on game launch and whenever you use /macros command. Thus macro file creation/modification/deletion will be reflected only when you type /macros command or restart the game.
- Text macros in lobby are sent as a single message and are limited to 1024 characters
- Text macros in-game are split by newline character into separate messages and are limited to 256 characters per line. Up to 3 text lines can be used in a single macro.
- Spamming text macros will trigger automatic /ignore by all players, so keep your macros short and use this module with moderation.
- Do not use space or other special characters in command names
- Do not use command names that overlap with bult-in game commands (/test, /version, etc)
- This module has been tested with WA version 3.8.0. It will not work with WA 3.7.2.2 and earlier versions. It might work with newer WA releases if no significant changes are made to lobby or game chat functions.

6
Wormkit Modules / Re: wkTerrain
« 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

7
Wormkit Modules / Re: wkTerrain
« 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?

8
Wormkit Modules / Re: wkTerrain
« 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

9
Wormkit Modules / Re: wkTerrain
« 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?

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

11
Wormkit Modules / Re: wkKick38
« on: August 22, 2020, 10:28 AM »
I don't understand what you mean by this. The attachment to the (latest?) post at https://www.tus-wa.com/forums/worms-armageddon/wkkick38-32802/msg276478/#msg276478 still seems to pull in MSVCP140.dll?
There were bigger issues with the module than dynamic linking - connections were incorrectly terminated and signature scanner failed to access process memory in some cases. People also requested /kick# command so I added one. Players who previously experienced issues now report that the module works correctly.
From my perspective, dynamic link of libc is a non-issue and I personally prefer it, but I've recompiled the dll and updated attachments in OP to address your concerns.

12
Wormkit Modules / Re: wkKick38
« on: August 22, 2020, 09:32 AM »
I am truly sorry for causing  trouble to you and the entire worms community.

Shoddy workmanship and then refusing to accept responsibility for the problem is.
I agree that my works are on the lower end of code quality spectrum and my wording could've been better. Though I think that through discussion in this thread issues with the module were corrected and the most recent release of the module seems to work properly.
In my previous posts I have identified numerous problems with the module and wormkit ecosystem in general and in the following post I've released a corrected version that fixed problems on my end. While still a shoddy workmanship, I wouldn't call it refusing responsibility.
My works are and will remain open source, so if anyone wants to improve them, anyone is free to do so and I would love to see an active open source worms community in near future.

Yes. So, please try to not release software which causes confusing error messages.
Clearly, I'm no expert on windows api but I think that LoadLibraryA triggers this error before my module runs a single code instruction, so there is not much that I can do from technical standpoint. I should've stated in OP that this module requires MSVC runtimes, but some users would ignore it regardless (just like GrO did a few posts back when I instructed him to install runtimes).

Though from technical standpoint your works are excellent and take into consideration every possibility (I didn't even think of the case with loading exports from WA.exe), I think that they need to be adjusted for real world cases, such as this thread and make some assumptions to make it more clear to end users.

You may observe a non-negligible performance gain by avoiding the WinAPI overhead.
I am well aware of that and I've already changed that code before your posts when feedback about issues reached me.

- in my opinion this functionality should come standard with base game to avoid shitty kick module implementations like this.
And I still support this opinion. WormKit modules are inherently low quality hacks and need to reinvent the wheel to provide basic functionality, which can be properly implemented within matter of minutes in the base game. If there was a proper API to deal with the game's memory or proper open source examples, things could've been a bit better.
I know that your WormKit modules are available on github, but they work on hooking Windows API level or the most important parts of them are closed source, thus entire module's code is useless for other developers.

13
Wormkit Modules / Re: wkKick38
« on: August 22, 2020, 07:37 AM »
The error message shows:
1. The module that failed to load
2. The exact function call that failed
3. The numeric error code reported by your operating system
4. The localized error message for said error code, as provided by the operating system
5. A most likely explanation of the error (also localized to your language), which is true for this particular case
6. Advice to the user, which is again actually relevant here
Yes, this message is very verbose, but it would be nice to cover a special case for LoadLibraryA error 0x7E that suggests that some DLL is missing and maybe try installing runtimes. As seen in this thread, people are still confused about this error message.

And all that, just because you 1) chose to use the CRT, 2) chose to link to the CRT dynamically, 3) decided to not include the runtime with your module, and 4) failed to communicate to your users what the installation procedure and dependencies are?
I didn't give much thought to it - I just assumed that everyone has msvc runtimes installed.

BTW, I don't understand why you use CreateToolhelp32Snapshot / ReadProcessMemory etc. You know that WormKit modules run within the same process as the game itself, right? You can access the memory directly. And, if you really need a handle for some reason (soft fails on invalid addresses?), you can use GetCurrentProcess instead of tlhelp32.
This signature scanner is written by Zer0Mem0ry and available at https://github.com/Zer0Mem0ry/SignatureScanner that just happened to be the first result on google when I needed one. I agree that this scanner is suboptimal for this use case (and also leaked memory). I've patched it a little bit to work good enough to make the required hooks.

I think such an attitude gives a bad name to the entire WormKit authors community, and it would be good to see less of that.
I'm sorry for giving a bad name to the entire WormKit authors community by releasing open source modules for WA 3.8.

14
Wormkit Modules / Re: wkTerrain
« 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.

15
Wormkit Modules / Re: wkTerrain
« 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.

Pages: [1] 2