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 396 pages long: 1 50 100 150 200 250 300 350 ... 389 390 391 392 393 ... 396 · «PREV / NEXT»
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted November 02, 2021 09:49 PM

Eh,

!?AE1&v998=153; adds skill
!!HE-1:S11/?y1;
!!HE-1&y1<1:S11/1;

!?AE0&v998=153; removes skill
!!HE-1:S11/?y1;
!!HE-1&y1>0:S11/0;

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


Legendary Hero
posted November 03, 2021 03:57 AM
Edited by bloodsucker at 04:01, 03 Nov 2021.

Please, look at the script I changed. It does several other things... You don't lose the skill, you lose a level of the skill, then if you get it to expert you can remove the artifact and keep the full expertise, etc.
Of course, it is possible to re-write the entire routine but that's not what I wanted. I want a routine I have used hundreds of times and all together billions of times (so it's tested and doesn't rely on me increasing the size of the fonts to 12 so I can spot the difference between this ; and this : to detect the problems...) to get a very small but very strategic change.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 03, 2021 07:35 AM

There is no script, you deleted it. And I don't understand what you want, every post there is some detail you add after asking one thing.
____________
Era II mods and utilities

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


Legendary Hero
posted November 03, 2021 08:43 AM
Edited by bloodsucker at 09:01, 03 Nov 2021.

The WoG 7 - Enhanced Artifacts.

Here, the part that concerns the commander artifacts. The hole script does a lot of other things and the description misses this, that's why wasn't finding it.
** Initialization Code

!#UN:P71/?v7182;  [Check if Enhanced Artifacts is enabled in WoGify Options]
!#UN:P219/?v7178; [Check if Enhanced Commander Artifacts is enabled in WoGify Options]
*#VRv7182:S1;                  [enable for stand-alone use]
*#VRv7178:S1;                  [enable for stand-alone use]

!#TM51&v7182=1:S8/999/7/255;                         [timer once/week for all players - starts on day 8]
*#TM51&v7182=1:S2/999/1/255;          ****test timer once/day****

!#UN&v7178=1:A146/2/4;                                [set axe of smashing - right hand]
!#UN&v7178=1:A147/2/6;                                [set mithril mail - torso]
!#UN&v7178=1:A148/2/4;                                [set sword of sharpness - right hand]
!#UN&v7178=1:A149/2/1;                                [set helm of immortality - head]
!#UN&v7178=1:A150/2/3;                                [set pendant of sorcery - neck]
!#UN&v7178=1:A151/2/8;                                [set boots of haste - feet]
!#UN&v7178=1:A152/2/5;                                [set bow of seeking - left hand]
!#UN&v7178=1:A153/2/7;                                [set dragon eye ring - ring]
!#UN&v7178=1:A154/2/5;                                [set hardened shield - left hand]
!#UN&v7178=1:A155/2/7;                                [set slava's ring of power - ring]

!#VRv7060&v7178=1:S1 R4;                                      [random primary skill value 1-5]
!#VRv7061&v7178=1:S0 R27;                                     [random secondary skill 0-27]
!#VRv7062&v7178=1:S1 R4;
!#VRv7063&v7178=1:S0 R27;
!#VRv7064&v7178=1:S1 R4;
!#VRv7065&v7178=1:S0 R27;
!#VRv7066&v7178=1:S1 R4;
!#VRv7067&v7178=1:S0 R27;
!#VRv7068&v7178=1:S1 R4;
!#VRv7069&v7178=1:S0 R27;
!#VRv7070&v7178=1:S1 R4;
!#VRv7071&v7178=1:S0 R27;
!#VRv7072&v7178=1:S1 R4;
!#VRv7073&v7178=1:S0 R27;
!#VRv7074&v7178=1:S1 R4;
!#VRv7075&v7178=1:S11;           * and this is what I've changed.
!#VRv7076&v7178=1:S1 R4;
!#VRv7077&v7178=1:S0 R27;
!#VRv7078&v7178=1:S1 R4;
!#VRv7079&v7178=1:S0 R27;

!#UN&v7178=1:N4/960/v7061;                          [store skill name]
!#UN&v7178=1:N4/961/v7063;
!#UN&v7178=1:N4/962/v7065;
!#UN&v7178=1:N4/963/v7067;
!#UN&v7178=1:N4/964/v7069;
!#UN&v7178=1:N4/965/v7071;
!#UN&v7178=1:N4/966/v7073;
!#UN&v7178=1:N4/967/v7075;
!#UN&v7178=1:N4/968/v7077;
!#UN&v7178=1:N4/969/v7079;



!#VRz970&v7178=1:Sz171000;
!#VRz971&v7178=1:Sz171001;
!#UN&v7178=1:A146/10/970;
!#UN&v7178=1:A146/9/971;
***
!#VRz972&v7178=1:Sz171002;
!#VRz973&v7178=1:Sz171003;
!#UN&v7178=1:A147/10/972;
!#UN&v7178=1:A147/9/973;
***
!#VRz974&v7178=1:Sz171004;
!#VRz975&v7178=1:Sz171005;
!#UN&v7178=1:A148/10/974;
!#UN&v7178=1:A148/9/975;
***
!#VRz976&v7178=1:Sz171006;
!#VRz977&v7178=1:Sz171007;
!#UN&v7178=1:A149/10/976;
!#UN&v7178=1:A149/9/977;
***
!#VRz978&v7178=1:Sz171008;
!#VRz979&v7178=1:Sz171009;
!#UN&v7178=1:A150/10/978;
!#UN&v7178=1:A150/9/979;
***
!#VRz980&v7178=1:Sz171010;
!#VRz981&v7178=1:Sz171011;
!#UN&v7178=1:A151/10/980;
!#UN&v7178=1:A151/9/981;
***
!#VRz982&v7178=1:Sz171012;
!#VRz983&v7178=1:Sz171013;
!#UN&v7178=1:A152/10/982;
!#UN&v7178=1:A152/9/983;
***
!#VRz984&v7178=1:Sz171014;
!#VRz985&v7178=1:Sz171015;
!#UN&v7178=1:A153/10/984;
!#UN&v7178=1:A153/9/985;
***
!#VRz986&v7178=1:Sz171016;
!#VRz987&v7178=1:Sz171017;
!#UN&v7178=1:A154/10/986;
!#UN&v7178=1:A154/9/987;
***
!#VRz988&v7178=1:Sz171018;
!#VRz989&v7178=1:Sz171019;
!#UN&v7178=1:A155/10/988;
!#UN&v7178=1:A155/9/989;

**
!?AE0&v7178=1; take off artifact trigger

!!FU7038&v998>145/v998<156:P;
**

**
!?AE1&v7178=1; put on artifact trigger

!!FU7037&v998>145/v998<156:P;
**



____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 03, 2021 09:01 AM

ok, so what you need?

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


Legendary Hero
posted November 03, 2021 09:11 AM

Salamandre said:
ok, so what you need?

Nothing. I told you, it's done.
That is why I deleted the long and tedious script anyone can find in their own WoG directory.
My biggest problem was not finding the script. Then it took me some time to understand what it does, cause I'm rusty as hell.
____________

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


Legendary Hero
posted November 05, 2021 10:34 AM

I'm trying to create an object that allows you to buy the upgrades specialty from any two creatures in to any other creature.
Does any one knows a script that loops trough towns to make a list of creatures or something similar?
The only way I'm seeing it done is to loop from 0 to 13, then from 14 to 27, etc and I believe there must be a more elegant solution...
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 11:15 AM

I don't understand what "upgrades specialty" means. Can you give a specific example?

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


Legendary Hero
posted November 05, 2021 11:19 AM
Edited by bloodsucker at 11:22, 05 Nov 2021.

Gelu.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 11:28 AM

Still I don't understand. You want (for example) Gelu  to change specialty or give a specific creature you own to any hero? Give me a detailed example so I can give you the paths.

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


Legendary Hero
posted November 05, 2021 12:08 PM
Edited by bloodsucker at 12:13, 05 Nov 2021.

Ok, how I see it is this.

Prompts a dialog asking for the alignment the creature that will be the result of the upgrade, then shows a IF:M to get if it is upgraded or not.
Then shows a dialog with the creatures from that town (upgraded or nor according to the previous choice) for player to select one.
After this player must choose the two creatures (it selects their upgrades automatically, if they exist) that he wants to be able to upgrade in to the other, repeating the same operation.

In the end is just to do !!HE-1:X6/ value 2 /value 3 /value 1.

Now, I don't know of a property of the creature or the town, to link one another, so all I can see is loop trough even and uneven numbers between x and x1 and get the items for the lists like this.
It seams awful and tedious, so I ask if there is another way to find the creatures (without asking player to check the number in the Help's creature list that was my first idea...).
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 12:14 PM

Sorry I don't get it. Maybe someone else understands this.

What I asked was a specific example, not how you would code an action I don't understand. Like this:

Player visits object
Object displays a list of ...
Player choose from the list ...
Action...

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


Legendary Hero
posted November 05, 2021 12:23 PM

Player visits object
Is asked if he wants to change his specialty to master of upgrades.
If he answers YES, he will get the choices to fill the three parameters from !!HE94:X6/x1/x2/x3; and the object does the change.

I'm thinking of charging 100 mithril and 100.000 gold for the cheat...
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 12:36 PM

Finally!

1) So the object should display the 8 towns in a list.
2) If player selects a town, loop all towns of the player and see if he owns one of that type, if not exit
3) Show a list with the 7 creatures of that town (use UN:T formula so it works on custom upgrades too)
4) once the player selected the creature (store its subtype in a variable), ask him to enter in a text box the name of the creature he wants the former creature to upgrade. Use UN:N3 formula to see if name corresponds to an existing creatures
5) Define the new upgrade for that creature



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


Legendary Hero
posted November 05, 2021 12:50 PM
Edited by bloodsucker at 15:46, 05 Nov 2021.

It's not that.
It's to give the active hero Gelu's specialty but to upgrade peasants and halflings to Azure Dragons. Got it?
But only thing I don't know how to is that UN:T formula you mention. From all I know there are castles, creatures and alignments (at this moment my Master Genies and my Enchanters are Castle align but towns still produce monks and cavaliers, so it doesn't automatically removes the other creature to the neutrals faction, as I supposed) and they don't have a way of connecting except doing it by hand.
So I can't link the creatures to the towns and will have to do the lists by hand, creating hundreds of lines of embarrassing code...

It's that, thanks.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 01:00 PM

Well, is much easier then. Visit object, type name of creature #1 in a box, store in variable, type creature #2, same, type creature #3.
Set #1 and #2 to upgrade to #3 for that hero specialty.

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


Legendary Hero
posted November 05, 2021 01:07 PM

Salamandre said:
Well, is much easier then. Visit object, type name of creature #1 in a box, store in variable, type creature #2, same, type creature #3.
Set #1 and #2 to upgrade to #3 for that hero specialty.

Well, that was my first idea but with the numbers. Searching for a string will often produce bad results as you know or, you of all else, wouldn't have done Finder the way it is...
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 01:18 PM
Edited by Salamandre at 13:36, 05 Nov 2021.

Searching for a name is very precise, if the player knows the name of the creature. You can also create a dialog DL with list and subtypes so  all the player has is enter a number. But that will require much more time,it's up to you.

Still my first solution, select a creature from town list/neutral is what I would have done. You confuse alignment (MA:O) with town growth, a creature can get alignment to some town but that doesn't mean you can recruit it in that town (only UN:T  sets that). Alignment is only for morale and terrain speed bonuses purposes.                                  

@Edit: my bad, I just checked and you can get the name of a creature by typing its ID but not the opposite. I will look more into, there must be a way.

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


Legendary Hero
posted November 05, 2021 01:42 PM
Edited by bloodsucker at 13:50, 05 Nov 2021.

The problem with searching for a string is a problem between the chair and the keyboard, as a friend for mine used to say.

Forget it. It can't work in  game, except in a very studied custom map. The example I gave is extreme but if I don't find a kind of cap it won't be playable. It will be something like the other day, when I tried to play with your Trainer. One shouldn't get 30.000 level 10 azure dragons just because he can....
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted November 05, 2021 01:48 PM
Edited by Salamandre at 14:40, 05 Nov 2021.

I got it working

!?CM0; triggers when you right click on map
!!VRz2:S^Find the subtype of a creature^;
!!VRz3:S^Enter its name (first letter Uppercase):^;
!!IF:D55/2/3/0/0/0/0/0;
!!IF:F55/0/0/0/0/0;
!!IF:E1/55;
!!VRz1:H5; **check if text entered, flag 5=1 if yes
!!DO321321/0/196/1&5:P;

!?FU321321;
!!UN:N3/z2/x16/0;
!!FU&z1<>z2:E;
!!IF:Q1/21/x16/1^%Z1's subtype is %X16^;

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 396 pages long: 1 50 100 150 200 250 300 350 ... 389 390 391 392 393 ... 396 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0570 seconds