Current time: 20.04.2024, 11:19 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Ваши вопросы по ERM-скриптам
Author Message
XEPOMAHT Offline
Moderators

Posts: 2269
Post: #9076

(30.06.2023 06:55)AnT Wrote:  Как сделать так, чтобы новые созданные объекты (жилища существ, банки существ) генерировались на картах?

Задать им ценность и частоту появления в генераторе карт. Для жилищ этим занимается dwelling.dll, для банков - присутствует в некоторых крупных модах, отдельного плагина никто не делал.
30.06.2023 12:07
Find all posts by this user Quote this message in a reply
AnT Offline

Posts: 33
Post: #9077

Как все это сделать? Никакой инфы не нашлось ни по dwelling.dll (и как им пользоваться) ни в erm-справке.
30.06.2023 12:43
Find all posts by this user Quote this message in a reply
XEPOMAHT Offline
Moderators

Posts: 2269
Post: #9078

(30.06.2023 12:43)AnT Wrote:  Как все это сделать?

В ERM - никак. Поддержка новых объектов карты в генераторе карт может быть добавлена только на уровне кода самой игры.
30.06.2023 13:33
Find all posts by this user Quote this message in a reply
Ethereal Offline

Posts: 342
Post: #9079

(30.06.2023 12:43)AnT Wrote:  Как все это сделать? Никакой инфы не нашлось ни по dwelling.dll (и как им пользоваться) ни в erm-справке.

В Тифоне 2,7 есть текстовый файл с описанием в "Дата".


Космос Просто
Space Room
30.06.2023 15:58
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16485
Post: #9080

Archer30, your code seems to be correct. DefName + ':' + Group Index + '_' + Frame Index + '.png'.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
30.06.2023 16:12
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #9081

Berserker, it doesn't work now for some reason. I suspected the latest era/plugins broke the SN:R functionality, yet after I tested ERA/WND from 3.9 to 3.9.4, I found nothing.

Could you test if it works for you, please?


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 30.06.2023 17:42 by Archer30.)
30.06.2023 17:18
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16485
Post: #9082

I'm really sorry, am lack of time till August, but I would make much simplier test. Just !?PI + redirect some known def frame. Ensure png file exists. If all def png redirections stopped working, it will be easy to detect. I checked the code and it seems to be ok.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
30.06.2023 21:10
Find all posts by this user Quote this message in a reply
AnT Offline

Posts: 33
Post: #9083

(30.06.2023 15:58)Ethereal Wrote:  В Тифоне 2,7 есть текстовый файл с описанием в "Дата".
Спасибо! получилось. Да уж, запрятан он был далеко - так бы и не нашел.
(This post was last modified: 30.06.2023 22:18 by AnT.)
30.06.2023 22:15
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #9084

Berserker, no luck no matter what I try...

In the meantime it seems I cannot restore SN:R to default. What's the correct syntax?
It should play an Age and a poof animation with the code after pressing 1, yet only 2 Ages are played.

Edit:
Fixed by clearing memory before BM:V:
I suppose this should become part of the BM:V procedure.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 05.07.2023 17:40 by Archer30.)
04.07.2023 07:12
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16485
Post: #9085

SN:R only change redirection settings. Settings are applied if resource is not loaded yet. If it's loaded and saved in memory, redirections do not influence it.

Link to resource := LoadResource('name');
....
Free resource
....

Maybe animation defs are not deallocated for some time for performance reasons.

Ok, will test the issue with def frame redirection.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
05.07.2023 15:23
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1117
Post: #9086

What is the quickest way of replacing a number in a sentence by using erm?

For example:
Replace "108" with "52" in the following sentence. “108” may appear more than once in the sentence.
"I have made 108 violins in my whole life, so do the other 108 guys here."

The script should convert the sentence to:
"I have made 52 violins in my whole life, so do the other 52 guys here."


Latest ERA mods and scripts in development - My GitHub
19.07.2023 15:41
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16485
Post: #9087

1) We should write Str_Explode/Str_Split function, splitting string into substrings by string separator.
Str_Replace is implemented via Str_Explode('....', '108') + Array_Join(..., '52')

2) We have to implement string replacement function manually or via dll.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
19.07.2023 22:23
Find all posts by this user Quote this message in a reply
AnT Offline

Posts: 33
Post: #9088

возникли два вопроса:
1) как сменить картинки строений в замке городского холла (файлы HallElemn.def HALLRAMP2.def и т.д.)
2) как изменить названия/описания зданий замка (файла Dwelling.txt)

в самой игре динамически, т.е. не до запуска игры а именно во время.
SN:R и SN:D не помогают, видимо эти ресурсы уже захешировались в памяти.
(This post was last modified: 22.07.2023 15:14 by AnT.)
22.07.2023 15:13
Find all posts by this user Quote this message in a reply
igrik Offline
Administrators

Posts: 2814
Post: #9089

Оба вопроса не решаемы с помощью базового функционала ERM
Только UN:C, только хардкор. А для первой задачи ещё и хукер (перехваты исполняемого кода)

Ты лучше укажи что именно нужно поменять (т.е. составь нормальное ТЗ), тогда шанс, что шарящие помогут, вырастет в разы.

Второй пункт, приблизительно будет выглядеть так


game bug fixes extended.dll || My Plugins || My GitHub
22.07.2023 16:55
Visit this user's website Find all posts by this user Quote this message in a reply
AnT Offline

Posts: 33
Post: #9090

Понятно, жаль...
За пример с Граалем спасибо - но нужно тогда знать каждый конкретный адрес в памяти на каждое строение/описание в каждом городе.

Насчет ТЗ - хотелось менять названия и картинки многих строений, а не только каких-то определенных. Т.е. чтобы было что-то похожее на ресивер SN такого вида:
!!SN:H#towntype(0...8)/#id_здания(0...43)/^новое название строения^/^новое описание строения^;


А возможно ли динамически заменить сразу весь Dwelling.txt на заранее подготовленные Dwelling2.txt / Dwelling3.txt / ... ?
22.07.2023 18:10
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group