Coder Social home page Coder Social logo

fionafibration / team-frotress-2 Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 0.0 12.2 MB

Controls smart sex toys based on kills, Uber, and more in Team Fortress 2

License: GNU General Public License v3.0

Python 0.64% ReScript 99.36%
gaming gaming-software sex-toys

team-frotress-2's Introduction

Team Frotress 2

Controls smart sex toys based on kills, deaths, and uber in Team Fortress 2, using the Intiface Central backbone to connect to hardware

Linux suppport is currently slightly broken pending further testing

Uber tracking requires the use of the OMPHUD-sexy edit

WARNING - Use only in private lobbies / servers with consenting players, and test your strengths before using them. The default values are ad-hoc and not suitable for every person or device

Features

  • Custom vibration strength and time for kills, death, using Uber, and passing milestones of Ubercharge percent
  • Multipliers for critical kills, killstreaks, and "Uberstreaks"
  • Execute custom TF2 console commands when vibration starts and stops

Planned features

  • Support for further features involving config file scripting, such as weapon & class specific functionality
  • Support for assist tracking features (if anyone knows a good way to do this please reach out!)

Setup

Copy config_default.py to config.py (you will have to create this file in the same directory as config_default.py) and fill out your game executable and console.log paths (console.log will be in tf folder)

If you want medic functionality, install OMPHUD-sexy on your game, make sure every class config has $classname in it somewhere, i.e. medic.cfg has a line $medic, heavyweapons.cfg has a line $heavyweapons.

Note that usernames with non-ascii characters cannot be used at the moment.

Customising for multiple devices/motors

Edit the run_buzz method in vibration_handler.py to your liking

team-frotress-2's People

Contributors

fionafibration avatar semper-lux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

team-frotress-2's Issues

installation problems

Hi i tried my best to follow the instructions and managed to install all the requirements and got the config copied with the path but i run the python file and it just says config not found and i don't know why. I also couldn't find the console.log file i did check in the tf folder and searched it but it wasn't there. Not sure what i am doing wrong. Also it seems to delete the stuff i paste into the config file on launch for some reason.

Trouble Installing

image

I'm completely new when it comes to installing stuff like this, so it seems like I may need a bit of a more thorough explanation :(. So far I've just tried copying "config_default.py" into config.cfg (I don't have a config.py file anywhere) and I've put a "console.log" file in my tf folder. I don't have any indication on Intiface that recognizes Team Fortress 2 is connected. Do I need to do anything with the other files?

Cannot grab usernames with non-ascii characters

I've tried a few times to get this working but it always seems to hang on "Getting name". There are also a number of warnings about syntax before it starts running, alongside a strange RCONMessage line. Despite Intiface Central being open the whole time it needs me to press enter twice to register, and after around 10 seconds on "Getting name" it disconnects.
image

File Not Found Error

So I've installed all of the requirements listed in 'requirements.txt,' but now it says I am missing a certain file.
error

Resolution Checking

Currently, the project supports only 1920x1080. For now, we no longer have much interest in expanding the support of this. However, we do need to actually check on Windows if this resolution is being used for Uber functionality. So we need to do a few things:

  1. Check resolution in Windows
  2. Make the codebase less jank for the pixel checks
  3. Only force use of custom HUD if user is wanting Uber functionality
    More specifically on 2, I'd like to shove all the pixel calibration and such out of main or at least out them all in one function.

Mod only restricted to 1920x1080 resolution ?

Hi there, I've been trying to try your mod on the native Linux version Team Fortress 2 (And saw that Linux support was difficult at best). I got an intriguing error, and would like an explanation on it.
I'm an Ultrawide user. My moniyor has a ratio of 21:9 and a resolution of 3440x1440. Configuring everything well made the main.py stop working with an error about only supporting the 1920x1080 resolution. Why ?
I did tried to manually change the game resolution in windowed to that one and even restarted it to be sure it would be catched by the script but it didn't changed anything.
Do I do something wrong ? Did the script actively enforce the need of the custom HUD despite not wishing to get the medigun counter ?
I'm fairly confused about it.

Installation

Hello there! I am completely clueless about how the installation works. Could there be something like a tutorial vid? Since the whole part with config.py is confusing me since I don't have it, sorry if I am a total moron, but that's how I am :3

WinError 10061 when attempting to use omphudsexy

The program works fine without the hud, but once I add omphudsexy to my custom folder, doing the main menu confirmation provides the following:

Wait until TF2 has made it to the main menu, then press enter

Traceback (most recent call last):
  File "c:\Users\Max\Downloads\team-frotress-2-main\team-frotress-2-main\main.py", line 266, in <module>
    rcon.connect()
  File "C:\Users\Max\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\valve\rcon.py", line 464, in wrapper
    return function(instance, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Max\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\valve\rcon.py", line 464, in wrapper
    return function(instance, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Max\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\valve\rcon.py", line 483, in connect
    self._socket.connect(self._address)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

This is my config.py:

TF2_GAME_EXECUTABLE = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Team Fortress 2\\tf_win64.exe"
TF2_CONSOLE_LOG = "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Team Fortress 2\\tf\\console.log"
TF2_EXTRA_LAUNCH_OPTIONS = "-novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars -noquicktime"

INTIFACE_SERVER_ADDR = "ws://127.0.0.1:12345"  # The address intiface central is listening on

RCON_PORT = 2541  # Change if you have another port interfering

# Binds custom weapon switching functionality to track weapon changes
ENABLE_WEAPONSWITCH = True

UPDATE_SPEED = 5  # Speed in updates per second, values higher than 10 are not recommended for performance

BASE_VIBE = 0.0  # Base vibration speed that motor will always be on

ACTIVATE_COMMAND = ""  # TF2 console command to execute when vibrator is turned on
DEACTIVATE_COMMAND = ""  # Command to execute when vibrator is turned off

KILL_STRENGTH = 0.3  # Base kill vibration strength (0 to disable)
KILL_TIME = 1  # Kill vibration time

KILL_CRIT_STRENGTH_MULTIPLIER = 2.0  # Crit kill vibration multiplier
KILL_CRIT_TIME_MULTIPLIER = 1.0  # Crit kill time multiplier

# When at KILLSTREAK_MAX, vibration strength is KILL_STRENGTH * KILLSTREAK_STRENGTH_MULTIPLIER
# When you get first kill, vibration strength is KILL_STRENGTH * 1.0
KILLSTREAK_STRENGTH_MULTIPLIER = 2  # Amount that reaching KILLSTREAK_MAX should multiply strength
KILLSTREAK_TIME_MULTIPLIER = 1.5  # Amount that reaching KILLSTREAK_MAX should multiply time

KILLSTREAK_MAX = 20  # Max killstreak for scaling

DEATH_STRENGTH = 0.1  # Death vibration strength
DEATH_TIME = 1  # Death vibration time

UBER_ACTIVE_STRENGTH = 0.5  # Uber activation vibration strength (0 to disable)
UBER_STREAK_MULTIPLIER = 1.1  # Multipies uber strength by this per uber

UBER_MILESTONES = [25, 50, 75, 99]
UBER_MILESTONE_STRENGTH = 0.2  # Uber milestone passed vibration strength (0 to disable)
UBER_MILESTONE_TIME = 1  # Uber milestone vibration time

# When you pass the highest milestone, this will multiply UBER_MILESTONE_STRENGTH / UBER_MILESTONE_TIME
# When at the lowest milestone, multiplier will be only 1.0
UBER_MILESTONE_STRENGTH_MULTIPLIER = 1.0
UBER_MILESTONES_TIME_MULTIPLIER = 1.0  # See above

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.