Wake of Gods Forum | Форум Во Имя Богов

Full Version: Вопросы по моддингу
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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?
Через !!CA:B5/здание можно запретить постройку конкретного здания в конкретном городе.

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

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

UPD: попутный вопрос - как получить стоимость постройки здания? Чёт не могу найти, хотя есть ощущение, что было где-то...
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)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.
(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.
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: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 17:29)Algor Wrote: [ -> ]Через !!CA:B5/здание можно запретить постройку конкретного здания в конкретном городе.

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

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

UPD: попутный вопрос - как получить стоимость постройки здания? Чёт не могу найти, хотя есть ощущение, что было где-то...
Ответил в UN:C
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:26)igrik Wrote: [ -> ]Ответил в UN:C

Огромное спасибо 132
Оформлю функцией для библиотеки
V_Maiko, as far as I know, there is nothing to easily make new creature bank without implementing it from scratch.
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.
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)planetavril Wrote: [ -> ]DO !! (ShowRes) / 0 / 43 / 1: P;
This is wrong.

P.S. I don't see your code
Reference URL's