|
Thread: [Wake of Gods] - Introduction/Modding/Scripting | This thread is pages long: 1 2 3 4 5 ... 10 20 ... 29 30 31 32 33 · «PREV |
|
PIGGYChu620
Adventuring 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!!!
|
|
RerryR
Promising
Supreme Hero
Researching Magic
|
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
|
|
PIGGYChu620
Adventuring 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!!!
|
|
RerryR
Promising
Supreme Hero
Researching Magic
|
posted September 23, 2018 08:02 PM |
|
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 23, 2018 08:05 PM |
|
|
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
|
|
PIGGYChu620
Adventuring 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;
|
|
PIGGYChu620
Adventuring Hero
|
posted September 23, 2018 08:09 PM |
|
|
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!?
|
|
PIGGYChu620
Adventuring 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!!!
|
|
piggychu620
Adventuring 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!
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 25, 2018 09:13 AM |
|
|
!!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.
|
|
piggychu620
Adventuring 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
|
|
PIGGYChu620
Adventuring Hero
|
posted October 13, 2018 05:39 PM |
|
|
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!!!
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 13, 2018 08:00 PM |
|
|
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;
|
|
PIGGYChu620
Adventuring 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!!! :)
|
|
lea
Adventuring Hero
|
posted July 18, 2019 06:49 AM |
|
Edited by lea at 06:50, 18 Jul 2019.
|
where can I find HoMM3 modding tools for editing .lod and .def files (like mmarchive.exe and h3deftool.exe and resedit2.exe) for download?
all links I managed to find are dead, in this thread as well as here:
http://heroescommunity.com/viewthread.php3?TID=39961
and here:
http://heroescommunity.com/viewthread.php3?TID=32737
did I miss something obvious?
____________
|
|
avatar
Promising
Supreme Hero
|
posted July 18, 2019 08:15 AM |
|
Edited by avatar at 08:16, 18 Jul 2019.
|
Yes. Type names of this tools in google. It'll show you author (GreyFace) site to download.
____________
|
|
lea
Adventuring Hero
|
posted July 18, 2019 01:15 PM |
|
|
found it after adding "greyface" to the search query
thanks, avatar
____________
|
|
Centurion
Hired Hero
|
posted November 08, 2022 02:29 PM |
|
|
Hello guys, looking for help with scripting new town lineups on a per map basis running ERA 3 with Third Upgrades Mod. I've read through Lizard's post on Page 5 and tried to copy it, but I seem to be missing something
ZVSE
!!UN:T0/0/0/0 T4/0/1/1;
!!UN:T0/1/0/2 T4/1/1/3;
!!UN:T0/2/0/4 T4/2/1/5;
!!UN:T0/3/0/6 T4/3/1/7;
!!UN:T0/4/0/8 T4/4/1/169;
!!UN:T0/5/0/10 T4/5/1/11;
!!UN:T0/6/0/13 T4/6/1/14;
I've copy pasted this into a Timed Event, and set the day of first occurence to 600. In theory this should replace Zealot (09) with War Zealot (169) right?
However when game starts it says ERM has wrong syntax, disabled, and the creature lineup hadn't changed.
Anyone willing to help me troubleshoot? Thanks guys
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted November 08, 2022 04:59 PM |
|
|
You need a trigger, what you did is pasting a code but nothing will start it. Try this:
ZVSE
!?PI; (this is the trigger, code is run when map is loaded)
!!UN:T0/0/0/0 T4/0/1/1;
!!UN:T0/1/0/2 T4/1/1/3;
!!UN:T0/2/0/4 T4/2/1/5;
!!UN:T0/3/0/6 T4/3/1/7;
!!UN:T0/4/0/8 T4/4/1/169;
!!UN:T0/5/0/10 T4/5/1/11;
!!UN:T0/6/0/13 T4/6/1/14;
Don't use timed events, is mod structure, look in other mods to see how they are done, is easy.
|
|
Centurion
Hired Hero
|
posted November 08, 2022 05:31 PM |
|
|
Thanks Salamandre, no luck with this code but perhaps I will look into the mods as you say )
|
|
|