Skip to content
nyfrk edited this page Aug 22, 2020 · 1 revision

Welcome to the S4ModApi wiki!

This is the API reference. You probably want to start with the ISettlers4Api Interface.

Note this is work in progress! APIs and ABIs may get changed, extended or removed. Please do not link against prerelease builds as their ABI may change and is not maintained for backward compatibility. If you release a mod, make sure that it works with a non-prerelease version of the library.

Here is a step by step article on how to create your first hello world mod.

S4ModApi Reference

Here is a list of functions that are exported by the S4ModApi.dll. Please do not link to functions not listed in this list as they may not be maintained for backward compatibility.

Function Description
READ_AT Read a DWORD safely from memory.
WRITE_AT Write a DWORD safely to memory.
memget_s Read bytes safely from memory.
memset_s Write bytes safely to memory.
FindPattern Find a byte pattern in the virtual address space.
S4ApiCreate Create an interface to the Settlers 4 API that matches your header files.
S4CreateInterface Create an arbitrary interface to the Settlers 4 API.
Clone this wiki locally