Giter VIP home page Giter VIP logo

tf2-taunts-tf2idb's Introduction

TF2 Taunts TF2IDB Build Status

An extensible and auto-updatable TF2 taunt menu/command plugin for sourcemod that is intended to replace plugins like Taunt'em and Random taunt menu plugins thrown around that thread

Menu

Usage

Demo videos

General usage:

General usage

sm_taunt_force command:

sm_taunt_force

sm_taunt_force menu:

sm_taunt_force Menu

Commands

  • sm_taunt/sm_taunts(!taunt/!taunts from chat) If no arguments were given, it shows a taunt menu, if one argument is given it'll be interpreted as an Item Definition Index (aka taunt id). Example: sm_taunt 463 Makes you taunt "Laugh Taunt", sm_taunt shows the taunt menu.
  • sm_taunt_list/sm_taunts_list(!taunt_list/!taunts_list from chat) Shows a list of available taunts, starting with its id, then the name and lastly the class that can use it.
  • sm_taunt_force/sm_taunts_force(!taunt_force/!taunts_force from chat) Given a target and a taunt id, it forces target to taunt. If no arguments are given, it shows a taunt and target selection menu.

Example usage

Output from sm_taunt_list:
sm_taunt_list
[SM] Taunts:
- Taunts for class engineer:
-  1115: Rancho Relaxo Taunt (engineer)
-  30618: Taunt: Bucking Bronco (engineer)
- Taunts for class spy:
-  1108: Buy A Life Taunt (spy)
-  30615: Taunt: The Boxtrot (spy)
-  30762: Taunt: Disco Fever (spy)
- Taunts for class pyro:
-  1112: Party Trick Taunt (pyro)
-  30570: Pool Party Taunt (pyro)
-  30763: Taunt: The Balloonibouncer (pyro)
- Taunts for class heavy:
-  1174: Taunt: The Table Tantrum (heavy)
-  1175: Taunt: The Boiling Point (heavy)
-  30616: Taunt: The Proletariat Showof (heavy)
- Taunts for class medic:
-  477: Meet the Medic Heroic Taunt (medic)
-  1109: Results Are In Taunt (medic)
- Taunts for class demoman:
-  1114: Spent Well Spirits Taunt (demoman)
-  1120: Oblooterated Taunt (demoman)
-  30671: Taunt: True Scotsman's Call (demoman)
-  30840: Taunt: Scotsmann's Stagger (demoman)
- Taunts for class soldier:
-  1113: Fresh Brewed Victory Taunt (soldier)
-  30673: Taunt: Soldier's Requiem (soldier)
-  30761: Taunt: The Fubar Fanfare (soldier)
- Taunts for class sniper:
-  1116: I See You Taunt (sniper)
-  30609: Taunt: The Killer Solo (sniper)
-  30614: Taunt: Most Wanted (sniper)
-  30839: Taunt: Didgeridrongo (sniper)
- Taunts for class scout:
-  1117: Battin' a Thousand Taunt (scout)
-  1119: Deep Fried Desire Taunt (scout)
-  1168: Taunt: The Carlton (scout)
-  30572: Taunt: The Boston Breakdance (scout)
- All Class taunts:
-  167: High Five Taunt (All Class)
-  438: Replay Taunt (All Class)
-  463: Laugh Taunt (All Class)
-  1015: The Shred Alert (All Class)
-  1106: Square Dance Taunt (All Class)
-  1107: Flippin' Awesome Taunt (All Class)
-  1110: RPS Taunt (All Class)
-  1111: Skullcracker Taunt (All Class)
-  1118: Conga Taunt (All Class)
-  1157: Taunt: Kazotsky Kick (All Class)
-  1162: Taunt: Mannrobics (All Class)
-  1172: Taunt: The Victory Lap (All Class)
-  30621: Taunt: Burstchester (All Class)
-  30672: Taunt: Zoomin' Broom (All Class)
-  30816: Taunt: Second Rate Sorcery (All Class)

Tips

Using the commands listed above, you can bind a key to a specific taunt like this:

  • Type !taunt_list from chat, find and write down the id for which you'd like to bind a key.
  • Enter the game console and write bind KEY "sm_taunt id" replace KEY and id with their respective values, of course.

Now each time you press KEY you'll taunt to the rhythm of id ๐Ÿ’ƒ

Installing

  1. Make sure you have TF2ItemsInfo or TF2ItemsDB (preferred) installed on your server.
  2. You'll need the TF2Items extension too. You can download the latest snapshot from here.
  3. Recommended: Install the Updater plugin or check if you have it installed (sm plugins info updater), all releases/updates to this repo will be immediately available to the updater, including updates to gamedata files.
  4. Go to the releases section.
  5. Look for the latest post and download the attached zip file that matches your installed schema API (eg. tf2_taunts_tf2idb-nX-tf2ii.zip for TF2II).
  6. Drag and drop the contents of the file to your sourcemod folder.
  7. Load the plugin (sm plugins load tf2_taunts_tf2idb) and test it using the sm_taunt_list command.

Contributing

Did you find a bug? Want to request a feature?

Open a new issue and describe your request (include as much information as possible).

Do you want to contribute to this project?

Fork the repo and issue a pull request, you help is always welcome, just make sure to be consistent with the code style and naming conventions already in place.

About the libraries included with this project

Both CTauntCacheSystem and CTauntEnforcer (except gamedata for the latter) are meant to be modular, encapsulated methodmaps that anyone can use on their project if they want to, keep in mind that at the time of writing this, there is no documentation about them, however, most properties and methods are pretty self-explanatory.

tf2-taunts-tf2idb's People

Contributors

fakuivan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tf2-taunts-tf2idb's Issues

Plugin fails to load blaming tf2ii not being installed

Apparently some people are having problems with a version of tf2itemsinfo (1.8.17.7-20131121, hash b704419286dfb0cd45aa1e868953d52e).
From what I can see, since a recent version of sourcemod, this version of the plugin fails to register itself as a dependency, thus plugins that need it to work fail to load reporting [SM] Plugin tf2_taunts_tf2idb.smx failed to load: Could not find required plugin "tf2itemsinfo". .
This can easily be fixed by just installing the version of this plugin from the repo I linked to on the readme. So, do that If you are having the same problem.

Native functions for use in own plugins

Are there any plans to be able to list and force taunts via an include file/natives so that we can use it in our own plugins? I'm making an RTD plugin and one of the perks is disco ball, which needs to force taunts on players, and this plugin is the only one I see fit.

Add compile scripts

Although steps to compile this plugin with autoversioning and building the updater manifest are declared in .travis.yml#L56-L72, it'd be convinient to split that work onto an isolated script that can run outside travis.

Merge TF2IDB and TF2II versions

This plugin needs to be built for tf2ii and tf2idb separately because of name collisions occurring between some enums named the same way on both of their includes (on tf2idb, on tf2ii). This is just a compiler issue however and could be solved by just modifying the include files, both APIs can run simultaneously in one server.

Some options:

  • Use an intermediate include that redefines names before including them
    #define colliding_name api_colliding_name
    #include <api>
    #undef colliding_name
    #define colliding_name api2_colliding_name
    #include <api2>
    
    This will have to be done for each name that collides, and could break autocompletion on some scripting environments.
  • Patch the files in a precompile step.
  • Fork the repos and fix the issue for good.

How can I update to the latest taunts?

I know the Heavy has more taunts than what's currently shown**, so how can I get my tf2itemsdb to actually give me all up to date.**

I'm sure it'll help others as well. I'm new to this so please pardon me!

Exception reported: Item is NULL

I'm not sure what I did wrong when it came to installing the plugin since I did it exactly as the instructions said, but I keep getting this error whenever I select any taunt:

[TF2ITEMS] ---------------------------------------
[TF2ITEMS] >>> szClassname = tf_wearable_vm
[TF2ITEMS] >>> iItemDefinitionIndex = 167
[TF2ITEMS] >>> iEntityQuality = 6
[TF2ITEMS] >>> iEntityLevel = 1
[TF2ITEMS] ---------------------------------------
[SM] Exception reported: Item is NULL. File a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
[SM] Blaming: tf2_taunts_tf2idb.smx
[SM] Call stack trace:
[SM]   [0] TF2Items_GiveNamedItem
[SM]   [1] Line 58, /home/travis/build/fakuivan/TF2-Taunts-TF2IDB/addons/sourcemod/scripting/include/tf2_taunts_tf2idb/taunt_enforcer.inc::CTauntEnforcer.ForceTaunt
[SM]   [2] Line 222, /home/travis/build/fakuivan/TF2-Taunts-TF2IDB/addons/sourcemod/scripting/include/tf2_taunts_tf2idb/tf2_taunts_tf2idb.inc::CheckAndTaunt
[SM]   [3] Line 282, /home/travis/build/fakuivan/TF2-Taunts-TF2IDB/addons/sourcemod/scripting/tf2_taunts_tf2idb.sp::MenuHandler_TauntsSelfMenu

pRoJeCt dEd?

I haven't found enough time/motivation lately to continue updating this. Ironically this doesn't mean much for the current functionality this plugin provides, as gamedata files can be swapped and taunts are fetched from APIs, so no recompilation or code changes are needed. The main reason why I wouldn't want to touch it is because of how cancerous the build process is. I should have done something simpler but my OCD got the best of me back then. Also I don't enjoy coding on sourcepawn that much.

First thing I'd do would be to change the build process to something that's simpler, maybe make or a simple bash script, and easy to do CI with. Then update the environment so compiling, and uploading to a server from vscode (my preferred editor, supports sourcepawn via an extension) is easy to do. I don't care much about making a build script for windows, WSL works fine.

As is the case for all sourcemod plugins, licensing allows for anyone to fork and change stuff as they please. I'll keep watching this for pull requests and maybe doing code review once in a while.

Plugin fails to load properly, suggests installing latest version

I've installed this plugin on a dedicated server, but every time I try to load it, it says L 04/10/2023 - 14:00:52: [tf2_taunts_tf2idb.smx] Failed to initialize taunt cache: TF2IDB Not loaded. L 04/10/2023 - 14:00:52: [tf2_taunts_tf2idb.smx] Halting user interface initialization. Plugin loaded but updater not found. L 04/10/2023 - 14:00:52: [tf2_taunts_tf2idb.smx] Try using the latest version from here https://github.com/fakuivan/TF2-Taunts-TF2IDB .
SourceMod says the plugin loaded successfully, but it doesn't seem to work. sm_taunt_list results in getting an "Unknown command" error. I am also entirely sure I have installed the latest version of the plugin from this repository.

Plugin calls schema API before it's ready

If both this plugin and tf2idb load at the same time, natives exposed by the latter access data not initialized, that should be initialized later OnPluginStart.

Solution: move initialization process of this plugin from OnPluginStart to OnAllPluginsLoaded.

Add compatibility with TFEconData

nosoop/SM-TFEconData queries the game for items. Much less of a hassle for end users, but it carries a hefty amount of offsets and signatures that has to be kept in sync. In fact, in the readme there's an example for getting taunt data.

Typo on version string

This mismatch between the "latest version" string reported by the updater file and the version string reported by the plugin makes the updater try to update the plugin every time it checks for updates

TF2IDB Database Creation

I have the python script pointed to my tf2 server my sqlite folder and my items_game.txt they are in the default locations. May someone help me out with database creation I really want to play around with taunts. Also I forgot to say when I run it the database it creates but it's not actually a database just a .txt file with a tiny tiny bit garble only 60 kb large and the sample database is over 1400 kb.

Unknown command: "sm_taunt_list"

so, i've installed all the requirements for the taunts plugin, i double-checked everything, but for some reason, its always giving unknown command: "sm_taunt_list"

and when i put the command: sm plugins load tf2_taunts_tf2idb
it says Plugin tf2_taunts_tf2idb.smx is already loaded.
but, when i execute the command sm_taunt_list
it appears unknown command: "sm_taunt_list"

anyway, i'll go to sleep and i'll answer ASAP, well, if you answer me

Commands not responding

Just installed the plugin on the server i develop, triple checking everything is in its correct place.

Typed "sm plugins load tf2_taunts_tf2idb" into console, and it continues to say its loaded. But once on the server ingame, i go to test it out, via command, and nothing happens, therefore i went back, checked everything again, still no change.

Really stumped on this now. and seriously started to frustrate me

PLease advise and help

Add handlers on initialization

Since the updater plugin only tracks active plugins, If this enters fail state on gamedata / cache creation error the updater won't try to update it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.