Take Binding to the next level, with Scripting!

Guides about mapping and everything Teeworlds related.

What Scripts do you use? (Reset on the 10 of March 2019)

Please note that results are sorted by decreasing number of votes received.

One Key Deep-Fly
2
50%
Precision Hooking
1
25%
Fire Spam
1
25%
reset
0
No votes
anonymous
0
No votes
ZenMode
0
No votes
RecordingMode
0
No votes
InfoGeek
0
No votes
Introducing
0
No votes
Show others Toggle
0
No votes
Manual Kill "Protection"
0
No votes
Rcon & IF|City move
0
No votes
Hammer Take
0
No votes
 
Total votes: 4

GG Kid
User
Posts: 252
Joined: Sun Apr 16, 2017 2:33 am
Location: U.S.A.
Player profile: Bolto
Clan: Kerger

Take Binding to the next level, with Scripting!

Post by GG Kid » Thu Oct 26, 2017 5:58 am

Take Binding to the next level, with Scripting!
written by GG kid

Whats "Scripting" you ask?
Well it's like Binding but on another level, you can rule your client with more power then ever, what to change ten things all at once? write a script for it! it's that easy.
we will use configuration (.cfg) files to hold are settings & commands of choice, to use these .cfg scripts you must place them in in one of the paths specified in storage.cfg located in your DDnet's clients main folder, i suggest you store them in your Teeworlds userdata folder (config_directory)
On Linux: /home/USER/.teeworlds
In Windows: copy %appdata%\Teeworlds & paste it in the start-menus search bar & press enter
your'll see settings_ddnet.cfg in that folder, open it with your favorite text editor(Atom.io) & save a copy as reset.cfg , (this will serve as a backup of your settings)
now open your chosen text editing program & paste the code from this spoiler titled: anonymous.cfg
anonymous.cfgShow

Code: Select all

echo anonymous ID, wake up. 
# this is a note(comment), it will not execute. to execute this script use: exec anonymous.cfg

player_name "anonymous"
player_clan "illuminati"
player_country -1
player_use_custom_color 0
player_skin "default"

dummy_name "brainless tee"
dummy_clan "Dummy"
dummy_country -1
dummy_use_custom_color 0
dummy_skin "default"

& save as anonymous.cfg
now open your DDnet client & join a game, press F1 (Console) on your keyboard & type: exec anonymous.cfg press enter then press F1 again & ta-da :!:
you will now you have a new identity, hahaha!
Congratulations! you have just learned how to use scripts in Teeworlds, at any point you can restore your old configuration data by F1 > exec reset.cfg

Ok that was fun but lets do something a little more creative this time: toggling on & off some cool stuff, just remember these are made for the default settings, so you might what to read & edit them to customize the settings toggled,
(anything to the right of a # is a comment)
ZenMode.cfgShow

Code: Select all

echo Zen mode
# this is a comment, it will not execute. to execute this script use: exec zenmode.cfg

toggle cl_show_quads 1 0
toggle cl_overlay_entities 0 93
toggle cl_show_chat_friends 0 1
toggle cl_nameplates 0 1
toggle cl_scoreboard_on_death 0 1
toggle snd_long_pain 1 0
toggle cl_showkillmessages 0 1
toggle cl_shownotifications 1 0
toggle cl_show_chat_system 1 0
toggle cl_vanilla_skins_only 0 1
# prevents saving in this state
toggle cl_save_settings 1 0



## if you enabled these you might what to toggle them off for this mode. 
#toggle cl_race_show_ghost 0 1
#toggle cl_show_votes_after_voting 0 1
#toggle cl_show_local_time_always 0 1
#toggle cl_showfps 1 0
#toggle cl_showpred 1 0
#toggle ed_showkeys 1 0

# global, for if  show_others is enabled  
#toggle cl_show_others 1 0

# per player
#say /showothers

Attempts to simplify your experience & Remove distractions for when you are stressed or need to focus. #FeelTheZen
RecordingMode.cfgShow

Code: Select all

echo Recording mode
# this is a note, it will not execute. use exec "Recording mode.cfg" with quotes to execute this script.

toggle cl_nameplates 0 1
toggle cl_showhud 0 1
toggle cl_showchat 0 1
toggle cl_show_chat_system 1 0
toggle cl_shownotifications 1 0
say /mapinfo 
say /showothers
say /time 
say /teamtop5 
say /dnd
# prevents saving in this state
toggle cl_save_settings 1 0

## if you enabled these you might what to toggle them off for this mode. 
#toggle cl_show_others 0 1
Removes distracting elements of the game so people can admire your uber pro run.
InfoGeek.cfgShow

Code: Select all

echo Info Geek, you may use Ctrl>Shift>D to toggle: debug & Ctrl>Shift>G to toggle: dbg_graphs
# this is a comment, it will not execute, to execute this script use: exec infogeek.cfg
## if you enabled any of these you might what to comment out the command with a # (else they will be toggled off.) 

say /mapinfo
toggle cl_nameplates_always 0 1
toggle cl_nameplates 0 1
toggle cl_show_votes_after_voting 0 1
toggle cl_show_local_time_always 0 1
toggle cl_showfps 0 1
toggle cl_showpred 0 1
toggle debug 0 1
toggle dbg_graphs 0 1
toggle cl_show_ids 0 1
toggle cl_show_direction 0 1
ping
say /rules
# prevents saving in this state
toggle cl_save_settings 1 0

For those who really want to know. look i just sat down & though of every use for scripts i could for the tutorial, take it or leave it.

Ok nice, but i'm taking this to another level here guys, these are the most advanced scripts on the planet! which maybe have a few bugs :) so with that in mind here we go.
to use scripts with spaces in the name enclose the name with quotes like: exec "Name with spaces.cfg"
Precision hooking.cfgShow

Code: Select all

echo Precision hooking, this sets you mouse sensitivity to 100
# this is a note, it will not execute. use: exec "precision hooking.cfg"  with quotes to execute this script.
## instead of this Script try: bind lctrl "+toggle inp_mousesens 1 100; +showhookcoll" 
### that way holding left Ctrl will slooow mouse movement plus show the hook collision line 

# Shows current Mouse Sensitivity in Console
inp_mousesens

toggle inp_mousesens 1 100
toggle cl_overlay_entities 0 100
toggle cl_predict 0 1
toggle cl_predict_ddrace 0 1
toggle cl_show_hook_coll_always 0 1
## overridden by the above 
# cl_show_hook_coll_own 1
# toggle cl_show_hook_coll_other 1 0
 
 
# prevents saving in this state
toggle cl_save_settings 1 0


## if you enabled these you might what to toggle them off for this mode. 
#toggle cl_antiping 0 1
#toggle cl_antiping_limit 0 1

Helps for hard angle Hooks by enabling Entities, setting mouse sensitivity to the lowest value & enabling Hook collision line.
introducing.cfgShow

Code: Select all

echo Introducing... 
# this is a comment, it will not execute. to execute this script use: exec introducing.cfg

# this will not display the first time executed
say /points

# this will not display 
say /rank

# but these would if you uncomment them	
#say Test 123
#say /dnd

# this will display the first time executed
say Hello! i'm a Pro-noob & have been playing TW for about 3 years,

Alternatively you could use bind X "say /points; say Hello! i'm a Pro-noob & have been playing for about 3 years.;echo Introducing..."
to accomplish the same task, as you can see scripts are mostly like binds.
Fire Spam.cfgShow

Code: Select all

# echo Fire Spam! (enable for lots of (local)chat spam...)


+fire


##### Information #####

# fire spam script, very usefull with Hammer! but must be bound to the keyboard, the mouse will only execute scripts once,
# if another keyboard key is press it will quit/stop the execution of this action, 
# so one can hold left & spam fire but not spam fire & then run left (why still spaming fire).

# this is a note, it will not execute. use: exec "Fire Spam.cfg"  with quotes to execute this script.

### other + actions that also work this way

# +nextweapon
# +prevweapon


### other + actions that do not work this way

# +spectate
# +show_chat

# +left
# +right
# +jump	
# +hook

# +showhookcoll

# +weapon1
# +weapon2
# +weapon3
# +weapon4
# +weapon5

Continuously execute/press Fire, useful for Spaming Hammer or Gun very fast. this one is cooler then most, because it seems like a Bug is making it work.

& Now for Some Advanced Binds using Scripts, i'm calling them "Script binds", these allow you to bind anything & toggle it on & off. Replace bind X with your key of choice. for Dummy Deep-Fly see the Just bind it! thread or download the Attachment below.

Take Hammer on switch {inspiration from Firewave}Show
HammerTakeOn.cfg

Code: Select all

###          Information    
# Makes toggling dummy take Hammer in hand
###                    


# tells you privately though chat whats going on
echo Enabled Dummy take Hammer on switch

# bounds toggle dummy to also switch to Hammer
bind X "toggle cl_dummy 0 1; +weapon1"

# makes it so pressing 6 will disable it
bind 6 exec HammerTakeOff.cfg


HammerTakeOff.cfg

Code: Select all

###          Information    
# Restores Regular Dummy toggle
###                    


# tells you privately though chat whats going on
echo Enabled Normal Dummy toggling

# bounds toggle dummy as defualt
bind X "toggle cl_dummy 0 1"

# makes it so pressing 6 will enable "force dummy to take hammer"
bind 6 exec HammerTakeOn.cfg

Enables/Disables Forcing switch to Hammer on Dummy toggle.

To initialize it: exec HammerTakeOn.cfg , then use 6 in-game to toggle it on & off.
Rcon & IF|City move though walls Toggle {by fokkonaut}Show
Taken from here <3
rcon_move.cfg
# Rcon move though walls mode
bind up rcon up
bind down rcon down
bind right rcon right
bind left rcon left
bind x "exec city_move.cfg"
echo Rcon Move

city_move.cfg
# IF|City move though walls mode
bind up say /up
bind down say /down
bind right say /right
bind left say /left
bind x "exec rcon_move.cfg"
echo City move

Use your arrow keys for going through walls in city mode ( say /right, etc) or toggle using x for rcon mode (rcon right, etc).

To initiate: exec rcon_move.cfg, then use X in-game to toggle it on & off.
Show others Toggle {by fokkonaut}Show
show_others_on.cfg
cl_show_others 1
say /showothers 1
say /specteam 0
echo Show others: ON
bind X exec "show_others_off.cfg"

show_others_off.cfg
cl_show_others 0
say /showothers 0
say /specteam 1
echo Show others: OFF
bind X exec "show_others_on.cfg"

This will allow you to toggle showing others on solo servers, in spectator (/pause, /spec) and showing other teams while playing.
Have fun :D
Manual Kill "Protection" {by Valen_4}Show
Taken from here This one is really cool, thanks Valen_4! maybe others will use this great idea someday.

killprotection.cfg
bind "X" exec kill.cfg
bind mousewheelup "+nextweapon"

kill.cfg
echo "<Kill Protection> Press again to kill, or Mouse Wheel Up to cancel"
bind "X" "kill; exec killprotection.cfg"

bind mousewheelup "exec killprotection.cfg"

Pressing x once disables "Kill Protection", pressing x again kills you, Mouse-Wheel Up Re-enables "Kill Protection"

Long/technical description
pressing x once puts you in "killing Mode" that: 1. disables "Kill Protection" 2. bind's Mouse-Wheel Up to Re-enable "Kill Protection" 3. tells you this. now pressing x again kills you & disables "killing Mode, pressing Mouse-Wheel Up disables "killing Mode" & Re-enables "Kill Protection"

To initiate: exec killprotection.cfg

A lot can be done with Binds & Scripts, some useful & some not so useful, i hope i have inspired you to do greater things!
Now that you're armed with this knowledge what will you do next?

Here is all the scripts

DDnet Scripts V2.4.zip
(Version 2.4) Added "Take Hammer on switch" & "One Key Deep-Fly Toggle" Script-Binds, Updated style.
(7.95 KiB) Downloaded 6 times
old versionsShow
{outdated}
DDnet Scripts V2.3.zip
(Version 2.3) Added "Take Hammer on switch" Script-Bind,
Updated style.
(6.68 KiB) Downloaded 7 times

{outdated}
DDnet Scripts.zip
(version 2.2) added "Fire Spam.cfg"
(5.59 KiB) Downloaded 17 times

{outdated}
DDnet Scripts.zip
(version 2.1) updated & improved "Precision hooking.cfg" thanks to a new Command & bug fix.
(5.08 KiB) Downloaded 9 times

{outdated}
DDnet Scripts.zip
(version 2) added "cl_shownotifications" & "cl_show_chat_system" for DDnet V11.x & Bind Scripts
(5.06 KiB) Downloaded 13 times

{outdated}
TW Scripts.zip
(version 1)
(2.56 KiB) Downloaded 25 times


Well thats all i got for now.. please do tell me what you think. maybe you got a killer Script/Bind you what to share :?:

Thanks to: index, for guiding me on this path, your the reason I've made this.
fokkonaut for being smart, KlexMikrowelle for making the video tutorial, & of course Deen for making this wonderful experience!
Last edited by GG Kid on Mon Mar 11, 2019 2:38 am, edited 23 times in total.

n000b
Community Team: In-Game Moderator
Posts: 161
Joined: Tue Oct 28, 2014 4:18 pm
Clan: |AFK|

Re: Take Binding to the next level, with Scripting!

Post by n000b » Sat Oct 28, 2017 11:42 am

thanks for the turorial. i think many people can use this knowledge.

fokkonaut
User
Posts: 853
Joined: Wed May 13, 2015 5:59 pm
Player profile: fokkonaut

Re: Take Binding to the next level, with Scripting!

Post by fokkonaut » Sat Oct 28, 2017 12:18 pm

this is nothing new for me. I already have 15+ .cfg files in my config directory. if i press f1 ingame and write exec "binds.cfg" ALL the configs will get loaded and every bind will be set in This order (1. exec "binds.cfg": here are all general binds that are bound e.g. bind d +right. The first line in this cfg is "unbindall". i dont want to have all these default binds and i dont like all the stuff that is bound like /points. 2. the binds.cfg execs all the other configs.)
its simple and brilliant xd

GG Kid
User
Posts: 252
Joined: Sun Apr 16, 2017 2:33 am
Location: U.S.A.
Player profile: Bolto
Clan: Kerger

Re: Take Binding to the next level, with Scripting!

Post by GG Kid » Sun Oct 29, 2017 2:52 am

Your welcome n000b, if it's even half as useful as the "Just Bind it!" thread i will be pleased.

fokkonaut glad to see someone using this type of thing already, i understand the use of your Key-control setting scripts, but i'm curious as to what you might be doing with the other 13- scripts, if you would share as to the purpose of so many i would be great full.

fokkonaut
User
Posts: 853
Joined: Wed May 13, 2015 5:59 pm
Player profile: fokkonaut

Re: Take Binding to the next level, with Scripting!

Post by fokkonaut » Sun Oct 29, 2017 9:52 am

nah i dont want to give them to everybody but ill send u a pm when im home

edit: most of the cfgs are just normal binds like toggle dummy hammer or copy moves but with echos so i can see in chat if its on or off (for example to avoid killing the main tee while playing with dummy and kill)

RE3SES
User
Posts: 16
Joined: Sat Dec 16, 2017 8:27 am

Re: Take Binding to the next level, with Scripting!

Post by RE3SES » Sat Dec 16, 2017 8:36 am

uhm... what language was used in this? batch? :oops: :oops:

fokkonaut
User
Posts: 853
Joined: Wed May 13, 2015 5:59 pm
Player profile: fokkonaut

Re: Take Binding to the next level, with Scripting!

Post by fokkonaut » Sat Dec 16, 2017 10:14 am

RE3SES wrote:
Sat Dec 16, 2017 8:36 am
uhm... what language was used in this? batch? :oops: :oops:
teeworlds console xD its just commands from teeworlds

User avatar
Valen_4
User
Posts: 4
Joined: Sat Mar 03, 2018 8:11 pm
Location: Argentina
Player profile: Valen_
Clan: TElite

Re: Take Binding to the next level, with Scripting!

Post by Valen_4 » Sun Mar 04, 2018 7:15 am

I was wondering if scripting on TeeWorlds is as complete as in TF2.
Is there something like Aliases and Wait on TeeWorlds?

GG Kid
User
Posts: 252
Joined: Sun Apr 16, 2017 2:33 am
Location: U.S.A.
Player profile: Bolto
Clan: Kerger

Re: Take Binding to the next level, with Scripting!

Post by GG Kid » Sun Mar 04, 2018 7:30 am

i wish, so no sorry it's a very limited, i even asked one of the Main Developers {heinrich5991} & Deen about this. best solution appears to be using a client that supports LUA like ATH. getting started in Lua . there are so many it's hard to keep up some times, but only a few are really worth using.

dorothybarnes
User
Posts: 2
Joined: Fri Nov 17, 2017 12:56 pm

Re: Take Binding to the next level, with Scripting!

Post by dorothybarnes » Wed Apr 04, 2018 11:26 pm

Personally, I prefer to use zenmode. It is really useful
Hi to every player on this forum! My favourite map is book of ra demo play now. Have you tried it?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests