[Server] MBII Chaos V1 [Windows/Linux]

Posts
45
Likes
36
For the last few days I have been working on a Python 3 plugin for MBII server-side and named Chaos below is a bunch of features. I was originally trying to create an ELO and tournament seeding/round robin using blakes_won as a template. I ran into issues where the server.log does not catch duel challenges and wins, only for kills. I am releasing this to the public as I think this could be an opportunity to bring back some of the fun.

The chaos.py script has evolved into a comprehensive RPG-style server management system that integrates character progression, a dynamic economy, and server-state awareness.

1. The Core Progression System​

  • 20-Tier Career Paths: There are 14 distinct career paths (7 Hero, 7 Villain), each containing 20 unique titles that evolve every 2.5 levels.
  • Leveling & XP: Players earn XP through kills and lose a configurable amount upon death[cite: 1, 2]. "Last Stand Protection" prevents XP from dropping below zero.
  • Dynamic Title Logic: The get_title system automatically assigns colors (Cyan for Heroes, Red for Villains) and ranks based on the player's chosen faction and current level.

2. "Smart Switch" Mode Awareness​

  • Duel Mode Restriction (Mode 3): Automatically detects g_authenticity setting and restricts all players to "Jedi" or "Sith" titles, regardless of their chosen career.
  • Open Mode (0, 1, 2, 4): In all other modes, the full diversity of careers (Mandalorian, ARC Trooper, Droideka, etc.) is unlocked.
  • Command Blocking: Prevents players from switching to non-Force careers via !title while the server is in Duel Mode.

3. Economic & Gambling Features​

  • Banking System: Credits are stored in the SQLite players.db. Players earn a passive_credit_gain on every kill.
  • Pazaak (Casino): A fully functional !pazaak game with !hit and !stand commands. Features a 3x payout for hitting exactly 20 and a persistent Dealer Pot.
  • Bounty & Bet Systems: Contributors can pool credits onto a target's head. The process_kill logic automatically sums the dictionary and awards the total to the victor.
  • Peer-to-Peer Transfers: Validated !pay transfers allow players to move capital between accounts safely.

4. Advanced Combat Logic​

  • Killing Spree System: Tracks consecutive kills without dying. Triggers global server announcements at 5 (Killing Spree), 10 (Unstoppable), and 15 (Godlike) kills.
  • Nemesis & Revenge: Tracks "dominance" (3+ kills in a row). Breaking a Nemesis cycle grants a +200cr Revenge Bonus and resets the feud.
  • Force Surge: A 5% chance on any kill to trigger a surge, granting 3x XP.
  • Wealth Redistribution (Theft): Killing a "Wealthy" player (over 5,000cr) automatically steals 5% of their credits for the killer.
  • Bank Heist: A rare 1% chance to "crack the House Vault," stealing 20% of the Pazaak Dealer's credits.

5. Persistent Infrastructure​

  • IP-Based Record Syncing: The database now tracks last_ip. If a player changes their name, the script recognizes their IP and automatically re-links their XP, credits, and titles to the new name.
  • SQLite Backend: Migrated to players.db using clean_name as a primary key. This ensures data persistence across name changes and server restarts.
  • Multi-Port Ready: Uses timeout=20 and conn.commit() logic to allow multiple server instances (different ports) to read and write to the same database file without corruption or locking issues.
  • Robust Regex Parsing: Captures Slot ID, Name, and IP simultaneously to ensure the script always knows exactly who is on the server at any given second.

6. Anti-Grief & Team Protection​

  • Live Team Tracking: The script parses the status command to monitor team assignments (Rebel vs. Imperial) in real-time across all game modes.
  • Traitor Penalty: Automatically detects Team Kills. Instead of rewards, the killer is slapped with a -500 XP and -1000cr penalty, their kill streak is reset, and a global "TRAITOR" announcement is broadcast.
  • Suicide/World Filtering: Sophisticated filtering ignores world deaths (fall damage, map hazards) and suicides to prevent accidental XP loss or reward triggers.
  • Anti-Farming Logic: By validating team IDs before processing rewards, the script prevents players from killing friends on the same team to "farm" XP or credits.

Github Chaos project here.
Github Chaos release here.


Feel free to leave any comments or suggestions.
 
Last edited:
Upvote 0

.biggs

uM Team Mapper
Posts
58
Likes
70
this is cool man grats on completing it.
question; will there be silly hats and capes? I want to spend my money on ssj2 lightning aura
 
Posts
45
Likes
36
Well, I am still doing alot of bug-fixing and moved it to sqlite3 to handle databases easier. This server-side plugin is also good for anyone else wanted to expand or use as template for another project.
 
Top