Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Alternative Creatures Mod
Thread: Alternative Creatures Mod This thread is 2 pages long: 1 2 · NEXT»
Bersy
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Hero_of_Light
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RerryR
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 ?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted January 18, 2020 11:12 AM

Perry, sleepings is for lazybones. Era golems never sleep
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
xericsin
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted January 18, 2020 09:59 PM

Cannot reproduce. Will wait for more reports. Try to install 2.9.5 over clean Heroes, please.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted January 19, 2020 10:46 AM
Edited by Bersy at 11:02, 19 Jan 2020.

I'm really sorry, didn't delete garbage block of code. Reuploaded.
https://dropmefiles.com/kNhwN
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Diacris
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?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
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?)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 10, 2020 09:58 PM

Em, that one?

!?FU(SetTownDwellingSlot);
; Configures monster slot for town with specific ID
; x1 - town ID (same as CA:U)
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted March 10, 2020 10:16 PM

oops yeah :|

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
majaczek
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

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted March 11, 2020 08:06 PM

Updated the first post.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Hero_of_Light
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
VMaiko
VMaiko


Known Hero
posted June 04, 2020 12:01 AM

Extended Dwellings should be updated for ERA III.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted June 04, 2020 01:51 AM

I see, issue with %Vx-like syntax. Will add support for this syntax soon.
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Bersy
Bersy


Honorable
Supreme Hero
posted June 04, 2020 02:03 AM

Issue is fixed, will be mentioned in the next release.
Updated files:
https://dropmefiles.com/tmvgK
____________
Heroes 3 Era and everything for it. Releases folder for releases.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted June 04, 2020 02:40 AM

Nice

Brave men never sleep. They code.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 2 pages long: 1 2 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0557 seconds