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: ERM help and discussion
Thread: ERM help and discussion This Popular Thread is 407 pages long: 1 50 100 150 ... 186 187 188 189 190 ... 200 250 300 350 400 407 · «PREV / NEXT»
JimV
JimV


Responsible
Supreme Hero
posted February 18, 2013 04:30 PM

Thanks for the thanks (not everyone here does it, and it is encouraging).

ERM Help 3.58f updates:

BA:S? warning and alternate procedure added.

Some changes to the BF obstacle table:

Obstacle numbers 1 and 2 were switched in the table (Dino2 is #1 and Dino3 is #2).

Obstacle numbers 40 and 41 were switched similarly.

Obstacle 45 has a slightly different pattern of impassable (R) hexes than was previously shown.

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


Supreme Hero
Heroes 3 Fan
posted February 19, 2013 05:12 PM

Can anyone have script, that we can rally creature dwelling to our race also training troops in hero screen and upgrading troops in window like in Empire World IV.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 19, 2013 06:35 PM
Edited by Salamandre at 18:41, 19 Feb 2013.

@Zmudziak, the scripts you need are in tew4/data/s folder.

__________________________


I ran into a complicate to fix bug for tew4. If convert any town to inferno type the new  town will not recognize the extra growth from owned creature dwellings on map, but will recognize any you flag further.

Solitaire suggested long time ago to unflag owned dwellings, run through them again then flag again, or delete/replace them. Both solutions did not give any different result.

As I see it, we have two options: a) set growth manually on seventh day  -when click on end turn- b) add creatures on first day according on how many dwellings out there are. The problem is that erm scripts run after Heroes mechanics, and keeping track of how many creatures were not yet bought for each town and the regular growth from recognized dwellings looks impossible. At end game we finish with 10 inferno towns, every one having a different growth. I am open to any idea.


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


Supreme Hero
Heroes 3 Fan
posted February 19, 2013 07:27 PM

how can i get this cript to work, i put script to wog\data\s and i don't see any chance.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 19, 2013 08:23 PM

Zmudziak, there is almost no such thing as moving a script from a project to another and get it working just by that.

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


Responsible
Supreme Hero
posted February 19, 2013 08:46 PM
Edited by JimV at 22:22, 19 Feb 2013.

RE: Towns converted to Inferno do not get credit for previously-flagged external (Inferno) dwellings.

My reaction is: that seems like a fair rule to me. So my own preferred solution would be to do nothing. But if that is unacceptable under some circumstances, there is some code in the Dragon Peaks mod which attempts to do something similar, which was to try to give Dragon Peaks the appropriate growth in Dragons (rather than the growth of the same Rampart dwellings). The code would have to be modified, but I think it considers the same issue of how many creatures should have accumulated in a Town barracks, allowing for those previously recruited by the Town owner.

For what it is worth, the code looks like this:

!?TM1; day 1, get last player
!!VRv6:Sc;
!!FU&v6>1:E;
!!OW:C?v2151; save last color

!?TM1; Sunday, last color
!!VRv7:Sc0-1%7;
!!OW:C?v8;
!!FU|v7<>6/v8<>v2151:E;
* get available DP troops at end of week (accurate for all but last color)
!!UN:U98/1/?v1; get total # of Rampart towns on map
!!VRv2:S-1; must initialize v2<0 for "next" search
!!DO6161/1/v1/1&v1>0:P98/1/-1;
!!UN:C5168326/4/2657254; turn on TL triggers
!!IF:V414/1; turn on TL flag

!?TL0&414;
!!OW:C?v9; current player
!!IF&v9<>v2151:V414/0;
!!UN&v9<>v2151:C5168326/4/434630; turn off TL triggers
!!FU&v9<>v2151:E; done
!!UN:U98/1/?v1; get total # of Rampart towns on map
!!VRv2:S-1; must initialize v2<0 for "next" search
!!DO6161/1/v1/1&v1>0:P98/1/v2151; recheck last player for change during its turn

!?FU6161; check all Dragon Peaks for available troops for player x3 (=-1 for all)
!!UN:Ux1/x2/-1/2; put coordinates of next type x1/x2 object --> (v2,v3,v4)
!!CA2:O?y5;get owner
!!FU&y5<>x3/x3>-1:E;
!!CA2:N?z3; get Town Name
!!VRz2:M1/z3/0/11; get substring "Dragon Peak" if Town is a DP
!!FU&z2<>z709:E; exit if not Dragon Peak
* available troops
!!CA2:M1/2/?y1/0 M1/3/?y2/0 M1/4/?y3/0;
!!PO2:V0/y1 V1/y2 V2/y3; save available troops

!?TM1; Monday except day 1 first color
!!VRv7:Sc0-1%7;
!!OW:C?v8;
!!FU|v6<8/v7<>0/v8<>v2150:E;
* grow DP troops except in neutral towns
!!UN:U98/1/?v1; get total # of Rampart towns on map
!!VRv2:S-1; must initialize v2<0 for "next" search
!!DO6162/1/v1/1&v1>0:P98/1;

!?FU6162; check all Dragon Peaks owned by v2151 for available troops, grow 1st color
!!UN:Ux1/x2/-1/2; put coordinates of next type x1/x2 object --> (v2,v3,v4)
!!CA2:N?z3; get Town Name
!!VRz2:M1/z3/0/11; get substring "Dragon Peak" if Town is a DP
!!FU&z2<>z709:E; exit if not Dragon Peak
!!CA2:O?y5;
* available troops
!!if&y5>-1; not neutral--fix growth
!!PO2:V0/?y1 V1/?y2 V2/?y3; get prev. available troops
!!VRy1:+1;
!!VRy2:+1;
!!VRy3:+1;
!!CA2:M1/2/y1/0 M1/3/y2/0 M1/4/y3/0;
!!el; neutral--no growth until owned
!!CA2:M1/2/1/0 M1/3/1/0 M1/4/1/0 M1/6/1/0;
!!en;

It uses TM1 from Tobyn's Universal Timer (all colors, all days). A Dragon Peak has four dwelling, but one of them has the same growth rate as the Rampart Dwelling which it replaces. The troops for the other three dwellings are saved in PO:V0-V2 at the Town location.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 19, 2013 08:51 PM
Edited by Salamandre at 20:56, 19 Feb 2013.

What I mean is that the newly converted inferno does not recognize inferno dwellings on the map (we may have 10 forsaken palaces, none is count then players yell at me is not working as it normally does). Thanks for example, I will look into, I also thought at storing in PO the creatures available but abandoned the idea because it had only 4 values possible, while I need 7.

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


Responsible
Supreme Hero
posted February 19, 2013 10:20 PM
Edited by JimV at 22:36, 19 Feb 2013.

PO:V gives four values of up to 32767. PO:B gives two more with values up to 2147483647 (which is the maximum value of any integer used in Heroes 3). Each of the PO:B's is worth two PO:V's as follows:

To store two numbers, N1 and N2, into PO:B0, set PO:B0 = 46,000*N1 +N2 (N1 and N2 can each be up to 45,999). To retrieve them, N1 = (PO:B0):46000 and N2 = (PO:B0)%46000. (If you need numbers bigger than that, then PO:V won't work. If numbers up to 32,767 are okay, then you can store 8 values in PO:V and PO:B.)

This is easier to see for powers of ten, such as 100. For example, to store three numbers that are less than 100, such as 19, 37, and 46 in a single v-variable, store it as 193,746. E.g.:

!!VRv1:S19;
!!VRv2:S37;
!!VRv3:S46;
!!VRv100:Sv1*100+v2*100+v3; = 193,746

!!VRv1:Sv100:10000; = 19
!!VRv2:Sv100%10000:100; = 37
!!VRv3:Sv100%1000; = 46

P.S. I know what you meant (I think). It still seems quite fair to me. Heroes 3 could have been programmed that way and I wouldn't have complained. It doesn't necessarily give one player an advantage over another player. Anyway, custom maps can have custom rules. Many maps prohibit the use of Fly or Dimension Door, for example.

Edit - I had some 45000 numbers in the first example which should have been 46000.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 19, 2013 10:27 PM
Edited by Salamandre at 22:31, 19 Feb 2013.

That was funny read, I would never find the solution of storing several vars in one because I lack knowledge about further arithmetic operations. Now that I have them written down, thanks, this is an excellent example for other applications as well.

Fair/Unfair: I did not care much after trying to make it work-we have enough of armies-. But people asked about, so at least I wondered about a way. Maybe I will update it, but now I am a bit rusty on erm, no practice for several months.
____________
Era II mods and utilities

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


Promising
Famous Hero
feanor on DF2.ru
posted February 21, 2013 12:42 AM
Edited by OxFEA at 00:43, 21 Feb 2013.

Coming soon:

Spells tweaking:


Skills tweaking (e.g. necromancy):



And not coming not soon:


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


Admirable
Omnipresent Hero
Wog refugee
posted February 21, 2013 01:22 AM

Very interesting, the forgotten spells. Any more info about spells tweaking?

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


Responsible
Supreme Hero
posted February 21, 2013 01:33 AM

Nice graphics. I notice Prayer is at Expert level, while other Water spells are lower-level - similar to the way that Armageddon's Blade gives Expert Armageddon.

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


Promising
Famous Hero
posted February 21, 2013 09:34 PM

Quote:
What I mean is that the newly converted inferno does not recognize inferno dwellings on the map (we may have 10 forsaken palaces, none is count then players yell at me is not working as it normally does). Thanks for example, I will look into, I also thought at storing in PO the creatures available but abandoned the idea because it had only 4 values possible, while I need 7.


A possible solution (not tested):

Have an array of 7 numbers to store number of captured external dwellings, increment corresponding number with each capture (and decrement if enemy captures it).
After converting a town, get town number to v2 and add this code:

!!SN:E7412692/1; GetTowns();
!!VRv2:*360; Calculate offset in towns table
!!VRv1:+v2; v1 is now pointer to town structure
!!SN:E6029904/2/v1/[DwellingLevel]/[NumDwellings];  CorrectTownCreatureGrowth(_TownSetup_ *this, int Level, int Num)

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


Responsible
Supreme Hero
posted February 22, 2013 04:41 AM

Good stuff, as usual. I think the first two arguments are switched in the end comment(2=this, v1=town_setup)?

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


Promising
Famous Hero
posted February 22, 2013 07:23 AM

Uhh, no. The 2 means that the function uses __thiscall convention and "this" in this function is a pointer to town setup. v2*360 is offset of town structure in town table, which added to v1 yelds the address of needed town structure.
Or did I not understand your question?

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


Responsible
Supreme Hero
posted February 22, 2013 04:32 PM

Sorry, I was confused between the "this" and the "this_call" parameter, which I know comes right after the function address. I didn't realize you would use "this" for something else, and thought the "setup" and the "this" referred to two different parameters. (I didn't notice that there was not a comma between them.) Thanks for the explanation.

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


Disgraceful
Undefeatable Hero
posted February 22, 2013 05:18 PM

Quote:
Coming soon:

Spells tweaking:


Skills tweaking (e.g. necromancy):



And not coming not soon:




love the stuff in the 3rd pic. i guess you say, not coming soon, because you're hogging them all to yourself? jk. looks great, and the implications are even better.

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


Supreme Hero
Heroes 3 Fan
posted February 22, 2013 10:20 PM

For dispel helpul spells should be in Water Magic, just like normal dispel.

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


Promising
Famous Hero
feanor on DF2.ru
posted February 23, 2013 12:13 AM

Quote:
Any more info about spells tweaking?

Quote:
I notice Prayer is at Expert level, while other Water spells are lower-level - similar to the way that Armageddon's Blade gives Expert Armageddon.

http://forum.df2.ru/index.php?s=&showtopic=19364&view=findpost&p=579662

Quote:
!?FU4074026 - spell level (none - basic - advanced - expert).

x1 - hero id
x2 - spell level pointer
x3 - hero struct adress
x4 - spell id
x5 - magic school

Also, there are some trigger for mana cost and I plan to add trigger for mana damage.

Quote:
i guess you say, not coming soon, because you're hogging them all to yourself?

it doesn't coming soon because now it's only a pictures in spellbook. No actions, no AI, no legal way to obtain.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 23, 2013 12:35 AM
Edited by Salamandre at 02:29, 23 Feb 2013.

@Solitaire, thanks.

I couldn't get it to work, you mean get town number with CA:U, right?
!!CAx1/x2/x3:U?v2;
!!SN:E7412692/1; GetTowns();
!!VRv2:*360; Calculate offset in towns table
!!VRv1:+v2; v1 is now pointer to town structure
!!SN:E6029904/2/v1/6/15;  CorrectTownCreatureGrowth(_TownSetup_ *this, int Level, int Num)

Tried for testing efreets dwelling, with 15 owned on map.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 150 ... 186 187 188 189 190 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.4342 seconds