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 ... 194 195 196 197 198 ... 200 250 300 350 400 407 · «PREV / NEXT»
JimV
JimV


Responsible
Supreme Hero
posted March 14, 2013 03:04 PM
Edited by JimV at 15:09, 14 Mar 2013.

In my experience, UN:R6 causes a delay of the specified amount before the next ERM command or trigger will be executed. It also prevents responses to most normal Hero commands by the player, such as attempting to cast a spell, during the delay period, but may not pause all internal processes because, for example, in the SoDit mod there is a two-second delay in the Hero Screen during which I can move the cursor (mouse arrow) but not perform any command with it.

I have mainly used it to allow some custom sound effect (SN:P) to finish before a standard program sound effect over-rides it.

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


Adventuring Hero
posted March 15, 2013 01:32 AM

I think this would be the wrong forum, if it is just say which to post this in,

for example, how would I change a imported unit so it replaces for instance gremlins?
(Or just how to add a unit and then make it replace gremlins as the recruited unit?)

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


Responsible
Supreme Hero
posted March 15, 2013 01:57 AM

See the thread "Wake of Gods Forum Links" which is a "sticky" post so it is always on the first page of this forum. I recommend "Introduction to Modding and Scripting" for learning how to "mod" creatures. There is also a post by OxFEA on how to add new creatures without replacing existing ones, but I don't know if it is in the Links thread.

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


Responsible
Supreme Hero
posted March 15, 2013 02:04 PM

SoD It 2 - ERM automation

The question of how to restore the SoD interface completely under WoG was raised elsewhere, especially how to get rid of the Gods Bonuses and Blessings and Cursing icons in the Hero Screen, and replace them with the Specialty short hint text, as in SoD.

I described, also elsewhere, how this might be done by making the Zgodbon.def frames transparent and extending the UN44.def Specialty frames to cover them and add the hint text, but this required making 156 new frames for UN44, one for each Hero. (I am sure Bersy or others could do this with a binary patch, but I am not familiar with Heroes 3 internal code myself.) Since then it occurred to me that the process of making the new frames could be semi-automated with ERM scripts. Since this is a somewhat unusual use of ERM, I thought it might be interesting enough to post here.

The following script reads the short hint text from the Specialty text file (I think it is herospec.txt, if I remember correctly) in Heroes 3 memory via UN:C and displays in the SoD box next to the Specialty Icon. (Zgodbon.def has been made transparent.) Then it uses XFiles to save a screen-capture bitmap file for the new UN44 frame. The file name is UN44H000.bmp for Hero 0 (Orrin), UN44010.bmp for Hero 10, and so on. The signal to do this is a right-click on the Flag which is above the Hero list in the Hero Screen.

* Capture SoD Specialty Short Text when Flag Icon clicked

!?CM2; Hero screen, click Flag Icon (capture Specialty pic and text)
!!CM:I?v2; v2=141 Flag Icon
!!FU&v2<>141:E;
* Load dll and get ID
!!VRz1:S^XFiles.dll^; store dll name
!!SN:Lz1/?y1; now y1 holds dll ID
!!IF&y1<1:M^Error - the XFiles DLL was not found!  XFile functions won't work.^;
!!VRz1:S^WriteText^; store function name
!!SN:Ay1/z1/?y2; get WriteText address to y2
!!IF&y2<1:M^Error - the XFiles DLL was not found!  XFile functions won't work.^;
!!VRz1:S^CaptureScreen^; store function name
!!SN:Ay1/z1/?y3; get CaptureScreen function address to y3
!!VRz1:S^Specialty^;
!!SN:Ey2/1/z1/130/188/89/21/8116207/8; call WriteText(msg=z1,left=130,top=188,width=89,height=21, BGR=0x007BD7EF,Points=8)
!!HE-1:N?v4;
!!VRv2:Sv4*40+8080476;
!!UN:Cv2/4/?v3; v3 = specialty short text address
!!SN:Ey2/1/v3/130/209/89/21/14611455/8; call WriteText(msg=z2,left=130,top=209,width=89,height=21, BGR=0x00DEF3FF,Points=8)
!!VRz2:S^^;
!!VRz2&v4<100:S^0^;
!!VRz3:S^^;
!!VRz3&v4<10:S^0^;
!!VRz1:S^Data/UN44H%Z2%Z3%V4.bmp^;
!!SN:Ey3/1/z1/82/187/137/42; call CaptureScreen(left=82,top=187,width=137,height=42)
!!CM:R0;

Example:


Then I made a test map with no Heroes on it or in Towns, and used the next script to place eight Red heroes on it at the start of a game. I had already made Orrin's frame (UN44000, above), so I started with Hero 1 (Valeska):

!#TM1:S1/999/1/255;    triggers every color every day [same as Tobyn's Universal Timer--no conflict]
!#IF:V411/1;

!?TM1&411; day 1 only
!!IF:V411/0;
!!VRv1:S1;
!!VRv2:Cv1/v1/v1/v1/v1/v1/v1;
!!VRv2:Cd8/d16/d24/d32/d40/d48/d56;
!!VRz1:S^Hero #%V1^; 1
!!VRz2:S^Hero #%V2^; 2
!!VRz3:S^Hero #%V3^; 4
!!VRz4:S^Hero #%V4^; 8
!!VRz5:S^Hero #%V5^; 16
!!VRz6:S^Hero #%V6^; 32
!!VRz7:S^Hero #%V7^; 64
!!VRz8:S^Hero #%V8^; 128
!!VRz9:S^Select the first Red Hero # (0-155) to be placed:^;
!!IF:G0/9/0/9/1/2/3/4/5/6/7/8; result in v9
!!VRv10&v9=1:Sv1;
!!VRv10&v9=2:Sv2;
!!VRv10&v9=4:Sv3;
!!VRv10&v9=8:Sv4;
!!VRv10&v9=16:Sv5;
!!VRv10&v9=32:Sv6;
!!VRv10&v9=64:Sv7;
!!VRv10&v9=128:Sv8;
!!VRy10:Sv10+7;
!!DO6158/v10/y10/1:P;

!?FU6158; x16 = HE#
!!FU|x16<0/x16>155:E;
!!VRy1:Sx16-v10+33; x
!!VRy2:Sy1-1; y
!!HEx16:Py1/y2/0;
!!HEx16:O0;
!!UN:Sy1/y2/0/0/6;
!!UN:Ly1/y2/0/0;

Selecting the first option from the input dialog places Heroes 1-8, the second option places 9-16, and so on. So I started the map, selected the first option, pressed Enter to enter Valeska's Hero Screen, clicked the Flag to save her frame, clicked the second Hero in the Hero List to show his Hero Screen, clicked the Flag, and so on. After doing these eight Heroes, I pressed 'O' (Option) and 'R' to restart the game, selected the second option to do Heroes 9-16, and so on so. After doing Heroes 1-64 this way, I edited the script to set v1 = 65 and continued. In about a half-hour I had the 156 frames needed to remake UN44.def for the SoD Hero Specialty interface.

I made the revised DEF in H3DefTool (thanks again, Grayface), and tested it in my test map to see if I had skipped any numbers by viewing Xeron:



The mod for this interface is in SoD It 2.zip.

Problems: Nagash and Jeddite. WoG has changed their specialties, so the frames I captured for them are not correct for SoD. I am not interested in using the SoD interface myself, so I will leave the work of correcting these frames to someone who cares to.

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


Adventuring Hero
posted March 15, 2013 04:03 PM

!!UN:C6911880/4/-1;
it could disable selection on hero screen
but how to disable selection on heroes meeting screen?

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


Responsible
Supreme Hero
posted March 15, 2013 04:49 PM
Edited by JimV at 21:58, 15 Mar 2013.

This is the script which I used in "The Dragon Slaughter v2.07" and some other maps:

ZVSE

* TestSlotMoveHMS3, JHV, Feb. 18, 2012

* Fixes this problem:
*  Troop numbers >32767 must be moved by either shift-left click
*  or Split Creatures Button in Hero Meeting Screen because in Hero Meeting Screen troop
*  counts use 2-byte integer arithmetic except in those functions.

* uses v1-v10, and FU8044

!?CM3; click on Hero Meeting Screen
!!CM:F?v1 I?v2 S?v3 H?v4/?v5; get flag and clicked object values, Left-Right Heroes
!!FU|v1<>0/v2<13/v2>78/v3<>12:E; exit if not left-click push or not cr slot or number
!!FU&v2>26/v2<65:E; exit if not creature slot (13-26) or number (65-78)
* check for first slot selected
!!UN:C6962576/4/?v6;
!!VRv6:+72; add offset
!!UN:Cv6/4/?v8; get 1st selected slot's side (-1 if none)
!!FU|v8<0/v8>1:E; exit if 1st slot not selected yet
!!VRv9:Sv6+8;
!!UN:Cv9/4/?v10; get 1st selected slot's number (0-6)
!!VRy1&v2<20:S0; y1=2nd selected slot's side (0-left, 1-right)
!!VRy1&v2>19/v2<27:S1;
!!VRy1&v2>64/v2<72:S0;
!!VRy1&v2>72/v2<79:S1;
!!VRy2&v2<20:Sv2-13; y2=2nd selected slot's humber
!!VRy2&v2>19/v2<27:Sv2-20;
!!VRy2&v2>64/v2<72:Sv2-65;
!!VRy2&v2>72/v2<79:Sv2-72;
!!FU&v10=y2/v8=y1:E; exit if same slot re-clicked
!!FU8044:Pv4/v5/v8/v10/y1/y2; swap contents

!?FU8044; x1=HE(0), x2=HE(1), x3=side A, x4=slot A, x5=side B, x6=slot B
!!VRy1:Sx1; side A Hero
!!VRy1&x3=1:Sx2;
!!VRy2:Sx1; side B Hero
!!VRy2&x5=1:Sx2;
!!HEy1:C0/x4/?y3/?y4/?y5/2; Slot A y3=type, y4=number, y5=experience
!!HEy2:C0/x6/?y10/?y11/?y12/2; Slot B
!!FU&y3=y10:E; combining same type works okay
!!CM:R0; disable move
!!EXy1/x4:R?y6/?y7/?y8/?y9; Slot A artifact info
!!EXy2/x6:R?y13/?y14/?y15/?y16; Slot B artifact info
* swap
!!HEy1:C0/x4/y10/y11/y12/2; Slot B-->A
!!HEy2:C0/x6/y3/y4/y5/2; Slot A -->B
!!EXy1/x4:Ry13/y14/y15/y16; Slot B-->A
!!EXy2/x6:Ry6/y7/y8/y9; Slot A-->B
!!UN:Cv6/4/-1; unselect 1st selected slot's side
!!UN:Cv9/4/-1; unselect 1st selected slot's number
!!VRy17:Sv9+8; flag for 1st selection
!!UN:Cy17/4/-1; unselect 1st selection

I think the UN:C addresses used work both in WoG 3.58f and Era's WoG 3.59.

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


Adventuring Hero
posted March 18, 2013 03:03 AM
Edited by hawaiing at 03:17, 18 Mar 2013.

!!UN:C6962576/4/?v6;
!!VRv6:+72;
!!UN:Cv6/4/-1;
!!VRv9:Sv6+8;
!!UN:Cv9/4/-1;
!!VRv10:Sv9+8;
!!UN:Cv10/4/-1;

it works well.
thank JimV very much.

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


Adventuring Hero
posted March 18, 2013 10:45 AM

I put a new button on heroes meeting screen. (***.btn)
the button show but it can't be triggered.
I don't know why,and the similar sctipts work well on hero screen.

So,how to trigger the button on heroes meeting screen?

-----------------------------
ZVSE
!?CM3;
!!CM:I?y1;                                  y1 - click ID
!!CM:S=13; !!FU&-1:E; !!CM:F=0; !!FU&-1:E;  exit if not LMB released
!!SN:L^Era.dll^/?y2 Ay2/^GetButtonID^/?y3;  y2 - era.dll, y3 - function GetButtonID
!!SN:Ey3/0/^myButtonName^;            y4 - button ID
!!VRy4:Sv1;
!!IF&y1=y4:M^Click my button^;

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


Admirable
Omnipresent Hero
Wog refugee
posted March 18, 2013 11:01 AM
Edited by Salamandre at 11:13, 18 Mar 2013.

Maybe your third line is somehow not working, test show you get past FU:E (why flag 1)?. Have you tried this?

!?CM3; [I use it for every CM3 so only one trigger]
!!CM:I?v2 F?v3 S?v4;

!?CM3&v3=0/v4=13; [or FU:E if not those coordinates]
!!SN:L^Era.dll^/?y1 Ay1/^GetButtonID^/?y2 Ey2/0/^mybuttonname^;
!!VRy3:Sv1;
!!FU&y3<>v2:E;
!!IF:M^Click my button^;

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


Adventuring Hero
posted March 18, 2013 02:17 PM

Thanks,Salamandre.
But i think it's not the point.

I only use the scripts like following
----------------------------------
!?CM3&1000; [Hero Visiting screen mouse-click is trigger]
!!CM:F?y-1 I?y-2 S?y-3 A?y-4/?y-5 H?y-6/?y-7;
!!IF:M^F=%Y-1 I=%Y-2 S=%Y-3^;
----------------------------------
and then
Left-Click on the button, nothing happens.
Right-Click on the button,it works. --->(F=512 I=404 S=14)
something strange!

Could someone show me a sample that add a new button click on heroes meeting screen?
(sorry for my poor english)

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


Responsible
Supreme Hero
posted March 18, 2013 03:03 PM
Edited by JimV at 15:05, 18 Mar 2013.

In answer to the "why flag 1" question, Hawaiing is using the "check" part of "check/get/or set" as explained in ERM Help under "Flags and Variables". (Someone has still not read all of ERM Help.)(Or read it and not practiced the sample commands with IF:M displays to see what is happening.)(Sorry, don't mean to be offensive, but I couldn't resist.)

As I sit here typing, without having done any recent tests, I am not sure the CM3 trigger is executed for mouse-button releases. The Town Screen CM trigger executes both on the push (12) and release (13), but not all screens have both triggers. The way to check, or the way I checked when I was investigated the troop movement problem, was to use a test script which displayed all the CM:I, F, and S parameters at every click. (I used IF:L under Era instead of IF:M to avoid having to click a message box; then I had to exit the screen after every few clicks to see the IF:L messages which didn't always show in a sub-window.) In the Town screen I got separate messages for S=12 and S=13 (two triggers per click), but in some other screens I did not. I think I added some notes to ERM Help about this.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 18, 2013 08:19 PM
Edited by Salamandre at 20:47, 18 Mar 2013.

A good example why reading erm help entirely gives subjective results (I read it, I understood what I could). I have no idea where you found the check/get/set in "flags and variables", there is nothing about, as I read it.
If you refer to this phrase:

Flag 1 is used by certain commands to return a result and will also return the result of a conditional check of values

Then there is nothing looking more vague to me (certain commands). I know is used in CA:B when specified. Now, reading the GE examples, I see what you mean. First time I read them, I did not have a clue what's about and forgot that part. Some things appear clear with time, that's why reading erm help for the first time will leave one with even more confusion. If one advice, while written 200 times in 200 posts, is clearly not followed, maybe is time to propose other solutions, if any, or create a guide to the guide. Not mean to offend, neither.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted March 18, 2013 09:23 PM
Edited by JimV at 14:43, 19 Mar 2013.

Yes, the first time you read something it may not be clear until you read other parts. That is why I emphasize a) read all of ERM Help, not just a piece here and a piece there; and b) practice with commands, especially those which aren't clear to you. See what they do in different examples.

Example: I read:

HE Receiver:

F$1/$2/$3/$4;  Set/check/get primary skills.
  $1 = Attack
  $2 = Defence
  $3 = Power
  $4 = Knowledge (Format PK)

I say to myself, hmmm, I understand what is set and get, but what is check? Then I read Flags and Variables:

Under Flags on the left side menu I see "Check Value" and click that to read:

Comparing Values
To compare the game parameter to a particular value you can use the following way: ...[compare operator] value... The result of comparing is stored in flag 1. You can use its value for further ERM statements.

Examples of Value Comparison using the GE Receiver:

!!GE100:F5
Set first day to 5 for Time event (standard syntax)

!!GE100:F=5
Check if first day is 5 and set Cond.Flag1 (CF1)

!!GE100:F<>5
Check if first day is NOT 5 and set Cond.Flag1 (CF1)

!!GE100:F><5
The same as above

!!GE100:F>5
Check if first day is greater than 5 and set CF1
...

So now I understand. Or I could try the operation in a test script to check HE:F, and see what happens.

From my point of view, I see lots of people posting who don't follow my advice (such as the latest post asking for someone to explain how to write a script to him - obviously he didn't read the PO commands) who complain that it takes months or years to learn enough ERM to write simple scripts, whereas the few people I know who did follow my advice learn enough ERM to write scripts in about one week, maybe two. So this only hardens my opinion. It would be different if someone had followed my advice and still did not have a clue as to how ERM works (and was otherwise a competent person with good English reading comprehension) - then I would have evidence to change my thinking.

Instead I see posts by people wondering why their AE scripts get triggered when they click on the Backpack, and have to copy and paste information directly from ERM Help yet again. These are not people who have tried my method. Under my method, when something does not work as you thought it would, the first step is to reread ERM Help.

If I could get people to do that, I would have at least four more large maps done by now, even as slowly as I work.

As for writing a guide to a guide, wherever I have thought ERM Help was badly written or missing necessary information, I have revised it. But at least 95% of the text looks good enough that I doubt I could do any better. It is one of the best computer manuals I have read. Reading it plus practice is all anyone needs to get started writing scripts, if they are willing to work at it. I know that is true because you will not find a single ERM question from me on this site or any site.

Of course, if I had to read ERM Help in a language which is foreign to me we wouldn't be having this discussion as I would have found something else to do.

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


Admirable
Omnipresent Hero
Wog refugee
posted March 18, 2013 10:39 PM

I am not surprised you have no erm question, your job was computer language. Now try write a symphony after read the music manual entirely, then maybe you will get my point. What you fail to understand is unique conjectures which have to be found alone.

How someone who never coded is supposed to get that while seeking for OB commands, PO is usable for that matter?! PO is square, OB is object. The way to understand that square must be modified to give the object up to it a new property is not so obvious as you seem to think. You may keep moralize people to read erm because this is what you did, but getting them to understand what they read and create conjectures between the 5000 parts of erm help is another matter. I am done discussing over and over this issue, someone here is living on another planet and takes others for retarded.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted March 18, 2013 11:21 PM

I would certainly start by reading all the music manuals I could find, if I had to write a symphony, and would expect to have to do a lot of practice work besides. In my world, as an engineer, my advice is far from controversial. In fact there is a very common English acronym for it: RTFM.

As I see it, there are two parts to learning anything: communication of the principles, and practice (work). Manuals are written to accomplish the communication part. And yes, I learned how to play guitar by reading manuals and practicing, which is a better analogy for ERM than writing a symphony. Writing a symphony would be like writing the Skyrim program (or perhaps Era).

I have never used, and never will use terms like retarded, noob, et cetera. You are projecting emotions onto me that I do not feel. My emotion is frustration that some people can not see the worth of the best advice I can give, probably because I am not expressing it in the best way.

If ERM Help needs to be improved, let's improve it. The WoG Team must have spent many person-months writing it and I think they did a fine job, but anything in this world can be improved.

Starting perhaps with PO. To me, PO gives another set of variables, that is, places to store information. The information is stored by location (map squares) rather than a single variable index, like v1. This is convenient for storing information that relates to a map object, because the map object also has a location (the location of its yellow square, or trigger square). When a Hero arrives at the location and triggers the object, the location is in variables v998-v1000, so those variables can be used to access the object's special information that is stored at its location in PO998:x, e.g., PO998:N. This allows general scripts to be written which don't even have to know in advance where on the map an object is placed.

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


Known Hero
Editing Heroes Without Limits
posted March 19, 2013 01:26 PM
Edited by felipe at 13:26, 19 Mar 2013.

There is still one object that I couldnīt make it work. Whirlpool 111\0. When I place them at the map they don īt work properly.


I place it in the map with UN:I; I am using a time trigger. After I try to change the number of the whirpool with !!OB/C; but this last command is not working. How do I change the whirlpool number?

All my commands(confusing):

!#TM7:S2/2/1/1; [Once in day 2]

!?TM7;

!!UN:X?y6/?y2;
!!VRy1:Sy6 :50;
!!DO22502/1/5/1; [Whirlpool placing]

!!UN:U111/0/?y4; [Whirlpool correcting]
!!VRy1:S0;
!!VRy1&y4>0:S1;
!!DO22507/y1/y4/1;
!!VRv9501:S0;
!!VRv9502:S0;
!!VRv9503:S0;
!!VRv9504:S0;

!?FU22502;
*place iteractive objects at the water
!!UN:X?y6/?y2;
!!VRy10:S0 Ry6; [Random x value]
!!VRy11:S0 Ry6; [Random y value]
!!TRy10/y11/0:T?y1/d/d/d/d/d/d/d; [Check terrain type]
!!OBy10/y11/0:T?y3; [Check object type for free square]


!!VRy2:S0 R5; [Random value]
!!VRy2&y2>=0/y2<=4:S111; vortice
!!VRy4&y2=111:S0; vortice
!!VRy2&y2=5:S80; santuario
!!VRy4&y2=80:S8; santuario
!!UN&y1=8/y3=0:Iy10/y11/0/y2/y4;

!?FU22507;
*give a new number to the whirlpool
!!UN:U111/0/?y6;
!!FU&y6=0:E;
!!UN:U111/0/-1/9501;
!!OBv9501/v9502/v9503:Cv9504; [give it a number not used]
!!VRv9504:Sv9504 +1;

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


Responsible
Supreme Hero
posted March 19, 2013 02:39 PM

It may be that Whirlpools are one of the untested objects mentioned in ERM Help which will not work if placed by UN:I. On the other hand, under the OB receiver there is this cryptic note:

-----copy and paste from ERM Help #1,902 begins-----------
Be careful: don't use OB command with an object with 2 entrances (yellow squares).
When you place an object, it will set up only first right bottom entrance square that will be met. Then you should manually copy a control word from that square to all other yellow squares of this object.
-----end of copy and paste--------------------------------

A lot of ERM Help was written by native Russian-speakers whose English is not always clear. Does "place" in the above quote mean "place on the map in the Map Editor" or "place with ERM using UN:I" (or both?). Maybe someone else here knows. Anyway you could try doing what it says, that is copying the OB:C? value from the bottom right trigger square (one of about six trigger squares that a whirlpool has) to all the other trigger square locations.

Did you first test several Whirlpools placed in the Map Editor to see if their OB:C values were 0, 1, 2, etc. for different Whirlpools? If they are not then you may be doing harm instead of good by renumbering them, because, remember, the OB:C value is not always the number of the object. For example, it is not the object number in the case of Magic Springs, although it is for many other object types.

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


Responsible
Supreme Hero
posted March 19, 2013 05:33 PM
Edited by JimV at 20:29, 20 Mar 2013.

Whirlpool Update: I have done Felipe's testing for him, with these results:

1) I placed three WP's in a test map. From top left to bottom right, their UN:C? values were 0, 1, and 2 (in all six trigger squares).

2) I used Tobyn's Universal Timer to place a 4th WP on day one (one time only):

!?TM2&v2391=1/v2392=1; Tobyn's Universal Timer, once, day 1
!!UN:I4/27/0/111/0; place Whirlpool

Result: all six trigger squares had OB:C? = 0, as expected. The WP works when I enter it (with a Hero in a Ship), that is, the Ship is transported to another WP, but no other WP transports to it.

3) I set the OB:C value for all six trigger squares to the next higher WP number, 3:

!?TM2&v2391=1/v2392=100; Tobyn's Universal Timer, once, day 1 [reset to 100 for instruction test]
!!UN:I4/27/0/111/0; place Whirlpool
!!OB2/26/0:C3;
!!OB3/26/0:C3;
!!OB4/26/0:C3;
!!OB2/27/0:C3;
!!OB3/27/0:C3;
!!OB4/27/0:C3;

Result: the same as in Trial 2) = the WP works when you enter it, but no other WP connects to it. This is as expected, since the connection process does not take place after the start of the game. But it might take place as the map is being loaded, so

4) I used instructions to do the same process:

!#UN:I4/27/0/111/0; place Whirlpool
!#OB2/26/0:C3;
!#OB3/26/0:C3;
!#OB4/26/0:C3;
!#OB2/27/0:C3;
!#OB3/27/0:C3;
!#OB4/27/0:C3;

Result: the added WP seems to work normally. It connects to other WP's, and other WP's connect to it.

Note: there must be a limit to the number of WP's that can be placed on a map. This could be found in the Map Editor by adding WP's until the Map Editor won't allow any more to be added.

Edit - that number is greater than 53, which is where I stopped just now in my test map. Also I should note that the 4th WP which I placed with UN:I for testing was placed below the three wP's which were placed in the Map Editor, so 3 was its natural number.

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


Responsible
Supreme Hero
posted March 20, 2013 08:24 PM

For those who think ERM is hard, see today's XKCD comic:


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


Honorable
Supreme Hero
posted March 20, 2013 09:35 PM

Stack overflow in Java program?

 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 ... 194 195 196 197 198 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5542 seconds