Кто может помочь - написать dll для Эры, которая подгружает дополнительный lod-файл, указанный в командной строке (или в файле Wog.ini)?
Я подозреваю, что это делается просто, только сам не умею, и не знаю даже как к этому подступиться.
Скрипт, реализующий действие кнопки "Следующий герой" в Эре:
script96.erm
У меня ни запускается ни один из созданных инсталлятором экзешников. Даже те "стандартные" экзешники, которые лежат "Era Софт\Exebuilder", тоже не запускаются - даже в таскменеджере не появляются. В чём же дело? Скачивал полную версию...
Проверь наличие в Data файла SPTRAITS.TXT.
О, с ним заработало. Странно, что в первом посте про него ничего не сказано... Спасибо.
Согласен, нужно было. Это особенность ехе ТЕ и выше. Без файла не грузятся.
Хм. Я же когда-то спрашивал, можно ли этот файл прошивать в лод, чтоб не мешался? Ответ был - да, однозначно... Неужто так трудно было сделать экзешники, чтоб от него не зависели?
A short list of problems we had, maybe I do something wrong?
1) Displaying IF:M messages in a FU77006 trigger seems to screw up the SN:X parameters (stack and side) - maybe when I press Enter to end the display?
2) Using the same yn or y-n variables in an FU77xxx trigger section as in another ERM trigger runs the risk that the values will change between the times when they are set in the other trigger and when they are used in that trigger. That is, an FU77xxx (or some of them) seems to be able to interrupt another trigger in progress without saving and restoring y-variables.
3) Using a z-n variable (e.g., z-1) to set the hint text for a DL item crashes the program. (I think the ERM Help was trying to tell me this, but I wish it had specifically said, don't use z-n variables.)
4) Trying to set a different hint text for a DL item which already has hint text does not change the hint text and usually crashes the program.
5) There are some DL command parameters used in the TPM script90.erm which are not mentioned in the ERM Help. For example, sometimes a 4th, "/1" parameter is used at the end of some commands for which only three parameters are shown in the ERM Help. (I added the /1 in some places and it seemed to help prevent crashes but that may have been a coincidence.)
Quote:1) Displaying IF:M messages in a FU77006 trigger seems to screw up the SN:X parameters (stack and side) - maybe when I press Enter to end the display?
SN:X array of parameters is global. Key press event rewrites the parameters. Solution: save parameters first!
!?FU77006;
!!SN:X?v500/...;
...
Quote:2) Using the same yn or y-n variables in an FU77xxx trigger section as in another ERM trigger runs the risk that the values will change between the times when they are set in the other trigger and when they are used in that trigger. That is, an FU77xxx (or some of them) seems to be able to interrupt another trigger in progress without saving and restoring y-variables.
Valery, remember. Triggers don't save y-vars. Example:
!?CM2;
!!VRy1:S777;
!!HE0:Ed999999/d0; // trigger Level-up
!!IF:M^%Y1^;
!?HL-1;
!!VRy1:S666;
You should not include actions in triggers or your code is not safety. The solution:
!?...;
!!FU@My trigger handler@;
Functions have separate local vars and they are saved.
Quote:5) There are some DL command parameters used in the TPM script90.erm which are not mentioned in the ERM Help. For example, sometimes a 4th, "/1" parameter is used at the end of some commands for which only three parameters are shown in the ERM Help. (I added the /1 in some places and it seemed to help prevent crashes but that may have been a coincidence.)
Once MOP asked about the reasons of DL crash. I found out unmentioned parameter /1, which should always be used. Don't remember that command, but you'll find it, I think.
SAG Wrote:можно узнать подробности про Exec Erm ERA Plugin?
Можно. Позволяет без накладных расходов выполнять ЕРМ из DLL. Для этого должен быть создан ЕРМ-файл с одной функцией и серией пронумерованных команд.
!?FU80000;
!!IF:Mz1; #0 показ сообщения
!!UN:R3/-1; #1 обновление окна
...
Нумерация сугубо добровольная, ибо для вызова команды нужно знать её номер. Вызов ЕРМ кода состоит из двух этапов:
1) На этапе загрузки или старта карты получить адрес функции своей (в примере - 80000).
2) Вызывать в любое время команду по адресу функции и номеру.
Асм мог бы использовать, кстати.
Гм. пока сложно мне представить зачем нужно вызывать ERM из DLL когда обычно процесс обратный...подумаю где это может пригодиться
Например, если тебе надо вызвать только одну erm-команду, вставлять вызов своей функции - слишком громоздко.
Асм почти весь мод пишет в кодах насколько я помню. Пытаться дублировать ЕРМ неразумно, проще его вызывать. У меня была идея писать мод целиком на паскале, вызывая лишь нужные ЕРМ-команды.
Berserker, thanks, it helped.
(11.12.2010 20:45)MOP Wrote: [ -> ]Разбираться с WT и патчем к нему мне обойдётся дорого по деньгам.
За деньги гораздо честнее, согласен.
Valery, glad to hear that
