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


Promising
Famous Hero
feanor on DF2.ru
posted November 30, 2011 01:31 PM

Quote:
Is there any UN:C code to change the pitlords ability to horned demons instead of demons?


Try this:

!!UN:C5928811/1/49;

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


Admirable
Omnipresent Hero
Wog refugee
posted November 30, 2011 02:51 PM

Thank you
____________
Era II mods and utilities

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


Known Hero
posted November 30, 2011 05:26 PM
Edited by mister_kalu at 17:27, 30 Nov 2011.

Quote:
Quote:
Is there any UN:C code to change the pitlords ability to horned demons instead of demons?


Try this:

!!UN:C5928811/1/49;


hello, you know the UN:C to the perfection, some time ago you posted the script that allows to change the coordinates of buildings, can you do some similar for the scrolls inside mage guild? thanks

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


Admirable
Omnipresent Hero
Wog refugee
posted December 03, 2011 04:38 PM

c var is summarily explained in ERM help. I found that adding a number after it is adding the value to the current day.

!!VRv1:Sc10; [v1=current day +10)

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


Responsible
Supreme Hero
posted December 03, 2011 06:06 PM

That is interesting.  I have seen problems with expressions like Sc-w11 which are fixed by adding a zero after the c (Sc0-w11), which is probably part of the same issue.

There are also issues with using v1, as some internal Heroes/WoG routines seem to affect it.  One I just found yesterday is this:  if you use an SN:E command (in Era 1.8) to get a returned value, and use ?v1 to get the value, the value may not be correct.  I always get v1=42 from a ?v1 which is supposed to return the length of a video, whereas if I use ?v2, I get the correct length of the video.  I am wondering is this was a joke based on Douglas Adams' "The Hitch-Hikers Guide to the Galaxy", in which an oracle is asked for the answer to everything and replies "42".

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


Honorable
Supreme Hero
posted December 03, 2011 06:29 PM

v1 is function result in Era.
(the value returned in EAX register)

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


Responsible
Supreme Hero
posted December 03, 2011 07:22 PM

Bersy, thanks for that important information.  It is not in my current copies of Era 1.5 Help or the WoG 3.59 ERM Help, so I hope Solitaire345 will add it to the latter (if he has not already) - it adds access to many system routines which return a result via the function return rather than an argument.  (In hindsight it seems obvious that there must have been some such provision.)

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


Honorable
Supreme Hero
posted December 03, 2011 07:30 PM

Indeed. Only latest russian version contains information on v1.

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


Famous Hero
posted December 05, 2011 01:15 AM

I noticed that if I give a creature Immunity 4 or 5 (excluding beneficial spells), say 119/52 or 119/53, then the "resurrection" spell cannot be used on such a creature.  Is Resurrection not considered a beneficial spell, or do I have a bad WOG version and this is a mistake? I always thought it was a good thing.  

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


Responsible
Supreme Hero
posted December 05, 2011 03:59 AM
Edited by JimV at 04:00, 05 Dec 2011.

Quote:
Can't play avi, Heroes (except campaigns) only reads uncompressed movies, so 10 seconds will take 200 Mo. For the same effect use big gifs, but they can't stop.


In belated response to this, I have added functions to XFiles.dll to play video files (.avi, .wmv, etc.).  The functions will play any video (compressed or uncompressed) for which the user has the required codec - that is, any file which the Windows Media Player will play on the user's system.  (Codec files may be downloaded at various websites.)

The example included in XFiles.zip is a 17-second video which is one megabyte (or megaoctet) in size.  It looks like this (snapshot):



The video plays without a frame or border.  The user can create a border as a bitmap file, draw it with the DrawBmp function, then show the video inside it.  Alternately, a WoG 3.59 DL can be created and the video can be played inside it.

The README file in XFiles.zip gives more information, but two more issues should be disclosed:

1. In developing these functions on my Windows 7/32-bit system, I had several problems which were cured by running the Heroes 3-Era 1.8 program in Windows 98 compatibility mode.  I don't know if this would be necessary on an Windows XP system - but it might be.

2. It is necessary to create a "child" window inside the Heroes 3 window to show the video.  While this child window is active, the Heroes 3 mouse will not work properly within it.  Closing the video removes the child window, but also causes the Heroes 3 window to be minimized.  The XFiles CloseMedia function immediately restores the Heroes window, but in full screen mode this is visible to the user as follows:  the screen flashes to black, to the desktop, to black again, then to the Heroes screen.

XFiles.zip (DLL, sample Data files, demo map, and README) can be downloaded at:

http://www.box.com/s/1n069e3vc5vixc8l1zk5

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


Admirable
Omnipresent Hero
Wog refugee
posted December 05, 2011 04:12 AM
Edited by Salamandre at 09:42, 05 Dec 2011.

Awesome

I was not able to play the video, Heroes window minimized on desktop and no way to bring it back, what codecs I need? I have DiVX icon activated but no reading. I got the Gershwin blue rhapsody, the huge behemot, the wizard in town and and sword pic. Very impressive.

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


Responsible
Supreme Hero
posted December 05, 2011 12:53 PM
Edited by JimV at 13:47, 05 Dec 2011.

Quote:
I was not able to play the video, Heroes window minimized on desktop and no way to bring it back, what codecs I need?


Thanks for the comment.  I didn't need to load any new codec to play the video on my system, so I don't know which one it uses, but the information is embedded in the video file, and I have read that if you try to play it using the Windows Media Player, WMP will tell you the name of the missing codec.  Meanwhile, you could try any other video file which you have which plays on your system, by editing the filename "Data\cute-kitty.avi" in the script in "XFiles Test" (Timed Event 511).

If cute-kitty.avi will play in WMP on your system, then you may need to set your Heroes 3-Era program to run under Windows 98 compatibility mode.  Another possibility is that Era 1.9(+) has made some change which affects the functions (I developed and tested under Era 1.8) - this seems unlikely to me, though.

P.S. - I should have said "any video file which plays on your system and is less than 800x600 pixels in size" (so it will fit on the Heroes screen).

P.P.S. - In response to the previous question, Resurrection can only be applied to (dead) "alive" creatures - not golems, not gargoyles, not Crystal Dragons, not undead, and not elementals.  Similarly, Animate Dead will only work on undead creatures.  "Alive" and "undead" are flag-bit properties (MA:X and BM:F in ERM Help).

P.P.P.S. - The 199/5x attributes add immunities to creatures which don't have them, e.g. Pikemen, but do not subtract them from creatures which do have them, e.g. Black Dragons and Gold Dragons.  There is an EA:B property called "Receptivity" which does this.  I don't recall the codes but you can find them by creating a level-10 Gold Dragon in a test map and interrogating (EA:B?) its Receptivity line.

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

Tavern Dweller
posted December 05, 2011 01:12 PM

Whirlpool Effect

I was wondering if there were any way to give an object the unit-decreasing effect of a Whirlpool?
I wanted to make a monolith labyrinth, and would like various traps such as this to make it a lot more challenging for those who wish to venture into the labyrinth :3
____________

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


Responsible
Supreme Hero
posted December 05, 2011 01:55 PM
Edited by JimV at 14:04, 05 Dec 2011.

Quote:
I was wondering if there were any way to give an object the unit-decreasing effect of a Whirlpool?


There are hundreds or thousands of ways to do this, in very simple ERM scripts.  First, you have to decide how you want it to act, e.g., Hero steps into a hole, an IF:M display says "Ouch! Some of your troops fall into the pit!", and you subtract a random number (VR:R or VR:T) of troops from a random troop slot (HE:C).  If I wrote such a script, you would say, "Err, that's not exactly what I had in mind.", so it is better if you read ERM Help and then write it yourself.  ERM Help includes tutorials for beginning scripters.  Who knows, it might be the start of a career in computer programming (this actually happened with a nephew of mine).  If you have questions about what you read in ERM Help, people here will be glad to answer them.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 05, 2011 08:02 PM

Normally all the AVI are played by my AVI codec, but in this case, it triggers DiVX, which is unusual. Tried the second video, same issue. Maybe because Windows XP?

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


Responsible
Supreme Hero
posted December 05, 2011 10:50 PM
Edited by JimV at 04:47, 06 Dec 2011.

Quote:
Normally all the AVI are played by my AVI codec, but in this case, it triggers DiVX, which is unusual. Tried the second video, same issue. Maybe because Windows XP?


I don't have either DiVX or a Windows XP system, but my Google searches say that the commands I am using should play DiVX videos on an XP system.  Here's an example (from Googling "DiVX mciSendString Problem"):
---------------------------------------------------------
When playing DivX encoded video, it should work fine if you open it as "MPEGVideo" [this is the type I am using--JV] ...

Also, be sure to check your system.ini (or I guess the registry for 2000/xp) for the driver being used. This will be changed by some players, so you may not be able to depend on it being correct. The driver should be "mciqtz.drv".
------------------------------------------------------------

If I had my hands on your system there are dozens (perhaps hundreds) of things I could try:

1. Uninstall DiVX via the Control Panel to see if that changes anything.

2. See if Windows Media Player will play the files.

3. Try different device types in the DLL commands to see if they work better or worse (maybe try setting the driver to be used to mciqtz, based on the above random internet advice). [Later--I don't have any mciqtz.drv driver on my hard drive.  I have mciavi.drv.]

4. Set the Heroes-Era program to run in Windows 98 compatibility mode under Administrator privilege.  (This is the first thing I would try, because on my system there were minor incompatibility issues between the Windows system commands I use in the DLL and the Heroes program.)(Prior to this I had run Heroes 3-WoG on Windows 95 through Windows 7 without resorting to any compatibility settings.)

5. Run my initial test version which runs from a console window to see if any error messages occur.

Probably none of those would work and I would be up late nights trying other things (it was a week or more before I tried the Windows 98 compatibility on my system) and searching on Google for more things to try.  Eventually something would work, because there are hundreds of examples on the web of programs which do similar things - but with all the varieties of Windows and other software, tweaks which work on one system may not work on another.

Trying such things over the internet may not be very practical but for a start I have added my avitest console program to the box.net site.  If you run this program from a directory which contains the cute-kitty.avi video, you can type in the file name and the program will try to display the video using the same types of Windows MCI commands which I use in the DLL, and will display any error codes which Windows issues.  If it doesn't work, then these standard commands don't work on your system, for some reason.  If it does work, then probably the issue lies in merging current system commands with a Windows 98 program - or not.

I am sorry for the frustration this has caused you.

Update - I have downloaded and installed the free version of DivX Plus software (Codec pack, Converter, Player, and Web Player), then run Xfiles Test again and played the video a few times.  So the problem does not appear to be DivX per se.  Now I need to get access to an XP system - and perhaps install the latest Era version.

Further Update - The file cute-kitty.avi is now associated with the DivX player on my machine (due to the installation) - but will not play properly with that player!  I hear the audio, but see no video.  Windows Media Player still plays the file correctly, so maybe the file is calling for a codec which WMP has but DivX does not have.

Or maybe it is something else.  Here is a web site for a fix-it program for video problems from Microsoft Support:

http://support.microsoft.com/mats/video_freezes_or_crashes/en-us?entrypoint=lightbox

And here is a forum of horror stories about codec problems and possible fixes:

http://social.technet.microsoft.com/Forums/en/w7itpromedia/thread/584e73b8-7a4b-4e39-b2cc-51bbda1875a9

I made a Restore Point before installing DivX, and I think that should be done before attempting any fixes because it appears that things can get worse as well as better, when installing new video players or codecs.

The symptom I had on my system, prior to changing the Heroes program compatibility, was that the Heroes program would freeze after about one of every eight video plays. (I am on a run of over 60 video plays with no freeze since going to Windows 98 compatibility.)  That may have been a different issue.

Final Update of the night:  I tried other videos with the DivX Plus player.  Most played okay, but another one which plays with the Windows Media Player causes the DivX Plus player to crash.  I used the DivX Plus Converter (15-day free trial) to convert that file and the cute-kitty.avi file.  It converts them to .mkv files, which play okay with the DivX Plus player.  When I try to play cute-kitty.mkv with XFiles, it gives error 7 (unable to create the child window) in full-screen mode, but if I start in reduced-window mode (F4) it plays okay.  If I start in full screen mode, get the error, then convert to reduced-window mode, I still get the error.

When I play cute-kitty.mkv with avitest, it plays okay but I see a couple of extraneous messages sent by the DivX player, which will not be expected or handled by XFiles.

I have uploaded cute-kitty.mkv to the box.net link, in case you want to try these tests on your system.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 06, 2011 05:10 AM

Thanks, I will try as far as I can, I am noobie at all those things, codecs, support microsoft (which is always asking for CD which I don't have). I appreciate the help.

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


Responsible
Supreme Hero
posted December 06, 2011 02:11 PM

I thought of another test this morning.  I installed XFiles in my older Era 1.8 folder, which has the executable Era 1.8.exe instead of h3wog.exe, and ran Xfiles Test without changing the compatibility of Era 1.8.exe to Windows 98.  The video played okay - with DivX Plus installed and without W98 compatibility.  (I expect if I kept replaying I would eventually get a freeze, but there is no immediate problem.)

More information is better than less, but so far nothing I have tried on my system explains the problem on your system.  I wish I had not given away my Windows XP laptop.  At some point I will get access to it, but right now it is 240 kilometers away.

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


Admirable
Omnipresent Hero
Wog refugee
posted December 06, 2011 02:21 PM
Edited by Salamandre at 14:23, 06 Dec 2011.

There could be another problem you don't have but I do. When working for Atlantis, I had to test and install tens of codecs because I was trying to run a movie when gate opening, but finally it ended in gif.
All those codecs are still active and I don't remember which I can remove without making the system unstable. I also can't find the location of DiVX in my program files. I ran a search, looked at all programs, it is nowhere. But is activating when your movie starts.

A third opinion is needed, if someone else could test.

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


Responsible
Supreme Hero
posted December 06, 2011 05:06 PM
Edited by JimV at 01:53, 07 Dec 2011.

One more thought:  Safe mode.  It probably won't help, but sometimes it can prevent an interference due to third-party software.  On my system it shuts off the sound, but the video plays.  It is not practical as a long-term solution, but could confirm or eliminate some possible problem sources.

See Windows Help for a description of Safe mode and how to restart your computer in Safe mode.

Update - good (and bad) news:  I have spent the last several hours getting my virus-ridden XP laptop cleaned with an AVIRA Rescue CD, and installing a Heroes 3/WoG3.58f+Era 1.8(1) folder, so I can do the tests here that I would like to do on your machine, and ...

1) Trying to show the video in Heroes immediately froze the program.

2) Changing the compatibility to Windows 98 caused the video to show, but then Heroes froze.

3) Running avitest.exe shows the video with no error messages.

4) I ran msconfig (Startup menu, Run command) to select a safe startup, which I thought was the second option (diagnostic startup, basic devices and services only), but it turned out to be something between safe and normal (didn't look or act the same as the Safe startup which I used to clean the machine).  Anyway, it turned off the sound and my Symantics SystemWorks and (worthless) Norton Anti-Virus, and now the video runs okay (but without sound).

I have a hunch that turning off the virus-protection during the game might be sufficient to get sound and video on my XP machine, but anyway, I now have a test bed to try things on.  (My Windows 7 machine uses McAfee Anti-Virus - much better than that the lousy Symantics/Norton stuff.)

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

Page compiled in 3.3002 seconds