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 ... 119 120 121 122 123 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Al_Mualim
Al_Mualim


Adventuring Hero
Current Russian Peasant
posted November 27, 2011 02:35 PM

Quote:
Working in the exe tutorial
I now it was here long time ago, but please, can somebody re-upload it somewhere
____________

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


Famous Hero
posted November 27, 2011 06:54 PM



Quote:
Orrin has ID=0 (!!HEy-96&y-96>-1), and in your script, if artefact is equipped, nothing happens. Your code checks in backpack (v2-v4 stores if artefact on).


once again, you're right.  Only after a few weeks, after you click the end turn button, an error prompts.  I never noticed it before because I tested it daily.  How can I identify the right and left heroes without using HE0 (orrin) and HE1?

!?AE1&v998=166; Equip artifact
!!HE-1:Fd5/d5/d5/d5;
!!HE-1:R0/d3; Add +3 Moral
!!HE-1:R1/d3; Add +3 Luck

!?AE0&v998=166; Unequip Artifact
!!HE-1:Fd-5/d-5/d-5/d-5;
!!HE-1:R0/d-3; Remove -3 Moral
!!HE-1:R1/d-3; Remove -3 Luck


!?BA1; after any battle
!!BA:H0/?y-95; check who the left hero was
!!BA:H1/?y-96; check who the right hero was
!!HEy-95:A2/166/?v1/?v2; check if the left hero still has the shield (he might have lost it in the battle)
!!HEy-96&y-96>=0:A2/166/?v3/?v4; do the same for the right hero, but only if it was a hero (and not just creatures)

give luck and morale
!!HEy-95&v1>0:R0/d3;
!!HEy-96&v3>0:R0/d3;
!!HEy-95&v1>0:R1/d3;
!!HEy-96&v3>0:R1/d3;

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


Known Hero
posted November 27, 2011 07:53 PM

Quote:

Only after a few weeks, after you click the end turn button, an error prompts.


Then it probably has nothing to do with this script.
Quote:

How can I identify the right and left heroes without using HE0 (orrin) and HE1?


Some weird question. We have !!BA:H0 and !!BA:H1 and H0/H1 are only names of procedures, they do not stand for any hero. Salamandre noticed that there may be some problems with Orrin, but I think he just missed the "=" sign you have in the script, so "&y-96>=0" seems correct to me.

Also Salamandre told you that the bonus will be given even if you only have the item in the backpack. In order to make it work when it's equipped in the last four lines you should check for v2 and v4 that stand for the number of equipped artifacts.

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


Famous Hero
posted November 27, 2011 08:22 PM

Quote:
Quote:

Only after a few weeks, after you click the end turn button, an error prompts.


Then it probably has nothing to do with this script.
Quote:



If it has nothing to do with the script, what can I change to correct it then?

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


Responsible
Supreme Hero
posted November 27, 2011 08:51 PM

Quote:

Is there any way to replace the prisons in wogification? I remember this could be done but a patch fixed it?


Here's what I know, without testing since it isn't something I care enough about to test:

There was another post about Prisons earlier this year, I think as a new topic.  The poster wanted to play a random map with three friends, but the map generator randomly put prisons in some of their home territories, and some of the Heroes in the Prisons were high-level, which altered the balance, which they wanted to be fair to all.  So the poster wrote a script to delete all the Prisons, but found that the Heroes who were in those Prisons still might be high-level (greater than level one, anyway), when they showed up in someone's Tavern - so, still not fair.  I posted a simple script to set all enabled Heroes to level one at the start of a game, and that satisfied the poster.

So, based on that information, I see no reason why Prisons can't be deleted and replaced during wogification, similar to other objects, with the only difference being that some of the Heroes who were in those Prisons might have been randomly set to levels above one, and need to be reset, if that is a concern.

Prisons cannot be added during wogification of course, as stated in the ERM Help.

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


Known Hero
posted November 27, 2011 08:57 PM

Quote:

If it has nothing to do with the script, what can I change to correct it then?

I only assumed. Usually you can get useful information from the error message.

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


Admirable
Omnipresent Hero
Wog refugee
posted November 27, 2011 11:25 PM

@fanofHeroes: I see nothing wrong in your script except change v1 to v2, and v3 to v4. v1-v3 checks in backpack, v2-v4 check in equipped items.
____________
Era II mods and utilities

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


Hired Hero
posted November 28, 2011 12:06 AM

Hi.
I was away for some time, so I forgot quite a lot about scripting...
Is there a quick way to imitate the Lycantropy skill with other units, both casters and victims?
Like, "the touch of the Wraith turned you into a scared Ghost"...
Same goes for switching unit types during combat:
"Your brave Archer is promoted to a Marksman".
I remember the pain in the neck I had when upgrading Angels...
Still, I don't remember any details as to how I actually did it...
Any help, please???

Also, is there a way to do real-time "storm" type spells???
Like, if you don't move long enough, the battlefield starts throwing lightnings at random...
Thanks.

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


Admirable
Omnipresent Hero
Wog refugee
posted November 28, 2011 12:09 AM
Edited by Salamandre at 00:14, 28 Nov 2011.

I think that Slava hardcoded werewolves, so he kills the stack, applies sacrifice animation and place a new stack. Would be interesting to check if new stack has same ID, never tried.
In 56.erm, Fnord makes metamorphs cast implosion on themselves, replace with new stack and gives same ID with BU:E, after storing experience and flags.
____________
Era II mods and utilities

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


Hired Hero
posted November 28, 2011 12:21 AM

Cheers, Salamandre!
I'm more interested in real time events - are such even possible in WOG???
Would be really fun to use them.
Not only "weather", but stat changes too.
Any idea???

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


Admirable
Omnipresent Hero
Wog refugee
posted November 28, 2011 12:27 AM

I don't understand. Example?
____________
Era II mods and utilities

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


Hired Hero
posted November 28, 2011 12:38 AM

Normally, the checks for actions happen:
1. When a unit moves/attacks, before or after.
2. When a spell is cast, maybe before or after.
3. At the end or beginning of battle or player turn.
What about checks that happen after a specific TIME???
Could you use a VARIABLE that would update itself not by checking the actions but rather the (real-time) clock itself???
I know it sounds so non-HOMM, yet who knows...
I mean, your unit gets the "activate" state, normally, it just waits until you do something, maybe after an HOUR.
What about if the REAL time clock would be also somehow checked???
Hint:
The (multiplayer) TURNS themselves ARE real-time based if you choose so (I do play on UNLIMITED, but there are other options)!!!
Maybe there is a way to track those time variables???

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


Admirable
Omnipresent Hero
Wog refugee
posted November 28, 2011 12:47 AM
Edited by Salamandre at 03:04, 28 Nov 2011.

I still don't get why you call those real time actions.

1) We have a code which identify when an unit moves or attacks
2) Same for casting a spell
3) Same for each battle turn
4) TL was disabled in ERA. Probably in 3.58 you can increase a variable by checking clocker, but not sure.
5) The units does something after one hour: I am not sure this exist in any game. If must activate after you do something specific, there is code for that.

In my mind, real time action was the def of a plane I wanted to land in Atlantis. But I could not tell the game to start the def on animation 0 and delete it once last animation was played. This is what I miss in Heroes.
Real time def handle.
____________
Era II mods and utilities

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


Hired Hero
posted November 28, 2011 12:58 AM

OOOK...
It's weird that you don't understand me...
Example FAKE code (just for logical purposes):
IF (unit=Behemoth AND state=active AND time>=10 seconds) THEN (turn=over AND message="Your Behemoth fell asleep...")
OR
IF (unit=Knight AND state=attack AND time<=3 seconds) THEN (luck+=1 AND message "For quick reaction, your Knight gets some Luck...")
I hope you will get the point now...
Again, I'm talking about events that happen according to the real clock time, not what your units are doing...
Example form multiplayer:
When time runs out, your turn ends automatically!!!
So, where is that TIME variable - and can't we steal it fro other purposes???

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


Admirable
Omnipresent Hero
Wog refugee
posted November 28, 2011 01:02 AM

JimV experimented TL a lot. Me thinks that what you ask can't be done currently, but he will certainly give a more definitive answer. I see timer activated in TL but no way to check between.
____________
Era II mods and utilities

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


Hired Hero
posted November 28, 2011 01:37 AM

Ok, thanks.
Why you suddenly started speaking broken English (a bit)?

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


Admirable
Omnipresent Hero
Wog refugee
posted November 28, 2011 01:42 AM

When I heard your french, did not want to upset you.
____________
Era II mods and utilities

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


Hired Hero
posted November 28, 2011 01:43 AM

Funny.
Good luck.

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


Responsible
Supreme Hero
posted November 28, 2011 05:24 AM
Edited by JimV at 05:35, 28 Nov 2011.

Quote:

I'm more interested in real time events - are such even possible in WOG???


In WoG 3.59, yes.  See Solitaire345's updated WoG 3.59 Help, downloadable from this thread (several pages back) - the TL triggers.

Bersy has disabled them under Era, but has provided a method for re-enabling them.  One of them with a long time interval, say TL4 (which triggers every 60 seconds) could be enabled during a a battle on terrain with a cloud overlay to produce random lightning (for example):

!?BR&1000/v997=0;
(check for rain overlay, exit if none)
!!UN:C5168326/4/2657254; turn on TL triggers
!!IF:V38/1; use a flag on TL4 for extra safety
(In case TL4 is also used elsewhere - don't want a lightning storm on the adventure map.)

!?TL4&38;
(draw a random number to decide whether to cast lightning on a random stack)

!?BA1&1000
!!UN:C5168326/4/434630; turn off TL triggers
!!IF:V38/0;

Actually, I have never used TL4, only TL0, so I am not certain Bersy's enabling poke works for it, but I think so, and if not he can probably provide one which does.

Also, I don't know that there is a big advantage to this method versus using BG0 and BG1 triggers, which happen quite frequently anyway, and there may be disadvantages - ways to crash the game if the Heroes program is not ready to accept the actions taken under the TL4 trigger at a particular moment.

The closest similar thing I have done is to use TL0 to detect the spell which the player has just selected from a Spell Book (I can detect when the Spell Book is opened, but CM triggers do not work within the Book's dialog).  I enable TL0 when the Spell Book is about to be opened, then keep checking for an active spell (BG:S) under TL0 until I find one, then disable TL0 again.  That works.  So for instance, if the spell is Curse, I can set all enemy undead to alive in time for the Curse to be applied to them (while the player is moving the Cast Spell mouse pointer across the screen to find a target).

P.S. For those who might say that "real time" means at any instant, not once per minute (TL4)or once per second (TL0) (or once per 20 milliseconds with another UN:C poke provided by Bersy) - well, then even the real world does not have real time, since quantum mechanics tells us that time occurs in (very tiny) increments.  The difference is just a matter of degree, between the digital and physical worlds.

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


Hired Hero
posted November 28, 2011 02:23 PM

Wow, thanks.
Though I meant something a bit more random, and not only spells.
A funny example would be "messengers" that appear for a second, "say" something at you, then disappear again.
Or units temporarily switching to other ones.
(This could even lead to a "Sheng Tsung MK1" type unit..!!!)
But out-of-nowhere spells are the main thing, yeah.
Anyways, this question was meant more for YOU do think about new abilities to be incorporate, rather than for ME to actually use now.
I do hope it gave you at least some nice ideas that you'll develop later on.
GOOD LUCK!

 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 ... 119 120 121 122 123 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.4317 seconds