Objects (omgr_)
3 functions of the host module. Generated from the bf2-rs sources; see the reference index for the cross-game table.
omgr_getObjectsOfType#
host.omgr_getObjectsOfType(typeName)| Fact | Detail |
|---|---|
| Arguments (as parsed) | s@0 |
| Returns | tuple(host.Object) |
| Errors | TypeError (wrong arg type),missing arg,"unknown object type" |
| Original code | bf2_w32ded.exe!0x00535c00, BF2.exe!0x005929d0, BFHeroes.exe (1.89)!0x0066f705 |
| bf2-rs | crates/bf2-server/src/hostfns.rs:504 |
What it does (from the original code). Class id from DAT_00892d58 vt+0x28(name,&id); on failure sets RuntimeError but still builds and returns the (empty) tuple. Objects from ObjectManager (DAT_0089ae48) vt+0x34 whose template class id matches.
Shipped scripts use it like this:
return host.omgr_getObjectsOfType(type)return host.omgr_getObjectsOfType(type)return host.omgr_getObjectsOfType(type)omgr_getObjectsOfTemplate#
host.omgr_getObjectsOfTemplate(templateName)| Fact | Detail |
|---|---|
| Arguments (as parsed) | s@0 |
| Returns | tuple(host.Object) |
| Errors | TypeError (wrong arg type),missing arg |
| Original code | bf2_w32ded.exe!0x00535cc0, BF2.exe!0x00592ad0, BFHeroes.exe (1.89)!0x0066f7a8 |
| bf2-rs | crates/bf2-server/src/hostfns.rs:520 |
What it does (from the original code). Lower-cases name (0x0040c250); objects whose lower-cased template name equals it.
Shipped scripts use it like this:
return host.omgr_getObjectsOfTemplate(templ)return host.omgr_getObjectsOfTemplate(templ)return host.omgr_getObjectsOfTemplate(templ)omgr_getNetworkId#
host.omgr_getNetworkId(...)| Fact | Detail |
|---|---|
| Original code | BFHeroes.exe (1.89)!0x0066ef0c |
| bf2-rs | crates/bfh-server/src/lib.rs:417 |
What it does (from the bf2-rs port). host.Object.getNetworkId(obj) (BFHeroes.exe!0x0066e530): argObject(0), the networkable's id, 0 without one. host.omgr_getNetworkId(obj) (BFHeroes.exe!0x0066ef0c) is the same except that it returns NULL with no exception set when the object has no networkable (Python's SystemError).
Shipped scripts use it like this:
return host.omgr_getNetworkId(object)tools/devwiki/refs_python.py · built from bf2-rs e3b4f05 · part of the Battlefield 2 / 2142 / Heroes reimplementation. Not affiliated with EA or DICE.