▼ Latest
Fix my code
Free mode
100% free
Freemium
Free Trial
-
1,230256435Released 4mo ago100% Free```python # trainer_emulator.py import sys import os from PySide6.QtWidgets import ( QApplication, QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel, QListWidget, QListWidgetItem, QLineEdit, QCheckBox, QMessageBox, QFileDialog ) from PySide6.QtCore import Qt # Supported emulators and their cheat file extensions EMULATORS = { "PCSX2": ".pnach", "Dolphin": ".gct", "DuckStation": ".pcsxr", "RetroArch": ".cht", "PPSSPP": ".db" } class Cheat: def __init__(self, name, code, enabled=False): self.name = name self.code = code self.enabled = enabled class Game: def __init__(self, name): self.name = name self.cheats = [] class TrainerApp(QWidget): def __init__(self): super().__init__() self.setWindowTitle("UCT - Universal Cheat Trainer") self.setGeometry(200, 200, 800, 600) self.games = {} self.current_emulator = None self.current_game = None self.init_ui() def init_ui(self): main_layout = QVBoxLayout() # Emulator buttons emulator_layout = QHBoxLayout() for emu in EMULATORS: btn = QPushButton(emu) btn.clicked.connect(lambda checked, e=emu: self.load_emulator(e)) emulator_layout.addWidget(btn) main_layout.addLayout(emulator_layout) # Game selection self.game_list = QListWidget() self.game_list.itemClicked.connect(self.select_game) main_layout.addWidget(QLabel("Games:")) main_layout.addWidget(self.game_list) # Cheat filter/search filter_layout = QHBoxLayout() self.search_box = QLineEdit() self.search_box.setPlaceholderText("Search cheats...") self.search_box.textChanged.connect(self.filter_cheats) filter_layout.addWidget(self.search_box) main_layout.addLayout(filter_layout) # Cheat list with checkboxes self.cheat_list = QListWidget() main_layout.addWidget(QLabel("Cheats:")) main_layout.addWidget(self.cheat_list) # Manual cheat file adder add_file_btn = QPushButton("Add Cheat File") add_file_btn.clicked.connect(self.add_cheat_file) main_layout.addWidget(add_file_btn) # Help button help_btn = QPushButton("Help") help_btn.clicked.connect(self.show_help) main_layout.addWidget(help_btn) self.setLayout(main_layout) def load_emulator(self, emulator): self.current_emulator = emulator self.game_list.clear() self.cheat_list.clear() self.games.clear() # Auto-scan cheat folder (optional) cheat_folder = QFileDialog.getExistingDirectory(self, f"Select {emulator} Cheat Folder") if not cheat_folder: return for file in os.listdir(cheat_folder): if file.endswith(EMULATORS[emulator]): game_name = os.path.splitext(file)[0] game = Game(game_name) try: with open(os.path.join(cheat_folder, file), "r") as f: for line in f: line = line.strip() if line: cheat = Cheat(line, line) game.cheats.append(cheat) except Exception as e: QMessageBox.warning(self, "Error", f"Failed to load {file}:\n{str(e)}") self.games[game_name] = game self.game_list.addItem(game_name) def select_game(self, item): game_name = item.text() self.current_game = self.games.get(game_name) self.update_cheat_list() def update_cheat_list(self): self.cheat_list.clear() if not self.current_game: return for cheat in self.current_game.cheats: item = QListWidgetItem(cheat.name) item.setFlags(item.flags() | Qt.ItemIsUserCheckable) item.setCheckState(Qt.Checked if cheat.enabled else Qt.Unchecked) self.cheat_list.addItem(item) self.cheat_list.itemChanged.connect(self.toggle_cheat) def toggle_cheat(self, item): if not self.current_game: return cheat_name = item.text() for cheat in self.current_game.cheats: if cheat.name == cheat_name: cheat.enabled = item.checkState() == Qt.Checked break def filter_cheats(self): if not self.current_game: return search_text = self.search_box.text().lower() for i in range(self.cheat_list.count()): item = self.cheat_list.item(i) item.setHidden(search_text not in item.text().lower()) def add_cheat_file(self): file_path, _ = QFileDialog.getOpenFileName(self, "Select Cheat File") if not file_path: return try: game_name = os.path.splitext(os.path.basename(file_path))[0] game = Game(game_name) with open(file_path, "r") as f: for line in f: line = line.strip() if line: cheat = Cheat(line, line) game.cheats.append(cheat) self.games[game_name] = game self.game_list.addItem(game_name) except Exception as e: QMessageBox.warning(self, "Error", f"Failed to load file:\n{str(e)}") def show_help(self): QMessageBox.information( self, "Help", "1. Select an emulator.\n" "2. Choose the cheat folder or add a cheat file manually.\n" "3. Select a game to view cheats.\n" "4. Toggle cheats on/off using the checkboxes.\n" "5. Use the search box to filter cheats.\n" "Note: Memory injection is not implemented in this prototype." ) if __name__ == "__main__": app = QApplication(sys.argv) trainer = TrainerApp() trainer.show() sys.exit(app.exec()) ```
Verified tools
-
13,21972Released 2y agoFree + from $490/yr
-
7,39939v2.0.0 released 9mo agoFree + from $7/moRobert Lukoshko🛠️ 1 tool 🙏 25 karmaJan 2, 2025Every time i switch to a new mac -> this is the first tool i install
-
3,06912Released 2y agoNo pricing
-
13,56693Released 1y agoFree + from $50/yr
- Sponsor:Rocket
-
3,13826Released 5mo agoFree + from $15/moCodespell streamlined our development process by automating repetitive backend tasks. It’s intuitive, efficient, and has become a core part of our workflow.
Other tools
-
1602Released 1y agoFrom $3.69
-
9,87872Released 1y agoFree + from $5
-
6,38558Released 2y ago100% Free
-
5,6676Released 2y agoFree + from $4.99/mo
-
6,34727Released 2y agoFree + from $14/mo
-
4,37218Released 1y ago100% Free
-
6,10938Released 2y agoFrom $3
-
43326Released 1y agoNo pricingIt's basically a chatgpt whose profession is life advice. Not bad actually, tried going into more in depth thoughts and situations to see how it handles sensitive stuff and it gave some pretty decent advice. A cool one right here
-
7,33468Released 3y ago100% Free
-
8,49148Released 3y agoFree + from $6.99/mo
-
3551Released 2y agoNo pricing
-
53911Released 1y agoFree + from $15/mo
- Didn't find the AI you were looking for?
-
7,63939Released 2y agoFrom $5
-
1,41612Released 2y agoFree + from $5.40/mo
-
1,70025Released 1y agoFree + from $19/mo
-
2,74914Released 2y agoNo pricing
-
5,30036Released 2y agoFree + from $39.99/moyou cannot try the software. you waste lot of time downloading/installing, and the app doesn't let you repair... not even one damaged file
Post

