Addresses
The game’s address list, by id like player.health. A plugin’s own go under its name. Any thread.
Addresses
Section titled “Addresses”Get it with Api.addresses().
get(id: string): numberresolve(text: string, names: Array<import("salamander").Given<Wraith.Addresses.Name>>): numberadd(entry: import("salamander").Given<Wraith.Addresses.Entry>): voidremove(id: string): voidfind(text: string, names: Array<import("salamander").Given<Wraith.Addresses.Name>>): Wraith.Addresses.FoundsetSources(sources: import("salamander").Given<Wraith.Addresses.Sources>): voidactiveSources(): Wraith.Addresses.Sourcesget(id: string): integerresolve(text: string, names: (Wraith.Addresses.Name)[]): integeradd(entry: Wraith.Addresses.Entry)remove(id: string)find(text: string, names: (Wraith.Addresses.Name)[]): Wraith.Addresses.FoundsetSources(sources: Wraith.Addresses.Sources)activeSources(): Wraith.Addresses.Sourcesnuint Get(string id)nuint Resolve(string text, System.Collections.Generic.IReadOnlyList<Wraith.Addresses.Name> names)void Add(Wraith.Addresses.Entry entry)void Remove(string id)Wraith.Addresses.Found Find(string text, System.Collections.Generic.IReadOnlyList<Wraith.Addresses.Name> names)void SetSources(Wraith.Addresses.Sources sources)Wraith.Addresses.Sources ActiveSources()sal::Result<uintptr_t, Wraith::AddressError> get(std::string_view id) constsal::Result<uintptr_t, Wraith::AddressError> resolve(std::string_view text, std::span<const Wraith::Addresses_Name> names) constsal::Result<void, Wraith::AddressError> add(Wraith::Addresses_Entry entry) constvoid remove(std::string_view id) constsal::Result<Wraith::Addresses_Found, Wraith::AddressError> find(std::string_view text, std::span<const Wraith::Addresses_Name> names) constvoid setSources(Wraith::Addresses_Sources sources) constWraith::Addresses_Sources activeSources() constpub fn get(&self, id: &str) -> Result<usize, wraith::AddressError>pub fn resolve(&self, text: &str, names: &[wraith::AddressesName]) -> Result<usize, wraith::AddressError>pub fn add(&self, entry: wraith::AddressesEntry) -> Result<(), wraith::AddressError>pub fn remove(&self, id: &str)pub fn find(&self, text: &str, names: &[wraith::AddressesName]) -> Result<wraith::AddressesFound, wraith::AddressError>pub fn set_sources(&self, sources: wraith::AddressesSources)pub fn active_sources(&self) -> wraith::AddressesSourcesfn get(self: Wraith.Addresses, id: []const u8) (Wraith.AddressError || rt.Failure)!usizefn resolve(self: Wraith.Addresses, text: []const u8, names: []const Wraith.Addresses.Name) (Wraith.AddressError || rt.Failure)!usizefn add(self: Wraith.Addresses, entry: Wraith.Addresses.Entry) (Wraith.AddressError || rt.Failure)!voidfn remove(self: Wraith.Addresses, id: []const u8) voidfn find(self: Wraith.Addresses, text: []const u8, names: []const Wraith.Addresses.Name) (Wraith.AddressError || rt.Failure)!Wraith.Addresses.Foundfn setSources(self: Wraith.Addresses, sources: Wraith.Addresses.Sources) voidfn activeSources(self: Wraith.Addresses) Wraith.Addresses.Sourcesuint32_t Wraith_Addresses_get(Wraith_Addresses self, sal_string id, uintptr_t *out)uint32_t Wraith_Addresses_resolve(Wraith_Addresses self, sal_string text, Slice_Wraith_Addresses_Name names, uintptr_t *out)uint32_t Wraith_Addresses_add(Wraith_Addresses self, Wraith_Addresses_Entry entry)void Wraith_Addresses_remove(Wraith_Addresses self, sal_string id)uint32_t Wraith_Addresses_find(Wraith_Addresses self, sal_string text, Slice_Wraith_Addresses_Name names, Wraith_Addresses_Found *out)void Wraith_Addresses_setSources(Wraith_Addresses self, Wraith_Addresses_Sources sources)Wraith_Addresses_Sources Wraith_Addresses_activeSources(Wraith_Addresses self)Where the entry with this id is now.
Fails with AddressError.
resolve
Section titled “resolve”Where location text is now. names come before the list’s.
Fails with AddressError. Uses Addresses.Name.
Until it’s removed or the plugin goes. Not saved.
Fails with AddressError. Uses Addresses.Entry.
remove
Section titled “remove”Only the plugin’s own.
Like resolve, saying which copy it was found in. Non-live means the code’s hooked now.
Fails with AddressError. Uses Addresses.Name, Addresses.Found.
setSources
Section titled “setSources”Which copies this plugin’s lookups may use. Defaults to Wraith’s setting; a sig’s Sources(..) wins.
Uses Addresses.Sources.
activeSources
Section titled “activeSources”What this plugin’s lookups may use now.
Uses Addresses.Sources.
AddressError
Section titled “AddressError”What can go wrong, besides Cancelled, Unsupported and Gone.
| Code | Error | |
|---|---|---|
| 1 | NotFound |
|
| 2 | Unreadable |
|
| 3 | InvalidAddress |
Location text that doesn’t parse |
| 4 | InvalidId |
Empty, or has spaces |
| 5 | AlreadyAdded |
|
| 6 | Failed |
Addresses.Name
Section titled “Addresses.Name”A name for an address, like a tweak’s @data, for location text and asm.
A struct, 0x18 bytes, aligned to 8.
| Offset | Field | Type | |
|---|---|---|---|
| 0x0 | name |
string |
|
| 0x10 | address |
usize |
name: stringaddress: numbername: stringaddress: integerstring Name_nuint Addresssal::String nameuintptr_t addresspub name: salamander::Strpub address: usizename: []const u8address: usizesal_string nameuintptr_t addressAddresses.Source
Section titled “Addresses.Source”Which copy of the game’s code an address came from: snapshot is taken at startup, disk is the exe.
An enum of u8.
| Value | Name | |
|---|---|---|
| 0 | live |
|
| 1 | snapshot |
|
| 2 | disk |
Addresses.Sources
Section titled “Addresses.Sources”Which copies lookups may use, tried live, then snapshot, then disk.
A struct, 0x3 bytes, aligned to 1.
| Offset | Field | Type | |
|---|---|---|---|
| 0x0 | live |
bool |
|
| 0x1 | snapshot |
bool |
|
| 0x2 | disk |
bool |
live: booleansnapshot: booleandisk: booleanlive: booleansnapshot: booleandisk: booleanSalamander.Bool LiveSalamander.Bool SnapshotSalamander.Bool Diskbool livebool snapshotbool diskpub live: boolpub snapshot: boolpub disk: boollive: boolsnapshot: booldisk: boolbool livebool snapshotbool diskAddresses.Found
Section titled “Addresses.Found”An address and which copy of the code it came from.
A struct, 0x10 bytes, aligned to 8.
| Offset | Field | Type | |
|---|---|---|---|
| 0x0 | address |
usize |
|
| 0x8 | source |
Addresses.Source |
address: numbersource: Wraith.Addresses.Source | Wraith.Addresses.SourceNameaddress: integersource: Wraith.Addresses.Source|Wraith.Addresses.SourceNamenuint AddressWraith.Addresses.Source Sourceuintptr_t addressWraith::Addresses_Source sourcepub address: usizepub source: wraith::AddressesSourceaddress: usizesource: Wraith.Addresses.Sourceuintptr_t addressWraith_Addresses_Source sourceAddresses.Entry
Section titled “Addresses.Entry”A struct, 0x58 bytes, aligned to 8.
| Offset | Field | Type | |
|---|---|---|---|
| 0x0 | id |
string |
Unique for the plugin |
| 0x10 | address |
string |
Location text, like game.exe+0x1234 or sig("48 8B ??", Rip) |
| 0x20 | offsets |
[]i64 |
Pointers to follow, each one’s offset added after |
| 0x30 | name |
string |
Pointers to follow, each one’s offset added after |
| 0x40 | type |
string |
What’s there, like u32 or a schema type’s name |
| 0x50 | size |
u32 |
Bytes, so addresses inside it are named after it. 0 is just the one. |
id: stringaddress: stringoffsets: Array<bigint>name: stringtype: stringsize: numberid: stringaddress: stringoffsets: (integer)[]name: stringtype: stringsize: integerstring Idstring Addresslong[] Offsetsstring Namestring Typeuint Sizesal::String idsal::String addresssal::Slice<int64_t> offsetssal::String namesal::String typeuint32_t sizepub id: salamander::Strpub address: salamander::Strpub offsets: salamander::Slice<i64>pub name: salamander::Strpub r#type: salamander::Strpub size: u32id: []const u8address: []const u8offsets: []const i64name: []const u8@"type": []const u8size: u32sal_string idsal_string addressSlice_i64 offsetssal_string namesal_string typeuint32_t sizewraith.io · Mods on the Hub · Get Wraith
Made with ♥ by Asgard
