|
|
elimicmat
Hired Hero
|
posted July 12, 2012 08:59 PM |
|
|
I guess this question been up like a thousand times, but I just couldn't find it. I feel really stupid for asking this but here goes:
How do you add a script so it will be in random maps? I've downloaded some scripts I wanted to try but it don't seem to work.
A few of them miss the .ert file. Do I need that?
For instance: I've tried to add Fnords "random events" script, but nothing happens. I cant choose it in the menu either. I'm running 3.58f. Havent tried in Era though. But I prefer 3.58f....
And I've read about adding own artifacts. I understand how to make them special but how do I add them in random maps??? I've played "Master of puppets" mod and I really want a few of those artifact....
|
|
revolut1oN
Famous Hero
|
posted July 12, 2012 09:26 PM |
|
|
Quote: But I prefer 3.58f....
Why? ERA is newer and better in every way.
|
|
elimicmat
Hired Hero
|
posted July 12, 2012 09:37 PM |
|
|
Well no biggie. I just had a break from WOG for about a year or something but once again i'm deep into the game again (will it ever end). So I've recently found out about ERA so thats the only reason...
But it really doesn't matter if I use ERA or 3.58. But the question remains....
|
|
JimV
Responsible
Supreme Hero
|
posted July 13, 2012 01:33 AM |
|
Edited by JimV at 01:36, 13 Jul 2012.
|
Assuming you have the ERM script editor, click on the book icon at the end of the tool bar, or click on "Information" and then "Erm Scripter- Help" and then "New Document", and read about the .ers file. This file allows you to add new wogify scripts to the WoG Options Menu under WoG 3.58f.
The simplest and quickest way to add a wogification script, if you always want the script to be active in all wogified maps, is to copy and paste it at the end of any of the existing WoG scripts. This method does not add it to the WoG Options menu and perhaps in this case you should add a question to the player at the beginning of the script giving the player the option to disable it - similar to the message about custom alliances or Map Rules.
P.S. You can also read about "ertifying" and "de-ertifying" scripts (.ert files) in the ERM Scripter Help.
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 13, 2012 05:06 AM |
|
|
So the dialogue box that opens when you right click a commander in battle, the same one that opens when you press the handshake gloves in the hero screen, can I edit what is in that in any way? If I change a commander def the small def in that dialogue box does not change, and that's just not right
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 13, 2012 07:07 AM |
|
|
Quote: So the dialogue box that opens when you right click a commander in battle, the same one that opens when you press the handshake gloves in the hero screen, can I edit what is in that in any way? If I change a commander def the small def in that dialogue box does not change, and that's just not right
Also, let's say I want to check if a wall is injured or destroyed in a siege? Possible?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 13, 2012 09:20 AM |
|
|
@Master_learn, thanks for offer, I for one think would be completely useless. There is already an index available, that's ERM help.
|
|
elimicmat
Hired Hero
|
posted July 13, 2012 10:02 AM |
|
|
@JimV
Well thats seems to be the problem I cant see to overcome. I open the folder with all the scripts (Think it is Data/s (or "p"), and I see the usual 70+ scripts, and then put the textfile there amongs the others, but nothing happens. So either I'm doing something wrong (and stupid since its seems very easy) or the script don't work. Could anyone please make a link or something to a script that works 100%.
I now understand why its not in the menu, so that was helpful though.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 13, 2012 10:17 AM |
|
|
All scripts in DATA/s work 100%, can open with erm editor.exe. As for Fnord scripts, the title of the thread could not be more explicit: it says 3.59. Will not work with 3.58 unless you re-write them to become compatible.
|
|
JimV
Responsible
Supreme Hero
|
posted July 13, 2012 01:24 PM |
|
|
Nothing happens that way for me either, in WoG 3.58f (under Era 2, all scripts for all active mods in an active mod's Data/s get loaded at the start of a game, can be extracted with F11, and can be reloaded (with changes) during the game with F12). When I said copy and paste into an existing script, I meant open a script, say script43.erm, in the Script Editor, paste your new script at the end of it (except for the ZVSE) and resave as script43.erm. That always works for me. To get a new script recognized in WoG 3.58, I think you have to give it a number, say script85.erm, and then register it by either editing the Zsetup text files or adding a .ers file.
First of course you must verify that the new script works, by trying it in a test map as a Timed Event - as discussed in ERM Help.
Master_learn, thanks for the offer. I can think of two things you could do, if you have the time and interest:
1) Compile a list of useful UN:C hacks. I have one as a .erm file which I add to every time I see something new, or find something myself. As an ERM or text file, it can be searched for key words with an editor. I try to credit the person who first mentioned it, although I could be mistaken.
2) Compile a list of frequently-asked ERM questions and their answers. Although as Salamandre says they are all in ERM Help, many people refuse to read that great document.
|
|
master_learn
Legendary Hero
walking to the library
|
posted July 13, 2012 01:31 PM |
|
|
Thanks for your support,JimV,will do these tasks.
____________
"I heard the latest HD version disables playing Heroes. Please reconsider."-Salamandre
|
|
Bersy
Honorable
Supreme Hero
|
posted July 13, 2012 02:05 PM |
|
|
Quote: So the dialogue box that opens when you right click a commander in battle, the same one that opens when you press the handshake gloves in the hero screen, can I edit what is in that in any way? If I change a commander def the small def in that dialogue box does not change, and that's just not right
Check Data\zvs\Lib.1\... npc%n.gif files
|
|
elimicmat
Hired Hero
|
posted July 13, 2012 02:07 PM |
|
|
@Salamandre.
Yeah, well I know the thread says 3,59 but there's at least one post in the thread that says the opposite (at least for a few). Fnord himself says:
"A number of them definitely work in 3.58f. Some won't work without modification, and a couple might be impossible to modify if they rely too heavily on 3.59 beta features (honestly I don't recall for sure now)."
Now, I've tried almost all of them and no-one works. So there must be something really basic I miss....
@JimV
I've tried in a test-map, but to no avail. Guess I have to do it your way and remove a script and put another there. Can I remove whatever script I like. For instanse "Monster muttering" and "Berserker flies" are two scripts I never use.
|
|
JimV
Responsible
Supreme Hero
|
posted July 13, 2012 02:19 PM |
|
|
Again (3rd try), there is no need to remove any WoG 3.58f script. You can add your new script to the end of an existing script, using the ERM Script Editor. (See the sticky post, "Introduction to Modding and Scripting" if you don't have the editor.) Note: unlike Timed Events, there is not a small limit to the number of lines that a wogification script can have - although I tend to use a short WoG script to add to, just in case.
If your script does not work under WoG 3.58f as a Timed Event in a test map, it won't work as a numbered WoG script either. You must first debug your script so that it works. Also, it must not interfere with any existing WoG scripts (by using the same variables, functions, flags, etc.) - as discussed in ERM Help.
|
|
elimicmat
Hired Hero
|
posted July 13, 2012 02:28 PM |
|
|
Quote: Again (3rd try), there is no need to remove any WoG 3.58f script. You can add your new script to the end of an existing script, using the ERM Script Editor. (See the sticky post, "Introduction to Modding and Scripting" if you don't have the editor.)
Third times the charm :-) Guess I was reading to fast.... Off to try it again. Thanx
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 13, 2012 09:20 PM |
|
|
I'll ask again as it may have gotten drown out:
During a siege I would like to check if a wall is destroyed or injured, which has to be stored somewhere (probably some table for each piece of wall and tower). Would anyone know where to look?
|
|
Asheron
Famous Hero
Ancient
|
posted July 13, 2012 09:37 PM |
|
|
I must thank once again to all the helpful people here. But it's not that easy to understand, even when explained like this... Salamandre, I definitely agree with you that taking baby steps is the best way to learn, but that takes too much time and tutorials are like "make singing rock" which is something I will never use. Still, I will try to improve, and I think that through examples it's easier to understand.
- about stack experience... What I meant was: if I write code in that manner, example !!EA136:B5/1/119/49/1/1/1/1/1/1/1/1/1/1/1 (taken from your guide) and paste in some existing script (or make entirely new one just for this), will Enchanter (in this example) be immune to lvl 1 spells even though stack experience itself is disabled? Since I personally don't know of any other way to make creature cast spells before and after attack and things like that.
- regarding mechanical - two creatures that fall into this group in vanila homm3 is gargoyle and golem. They are not alive and therefore not affected by Resurrection, and neither they are dead, so Animate Dead can't resurrect them. I'm asking this since in one of factions I'm making there will be 3 machines out of 7 tiers, so I was just curious can I give some creature ability to repair machines only (like gremlin does in HoMM5).
- about shooter and changing coordinates scripts - again, I am ashamed to admit I don't know what numbers I need to change? I tried to do it like this:
!?FU500; //make archer for new shooters
!!VRx2:+7994814;
!!UN&x1=0:Cx2/1/x3;
!?FU501;
!!FU5000/79/1; (79 being randomly chosen Minotaur King, I replaced his def with Orc axe thrower to have throwing animation)
and it's not working... Would it be too much to make an example with some creature so I can see exactly what part of scripts needs changing?
@Elimicmat - I can tell you how I do it (way I figured out via trial and errors). You just need to paste the script in Data/s, and it's needs to be named script93.erm (number is random example). At least that's true for WoG 3.58, in ERA I see scripts have their own names. Then it's usual ZVSE and inputting codes. Hope this tiny help helps
____________
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 13, 2012 09:49 PM |
|
Edited by kegolo at 22:09, 13 Jul 2012.
|
If stack xp is disabled then it will not work. The EA receiver only works with stack xp enabled.
I can't give you a better example than what you wrote for shooters. You do need to give the creature the shooting flag as well as some shots however. For your minotaur king add into FU500
!!MA:N79/24;
!!MA:X79/?i;
!!VRi:|4;
!!MA:X79/i;
As for repairing mechanical creatures, the following from the Covenant allows Sword Elites (#206) to fix ghosts (#209) and wraiths (#210). Ask if anything is unclear, I try to comment as much as possible for my own sake.
[This makes Sword Elites able to fix Ghosts/Wraiths]
!?BG0&v226=-5/v227=-5/v225=1;
!!VRv3:S-2; !!VRv5:S-2; [initialize to false]
!!BU:E20/?v1; [stack #s]
!!BU:E30/?v2;
!!BMv1&v1<>-1:G4/?v3/?v4; [if has disguise, is henchman]
!!BMv2&v2<>-1:G4/?v5/?v6;
!!VRv226&v3>0:Sv1; [set if a henchman > 0 to stack #]
!!VRv227&v5>0:Sv2;
!?CM4&v225=1;
!!VRv8:S-1; !!VRv11:S-1; [reset variables]
!!CM:S?v891 D?v3; [Get type of click and position of click]
!!FU|v3<0/v3>186:E; [break if not in grid]
!!BG:N?v894; [current creature stack]
!!BMv894:N?v896; [current number of sword elites]
!!BMv894:T?v893; [creature type to 893]
!!FU|v893<>206/v891<>12:E; [exit if not a sword elite]
!!BMv894:I?v901; [get side of creature]
!!BMv894:P?v905; [get position of sword elites]
!!BU:Dv3/?v2; [stack # at clicked position]
!!FU|v2<0/v2>41:E; [break if not a stack]
!!FU&v2<21/v894>20:E; [wrong side]
!!FU&v2>20/v894<21:E; [wrong side]
!!BMv2:P?y2 T?y4 N?v906 O?v902; [position type number and army slot num]
!!BU&y2<>v3:Ey2/?v8; [check other hex if clicked front of creature]
!!VRv10&v901=0:S 1 + v3; !!VRv10&v901=1:S -1 + v3;
!!BU&y2=v3:Ev10/?v11; [check other hex if clicked back of creature]
!!FU|v8<>-1/v11<>-1:E; [break if someone standing there]
!!CM|y4=209/y4=210/y4=211:R0; [disable standard reaction]
!!FU&y4<>209/y4<>210/y4<>211:E; [break if not a ghost/wraith/aa]
!!IF&v226=v2/v894<21:M^The Elites have not yet developed the technology to repair {Henchmen}.^;
!!IF&v227=v2/v894>20:M^The Elites have not yet developed the technology to repair {Henchmen}.^;
!!FU|v226=v2/v227=v2:E;
!!IF&v896<3/y4=209:M^Upon entering the wreckage, it seems you have too few Sword Elites to repair the Ghosts^;
!!IF&v896<3/y4=210:M^Upon entering the wreckage, it seems you have too few Sword Elites to repair the Wraiths^;
!!IF&v896<6/y4=211:M^Upon entering the wreckage, it seems you have too few Sword Elites to repair the AA Wraiths^;
!!FU&v896<3:E; [if too few break after displaying message]
!!FU&v896<6/y4=211:E; [break for AA]
!!BMv2:B?v904; [number of ghosts/wraiths at the start]
!!VRv898&y4=209:Sv904 * 2; [number of sword elites needed for full ghost fix]
!!VRv898&y4=210:Sv904 * 3; [number of sword elites needed for full wraith fix]
!!VRv898&y4=211:Sv904 * 6; [number of sowrd elites needed for full AA fix]
!!VRv899:Sv896 - v898; [number left after fixing vehicle]
!!IF&v899<0/y4=209:M^Too few Sword Elites to fix the %V904 Ghosts.^;
!!IF&v899<0/y4=210:M^Too few Sword Elites to fix the %V904 Wraiths.^;
!!IF&v899<0/y4=211:M^Too few Sword Elites to fix the %V904 AA Wraiths.^;
!!FU&v899<0:E; [break if too few]
!!IF&y4=209:Q1/21/209/2^It will take %V898 Sword Elites to fix %V904 Ghost(s). Proceed?^;
!!IF&y4=210:Q1/21/210/2^It will take %V898 Sword Elites to fix %V904 Wraith(s). Proceed?^;
!!IF&y4=211:Q1/21/211/2^It will take %V898 Sword Elites to fix %V904 AA Wraith(s). Proceed?^;
!!FU&-1:E;
!!BHv901:N?y5; [current hero number]
!!HEy5:F?y6/?y7/?y8/?y9; [hero primary skills]
!!HEy5:B0/?z1; [hero name]
!!IF&y8<7:Q1/33/0/1^%Z1 needs at least 7 {Spell Power} to persuade Sword Elites^;
!!FU&y8<7:E;
!!BMv894&1:Nv899; [sword elites new number]
!!VRz123:S^The Sword Elites have variable efficiency, but they report at least^;
!!BU:Mz123;
!!BG:A0;
!!HEy5:S17/?y10; [earth magic]
!!HEy5:A2/0/?y11/?y12; [spell book number to y11]
!!HEy5&y11=0:A1/0/17; [if no spellbook, add one]
!!HEy5&y10<>3:S17/3;
!!HEy5:Fy6/y7/1000/y9;
!!BHv901:C38/y2/3/0;
!!BMv2:Nv904;
!!BG:A12;
!!BU:R;
!!HEy5:Fy6/y7/y8/y9;
!!HEy5:S17/y10;
!!HEy5&y11=0:A3/0/1/1; [delete spellbook if didn't have one]
!!FU:E;
|
|
LizardWarrior
Honorable
Legendary Hero
the reckoning is at hand
|
posted July 13, 2012 09:52 PM |
|
|
So I recently added several new creatures with amethyst plugin,I added all it needed,frames to cprsmall.def,twcrport.def and avwattak.def.Added and completed the new rows in cranim.txt and zcrait.Added sounds and map sprites.But the script below doesn't work,when I try to play it shows me the next errors and in game my creatures doesn't appear in the line-up:
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted July 13, 2012 10:11 PM |
|
|
Did you get the updated amethyst plugin from like pg 5 of oxfea's thread. I believe I reported this exact problem to him and he fixed it. Also the one from the covenant is the right one if you have that too.
|
|
|