feanor, понял, спасибо. daemon_n, меня когда спрашивают, я первым делом переключаюсь на era iii changelog.txt и вбиваю в поиск SN:B
Code:
[+] Added new ERM command SN:B to work with binary buffers on a low level. It allows to:
- get address of local or static global ERM variable;
- read/write integer/string from/to specific address.
!!SN:B(intAddress) or ?(intVar) or (strVar) or ?(strVar)[/?(addressValue) or (dummy)/$valueAtAddress]
The first argument determines variable address to work with. For strings it's always first string character address, regardless GET/SET syntax.
For floats/ints SET syntax mean value of variable as address. GET syntax means address of specified variable.
!!VR(test:y):S8943200;
!!SN:B(test); means use 8943200 as address
!!SN:B?(test); means use address of (test) y-variable.
!!VR(text:z):S^hello world^;
!!SN:B(text); means use address of (text) first character
!!SN:B?(text); means use address of (text) first character too.
Example:
Let us declare integer y-variable and determine its address to use with external API function.
!!VR(fileHandle:y):S(INVALID_HANDLE_VALUE);
!!SN:B?(fileHandle)/?(fileHandleAddr:y); (fileHandlerAddr) is now address of (fileHandle) variable.
Let us read last savegame name from H3 static buffer
!!SN:B(ADDR_MARKED_SAVEGAME_NAME)/d/?(lastSavegameName:z);
!!IF:M^You last savegame name was %(lastSavegameName)^;
Это удобная замена SN:X хакам для работы с адресами ЕРМ переменных, строками по произвольным адресам и частично аналог UN:C для int32-чисел.