Skip to content

thinotmandresy/imaips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Improvement Mod

AI Data Persistent Storage Plugin

This is a UHC Plugin (UPL) made specifically for the Improvement Mod in Age of Empires III. It enables AI scripters to persist data between game sessions using JSON (but in a very rudimentary way because XS is extremely limited).


Table of Contents

  1. File Locations
  2. Functions
  3. Installation
  4. TODO List
  5. Credits & Links
  6. License

1. File Locations

Storage type Path
SPS (Shared) My Games\AoE3 Improvement Mod\AIM\persistent\shared.json
OPS (Owned) My Games\AoE3 Improvement Mod\AIM\persistent\<ai_name>.json

2. Functions

Warning

Please be extremely careful with shared persistent storage: your saves may be corrupted if multiple AIs write at the same time.

// Write to shared storage
bool aiSPSSetBool(string key, bool value);
bool aiSPSSetInt(string key, int value);
bool aiSPSSetFloat(string key, float value);
bool aiSPSSetString(string key, string value);

// Read from shared storage
bool aiSPSGetBool(string key);
int aiSPSGetInt(string key);
float aiSPSGetFloat(string key);
string aiSPSGetString(string key);

3. Installation

Normally, everything is already in the mod so you don't have to do anything. This repository is mainly for development purposes.

4. TODO List

  • Per-AI owned storage (aiOPSSetInt, aiOPSGetInt, etc.)
  • Support for all (non-vector) XS data types
  • Safety checks
  • Delete/clear functions (aiSPSClear(), aiSPSRemoveKey())1

1 There is intentionally no function to delete the persistent files themselves (same as the .personality, .dmp.txt and .lxs files)

5. Credits & Links

6. License

This project is published under the MIT License

About

UHC Plugin for ImpMod to allow persisting data between game sessions.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors

Languages