Current time: 29.11.2024, 05:06 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Вопросы по моддингу
» (обсуждаем моддинг здесь)
Author Message
V_Maiko Offline

Posts: 610
Post: #1246

Thanks to Typhon, I was able to add a dummy creature bank

The id of the new object is type 16, subtype 21 and is able to generate freely in rmg

Image: Screenshot-1.png
Image: Screenshot-2.png

The funny thing is that it works, and as a test here you will see pikemen with zero amount

Image: Screenshot-3.png

Now the question is, how can I make it functional? I have been told that it is calling "!!CB", but could you help me? I am not good with ERM I would like to test if it is possible to make new Creature Banks work Rolleyes
(This post was last modified: 15.05.2020 09:05 by V_Maiko.)
15.05.2020 08:59
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 792
Post: #1247

V_Maiko,
First you need to get the bank coordinates X,Y,L, and then it will be possible to set up guards and rewards like this:
!!CBx/y/l:G#1/$2/$3 - set a guard creature in slot #1 (0...6), to type $2 and number $3.
You may have to configure all 7 guards slots.
For a missing slots 5,6, use type -1 and qty 0.
!!CBx/y/l:M$1/$2 - set/get/check a bonus creature type $1 and number $2.
!!CBx/y/l:R#1/$2 - set/get/check a resource bonus. Resource type #1 and amount $2. You may set all 7 resources simultaneously.
I will try to write a complete script now.

Something like this:
I have not tested this script, and it requires script 78 wog - wogify.erm to work.

Can I find out how to make such a bank using Typhon?
(This post was last modified: 15.05.2020 10:33 by wessonsm.)
15.05.2020 09:45
Find all posts by this user Quote this message in a reply
Algor Away
Administrators

Posts: 3881
Post: #1248

Через !!CA:B5/здание можно запретить постройку конкретного здания в конкретном городе.

Вопрос: а как проверить, разрешена ли постройка конкретного здания в конкретном городе?

В идеале для города/здания надо получить статус
- Постройка недоступна (запрещена в конкретного городе, типе города, или рядом нет воды для Верфи, или, для Капитолия, отстроен в другом городе)
- Постройка недоступна (потенциально возможна, но нет нужных построек или сегодня уже было что-то построено)
- Постройка недоступна (не хватает ресурсов)
- Постройка доступна

UPD: попутный вопрос - как получить стоимость постройки здания? Чёт не могу найти, хотя есть ощущение, что было где-то...


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
15.05.2020 17:29
Visit this user's website Find all posts by this user Quote this message in a reply
V_Maiko Offline

Posts: 610
Post: #1249

wessonsm, Works! It really works! Now I need to find out how I can put the name of the object, it doesn't work writing in zcrbank.txt. I really appreciate it.

Image: Screenshot-1.png
15.05.2020 18:54
Find all posts by this user Quote this message in a reply
wessonsm Offline

Posts: 792
Post: #1250

(15.05.2020 18:54)V_Maiko Wrote:  wessonsm, Works! It really works! Now I need to find out how I can put the name of the object, it doesn't work writing in zcrbank.txt. I really appreciate it.

Add to your script:
But you may need to add “visited / not visited” to the description, that is, you will need to change the description after visiting the object, and for each player separately, and this is a more difficult task.
Immediately, I can’t write such a script, it takes time.
(This post was last modified: 15.05.2020 21:14 by wessonsm.)
15.05.2020 20:55
Find all posts by this user Quote this message in a reply
V_Maiko Offline

Posts: 610
Post: #1251

(15.05.2020 20:55)wessonsm Wrote:  
(15.05.2020 18:54)V_Maiko Wrote:  wessonsm, Works! It really works! Now I need to find out how I can put the name of the object, it doesn't work writing in zcrbank.txt. I really appreciate it.

Add to your script:
But you may need to add “visited / not visited” to the description, that is, you will need to change the description after visiting the object, and for each player separately, and this is a more difficult task.
Immediately, I can’t write such a script, it takes time.

A friend tried something similar and got the same result, when I visit the creature bank the name does not appear

Code:
!#VRz890:S^Test^;
!#HT16/21:P0/890;

I was underestimating that it was going to be simple but it wasn't, well, I'll see if it's possible otherwise.
(This post was last modified: 15.05.2020 21:21 by V_Maiko.)
15.05.2020 21:20
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #1252

wessonsm, memory-heave script:
!!SN:W^vis%Y1.%Y2.%Y3%Y4^/$;
where y1..y3 are coordinates, y4 - hero id. $ is 0 or 1 SET/GET.


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

Posts: 792
Post: #1253

(15.05.2020 22:15)Berserker Wrote:  wessonsm, memory-heave script:
!!SN:W^vis%Y1.%Y2.%Y3%Y4^/$;
where y1..y3 are coordinates, y4 - hero id. $ is 0 or 1 SET/GET.
Там есть еще один нюанс. Если зайти в банк, но не перебить охрану, то будет отображаться не "посещено/не посещено", а примерное количество оставшейся охраны (толпа, орда, группа и так далее).
Это тоже надо предусмотреть.
В общем, как ни крути, все равно не так просто, хоть и реализуемо.
15.05.2020 22:33
Find all posts by this user Quote this message in a reply
igrik Offline

Posts: 2819
Post: #1254

(15.05.2020 17:29)Algor Wrote:  Через !!CA:B5/здание можно запретить постройку конкретного здания в конкретном городе.

Вопрос: а как проверить, разрешена ли постройка конкретного здания в конкретном городе?

В идеале для города/здания надо получить статус
- Постройка недоступна (запрещена в конкретного городе, типе города, или рядом нет воды для Верфи, или, для Капитолия, отстроен в другом городе)
- Постройка недоступна (потенциально возможна, но нет нужных построек или сегодня уже было что-то построено)
- Постройка недоступна (не хватает ресурсов)
- Постройка доступна

UPD: попутный вопрос - как получить стоимость постройки здания? Чёт не могу найти, хотя есть ощущение, что было где-то...
Ответил в UN:C


game bug fixes extended.dll || My Plugins || My GitHub
15.05.2020 23:26
Visit this user's website Find all posts by this user Quote this message in a reply
V_Maiko Offline

Posts: 610
Post: #1255

Berserker, My new creature bank is functional, but it is very difficult for the game to treat it as one, there is no specific call for blank objects to show; the name when you enter such creature bank and if it was visited or not?
15.05.2020 23:46
Find all posts by this user Quote this message in a reply
Algor Away
Administrators

Posts: 3881
Post: #1256

(15.05.2020 23:26)igrik Wrote:  Ответил в UN:C

Огромное спасибо 132
Оформлю функцией для библиотеки


BattleHeroes Rus/Eng | ERA scripts (+ReMagic) Rus/Eng
16.05.2020 00:38
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #1257

V_Maiko, as far as I know, there is nothing to easily make new creature bank without implementing it from scratch.


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

Posts: 610
Post: #1258

From scratch for sure you will be referring to hardcoding because in my case I was able to create it simply by adding it in zaobjct.txt, zeobjct.txt and zobjct.txt, and if I want I can make it generate freely through this event:


I just need to find out how I can get my new creature bank named and the job will be complete.
16.05.2020 02:35
Find all posts by this user Quote this message in a reply
planetavril Offline

Posts: 87
Post: #1259

I tried to set the priority of city buildings with this script :

[Set building priority]
!? FU (SetBuilding'sPriority);
; x1 - type of city
; x2 - priority (0-43)
; x3 - building number
!! VR y1: Sx1 * 44 + x2;
!! VR y2: S6565572 + y1;
!! UN : Cy2 / 1 / x3;
[Getting priorities of city buildings]
!? FU (GetPriorities);
; x1 - type of city
!! VR v1: Sx1 * 44;
DO !! (ShowRes) / 0 / 43 / 1: P;
!? FU (ShowRes);
!! VR y1: Sv1 + x16;
!! VR y2: S6565572 + y1;
!! UN : Cy2 / 1 / ? y3;
!! IF : M ^% Y3 ^ ;

but it does not work some buildings in the city continue to overlap,

I don't know how to solve this
16.05.2020 03:01
Find all posts by this user Quote this message in a reply
Raistlin Away
Moderators

Posts: 1349
Post: #1260

(16.05.2020 03:01)planetavril Wrote:  DO !! (ShowRes) / 0 / 43 / 1: P;
This is wrong.

P.S. I don't see your code


Создал новый глобальный мод: WoG Ultra Edition
16.05.2020 18:59
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