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: Several questions about what I can and canīt do with Era
Thread: Several questions about what I can and canīt do with Era This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted September 17, 2016 04:17 PM

Well, the only games where you can control dead heroes are the Zombies games. Not so heroes style.
____________
Era II mods and utilities

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


Famous Hero
posted September 17, 2016 07:49 PM

Heroes actually canīt die So No dead heroes ever exist.
____________

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


Famous Hero
posted September 18, 2016 09:12 AM

Ive learn that changing spell power of a hero during a battle doesnt affect spells.

I was trying to change the duration of spells based on spellpower in another way than a 1-1 ratio.

Is there an easy way to do it? i can accep tmaybe some moment before the battle start to change the spell power of the heroes to match the duration of spells i want.

I know the other solution is to check the stack of creatures that just recieved the spells and change the duration of the spell. (which can be a pain to do in the case of mass spells)
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 18, 2016 09:52 AM

Erm is not a miracle, it can work with the existing mechanics, and of course you can change the spell power OR effect, is specified in manual then I used it intensively to change many things to spells in tew 4. Also I don't see why is a pain to check if mass spells, we have !!DO loop, for that. Is fast and effective.

You can try in BG0, check if hero cast spell, check the spell, put a flag if spell is cast, then in BG1 (after action), check if flag is true, continue if yes, loop all creatures, check if they have the spell applied, in case of immunities, and change the duration of the spell.

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


Famous Hero
posted September 18, 2016 05:11 PM

Yes with the !!SS reciever you can do many things, I figured that out, I just couldnīt figure out an easy way to change buff/debuff durations. At least that is as simple as changing other things, but ok it seems the only way is to do it the long route.

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


Famous Hero
posted September 18, 2016 07:11 PM
Edited by Pollo2002 at 19:18, 18 Sep 2016.

I'm right now working on my "one spell per combat script"
Removing the spells once they are cast is super easy (done in 3 lines).

The hard part is storing the spells and restoring them at the end of combat.

This is the only way I come with and seems very complicated.

I assign to every spell a FLAG for each of both heroes. (like V100 is for stoneskin for attacking player)

Every time you cast a different numbered spell, that spell set that Flag to true (in addition to dissapearing from the playe spellbook)

When battle ends, check for each hero what flags are true and add to their spellbooks each spell with a TRUE Flag.

That's what im planning to do for now. Is there any simpler/cleaner way to do it?

EDIT: The other way i thought about but not much simpler is at the start of the battle use !!HE:M to get every spell in the spellbook one by one and doing this 68 times for each variable and store it on 68 variables, and at end of combat add the 68 spells stored.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 18, 2016 07:35 PM

Storing the spells Orrin (ID=0) has:
!?BA0;
[...check heroes...]
!!DO12345/0/69/1:P0;

!?FU12345;
;x1 hero ID
!!HEx1:Mx16/?y1; y=1 he has the spell
!!FU&y1<1:E; exit if he does not have this spell
!!SN:W^Pollo_Hero_%X1_%X16^/1; store this spell in SN W var

Restoring Spells after battle:
!?BA1;
!!DO54321/0/69/1:P0;

!?FU54321;
;x1 hero ID
!!SN:W^Pollo_Hero_%X1_%X16^/?y1;
!!HEx1&y1>0:Mx16/1; give back spell

See? easy.

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


Famous Hero
posted September 18, 2016 07:42 PM

First thanks a lot for your help, that looks very elegant, though I didnīt figure it out yet.

Second, thanks to this I just figure out !!SN has a purpose! LOL, I always ignored that reciever because itīs called sound support and i have no interest in messing with sound, I was dazzled that you would change sound so where to the erm help to find out that functionality has been improved to more stuff. So that's intersting!
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 18, 2016 07:46 PM

SN w is very powerful, just make your own SN w templates, usually with your name in, so it can't conflict with other scripts. This way you can store endless things, and safely.

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


Famous Hero
posted September 18, 2016 08:02 PM
Edited by Pollo2002 at 20:03, 18 Sep 2016.

Wow thanks a lot it works excellent now, tested in several ways wtih no problem, you saved me a lot of time, donīt you have a donation box?
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 18, 2016 08:21 PM

All the fame and rewards should go to the one who made both Era and SN w vars possible, Bersy. I only apply the rules.
____________
Era II mods and utilities

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


Famous Hero
posted September 19, 2016 02:47 AM

Is there any quickway to change the % of movement terrains require?
____________

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


Famous Hero
posted September 19, 2016 06:23 PM

I want to create the mod to download but not sure how to do with era, I change a lot of the TXT files, that i just put on the WOG Data folder, what happens if i put it on my mod/pollomod/data folder? how i make them take priority over those in WOG? Also for now i can put the scripts on my map but i want to make the scripts in random maps, by just placing ERM files in the data/s folder is enough? or do i have to enable somehow?
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 19, 2016 07:02 PM
Edited by Salamandre at 19:13, 19 Sep 2016.

Terrains movement: ask /IM Oxfea, he has the addresses.

Mod: never change anything else in other mods. Make

Pollo mod/data/s then you put here the scripts. The text files you can either put in your mod data folder, or create a pac (ancient lod) and put them inside, both work.

Additional folders (maps/sounds etc) in your Pollo main folder. Will have priority on any other mod which is activated below.

This way, when someone wants to play your mod, it clicks and activates it, then deactivates later and no changes to his game.

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


Famous Hero
posted September 20, 2016 05:47 PM
Edited by Pollo2002 at 17:47, 20 Sep 2016.

This is the script im running
For some reasons, SOMETIMES not always i get an error that HE canīt find hero, when I attack neutrals.
As you see I do a check for that, first just in case i set the variable 790 to -1, which i use later as a check.
Basically it shouldnīt run the !!HE-20 line unless there is a hero, yet somehow it runs when there is a hero. I check on the log and for some reason BH1 sometimes return a result of a hero the computer has, even when in the battle there is no hero, I donīt get it.

ZVSE
!?BG0;
!!BG:A?y1 S?y2;
!!HE-1&y1=1/y2<>15:My2/0;

!?BA0&1000;
!!VRv790:-1; Reset variable 790
!!BH1:N?v790; Ask what hero is sitting to the right if any
!!HE-10:N?v755;
!!HE-20&v790<>-1:N?v756; if any hero is present at the right side, ask which hero it is.

!!DO12345/0/69/1:Pv755;
!!DO12345/0/69/1&v756<>-1:Pv756;

!?FU12345;
;x1 hero ID
!!HEx1:Mx16/?y1; y=1 he has the spell
!!FU&y1<1:E; exit if he does not have this spell
!!SN:W^Pollo_Hero_%X1_%X16^/1; store this spell in SN W var

Restoring Spells after battle:
!?BA53&v780=0;

!!DO54321/0/69/1:Pv755;
!!DO54321/0/69/1:Pv756;

!?FU54321;
;x1 hero ID
!!SN:W^Pollo_Hero_%X1_%X16^/?y1;
!!HEx1&y1>0:Mx16/1; give back spell

____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 20, 2016 06:00 PM

To be safe, always store both heroes in BA0 trigger, then when in BG, use the above vars. HE-1 is too vague for BG trigger, you should check BG:H first.

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


Famous Hero
posted September 21, 2016 11:28 PM
Edited by Pollo2002 at 23:30, 21 Sep 2016.

I decided to use this thread to deal with all my problems with ERM and giving that they are going to be abundant since im doing a lot of work. But if desire i can start doing it on the sticked ERM HELP thread.

Anyway, Iīve been breaking my head with this one

!?CM0;
!!IF:V10/0;

!!IF&-1000:V10/1; (check if it's AI)
!!CM&-10?v4/?v5/?v6; (Get location)
!!VRy52&-10:S-1; (assume no hero)
!!OW&-10:A-1/?y52; (get current Hero)
!!IF&-10/y52<0:V10/1; (abort if no current hero)


!!OBv4/v5/v6&-10:T?y55;
!!IF&-10/y55<>34:V10/1;(abort if not hero)
!!IF:M^%V4 %V5 %V6 %Y55 %Vf10^;
!!IF&-10:M^So far so good%V4^;

it doesnt matter the rest of the script because here is the problem.

This is my show gold of army script. Ive trying to debug why it sometimes work and sometimes it doesnt and it all lies on the !!OB reciever line.
As you see Ive set two IF command to let me see what the variables are doing. And here is what i found. the !!OB reciever is inconsistent on what finds on the exact same coordinates.
The v4 v5 v6 coordinates are ALWAYS correct, the problem is that the y55 where i Keep track of what object is on those coordinates itīs not.

Sometimes it finds the object itīs there, sometimes it finds none, and surprisingly it depends on the most bizarre things.
I try to find if a hero is there.
If I have a castle selected, it finds nothing, y55 becomes 0.
If I have a hero selected, it canīt find itself UNLESS I move the vision of the map. Say i click on the minimap, then I check the hero, it finds the hero!. Bit if i choose the hero, and try to find it, it doesnt. it returns 0.
If I choose a hero and right click on other heroes they find it, they just canīt find themselves.
I donīt get it Iīm completly lost.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted September 22, 2016 02:09 AM
Edited by Salamandre at 02:09, 22 Sep 2016.

It would be easier if you describe what exactly you want your script to do. For instance, you don't need to check if AI or human when CM0 because this is click trigger. AI doesn't click yet, maybe they will improve it one day and will even drink a coffee but for now not :)

So this already eliminates a lot of unnecessary checks in your script, so others can read it better. Also, hero as object is never recognized, ID 34 I mean. To find if there is a hero at location xyz, you must ask his ID then store error message in flag.

!?CM0;
!!CM:P?v1/?v2/?v3;
!!UN:P904/1; turn errors off
!!UN:P905/0; clear error flag
!!HEv1/v2/v3:N?y1; get hero to y1
!!UN:P904/0; turn on errors showing
!!UN:P905/?y2; get error flag to y2
!!IF:L^%Y2^; y2=0 --> there is one hero there, y2=1--> no hero


Is preferable that you use ERM thread for erm scripts, because then is easier for us to search and link the solution when someone else asks for same problems.

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


Famous Hero
posted September 27, 2016 01:17 AM
Edited by Pollo2002 at 01:20, 27 Sep 2016.

1) Is there a way to add an arrow tower to forts or remove the moats from citadels?
2) Is there a way to change the damage moats do?
3) Is there a way to change the values in which each item appears on random map (I know I can just search X object and replace it with Y on !?PI; But i wonder if there is a more elegant way to do it?)
4) Is there a way to really force the RMG to not use portals? Iīm pretty sure this impossible, but who knows, better ask here than sorry

____________

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


Famous Hero
posted September 27, 2016 04:42 AM

Is it possible for potential joining monsters, to never offer to join for free but for gold?
____________

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

Page compiled in 0.0449 seconds