people playing: 170
servers online: 52
games played: 73,280,276

  Toribash Community » Toribash » Mods » Lua scripts
Reply
 
Thread Tools Display Modes
Old Aug 22, 2007   #1
NewbLuck
Skip Sandwich DX
 
10th Dan Black Belt
Join Date: Mar 2007
Posts: 227



Useful things for those that use Notepad++
If you haven't heard of Notepad++, its a free file editor aimed at coding/scripting that is chock full of features that make life alot easier.

Ok, a few useful things that I have found that makes life a bit easier for the Lua scripter in N++...

1) Toribash function syntax highlighting
--------------------------------------
Go to Settings > Styler Configurator...
In language box, scroll down and click on Lua.
In style box, click on FUNC2.
There is a box near the right bottom corner that is titled User Define Keywords. In this box, copy and paste all this in:

add_hook dismember_joint draw_centered_text draw_disk draw_quad draw_text echo edit_game fracture_joint freeze_game get_body_angular_vel get_body_info get_body_linear_vel get_bouts get_camera_info get_color_info get_game_rules get_grip_info get_head_info get_joint_dismember get_joint_fracture get_joint_info get_joint_pos get_joint_pos2 get_joint_radius get_joint_screen_pos get_option get_player_info get_screen_pos get_shift_key_state get_spectators get_window_size get_world_state list.txtopen_url rewind_replay run_cmd screenshot sdk_standard select_player set_body_force set_body_pos set_body_sides set_body_texture set_body_torque set_camera_lookat set_camera_pos set_default_rules set_ghost set_grip_info set_joint_pos set_joint_radius set_joint_state set_option start_new_game unfreeze_game

and then click apply, then save and close. Now, the toribash-specific functions will be highlighted just like the standard lua functions ( e.g. string.byte )

2) Toribash Lua Auto-complete
------------------------------
There is an attachment at then end of this post. Extract this file to:
[Notepad++ directory]\plugins\APIs\

Now restart Notepad++. To use the auto-complete function, make sure you have the language for that window set to lua, then start typing a function, then press Ctrl-Space. A box will pop up you can scroll through with the arrow keys, and press enter when the function you would like to have entered is selected.

3) Automatically setting new files created to Lua language
-------------------------------------------------------

Go to Settings>Preferences..., and then click on the new document tab.
Near the bottom of the window, there is a drop-down with the title Default Language: Set it to lua, then click on close.

This may not be for everyone, depending on what else you use N++ for. More often then not, the new documents i make in N++ will be lua, so I find it easier to change it to whatever I need if I'm not working with lua.



I hope this stuff helps you N++ people out there
Attached Files
File Type: zip lua.zip (1.1 KB, 234 views)
Code:
 ____  _____  __  __  _  _  ___  _  _ 
(  _ \(  _  )(  )(  )( \( )/ __)( \/ )
 ) _ < )(_)(  )(__)(  )  (( (__  \  / 
(____/(_____)(______)(_)\_)\___) (__) 

Last edited by NewbLuck; Aug 22, 2007 at 04:29 AM.. Reason: fixed engrish
NewbLuck is offline   Reply With Quote
Old Aug 22, 2007   #2
Blam
Now I know my abc's!
This user title is the property of SkulFuk.
 
4th Dan Black Belt
Join Date: Apr 2007
Posts: 5,470
Clan: bncy



thankyou!! =]
:D
Blam is offline   Reply With Quote
Old Aug 23, 2007   #3
veb
Raconteur
heh. neat. I use Notepad++ alot too, it's a very nifty program
veb is offline   Reply With Quote
Old Aug 24, 2007   #4
NewbLuck
Skip Sandwich DX
 
10th Dan Black Belt
Join Date: Mar 2007
Posts: 227



It is pretty damn sexy. And also, the fact that it is so useful for many, many other things, and the great plug in support makes it pretty indispensable for me.
Code:
 ____  _____  __  __  _  _  ___  _  _ 
(  _ \(  _  )(  )(  )( \( )/ __)( \/ )
 ) _ < )(_)(  )(__)(  )  (( (__  \  / 
(____/(_____)(______)(_)\_)\___) (__) 
NewbLuck is offline   Reply With Quote
Old Aug 24, 2007   #5
?ishi
Sample Text
 
10th Dan Black Belt
Join Date: Aug 2006
Posts: 4,735
Clan: no



Nice, im bookmarking this for if i ever pick up lua. Thanks
Machine saw all it had made and said: "Behold."

current location: BenDover's recently posted list
ishi is offline   Reply With Quote
Old Aug 23, 2008   #6
Blam
Now I know my abc's!
This user title is the property of SkulFuk.
 
4th Dan Black Belt
Join Date: Apr 2007
Posts: 5,470
Clan: bncy



<bump (1 day off of a year bump)>

i has an updated list of commands for all you.

add_hook set_event_hook echo run_cmd set_ghost get_obj_pos set_obj_pos get_obj_sides set_obj_sides get_obj_rot set_obj_rot set_obj_force set_obj_color get_obj_lvel get_obj_avel get_obj_flag set_obj_flag get_obj_vis set_obj_vis get_obj_bouce set_obj_bounce set_obj_mass get_bout_info get_spectator_info get_player_info set_camera_pos set_camera_lookat set_gameover_timelimit set_camera_range set_camera_angle disable_player_pick get_joint_screen_pos set_body_texture get_screen_pos get_joint_radius set_joint_radius set_joint_state set_joint_force_color set_selected_joint_force_color set_joint_color get_joint_color set_body_color set_torso_color set_blood_color set_torishop set_ghost_color set_ground_impact_color set_gradient_secondary_color set_gradient_primary_color set_gradient_color set_body_rotation get_joint_pos get_joint_pos2 set_joint_pos get_grip_lock set_grip_info open_url dismember_joint fracture_joit get_joint_dismember get_joint_fracture set_player set_option load_player screenshot unload_texture load_texture set_color set_volume draw_quad draw_disk draw_disk_3d draw_text draw_right_text draw_centered_text draw_chat_input draw_chat_message draw_boxed_text draw_sphere draw_sphere_m draw_box draw_box_m draw_capsule draw_capsule_m get_blood_age get_body_linear_vel get_body_angular_vel set_body_force set_body_torque get_blood_radius get_blood_pos get_blood_vel set_decal draw_ground_impact get_chat_type draw_chat_message set_fov export_mod freeze_game unfreeze_game is_game_frozen step_game step_to_end edit_game rewind_replay get_ghost set_default_rules open_menu get_shift_key_state get_world_state get_bouts get_bout_info get_customs get_spectators get_spectator_info get_player_info get_master get_game_rules get_window_size get_option disable_player_select enable_camera_movement disable_camera_movement end_tutorial open_upmenu get_head_info set_body_pos set_body_sides get_joint_radius get_grip_info set_grip_info init_mod_world disable_sound enable_sound get_volume get_color_info indicate_joint set_timex_color set_trail_color set_separate_trail_color set_separate_trail_color_2 add_trail_particle uninit_torishop set_body_texture get_errno get_num_blood_particles get_active_bloods get_total_chat_lines get_cur_chat_lines get_compact_chat_lines get_full_mode_chat_lines get_chat_type chat_input_activate chat_input_deactivate chat_input_is_active chat_input_clear reset_server remove_hooks get_joint_info

.
:D

Last edited by Blam; Aug 23, 2008 at 11:13 AM.. Reason: bump lawl
Blam is offline   Reply With Quote
Old Aug 23, 2008   #7
Egg
NON-EXISTING!
 
2nd Dan Black Belt
Join Date: Feb 2008
Posts: 425



N-N-N-NECRO. Nice list you got there Blam. Not that i know what it does, but whatever.
Egg is offline   Reply With Quote
Old May 6, 2012   #8
Iubsay
Junior Member
 
Join Date: May 2012



Thanks a lot, very useful thread
Iubsay is offline   Reply With Quote
Old Jun 18, 2012   #9
motota
Junior Member
 
2nd Dan Black Belt
Join Date: Nov 2008
Posts: 23



It looks like notepad++ has changed their way of doing auto complete. Now it requires an xml file instead of a ".api" file. It's a pain in the ass to add all of the xml formatting so I updated yours and am putting it up here in case anyone wants it.
Attached Files
File Type: zip lua.zip (1.3 KB, 14 views)
motota is offline   Reply With Quote
Old Jun 23, 2012   #10
Dr. box
Elitist
 
Cardboard Belt
Join Date: Sep 2007
Posts: 8,064



thanks for the update motota
<Nikelaos> mine however are so lame no girl would go for it no matter the conditions.

Now in female form, too!

A new way to make yourself look cooler and sink your TC. Visit the Usertitle Shop.
box is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:13 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game