|
Thread: Alternative Creatures Mod | This thread is pages long: 1 2 · NEXT» |
|
Bersy
Honorable
Supreme Hero
|
posted January 17, 2020 10:14 PM |
|
Edited by Bersy at 20:05, 11 Mar 2020.
|
Extended Dwellings
Name: Extended Dwellings
Version: 1.0.0
Requires: Era 2.9.9+
Download: Extended Dwellings
; Extended Dwellings Mod
; Author: Berserker
; Version: 1.0.0
;
; The mod allows to set up to 4 slots for each town dwelling.
; Each slot can be either an alternative creature or additional creature.
;
; Alternative creature uses native dwelling population, though custom quantity ratio can be set.
; For instance, 1 golem can be bought at the cost of 12 gremlins population. Such slots
; are called alternatives, because you cannot buy max creatures from several alt slots.
;
; Additional slots are not connected to native dwellings population. Their population can be set manually
; via ERM or be increased automatically every week, like it's done for native dwellings.
;
; Use the following documented functions:
; "dex_DwellingPopulation" to set/mofidy additional slots population amount
; "dex_SetDwellingSlotByTownType" to configure slot for all towns of given type.
; "dex_GetDwellingSlotByTownType" to get slot configuration for particular all towns of given type.
; "dex_SetDwellingSlotByTownId" to configure slot for particular town (has priority over dex_SetDwellingSlotByTownType).
; "dex_GetDwellingSlotByTownId" to get slot configuration for particular town (has priority over dex_GetDwellingSlotByTownType).
;
; For old mods, depending on battery.dll plugin, an extra "dex_CA_D" function was added with almost same syntax as CA:D.
; Better use newer API for much easier setup, including real alternative slots and auto-growing population for additional slots.
Example:
!?FU(OnAfterErmInstructions);
!!re i/0/8:;
!!FU(dex_SetDwellingSlotByTownType):Pi/0/0/2/120/-1007;
!!en:;
For each town type assigns to non-upgraded level 1 dwelling one extra slot with standalone auto-growing population of 7 Physic Elementals per week. Build Castle to have 14 elementals per week or 21 with Grail.
!?FU(OnAfterErmInstructions);
!!re i/0/8:;
!!FU(dex_SetDwellingSlotByTownType):Pi/0/0/2/120/5;
!!en:;
Same as above, but elementals are ALTERNATIVE to native creatures and can be hired at ratio 1 elemental at cost of 20 native creatures (5% = 1/20).
____________
Heroes 3 Era and everything for it. Releases folder for releases.
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted January 18, 2020 08:47 AM |
|
|
So If I understand it correctly, this plugin allows third and fourth slots on any dwelling but the growth of the added creatures MUST be directly linked to the growth of the original creature?
Because in my mod, I used the battery plugin to add third creatures that have their own weekly growth, regardless of what you do with the original creatures. This means that it kept growing in its own rate, whether you've build Citadel or Castle, or even wether yoou've recruited the original creatures of the dwelling or not.
Can this new plugin do that sort of thing?
____________
Not idly do the leaves of Lorien fall.
|
|
Bersy
Honorable
Supreme Hero
|
posted January 18, 2020 10:20 AM |
|
|
Nope. It's plugin for truly alternatives, not extra creatures from another source added to normal dwellings dialog. But it's the first version, so I can extend it with new functions. OK, I will add battery functionality in the next version and rename functions.
____________
Heroes 3 Era and everything for it. Releases folder for releases.
|
|
RerryR
Promising
Supreme Hero
Researching Magic
|
posted January 18, 2020 10:42 AM |
|
|
Bersy said: Nope. It's plugin for truly alternatives, not extra creatures from another source added to normal dwellings dialog. But it's the first version, so I can extend it with new functions. OK, I will add battery functionality in the next version and rename functions.
Awesome! When do you actually sleep ?
|
|
Bersy
Honorable
Supreme Hero
|
posted January 18, 2020 11:12 AM |
|
|
|
xericsin
Famous Hero
|
posted January 18, 2020 02:56 PM |
|
Edited by xericsin at 10:09, 19 Jan 2020.
|
Gonna try this for sure!
Edit:
I am experiencing lags between clicking creature dwelling and recruitment window popping. using era2.95, wog+alt creature only.
era2.95 installed over era2.82.
Edit2:
This is very strange. The alt creature mod only has a few function definitions. I cannot imagine how this would be associated with the lag.
Edit3:
I found it is the nested for loops in the OnOpenRecruitDlg function taking too long on my laptop i5-7200U CPU @2.5GHz.
Edit4:
It turns out this section of code is looping for 90000+ times. And what is the (num_iterations)? This section of code seems doing nothing except looping.
|
|
Bersy
Honorable
Supreme Hero
|
posted January 18, 2020 09:59 PM |
|
|
|
Bersy
Honorable
Supreme Hero
|
posted January 19, 2020 10:46 AM |
|
Edited by Bersy at 11:02, 19 Jan 2020.
|
|
Diacris
Tavern Dweller
|
posted March 10, 2020 07:27 PM |
|
|
Link is broken. Could you please post a new one? Perhaps upload it using Dropbox or something more reliable?
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 10, 2020 09:53 PM |
|
|
is it possible to get a version where first parameter is town number, not town type? (useful for emulated town types, like the Jim Vogan's Dragon Peaks?)
|
|
Bersy
Honorable
Supreme Hero
|
posted March 10, 2020 09:58 PM |
|
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 10, 2020 10:16 PM |
|
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted March 11, 2020 08:34 AM |
|
|
Diacris said: Link is broken. Could you please post a new one? Perhaps upload it using Dropbox or something more reliable?
Link is Broken
|
|
Bersy
Honorable
Supreme Hero
|
posted March 11, 2020 08:06 PM |
|
|
|
Bersy
Honorable
Supreme Hero
|
posted March 28, 2020 09:34 PM |
|
|
Quote: So If I understand it correctly, this plugin allows third and fourth slots on any dwelling but the growth of the added creatures MUST be directly linked to the growth of the original creature?
Because in my mod, I used the battery plugin to add third creatures that have their own weekly growth, regardless of what you do with the original creatures. This means that it kept growing in its own rate, whether you've build Citadel or Castle, or even wether yoou've recruited the original creatures of the dwelling or not.
Can this new plugin do that sort of thing?
My answer is outdated. Now you can set independant growth in 1 command. Use -(1000 + growth) for growth parameter. Write me if you have issues. Extended Dwellings script was successfully used Third Upgrades Script. 1 line for each creature setup.
____________
Heroes 3 Era and everything for it. Releases folder for releases.
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted April 08, 2020 04:28 PM |
|
|
Can you please give me a full example on what the script will look like so that I may try and update my mod?
Here's the two types of things that I want:
1) Upgraded Barracks in all Castle towns will have a third slot that sells War Zealots. This creature's growth has nothing to do with the swordsmen and crusaders. The dwelling will sell them both independentely.
2) Upgraded goblins dwelling in all the Strongholds (with or without a mess hall) will have a third slot that sells wolf raiders. These creatures will work as a third upgrade, meaning that if you buy a goblin or hobgoblin the wolf raiders available will be reduced as well (and vice versa).
Can you please post the COMPLETE script that does these things, so that I can apply it for the rest of the towns as well?
____________
Not idly do the leaves of Lorien fall.
|
|
VMaiko
Known Hero
|
posted June 04, 2020 12:01 AM |
|
|
Extended Dwellings should be updated for ERA III.
|
|
Bersy
Honorable
Supreme Hero
|
posted June 04, 2020 01:51 AM |
|
|
|
Bersy
Honorable
Supreme Hero
|
posted June 04, 2020 02:03 AM |
|
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted June 04, 2020 02:40 AM |
|
|
Nice
Brave men never sleep. They code.
|
|
|