Forums
March 29, 2024, 10:04 AM

Author Topic: wkmacros  (Read 3657 times)

0 Members and 1 Guest are viewing this topic.

Offline Kradie

wkmacros
« on: August 27, 2020, 02:22 PM »
Hi, could it be possible to make a module which allows the user to assign different keys that will trigger text and sentences? It could be useful in situation in the host room where you have to explain the rules, provide links to an update, modules, or whatever. Yes I know about the up key, but it is more convenient to have a text readied and written in a notepad file, just like wkRemapKeys.
 Sometime it can be very annoying and tiring typing a bunch of stuff only to see the user just leaves and never to return.

Anyone know it can be done and possible can do it?

Thanks.
Global Wormin' - A Friendly Discord Worms Server
https://discord.gg/zvFwZuAKQB

Offline Kaleu

Re: wkmacros
« Reply #1 on: August 27, 2020, 11:44 PM »
Someone once created an autohotkey script to type rules, it's easy to do.
Experience the best TTRR gameplays with my maps!

→ The best of Kaleu ←

↓ Average anti-modules player ↓

Offline Kradie

Re: wkmacros
« Reply #2 on: August 30, 2020, 01:12 PM »
Someone once created an autohotkey script to type rules, it's easy to do.
Would be nice if someone actually did make this true.
Global Wormin' - A Friendly Discord Worms Server
https://discord.gg/zvFwZuAKQB

Offline GrO

  • 🌞🌞🌞🌞♾️🌞🌞🌞🌞
  • Jr. Member
  • **

  • Poland Poland
  • Posts: 84
  • ⚘🌹🌷 🌿 🌻 🍀 🌷🌹⚘
    • View Profile
    • 440Hz >>> 432Hz
Re: wkmacros
« Reply #3 on: August 30, 2020, 02:22 PM »
...the easiest workaround is to keep long rule's descriptions in a txt files, then just ctrl+c, ctrl+v

...even the Light needs a background, or some dirt, to become visible... ...

Offline Kradie

Re: wkmacros
« Reply #4 on: August 30, 2020, 04:12 PM »
...the easiest workaround is to keep long rule's descriptions in a txt files, then just ctrl+c, ctrl+v
I didn't know about this. Thanks. ::)
Global Wormin' - A Friendly Discord Worms Server
https://discord.gg/zvFwZuAKQB

Offline GrO

  • 🌞🌞🌞🌞♾️🌞🌞🌞🌞
  • Jr. Member
  • **

  • Poland Poland
  • Posts: 84
  • ⚘🌹🌷 🌿 🌻 🍀 🌷🌹⚘
    • View Profile
    • 440Hz >>> 432Hz
Re: wkmacros
« Reply #5 on: August 30, 2020, 11:30 PM »
...the easiest workaround is to keep long rule's descriptions in a txt files, then just ctrl+c, ctrl+v
I didn't know about this. Thanks. ::)
...sarcasm unnecessary, some new users may not know and read this one day :)

...even the Light needs a background, or some dirt, to become visible... ...

Offline Kradie

Re: wkmacros
« Reply #6 on: August 31, 2020, 12:19 AM »
My apologize, I didn't think as far this could be useful for guests and new users.

Listen to me random reader! I know you are there! I am sorry for my sarcasm!  ;D

Anyway, the point of this module was convenience, not type a bunch of rules and have it ready for copy paste. Then you have to minimize per sentence to copy. It is crazy. Unless if you run in windows or have multimonitor setup. Which not all have or want.

Global Wormin' - A Friendly Discord Worms Server
https://discord.gg/zvFwZuAKQB

Offline GrO

  • 🌞🌞🌞🌞♾️🌞🌞🌞🌞
  • Jr. Member
  • **

  • Poland Poland
  • Posts: 84
  • ⚘🌹🌷 🌿 🌻 🍀 🌷🌹⚘
    • View Profile
    • 440Hz >>> 432Hz
Re: wkmacros
« Reply #7 on: August 31, 2020, 07:10 AM »
Then you have to minimize per sentence to copy.
...huh? Simple text processing and still so many mysteries? :D

Didn't you know you can copy new-line-chars (or 'enters' - see the picture attached)? You can copy the whole text before running the game for your convenience and you don't need multi-monitors to minimize the game at all - what are you talkin' about man???

So many useless sarcasm in you, who needs it when you don't know the basics...

Regards.


*edit*

Someone once created an autohotkey script to type rules, it's easy to do.
Would be nice if someone actually did make this true.
...he said it's easy to do and it's actually true, just made a simple script with 3 examples (also attached it):

Code: [Select]
; "!j" = "Alt"+"j"    ; if you want to use "Ctrl" instead, just swap:
; "!" with "^" (omit the quotes)
;
; codepage := 65001    ; uncomment start of this line for UTF-8 encoding,
;                              remember to save the script as 'Unicode big endian'
;
; to produce a literal commas or percent signs, you need to use so-called
; escape sign before each, example (omit the quotes):    "`," and "`%"
;
; "`n" makes a new line like "Enter"
!j::
  Send, Shopper rules:`n- crate before attack`,`n- kill the leader`,`n- attack from rope.
  Send, {Enter}
Return

!k::
  Send, Forts rules:`n- no invading`,`n- no fishing.
  Send, {Enter}
Return

!l::
  Send, Get the latest updates from:`nhttps://worms2d.info/Updates
  Send, {Enter}
Return
« Last Edit: September 03, 2020, 08:03 AM by GrO »

...even the Light needs a background, or some dirt, to become visible... ...

Offline Kradie

Re: wkmacros
« Reply #8 on: August 31, 2020, 01:54 PM »
Thank you for your effort though. But it's not really what I meant.

Sorry to have wasted your time.

Peace.


Global Wormin' - A Friendly Discord Worms Server
https://discord.gg/zvFwZuAKQB

Offline GrO

  • 🌞🌞🌞🌞♾️🌞🌞🌞🌞
  • Jr. Member
  • **

  • Poland Poland
  • Posts: 84
  • ⚘🌹🌷 🌿 🌻 🍀 🌷🌹⚘
    • View Profile
    • 440Hz >>> 432Hz
Re: wkmacros
« Reply #9 on: August 31, 2020, 02:13 PM »
Thank you for your effort though. But it's not really what I meant.

Sorry to have wasted your time.

Peace.
Hi, could it be possible to make a module which allows the user to assign different keys that will trigger text and sentences? It could be useful in situation in the host room where you have to explain the rules, provide links to an update, modules, or whatever.
...the script does exactly what you wanted, you can add more keys and more lines for each key, you can even use some different functions for one key simultaneously, it can also replace wkRemapKeys, and you can extend the script as you wish according to your needs.

I know you want some good uncle to write a no0b-proof module for you, but one likes waitin', the other likes doin', and no time was wasted, because time is an illusion, the script was very simple, and I still believe this thread may be useful for someone else in the future...

Regards... ;D

...even the Light needs a background, or some dirt, to become visible... ...

Offline Kradie

Re: wkmacros
« Reply #10 on: August 31, 2020, 03:54 PM »
Cheers! ;D
Global Wormin' - A Friendly Discord Worms Server
https://discord.gg/zvFwZuAKQB

Offline StepS

Re: wkmacros
« Reply #11 on: August 31, 2020, 06:32 PM »
There was a module for 3.6.29.0 called wkCinusAutoText but it has not been updated since and I think it only worked during the game, not in lobbies. It also predates the chat anti-flood.
You can paste multi-line text in lobbies as already said.
Dec 30 2013 23:59:44 <StepS> windowed mode isn't the only thing you need about frontend
Dec 30 2013 23:59:49 <StepS> you need it to be actually bigger
Dec 31 2013 00:00:13 <StepS> it actually is very small on my 15-inch full HD screen
Dec 31 2013 00:00:25 <StepS> while running at 640x480 or stretched mode makes it fuzzy
Dec 31 2013 00:00:44 <StepS> this problem has been around since the Worms Armageddon's release and no one has even tried to beat it
[...]

Offline Albus

  • Sr. Member
  • ****

  • Brazil Brazil
  • Posts: 370
    • View Profile
Re: wkmacros
« Reply #12 on: September 01, 2020, 11:39 AM »
I'm trying to find something like that. This function would be nice for both the lobby and the chat during the game.

Offline GrO

  • 🌞🌞🌞🌞♾️🌞🌞🌞🌞
  • Jr. Member
  • **

  • Poland Poland
  • Posts: 84
  • ⚘🌹🌷 🌿 🌻 🍀 🌷🌹⚘
    • View Profile
    • 440Hz >>> 432Hz
Re: wkmacros
« Reply #13 on: September 01, 2020, 03:10 PM »
I'm trying to find something like that. This function would be nice for both the lobby and the chat during the game.
...you can't send multi-line text with the in-game chat and there are at least 2 ways I posted, allowing you to play with text sending (and even more using AutoHotKey app)...

...anyway, there's no sense to make another module with functionality you can easily achieve by some other methods, and the notepad>ctrl+c>ctrl+v method seems to be quite easy to use, and such functionality was never essential to the game - you want more - use the AutoHotKey soft... :)

...even the Light needs a background, or some dirt, to become visible... ...

Offline Kaleu

Re: wkmacros
« Reply #14 on: September 02, 2020, 02:13 AM »
Then you have to minimize per sentence to copy.
...huh? Simple text processing and still so many mysteries? :D

Didn't you know you can copy new-line-chars (or 'enters' - see the picture attached)? You can copy the whole text before running the game for your convenience and you don't need multi-monitors to minimize the game at all - what are you talkin' about man???

So many useless sarcasm in you, who needs it when you don't know the basics...

Regards.


*edit*

Someone once created an autohotkey script to type rules, it's easy to do.
Would be nice if someone actually did make this true.
...he said it's easy to do and it's actually true, just made a simple script with 3 examples (also attached it):

Code: [Select]
; codepage := 65001    ; uncomment start of this line for UTF-8 encoding,
;                              remember to save the script as 'Unicode big endian'
;
; to produce a literal commas or percent signs, you need to use so-called
; escape sign before each, example (omit the quotes):    "`," and "`%"
;
j::
  Send Hi`, rules please...
  Send {Enter}
Return

k::
  Send Hi`, you know forts?
  Send {Enter}
Return

l::
  Send Get the latest version from:`nhttps://worms2d.info/Updates
  Send {Enter}    ; "`n" makes a new line
Return

Your script is not working for me, it's in an infinite loop of sending the first sentence, I had to call Ctrl+Alt+Del hahah.
I think it's behaving like that because you forgot to use comma after the Send command.
Code: [Select]
^j::
Send, Hello World.
return

Thank you for your effort though. But it's not really what I meant.

Sorry to have wasted your time.

Peace.

It's exactly what you asked for. It's not a wk module but it's a perfect workaround.
What phrases do you want to be written and what hotkeys will trigger it? Write it down, or replace the commands and sentences from my script (Read till the end.)


I'm trying to find something like that. This function would be nice for both the lobby and the chat during the game.

Call me in Discord, I will customize a script for you. :)

::

I tried doing it myself and it worked pretty well. I made a script with multiple functions, I had nothing else in mind but nevermind, it's up to your necessities. I made this to be used just as an example.
Edit as much as you need.

Code: [Select]
~PgDn::Suspend, On
~PgUp::Suspend, off

::cak::Crate Before Attack`, Attack From Rope`, Kill The Leader
::wba::Wall Before Attack
::fba::Fly Before Attack
::cba::Crate Before Attack
::afr::Attack From Rope
::ktl::Kill The Leader
::stf::Start To Finish
::s2f::Start To Finish
::nk::No Knocking
::wfwr::Stand on a pictured weapon or tool to use it
::bngr::No straight bazookas`, No sitters`, Reaim before every shot`, No Darksiding
::fortr::No invading`, No fishing


return

^1::
Send, Hello`, welcome to my host. I saw that you are using an outdated version of Worms Armageddon`, to play this scheme you need to update your game to the latest version (currently 3.8) via this link:`nhttps://worms2d.info/Updates_(Worms_Armageddon)
Send, {Enter}

return



First function is basically a replacer for shorten version of rules if you need to explain them. However, if you need to type the actual shorten version of any rule you will need to pause the script by pressing "Page Down." And pressing "Page Up" will unpause the script again, this is to prevent conflict with in-game chat.

It will behave like that:
Let's pick wba as example here. If type wba your text will be replaced by Wall Before Attack‎‎‎‏‏‎ ‎as soon as you press Comma or Spacebar or Enter to send. This script also respects capital letters. If you type WBA the replaced text will be WALL BEFORE ATTACK‎‎‎‏‏‎.
You can check all the triggers in the source code above.

Second function is a trigger bind to Ctrl+1 to warn players that they are using an outdated version of Worms Armageddon and asking them to update it.
Ctrl is represented by "^". Any key can be assigned to send this sentence and multiple sentences can be replicated using this simple command.
Here you can find the autohotkey key list: https://www.autohotkey.com/docs/KeyList.htm

I hope this helps to make your own scripts, it's easy, all you have to do is replace text and hotkeys.
Don't forget to install AutoHotkey or the script won't work (unless it's an exe but then you would'nt be able to edit it.)

Feel free to ask any questions!


Edit: Added rules for bng (bngr), wfw (wfwr), fly shopper (fba), fort (fortr).
« Last Edit: September 02, 2020, 03:07 AM by Kaleu »
Experience the best TTRR gameplays with my maps!

→ The best of Kaleu ←

↓ Average anti-modules player ↓