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 200 250 300 350 ... 373 374 375 376 377 ... 400 407 · «PREV / NEXT»
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted December 22, 2019 09:52 PM
Edited by majaczek at 13:46, 23 Dec 2019.

Quote:
================================================================================
** Grail recruitment **
================================================================================
!?CM1;
; exit if not grail clicked or not mouse key is down
!!CM:F?y99 I?y98; !!FU|y99<>0/y98<>26:E;

!!CA-1:U?y1; y1 - town ID
!!SN:W^RecruitDlgType^/^grail^; mark next recruit dialog as ours
!!RD:Oy1/-1/0/y1; source - current town, destination - current town harrison

!?FU(OnOpenRecruitDlg);
!!SN:W^RecruitDlgType^/?z2 W^RecruitDlgType^/^^;
!!VRz3:S^grail^;
!!FU&z2<>z3:E; it's not our dialog
!!CA-1:U?y1 T?y95; y1 - town id
!!SN:W^town%Y1.numGrailMons^/?y2; y2 - number of monsters in new dwelling

!!VRy94:Sy95 *14;
!!RD:C0/y94/y2/10000; Let it be 1 slot of monsters, custom source with ID 10000
!!RD:M^RecruitDlgType^/^grail^; remember dialog type in dialog memory

!?FU(OnCloseRecruitDlg);
!!RD:M^RecruitDlgType^/?z2;
!!VRz3:S^grail^;
!!FU&z2<>z3:E; it's not our dialog
!!RD:C0/?t/?y1; y1 - number of creatures left
!!CA-1:U?y2; y2 - town id
!!SN:W^town%Y2.numGrailMons^/y1; save new number of creatures



so this is fixed script ( ":" vs ";" fixed also RD:W vs RD:M fixed) ...

but it gives "pure virtual function call" popup when clicking on Grail Building :( image debug

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


Honorable
Supreme Hero
posted December 22, 2019 10:36 PM

I'll try to debug the script, thank you.
____________
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 December 23, 2019 02:12 PM

it seems that problem is with !!RD:O command :(

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


Famous Hero
posted December 31, 2019 09:49 PM
Edited by Orc at 21:54, 31 Dec 2019.

Orc said:
How to make Marius upgrade his demon stack into horned demons? but still having the regular bonuses too.



hello, is there way to make hero have these 2 specialties?

Edit: maybe I should give him Demon specialty before combat and upgrade specialty after it.

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


Supreme Hero
Work at Magic Dimmension
posted December 31, 2019 10:38 PM

Orc said:
Orc said:
How to make Marius upgrade his demon stack into horned demons? but still having the regular bonuses too.



hello, is there way to make hero have these 2 specialties?

Edit: maybe I should give him Demon specialty before combat and upgrade specialty after it.


good idea !
better than mine

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


Famous Hero
posted January 01, 2020 05:00 AM

majaczek said:
Orc said:
Orc said:
How to make Marius upgrade his demon stack into horned demons? but still having the regular bonuses too.



hello, is there way to make hero have these 2 specialties?

Edit: maybe I should give him Demon specialty before combat and upgrade specialty after it.


good idea !
better than mine


what was your idea?

and how would I could both yours and mine?

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


Supreme Hero
Work at Magic Dimmension
posted January 01, 2020 07:18 AM

my idea was changing to upgrade specialty when clicking monster in hero window, then to creature specialty if another button clicked.

my way can handle more upgrade types (and yeah I wasn't first with this idea)

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


Famous Hero
posted January 01, 2020 11:00 PM
Edited by Orc at 08:51, 02 Jan 2020.

majaczek said:
my idea was changing to upgrade specialty when clicking monster in hero window, then to creature specialty if another button clicked.

my way can handle more upgrade types (and yeah I wasn't first with this idea)

thats actually better than my solution. there is small side effect with it is not being able to upgrade in ArmySwapScreen, but I will still take it over my solution (because it will show specialty bonus atck dmg speed etc) and also because it will still increase demon speed for map travel.

so if your solution also work in Army Swap and  work on Castle/Town View, then its 100% better than mine (except little harder coding maybe)


though im equally clueless on how to implement both

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


Promising
Supreme Hero
Researching Magic
posted January 02, 2020 10:00 AM
Edited by RerryR at 20:56, 02 Jan 2020.

Hero_of_Light said:
RerryR said:

Yes to what Atom says, also there will be no universal approach for all skills. They will require vastly different scripts for each skill.

If you want to do with ERM I could help you out with Learning, this requires only a few ERM lines if you know them.


Maybe If these two are easy enough (though it also has to work with hero speacialties as well).

Learning:
Basic: +10 extra Experience (instead of 5%)
Advanced: +15 extra Experience (instead of 10%)
Expert: +20 extra Experience (instead of 15%)

Mysticism:
Basic: +4 Spell Points per day (instead of 2)
Advanced: +8 Spell Points per day (instead of 3)
Expert: +12 Spell Points per day (instead of 4)

If it's not easy, that's OK, thanks for the offer!



Ha nearly forgot :D

Heres the script you wanted. You can test it, hope it still works. Maybe it is a bit more complicated than needed because it's taken from my mod. I assume you know how to change skill descriptions. I want to note that its worth looking at the new available ERA commands to set SS descriptions because they dont require Z-Vars, which is nice ;-)

ZVSE


!?FU(OnGameEnter);                [When we enter a game]

!!FU(SetSecSkillPercent):P21/1/10;          [Set Skillvalue to 10% for Basic Learning]
!!FU(SetSecSkillPercent):P21/2/15;          [Set Skillvalue to 15% for Advanced Learning]
!!FU(SetSecSkillPercent):P21/3/20;          [Set Skillvalue to 20% for Expert Learning]

!!FU(SetSecSkillPercent):P8/1/0; [Set Skillvalue to 0% for Basic Mystic]
!!FU(SetSecSkillPercent):P8/2/0; [Set Skillvalue to 0% for Advanced Mystic]
!!FU(SetSecSkillPercent):P8/3/0; [Set Skillvalue to 0% for Expert Mystic]


**************************Mysticism*********************************************
*Basic: +4 Spell Points per day    (instead of 2)
*Advanced: +8 Spell Points per day (instead of 3)
*Expert: +12 Spell Points per day  (instead of 4)

!?FU(OnEveryDay)&$once$=1/$AI$=0;    [Trigger occuring every day only once]
!!DO(Set_Spell_Points)/0/155/1:P;   [loop thru heroes]


!?FU(Set_Spell_Points);
*** Spell Point bonus ***
!!HEx16:O?y1;        [Checke Hero Owner]
!!FU&y1=-1:E;        [Exit if none]

!!HEx16:S8/?y1; (Check level of Mysticism)
!!FU&y1=0:E;    (Abort if none)

!!FU(Calc_Max_Spell_Points):Px16/0/?y5/1;         [Return Max possible spell points for left Hero]

!!HEx16:I?y7/1;           (get current spell points)

**Set regen Rate**
!!VRy8:S0;
!!VRy8&y1=1:S4;
!!VRy8&y1=2:S8;
!!VRy8&y1=3:S12;

**Add additional SP if Specialists
!!HEx16:X?y50/?y51/?y60/?y60/?y60/?y60/?y60;                                    [Check Hero Speciality]
!!HEx16:E?y52/?y53/1; (Get Level of Hero)
!!VRy54:Sy53:2; [+1SP for 2 Hero levels, this will not give excat number]
!!VRy8&y50=0/y51=8:+y54;                                                      


**Give Spell Points
!!VRy9:Sy8;
!!VRy8:+y7;                         (add current spell points)
!!VRy9&y8>y5:Sy5 -y7;               (if under normal max now, but over after, set to normal after)
!!VRy9&y7>=y5|y8<0:S0;              (if result is normal max, or negative, set to zero)
!!HEx16:Idy9/1;                     (Add hero spell points)


********************************************************************************
!?FU(Calc_Max_Spell_Points);
*x1=Hero Id,  x2=1 double Spell Points   x3=Returns Max Spell Points   x4=1 to only check and not set SP

!!HEx1:S24/?y6;       (Get Intelligence level)
!!HEx1:E?y47/?y48/1;  (Get Hero level)
!!VRy5:S0;

!!HEx1:F?y33/?y33/?y33/?y5; (get knowledge of hero)
!!VRy7:Sy5*10;  (multiply with 10 and save for later :) )
!!VRy5:*10; (multiply with 10)

!!VRy5&y6=3:*2;                         (100% if Expert Intelligence is present)
!!VRy5&y6=2:*3:2;                       (50% if Advanced Intelligence is present)
!!VRy5&y6=1:*5:4;                       (25% if Basic Intelligence is present)

!!HEx1:X?y50/?y51/d/d/d/d/d;                                                    [Check Hero Speciality]
!!if&y50=0/y51=24:;                                                             [Handle Intelligence Specialists]
!!FU(Skill_Value_Database):Px1/24/y48/?y71;                                     [Pass Hero Number, Skill, Hero Level, Return Value]
!!VRy8&y6=3:S100;
!!VRy8&y6=2:S50;
!!VRy8&y6=1:S25;
!!VRy8:+y71+100;                                                                [Add Level Increase +Intelligence percents and than multiply the value with base Spell Points]
!!VRy5:Sy7*y8:100;                                                              [Calc Increases Spell Points Value]
!!en:;

!!VRy5&x2=1:*2;
!!HEx1:I?y6/1;                          (Check Hero Spell Points)
!!VRx3:Sy5;                             [Set Max possible Spell Points to return in x3]
!!HEx1&y5>y6/x4=0:Iy5/1;                (Set hero spell points to Max only if smaller than current SP)


********************************************************************************
!?FU(Skill_Value_Database);
*x1=Hero Number,
*x2=Skill
*x3=Hero Level
*x4=Returned Value
!!HEx1:Sx2/?y10;                        Check for Basic-Expert Skill Level

*Intelligence
!!if&x2=24:;
!!VRy20&y10=1:S25; !!VRy20&y10=2:S50; !!VRy20&y10=3:S100;
!!en:;

!!VRx4:Sx3*5*y20:100;  [5% Increase Per Level of Hero]


********************************************************************************
!?FU(SetSecSkillPercent); SS Werte skill Setzten
; x1 is a skill, x2 is a level (0..3), x3 is a value in objects, for example, 8
!!FU|x1<1/x1=5/x1=7/x1=10/x1>26:E; !!FU&x1>13/x1<21:E; !!FU|x2<0/x2>3:E;
!!VRy1&x1=1:S6547944;  !!VRy1&x1=2:S6548072;  !!VRy1&x1=3:S6547928;  !!VRy1&x1=4:S6548024;
!!VRy1&x1=6:S6547880;  !!VRy1&x1=8:S6547912;  !!VRy1&x1=9:S6547864;  !!VRy1&x1=11:S6548008;
!!VRy1&x1=12:S6547896; !!VRy1&x1=13:S6547992; !!VRy1&x1=21:S6548056; !!VRy1&x1=22:S6547960;
!!VRy1&x1=23:S6547976; !!VRy1&x1=24:S6548104; !!VRy1&x1=25:S6548088; !!VRy1&x1=26:S6548040;
!!VRx2:*4; !!VRy1:+x2; !!VRe1:Sx3:100; !!SN:X?y2 Xe1 X?y3 Xy2; !!UN:Cy1/4/y3;

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


Adventuring Hero
posted January 02, 2020 04:28 PM
Edited by DarkAtom at 16:40, 02 Jan 2020.

RerryR said:

!?FU(Calc_Max_Spell_Points);



Wow, I actually needed that, but never got an answer. Thank you!

EDIT: Sometimes it fails, though.

Hero details:
Andra, level 8 Witch
Specialty: Intelligence
Advanced Intelligence
Knowledge: 3
Max spell points in-game: 50

Function says 51
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

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


Responsible
Supreme Hero
posted January 02, 2020 04:54 PM

Thanks! The Learning thing worked, but the Mysticism didn't. It still is set to 4 spell points. I copied and pasted your script on my own, should I have edited something or was it ready to use?
____________
Not idly do the leaves of Lorien fall.

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


Promising
Supreme Hero
posted January 02, 2020 05:17 PM

Offtopic: Hero_of_light: can you check your HC inbox message?
____________

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


Promising
Supreme Hero
Researching Magic
posted January 02, 2020 05:31 PM
Edited by RerryR at 18:37, 02 Jan 2020.

Hero_of_Light said:
Thanks! The Learning thing worked, but the Mysticism didn't. It still is set to 4 spell points. I copied and pasted your script on my own, should I have edited something or was it ready to use?


Is it possible you are using ERA lower then 2.88?

If yes try replacing
!?FU(OnEveryDay)&$once$=1/$AI$=0;    [Trigger occuring every day only once]

with

!?TM2&$once$=1/$AI$=0;    [Trigger occuring every day only once]

Edit: @Atom I think I know why...
Edit: No I dont know why

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


Adventuring Hero
posted January 02, 2020 06:20 PM

Can Xeron's specialty be modified entirely?

Xeron's specialty:
Devils and Arch Devils recieve +4 attack, +2 defense and +1 speed.

The first 2 can be set (or unset) with:
!!HE155:X4/54/4/2;

How can you remove that speed bonus? HE:X4 only allows modification of attack, defense and damage, no mention of speed.
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate

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


Responsible
Supreme Hero
posted January 02, 2020 06:31 PM

Thanks, it (kinda) works now. I use a previous version of ERA II because I heard that my mod has some issues with the new update so I didn't upgrade to it.

The reason I said kinda works is that it doesn't seem to work properly with the Mysticism speciality. I run a test and a 10 level hero with Mysticism speciality should get a 50% bonus, meaning that his spell points should be increased by 12+6=18 spell points. However, it was increased by 15, which does mean that there's a bonus involved but only half of what is expected. At level 20, his bonus should go to 100% which would mean that the spell points should be set to +24. Instead, it is set to +17. I don't know why it's happening like that.  
____________
Not idly do the leaves of Lorien fall.

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


Promising
Supreme Hero
Researching Magic
posted January 02, 2020 06:35 PM
Edited by RerryR at 18:56, 02 Jan 2020.

Hero_of_Light said:
Thanks, it (kinda) works now. I use a previous version of ERA II because I heard that my mod has some issues with the new update so I didn't upgrade to it.

The reason I said kinda works is that it doesn't seem to work properly with the Mysticism speciality. I run a test and a 10 level hero with Mysticism speciality should get a 50% bonus, meaning that his spell points should be increased by 12+6=18 spell points. However, it was increased by 15, which does mean that there's a bonus involved but only half of what is expected. At level 20, his bonus should go to 100% which would mean that the spell points should be set to +24. Instead, it is set to +17. I don't know why it's happening like that.  


Yes the Mysticism speciality case is not covered by this script because I didnt need it. So now it's your turn ;-)
Should not be so hard to add it. Just change the amount regenerated if the hero has the mysticism speciality.

Edit: Wait there was a line try something like this:

**Add regen if Specialists
!!HEx16:X?y50/?y51/?y60/?y60/?y60/?y60/?y60;                                    [Check Hero Speciality]
!!HEx16:E?y52/?y53/1; (Get Level of Hero)
!!VRy54:Sy53:2;      CHANGE AMOUNT HERE
!!VRy8&y50=0/y51=8:+y54;                                                       [Add Spell Points for Mysticism Specialists  Dont know why they need -1?]
*!IF:M^Current Spell Points %Y7 Add %Y8 and Speciality gives %Y54^;

@Hero of Light
When I think about it, it might get complicated in this case. The speciality will still calculate from the old value (4) because it was not changed, unlike learning were it will be correct. So what you can do (and I did in my mod) I set Mysticism to zero and added all Spell Points regenerated with ERM.
In your case this would just mean to change the amount from the "difference" to total amount. And add these lines:

!!FU(SetSecSkillPercent):P8/1/0; [Set Skillvalue to 0% for Basic Mystic]
!!FU(SetSecSkillPercent):P8/2/0; [Set Skillvalue to 0% for Advanced Mystic]
!!FU(SetSecSkillPercent):P8/3/0; [Set Skillvalue to 0% for Expert Mystic]


@DarkAtom
you can consider reducing the speed of Devils by 1 if the battle starts.

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


Responsible
Supreme Hero
posted January 02, 2020 08:26 PM
Edited by Hero_of_Light at 20:27, 02 Jan 2020.

Your response was a bit confusing with all these edits. I added these three lines:

!!FU(SetSecSkillPercent):P8/1/0; [Set Skillvalue to 0% for Basic Mystic]
!!FU(SetSecSkillPercent):P8/2/0; [Set Skillvalue to 0% for Advanced Mystic]
!!FU(SetSecSkillPercent):P8/3/0; [Set Skillvalue to 0% for Expert Mystic]

on top of the script that you gave me and now it doesn't really work, with expert Mysticism it replenished 8 spell points (instead of 12) and with speciality at level 20, it only replenished 9 (I don't know why).

But anyway, could it be made into a percentage skill instead? There's a WoG option that allows that but has a lot of annoying other parts as well (like learn next week's monsters etc).

Could it just be made to get 5% spell points with Basic, 10% with Advanced and 20% with Expert? This might work with a specialty as well, as it is a percentage and not a fixed bonus.
____________
Not idly do the leaves of Lorien fall.

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


Promising
Supreme Hero
Researching Magic
posted January 02, 2020 08:47 PM
Edited by RerryR at 21:01, 02 Jan 2020.

Sure you can make anything you want, you have all the base work.
Now it's just about changing the numbers.

When you say it regenerates only 8 Spell Points than it works as intended because you set the base regeneration from Mysticism to 0, before it was 4 points at Expert. (4+8=12).

So all you have to do is change the part where it says
"**Set regen Rate**" to your numbers.

And No, to my best knowledge you cannot just write

!!FU(SetSecSkillPercent):P8/1/4;
!!FU(SetSecSkillPercent):P8/2/8;
!!FU(SetSecSkillPercent):P8/3/12;  
this somehow does not work.

Okay I will edit my script. Meanwhile you can try to figure out how to implement the correct formula for the Mysticism Specialist to regenerate the correct amount of Spell Points. Today I dont have enough time to do that.

When you make percentage-based regeneration it will not work by default with a specialist, it also has to be scripted.  

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


Responsible
Supreme Hero
posted January 03, 2020 12:54 AM

After a lot of thought and tests, I figured it could be made into this:

Learning is set to this:
*Basic: +5% Experience per day  (as it was)
*Advanced: +10% Experience per day (as it was)
*Expert: +20% Experience per day  (instead of 15)

Sorcery is set to this:
*Basic: +5% Damage  (as it was)
*Advanced: +10% Damage (as it was)
*Expert: +20% Damage  (instead of 15)

This way, the percentage is the same as Resistance and so these three Skills are now grouped in a small way.

Mysticism is set to this:
*Basic: +4 spell points  (instead of 2)
*Advanced: +8 spell points  (instead of 3)
*Expert: +12 spell points  (instead of 4)

And instead of a percentage bonus, since the whole Mysticism Speciality has to be scripted anyway, I thought why not give it a new twist altogether. So, heroes who specialize on Mysticism, now get an additional +1 spell point for each level. This could make you actually choose a hero that specializes in Mysticism for a change.

When you think about it, a 20 level hero who specialized to Mysticism, got a measly 4+4=8 spell points per day, that's like a haste and a slow per turn. Pathetic really.

Now the same hero at the same level will get +12+20=32 spell points which is a Fly and a Town Portal per day for free. It starting to look like a good deal I think. It's not as good as Crag Hack getting a 30+30% Damage on the same level, but still, it could be worthwhile, as you are no longer obligated to rely on towns and wells that much (at least in the endgame).  

Thank you RerryR for this! I will leave the full script here in case anyone wants it.


!?FU(OnGameEnter);                [When we enter a game]

**************************Learning*********************************************
*Basic: +5% Experience   (as is)
*Advanced: +10% Experience (as is)
*Expert: +20% Experience (instead of 15)

!!FU(SetSecSkillPercent):P21/1/5;        [Set Skillvalue to 5% for Basic Learning]
!!FU(SetSecSkillPercent):P21/2/10;       [Set Skillvalue to 10% for Advanced Learning]
!!FU(SetSecSkillPercent):P21/3/20;       [Set Skillvalue to 20% for Expert Learning]


**************************Mysticism*********************************************
*Basic: +4 Spell Points per day    (instead of 2)
*Advanced: +8 Spell Points per day (instead of 3)
*Expert: +12 Spell Points per day  (instead of 4)

!!FU(SetSecSkillPercent):P8/1/0; [Set Skillvalue to 0% for Basic Mystic]
!!FU(SetSecSkillPercent):P8/2/0; [Set Skillvalue to 0% for Advanced Mystic]
!!FU(SetSecSkillPercent):P8/3/0; [Set Skillvalue to 0% for Expert Mystic]

!?TM2&$once$=1/$AI$=0;    [Trigger occuring every day only once]
!!DO(Set_Spell_Points)/0/155/1:P;   [loop thru heroes]


!?FU(Set_Spell_Points);
*** Spell Point bonus ***
!!HEx16:O?y1;        [Check Hero Owner]
!!FU&y1=-1:E;        [Exit if none]

!!HEx16:S8/?y1; (Check level of Mysticism)
!!FU&y1=0:E;    (Abort if none)

!!FU(Calc_Max_Spell_Points):Px16/0/?y5/1;         [Return Max possible spell points for left Hero]

!!HEx16:I?y7/1;           (get current spell points)

**Set regen Rate**
!!VRy8:S0;
!!VRy8&y1=1:S4;
!!VRy8&y1=2:S8;
!!VRy8&y1=3:S12;

**Add additional SP if Specialists
!!HEx16:X?y50/?y51/?y60/?y60/?y60/?y60/?y60;                                    [Check Hero Speciality]
!!HEx16:E?y52/?y53/1; (Get Level of Hero)
!!VRy54:Sy53-1; [+1SP for 2 Hero levels, this will not give excat number]
!!VRy8&y50=0/y51=8:+y54;

**Give Spell Points
!!VRy9:Sy8;
!!VRy8:+y7;                         (add current spell points)
!!VRy9&y8>y5:Sy5 -y7;               (if under normal max now, but over after, set to normal after)
!!VRy9&y7>=y5|y8<0:S0;              (if result is normal max, or negative, set to zero)
!!HEx16:Idy9/1;                     (Add hero spell points)


********************************************************************************
!?FU(Calc_Max_Spell_Points);
*x1=Hero Id,  x2=1 double Spell Points   x3=Returns Max Spell Points   x4=1 to only check and not set SP

!!HEx1:S24/?y6;       (Get Intelligence level)
!!HEx1:E?y47/?y48/1;  (Get Hero level)
!!VRy5:S0;

!!HEx1:F?y33/?y33/?y33/?y5; (get knowledge of hero)
!!VRy7:Sy5*10;  (multiply with 10 and save for later :) )
!!VRy5:*10; (multiply with 10)

!!VRy5&y6=3:*2;                         (100% if Expert Intelligence is present)
!!VRy5&y6=2:*3:2;                       (50% if Advanced Intelligence is present)
!!VRy5&y6=1:*5:4;                       (25% if Basic Intelligence is present)

!!HEx1:X?y50/?y51/d/d/d/d/d;                                                    [Check Hero Speciality]
!!if&y50=0/y51=24:;                                                             [Handle Intelligence Specialists]
!!FU(Skill_Value_Database):Px1/24/y48/?y71;                                     [Pass Hero Number, Skill, Hero Level, Return Value]
!!VRy8&y6=3:S100;
!!VRy8&y6=2:S50;
!!VRy8&y6=1:S25;
!!VRy8:+y71+100;                                                                [Add Level Increase +Intelligence percents and than multiply the value with base Spell Points]
!!VRy5:Sy7*y8:100;                                                              [Calc Increases Spell Points Value]
!!en:;

!!VRy5&x2=1:*2;
!!HEx1:I?y6/1;                          (Check Hero Spell Points)
!!VRx3:Sy5;                             [Set Max possible Spell Points to return in x3]
!!HEx1&y5>y6/x4=0:Iy5/1;                (Set hero spell points to Max only if smaller than current SP)


********************************************************************************
!?FU(Skill_Value_Database);
*x1=Hero Number,
*x2=Skill
*x3=Hero Level
*x4=Returned Value
!!HEx1:Sx2/?y10;                        Check for Basic-Expert Skill Level

*Intelligence
!!if&x2=24:;
!!VRy20&y10=1:S25; !!VRy20&y10=2:S50; !!VRy20&y10=3:S100;
!!en:;

!!VRx4:Sx3*5*y20:100;  [5% Increase Per Level of Hero]


********************************************************************************
!?FU(SetSecSkillPercent); SS Werte skill Setzten
; x1 is a skill, x2 is a level (0..3), x3 is a value in objects, for example, 8
!!FU|x1<1/x1=5/x1=7/x1=10/x1>26:E; !!FU&x1>13/x1<21:E; !!FU|x2<0/x2>3:E;
!!VRy1&x1=1:S6547944;  !!VRy1&x1=2:S6548072;  !!VRy1&x1=3:S6547928;  !!VRy1&x1=4:S6548024;
!!VRy1&x1=6:S6547880;  !!VRy1&x1=8:S6547912;  !!VRy1&x1=9:S6547864;  !!VRy1&x1=11:S6548008;
!!VRy1&x1=12:S6547896; !!VRy1&x1=13:S6547992; !!VRy1&x1=21:S6548056; !!VRy1&x1=22:S6547960;
!!VRy1&x1=23:S6547976; !!VRy1&x1=24:S6548104; !!VRy1&x1=25:S6548088; !!VRy1&x1=26:S6548040;
!!VRx2:*4; !!VRy1:+x2; !!VRe1:Sx3:100; !!SN:X?y2 Xe1 X?y3 Xy2; !!UN:Cy1/4/y3;

____________
Not idly do the leaves of Lorien fall.

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


Responsible
Supreme Hero
posted January 17, 2020 12:21 AM

There are some other small issues I would like to fix in my mod, if anyone is willing to help me with them.

First of all, I would like to know if there's a way to remove a starting Ballista from a hero, without the use of ERM. The reason I am asking is that I changed the specialty of Torosar and Pyre (who both had Ballista as their specialty) into something else, but still they start as a default with a Ballista in their army. I used this command:

!!HE36:A3/4/1/1; [loose: Balista]

And it does work, however there's a problem with it. If you WANT to give the Ballista to these heroes in a map (say via the map editor) you CANNOT because the Ballista will always be erased. I tried editing the HOTRAITS.txt as well and set the Ballista number to 0 (instead of 1) but nothing happens (the Ballista stays on). Since the Ballista is set as a second tier starting creature for these heroes, maybe it could be replaced with another one (gargoyles for Torosar and Gogs for Pyre). But this needs a pluggin to work, so If anyone knows how to deal with this, please help.

Secondly, I have an issue with Jeddite's specialty. In WOG, Jeddite's specialty was changed to builder, which is something that I never really liked anyway, so I made a new specialty for him in my mod. When I start a new game, the specialty description works normal (when I choose him as a starting hero). However, If I start another one (without exiting the game) Jeddite's specialty description reverts to builder. Same goes with Nagash and the Darkness specialty. Both of these specialties were changed in my mod, but they will revert back to original if i start a second game. I don't know why and I don't know what can be done about it. If anyone knows how to fix this as well, I would really appreciate it.

Lastly, there's been some reported issues regarding the battery pluggin (the one that allows 3rd and 4th slots in creature recruiting screens) on newer versions of ERA II. Is there's something that can be done about it? Is there an updated version of the pluggin on the way? Or is it that the script needs editing? The reason I am asking is that I might be able to release a new version of my mod and I would like it to be compatible with the newest version of ERA (if possible). I personally use v7,6 or something and it works fine, but it doesn't seem to work on the recently released v9.
____________
Not idly do the leaves of Lorien fall.

 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 200 250 300 350 ... 373 374 375 376 377 ... 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.3201 seconds