From ad4dc7b0dfaae51db8250b84bb16ffadfb5ba671 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sat, 8 Nov 2025 16:33:02 -0500 Subject: [PATCH] feat: add script to send test entity packets to OverteClient --- tools/inject_test_entities.py | 81 +++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 tools/inject_test_entities.py diff --git a/tools/inject_test_entities.py b/tools/inject_test_entities.py new file mode 100644 index 0000000..0f8aca3 --- /dev/null +++ b/tools/inject_test_entities.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +""" +Simple script to send test entity packets to the OverteClient. +This simulates what the EntityServer would send. +""" + +import socket +import struct +import time + +# Overte packet types (as defined in your C++ code) +PACKET_TYPE_ENTITY_ADD = 0x10 +PACKET_TYPE_ENTITY_EDIT = 0x11 +PACKET_TYPE_ENTITY_ERASE = 0x12 + +def send_entity_add(sock, addr, entity_id, name): + """Send an EntityAdd packet""" + # Packet structure: [type:u8][id:u64][name:null-terminated string] + packet = struct.pack('