Chain Tactics Modding Tutorials

Unit Lister Mod:

  • Set up the headless client (see Installation).

  • Query units with GetUnits().

  • Output names:

using Sovrun.CTServer; class UnitLister { static void Main() { var client = new CTServerContext("http://127.0.0.1:8545"); var units = client.GetUnits(); foreach (var unit in units) { Console.WriteLine(unit.Name); } } }

AI Opponent Mod:

public class RandomAI { private CTServerContext client; public RandomAI(string rpcUrl) { client = new CTServerContext(rpcUrl); } public void MakeMove() { var moves = client.GetAvailableMoves(); var randomMove = moves[new Random().Next(moves.Count)]; client.ExecuteMove(randomMove); } }

Enhance with strategies like minimax for smarter AI.

Last updated