โผ Most saved
Fix my code
Free mode
100% free
Freemium
Free Trial
-
1,135242392Released 3mo 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()) ```
Other tools
-
25,967449Released 2y agoFree + from $12/moMino F16๐ 34 karmaJun 12, 2023magnificent. perfect. no errors.
-
13,39591Released 1y agoFree + from $50/yr
-
13,18072Released 2y agoFree + from $490/yr
-
9,82372Released 1y agoFree + from $5
- Spotlight: CodeRabbit (Code reviews)
-
7,30768Released 2y ago100% Free
-
6,31558Released 2y ago100% Free
-
8,47848Released 3y agoFree + from $6.99/mo
-
7,35839v2.0.0 released 8mo agoFree + from $7/moEvery time i switch to a new mac -> this is the first tool i install
-
7,62639Released 2y agoFrom $5
-
6,06938Released 2y agoFrom $3
-
5,11136Released 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
-
6,30927Released 2y agoFree + from $14/mo
- Didn't find the AI you were looking for?
-
1,63625Released 1y agoFree + from $19/mo
-
2,13225Released 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.
-
4,34118Released 1y ago100% Free
-
2,73414Released 2y agoNo pricing
-
1,40612Released 2y agoFree + from $5.40/mo
-
2,99911Released 2y agoNo pricing
-
51011Released 1y agoFree + from $15/mo
-
1492Released 1y agoFrom $3.69
-
3411Released 2y agoNo pricing
Post