Wake of Gods Forum | Форум Во Имя Богов
Creature Bank Creator for ERA 3 - Printable Version

+- Wake of Gods Forum | Форум Во Имя Богов (http://wforum.heroes35.net)
+-- Forum: Герои Меча и Магии 3.5 WoG/ERA (/forumdisplay.php?fid=99)
+--- Forum: Моды (/forumdisplay.php?fid=104)
+--- Thread: Creature Bank Creator for ERA 3 (/showthread.php?tid=5657)


Creature Bank Creator for ERA 3 - PerryR - 26.06.2020 00:25

Creature Bank Creator for ERA 3

Image: allcb09kj7.png

Thanks to Berseker and his new release of ERA 3 I was able to create a script/mod that allows to turn map objects into creature banks.
The goal of the project was to simulate a fully functional CB with only ERM code. This script will allow modders to easily create new CB and distribute them.
My hope is that creative people will use it and share their work or port creature banks of HotA or Tide of War to ERA, so they are available for everyone.

What is currently possible with this script:
- turn most objects available in the map editor into a CB. Transmuted objects can lose their original functionality, so I recommend to use blank objects for now.
- you can set custom sounds and battlefields
- replace map objects with your new CB, so they will appear on random maps
- fully flexibility by setting type of guards and number of guards
- setting a lot of possible rewards.
- CB can spawn in different sizes (Small,Medium,Large,Huge)
- CB can be revisited
- CB guards can grow over time

Current template version is 1.04. So please report bugs so I can improve it. In theory, this template can be expanded with anything you can imagine. Ofc if you are good with ERM you can even add your own scripts.
How much more time I will invest depends on your feedback and reports.

I made a video that explains how this template should be used:
How to create new creature banks in a few minutes with ERA 3

How to use this template in short:
1) Download Mod and activate in Mod Manager
2) Open Map Editor and look for an object that should become your CB
3) Place that object on your test map
4) Open ERM Editor and load one of the blank templates New_CB_000.erm
5) Make all settings in the erm file. until line 130 *Start of Script*
6) Save and start your map. Test if all settings work by visiting your CB with a hero
7) If you want to use your CB on a random map look for objects that should be replaced. Choose up to 6 different ones. Also, place these on your test map and check if they get replaced correctly. The yellow square should match in the coordinates. If it does not use the x-Offset setting until it does. This will prevent unaccessible CB
8) For new CB use a new template with a different number

Keep in mind that this Mod requires at least ERA 3 to work.

Template version 1.04
Download: Dropbox

I know that the newest ERA is still in development and not widely used but this will change in the future. So please see this as a long term project.
Many thanks to Berserker for his support and ERA!

Edit:
Some fresh impressions from VMaikos Third Upgrade Mod.
Creature Banks from hota are now 1:1 available also for ERA.
Isnt that great 119

Image: expshoprewardg7k7t.png Image: expshopcakk2.png Image: ivorytowerfightomj7u.png Image: ivorytower97jjm.png Image: picketfighttvkjh.png Image: picket2njt1.png Image: allcb09kj7.png Image: churchyardfight2vja6.png Image: churchyardkykfv.png Image: expshopfightnpkkz.png


RE: Creature Bank Creator for ERA 3 - Berserker - 26.06.2020 02:59

PerryR, congratulations with the first release! 132


RE: Creature Bank Creator for ERA 3 - PerryR - 24.07.2020 21:49

Updated the first post with some fresh images.
Turns out the script really works, who would have thought that 120
Big thanks to VMaiko for showing the potential of the template!

On the next weekend I will update the templates with some improved functionality.


RE: Creature Bank Creator for ERA 3 - V_Maiko - 24.07.2020 21:57

I didn't waste any of the scripts, it's more, it seems that I fell short, I look forward to the new functions that you will bring us, your script is revolutionary in ERA for allowing us new playable content 96-copy


RE: Creature Bank Creator for ERA 3 - PerryR - 25.07.2020 14:51

Updated and Reuploaded Beta 2

Image: redtowerouj2q.png

Changelog:

- New: now set up to 4 different Artifacts as a reward
- New: now set all Resources as a possible reward
- New: Set up to two creatures as a possible reward
- New: Set a range x1-x2 as possible creature/artifact as a reward. For example, give only Castle creatures as rewards.
- New: Set custom text when visiting already cleared creature banks
- Removed WoG Scripts dependency by removing all macros
- fix that some CB showed incorrect name after map creation
- fix Gold Reward could be given to the wrong player
- fix Setting the First creature to -1 now does not give erm error
- fix different size option should now work again


Currently, if you set several different rewards they are processed one after each other, after clearing the CB. A multipurpose dialogue can be created were for example Experience and Creatures show up with pictures in one window. To program a flexible dialogue that does all that automatically and covers all possible cases is nearly impossible. It's much easier if you know exactly what your CB should give and script it accordingly. On request so to say.


RE: Creature Bank Creator for ERA 3 - Raistlin - 02.01.2022 12:11

Hello PerryR, I have got many problems because of the patch in this script... It would be better if you to change it this way:


I have already tested it in my mod, and it works without problems.


RE: Creature Bank Creator for ERA 3 - Raistlin - 02.01.2022 21:38

Btw, you can also optimize playing of custom sounds:



RE: Creature Bank Creator for ERA 3 - Berserker - 02.01.2022 22:47

Quote:!!VRz9:S^MYSTERY.WAV^;
!!VRz8:S^Mystery.wav^;
Omg! use !!FU(StrToLower) instead or check for mystery.wav and mYstery.wav too! )


RE: Creature Bank Creator for ERA 3 - Raistlin - 02.01.2022 23:19

Oh, I did not know that we have this function in ERM Sorry Thank you!


RE: Creature Bank Creator for ERA 3 - Berserker - 03.01.2022 01:21

Mods\Era Erm Framework\9999 era - stdlib.erm




RE: Creature Bank Creator for ERA 3 - V_Maiko - 03.01.2022 06:10

Thanks to your help Berserker, Raistlin, this small problem related to the sounds of the objects will surely be solved, there are cases where mystery.wav is played together with the custom sound when you visit the object, other times (eg Warehouses), or default object lacks mystery.wav when visiting Yes


RE: Creature Bank Creator for ERA 3 - PerryR - 03.01.2022 07:57

Raistlin,
thanks for the suggestion, I can change the code that disabled the sound, np. To be honest Iam not even sure if it is needed at all, if you use a different trigger to replace objects, you can refrain from using it completely.
Will we see some new creature banks from you 174 ?

V_Maiko, I wasn't aware that there is such an issue, only now I know. The suggestions from R&B could solve the problem I think.


RE: Creature Bank Creator for ERA 3 - Raistlin - 03.01.2022 10:38

Yes! A cursed chapel, that is guarded by Adepts 174

Quote:To be honest Iam not even sure if it is needed at all, if you use a different trigger to replace objects, you can refrain from using it completely.
I think, it works faster when you do it in "OnAfterErmInstructions". Using "OnEveryDay" will mean, that the trigger with its first check will be called during the whole game. One creature bank will not influence anything, but if there are many it could cause an overload.


RE: Creature Bank Creator for ERA 3 - Berserker - 03.01.2022 11:01

OnAfterErmInstructions is great, because objects replacement occurs even before map is shown. In other cases single trigger checks will no slow down any code significantly. It's a microptiomization.


RE: Creature Bank Creator for ERA 3 - Raistlin - 03.01.2022 11:56

In my opinion it is better to optimize something when you can optimize it Ab


RE: Creature Bank Creator for ERA 3 - Berserker - 03.01.2022 12:01

Quote:Trying to do the optimization too early can be a futile time-waster. Every programmer with a few years' experience or education has heard the phrase "premature optimization is the root of all evil." This famous quote by Sir Tony Hoare (popularized by Donald Knuth) has become a best practice among software engineers.

https://softwareengineering.stackexchange.com/questions/80084/is-premature-optimization-really-the-root-of-all-evil

Image: gzqwj.png


RE: Creature Bank Creator for ERA 3 - Berserker - 03.01.2022 12:07

Но вот что является полезной оптимизацией, так это замена десятков проходов по карте на один. Кажется, Archer пробовал такое событие сделать и спрашивал меня, как узнать размеры любого объекта по ИД.