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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: [Wake of Gods] - Introduction/Modding/Scripting
Thread: [Wake of Gods] - Introduction/Modding/Scripting This thread is 33 pages long: 1 2 3 4 5 ... 10 20 ... 29 30 31 32 33 · «PREV
PIGGYChu620
PIGGYChu620


Hired Hero
posted September 23, 2018 06:54 PM

Can somebody please teach me how to make my script auto-loaded on every game!?
Such as make it into a WOG option or something!?
So I don't have to write it into the time event manually EVERY SINGE GAME!?
Much appreciated!!!

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


Promising
Known Hero
posted September 23, 2018 07:08 PM

Well you can create an erm file and pack i as an mod. If this mod is activated the script will work for every game.
Use the new ERA. I has an Mod Manager integrated. There are several examples which you can study, you will also find how to use WoG options.
ERA: 100+ mods available, links and previews

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


Hired Hero
posted September 23, 2018 07:51 PM

RerryR said:
Well you can create an erm file and pack i as an mod. If this mod is activated the script will work for every game.
Use the new ERA. I has an Mod Manager integrated. There are several examples which you can study, you will also find how to use WoG options.
ERA: 100+ mods available, links and previews

Thanks trillions!
But I have another question:
I made a script which I could auto split my unit evenly across the empty slots when I right click the creature portrait in the hero's information screen.
But after I wogify it, it start to show up this stupid gamble game "NO MATTER WHERE I CLICK ON THE HERO'S INFORMATION SCREEN"!!!
Why is that!? Can you please teach me how to shut it off please!?
Much appreciated!!!

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


Promising
Known Hero
posted September 23, 2018 08:02 PM

Post your code.

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


Admirable
Omnipresent Hero
Wog refugee
posted September 23, 2018 08:05 PM
Edited by Salamandre at 20:06, 23 Sep 2018.

He probably used same function as gamble game, seeing that in the other code he used FU1. About auto split, what planet did you live on for the last 5 years? HD mod does that

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


Hired Hero
posted September 23, 2018 08:07 PM

RerryR said:
Post your code.

ZVSE

!?CM2;
!!CM:I?y1;
!!CM:F?y2;

!!VRz1:S^Split Option^;
!!VRz2:S^Split^;
!!VRz3:S^Join^;
!!VRv2:S0;    Available Space
!!VRv3:S0;    Current Amount;
!!FU1y1/y2;

!?FU1;    Split Option
!!FU&x2<>512:E;
!!FU&x1<68|x1>74:E;
!!VRv100:Sx1-68;
!!HE-1:C0/v100/?v101/?v102;
!!FU&v101=-1:E;
!!DO2/0/6/1;
!!VRv4:Sv3%v2;     Remainder
!!VRv5:Sv3:v2;     Each amount
!!IF:G1/1/1/1/2/3;
!!DO3/0/6/1;
!!DO5/0/6/1;

!?FU2;    Total amount of the same screature
!!HE-1:C0/x16/?v201/?v202;
!!VRv3&v201=v101:+v202;    Total number
!!VRv2&v201=v101|v201=-1:+1;    Total slot

!?FU3;    Auto split
!!FU&v1<>1:E;
!!VRy3:Sv5;    Assigned number
!!VRy3&v4>0:+1;
!!HE-1:C0/x16/?v301/?v302;
!!FU4&v301=v101|v301=-1x16/v101/y3;

!?FU4;    Change stack amount
!!HE-1:C0/x1/x2/x3;
!!VRv4&v4>0:-1;

!?FU5;    Auto join
!!FU&v1<>2:E;
!!HE-1:C0/x16/?v301/?v302;
!!VRy3&x16=v100:Sv101;
!!VRy5&v301=v101:S-1;
!!VRy5&v301<>v101:Sv301;
!!VRy3&x16<>v100:Sy5;
!!VRy4&x16=v100:Sv3;
!!VRy5&v301=v101:S0;
!!VRy5&v301<>v101:Sv302;
!!VRy4&x16<>v100:Sy5;
!!HE-1:C0/x16/y3/y4;

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


Hired Hero
posted September 23, 2018 08:09 PM
Edited by PIGGYChu620 at 20:10, 23 Sep 2018.

Salamandre said:
He probably used same function as gamble game, seeing that in the other code he used FU1. About auto split, what planet did you live on for the last 5 years? HD mod does that

How about... the wonderful BOP!?
But you're absolutely right about using FU1!
So which number should I use!? Over 100000!?

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


Hired Hero
posted September 23, 2018 08:16 PM

PIGGYChu620 said:
Salamandre said:
He probably used same function as gamble game, seeing that in the other code he used FU1. About auto split, what planet did you live on for the last 5 years? HD mod does that

How about... the wonderful BOP!?
But you're absolutely right about using FU1!
So which number should I use!? Over 100000!?

OK! I solved it!
It IS because I use FU1!!!
Thank you all!!!

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


Hired Hero
posted September 25, 2018 04:43 AM

Salamandre said:
you can't just ask script to show only creatures ID 145 to 189 because for that it will still need to check every monster on map. So you have to set script to loop every monster first:


ZVSE

!?CM0; triggers when you right click on adventure map
!!UN:U54/-1/?y-1;  first find how many monster stacks are on map
!!VRv1:S-1;
!!DO50000/1/y-1/1:P; now check each

Then you have to eliminate those you don't need from displaying

!?FU50000;
!!UN:U54/-1/-1/1; store monster coordinates in v1-v3
!!OB1:U?y1; get its subtype (ID) and store in y1
!!FU&y1<145|y1>189:E; ignore ID <145 and >189
!!MA:Ly1/?y2;
!!VRy2:+1;
!!IF:L^Level is %Y2^;

I saw you use !!UN:U54/-1/-1/1 to store the coordinates to v1-v3, but I didn't see you use it anywhere after that!
Is it because the !!MA receiver use it "internally"!?
Thanks!

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


Admirable
Omnipresent Hero
Wog refugee
posted September 25, 2018 09:13 AM
Edited by Salamandre at 09:14, 25 Sep 2018.

!!OB1 means the object in v1, v2, v3.

Erm help: Note: v998/v999/v1000 variables will store the location of the current object visited. Also, you can refer to it easily with an indirect reference (for example: !!OB998:...; )

So, same logic when using OB1, OB2 etc

!!MA does not need any coordinates, is about monster structure.

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


Hired Hero
posted September 26, 2018 05:09 AM

Salamandre said:
!!OB1 means the object in v1, v2, v3.

Erm help: Note: v998/v999/v1000 variables will store the location of the current object visited. Also, you can refer to it easily with an indirect reference (for example: !!OB998:...; )

So, same logic when using OB1, OB2 etc

!!MA does not need any coordinates, is about monster structure.

I thought OB1 means Luke Skywalker's master!
Just kidding! :P

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


Hired Hero
posted October 13, 2018 05:39 PM
Edited by PIGGYChu620 at 17:45, 13 Oct 2018.

I tried to make a ratio dialog to show the towns a player control, just like a Export Town Portal would do.
And then I come across this problem:
In the command IF:G, you can make up to 12 ratio buttons, but the amount of it HAVE TO be decided beforehand!
And the problem is the amount of the towns a player control is a variable! And therefore can't NOT be known beforehand!
For example, if a player have 3 towns, the dialog command will looks like:

   !!IF:G1/1/1/101/1/2/3;

And if a player have 5 towns, the command will looks like:

   !!IF:G1/1/1/101/1/2/3/4/5;

Which have different length!
It's NOT something you could just plug in a variable and get the job done!
So somebody PLEASE teach me how to make IF:G "dynamically"!
Or if there other way to accomplish such a task is also very welcome!
Much appreciated!!!

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


Admirable
Omnipresent Hero
Wog refugee
posted October 13, 2018 08:00 PM
Edited by Salamandre at 20:07, 13 Oct 2018.

1/2/3/4/5 are z vars, right? So what you need is clean z1-z12 then check how many towns you have and assign one z var for each, okay?
Then in the IF:G command you place all z vars, from 1 to 12. Those containing a town will show, others will be empty so nothing will display.

Try this to understand:


ZVSE

!?CM0; right click on adventure map
!!DO123456/1/12/1:P; clean z1-z12
!!VRy1:S1R11; random value for y1 1-12
!!IF:M^dialog will have %Y1 options^; show it
!!VRv2:S1;
!!DO1234567/1/y1/1:Pv2; fill the z vars for y1 value (1-12)
!!VRz13:S^My awesome dynamic dialog^; header
!!IF:G1/3/0/13/1/2/3/4/5/6/7/8/9/10/11/12; dialog will change at each try


!?FU123456;
!!VRzx16:S^^;

!?FU1234567;
!!VRzx16:S^%V2^; assign a number to each z var within y1 range
!!VRv2:+1;

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


Hired Hero
posted October 13, 2018 08:27 PM

Salamandre said:
1/2/3/4/5 are z vars, right? So what you need is clean z1-z12 then check how many towns you have and assign one z var for each, okay?
Then in the IF:G command you place all z vars, from 1 to 12. Those containing a town will show, others will be empty so nothing will display.

Try this to understand:


ZVSE

!?CM0; right click on adventure map
!!DO123456/1/12/1:P; clean z1-z12
!!VRy1:S1R11; random value for y1 1-12
!!IF:M^dialog will have %Y1 options^; show it
!!VRv2:S1;
!!DO1234567/1/y1/1:Pv2; fill the z vars for y1 value (1-12)
!!VRz13:S^My awesome dynamic dialog^; header
!!IF:G1/3/0/13/1/2/3/4/5/6/7/8/9/10/11/12; dialog will change at each try


!?FU123456;
!!VRzx16:S^^;

!?FU1234567;
!!VRzx16:S^%V2^; assign a number to each z var within y1 range
!!VRv2:+1;

Thanks! You're the best!!! :)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 33 pages long: 1 2 3 4 5 ... 10 20 ... 29 30 31 32 33 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0591 seconds