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: any1 who's average+ with erm scripts here please:
Thread: any1 who's average+ with erm scripts here please:
Maccabi_Tel_...
Maccabi_Tel_Aviv

Tavern Dweller
posted February 28, 2003 03:32 PM

any1 who's average+ with erm scripts here please:

Every artifact has its own small text next to it, like if u see the Clover of Fortune artifact, then its that clover picture and right under it in small white text the name "Clover of Fortune", now, i've seen in a game the advanture cave - something like that, it asks u 2 places to go, like "rogue camp" and "wise man" if i remember correctly, at the choosing area down between 2 artifacts you see the text of the artifact "into rogue camp" for example and not "armageddon's blade" if its that artifact.
So what is the script line for this to happen? i couldnt find it. thanks!
____________

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


Promising
Famous Hero
posted March 01, 2003 12:26 AM
Edited By: Fnord on 28 Feb 2003

Quote:
Every artifact has its own small text next to it, like if u see the Clover of Fortune artifact, then its that clover picture and right under it in small white text the name "Clover of Fortune", now, i've seen in a game the advanture cave - something like that, it asks u 2 places to go, like "rogue camp" and "wise man" if i remember correctly, at the choosing area down between 2 artifacts you see the text of the artifact "into rogue camp" for example and not "armageddon's blade" if its that artifact.
So what is the script line for this to happen? i couldnt find it. thanks!


The command to change the name of an artifact (whether for display purposes in a dialogue box or just to change it for the map in general) is UN:A (see the ERM Help file UN Receiver for details and full syntax).

The way to do it for a message, is to change the name (to the text stored in a z variable) and then restore the original name after displaying the message.

Here's a quick example:

Let's suppose you were scripting a restaurant object and gave the hero a few choices .. say, Ribs or Seasoned Boar. You decide to use the Rib Cage artifact for the ribs, and that has the artifact number 26.

First you assign the text you want to a z variable, say z150. Let's put the words "Juicy ribs" in there:

!!VRz150:S^Juicy ribs^;

Now we want to change the Rib Cage to have that text:

!!UN:A26/9/150;

That means, Artifact 26, info #9 (artifact name), will have its new name taken from z varaible 150.

We also want to change "Boar Riders" to "Seasoned boars" so we use UN:G to change the name temporarily. Boars are creature number 140. We'll store their new temporary name in z151.

!!VRz151:S^Seasoned boars^;
!!UN:G1/140/0/151;

This means change creature 140 to use the text stored in z151 (Seasoned boars). The 0 means that we're changing the singular name only.

Now let's display a question message with the ribs as one option and the seasoned boars as another. Flag 5 will store the result (left=true, right=false):

!!IF:Q5/8/26/21/140/7^Choose a menu item for your hero.^;

Q5 stores the result in flag 5. 8 is an artifact picture, 26 is the Rib Cage, 21 is a monster picture, and 140 is the Boars. 7 is the "choose one of two pictures" option.

After the message, you can put the following to restore the artifact and creatures to their default text:

!!UN:A26/9/0;
!!UN:G1/140/0/0;

In both cases, a value of 0 for the z variable number means "restore original text".

Note: to change the right-click text of the Rib Cage as well as the regular text under the picture, you would need to use a second UN:A command with the number 10 (for artifact description) instead of 9 (for artifact name). You could then use the same z variable (if you just want the name again when a player right-clicks) or a different z variable if you want different text there, such as the price or which wines go well with ribs.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maccabi_Tel_...
Maccabi_Tel_Aviv

Tavern Dweller
posted March 01, 2003 11:01 AM

Thanks!

i understood everything, now i can add it to my script
thanks again!
____________

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


Promising
Famous Hero
posted March 01, 2003 07:56 PM
Edited by Cepheus at 17:29, 23 Jul 2011.

Quote:
i understood everything, now i can add it to my script
thanks again!


You're very welcome. Glad I could help.



---

Moderator note: This thread has been inactive for two years or longer, and has been archived (closed) to prevent necro-posting. If you wish to revive the topic, send a message to Cepheus or create a new thread in its place. Thank you.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0334 seconds