|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 17, 2020 09:37 AM |
|
|
Well, it all depends on WHERE you set your scripts to happen. Remove the balista in PI or first day timer, then you will be able to add balista to that hero later. Same for Nagash specialty, remove it in 1st day only timer, so it will occur again when you restart the map from main menu.
Also, restarting mods from main menu should be avoided, as many flags, z vars and such will be already modified. Either you do as I did in tew4, which is reset in instructions ALL flags and z vars, or you pust a warning message asking the player to close the game first.
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted January 17, 2020 12:43 PM |
|
|
Yeah but that doesn't solve my problem. It's not a matter of WHEN is the Ballista removed. It has to be removed by default (via a pluggin) so that if you DO want to give the hero a Ballista through the map editor, it will not be removed by a script.
Same goes with Jeddite and Nagash, it should be reverted to their original specialties by default. I did change their specialties via script and it works in game. All I am saying is that it could be made to work anyway (whether you start a new game or not).
As for the third creature slots, is there a way to make them work without the use of battery pluggin?
____________
Not idly do the leaves of Lorien fall.
|
|
DarkAtom
Adventuring Hero
|
posted January 19, 2020 03:14 PM |
|
Edited by DarkAtom at 15:15, 19 Jan 2020.
|
Hero_of_Light said: As for the third creature slots, is there a way to make them work without the use of battery plugin?
Didn't ERA 2.9 add a whole bunch of receivers and triggers just for this purpose? I am not sure how they work because I never had a chance to try them, but check the ERA 2.9 changelog for the !!RD receiver.
____________
"If you get scared of doing what's right you might as well lay down and die" - Wulfstan, Heroes of Might and Magic V: Hammers of Fate
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted January 19, 2020 05:46 PM |
|
|
Bersy made a new topic about it, but as he said, there are still some problems with it.
____________
Not idly do the leaves of Lorien fall.
|
|
Bersy
Honorable
Supreme Hero
|
posted January 19, 2020 06:29 PM |
|
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted January 20, 2020 02:35 PM |
|
|
If possible, the functionality should have a backwards compatibility as well, so that older mods that use the 3rd slots (like my own) are compatible with the newest versions of ERA. Ideally, any script that worked on previous versions of ERA, should work on later versions as well, otherwise they would be rendered obsolete.
____________
Not idly do the leaves of Lorien fall.
|
|
Bersy
Honorable
Supreme Hero
|
posted January 20, 2020 02:43 PM |
|
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted January 20, 2020 09:51 PM |
|
|
!#TM21:S8/999/7/255; //1st day timer
**Castle**
!?PI;
!!UN:U98/0/?i; //searching for all castles
!!FU&i=0:E;
!!DO25665/1/i/1:P;
!?FU25665; //searching for all castles
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/40; //if upgraded Swordsmen is built
!!CA1&y-1=0/1:D3/2/169/3; //set our creatures' number accordingly
!?FU25666;
!!UN:U98/0/x16/1;
!!CA1:T?y-1 B3/40;
!!OW:C?y1;
!!CA1:O?y2;
!!FU&y1<>y2:E;
!!FU&y-1<>0|-1:E; //checks for town type and dwelling status
!!CA1&y-1=0/1:D3/2/169/d3; //set our creatures' number accordingly
**third slots appear when built
!?TH1;
!!IF:V1/-1; initialize flag 1
!!CA-1:P?y4/?y5/?y6; get town position
!!POy4/y5/y6:N?v2; get PO value
!!CA-1:T?y1; get town subtype
!!if&y1=0:; castle
!!FU&v2=15:E;
!!CA-1:B3/40; //if upgraded Barracks is built
!!CA-1&1:D3/2/169/3; //set
!!POy4/y5/y6&1:N15;
!!en:;
It's a combination of these types of scripts. I asked if they will be compatible because I used them in earlier versions of my mod as well. It's not that big a deal I guess, I am not planning on releasing a new version of my mod till the new version of ERA II is completely stable anyways.
____________
Not idly do the leaves of Lorien fall.
|
|
Bersy
Honorable
Supreme Hero
|
posted January 21, 2020 10:52 AM |
|
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted January 21, 2020 01:42 PM |
|
|
I've been working on an update for my mod and I would like to refine some of its shortcomings. There are some minor problems that I would like to work out, but I think they need some plugins to work and will not work via ERM, as the script would not make such a change work 100%. If someone can help me, I would really appreciate it.
1) I would like Torosar the Alchemist and Pyre the Demoniac to lose the Ballista.
I know that the Ballista can be given or taken by a simple ERM command, however by doing so, this eliminates the possibility of giving the Ballista through the map editor on a custom map, and I really don't want it to work that way.
2) I would like Jeddite the Warlock's and Nagash the Necromancer WOG imposed specialities description (both on right and left click description) to be removed and fall back to default.
Jeddite's Builder and Nagash's Darkness specialities are so annoying, I would like to see them gone. I gave these two heroes a new speciality so I would like the WOG command that changes these descriptions to be gone (the actual specialities have been already been changed via ERM, I just want the descriptions gone).
More than that, I tried to make a new spell speciality (via ERM) but the game sometimes crashes for some reason. I must be doing it wrong, so If anyone can point me in the right direction that would be great.
I wanted to give Aislin the unique speciality of starting with a set of five random spells (or actually 4 random + Meteor Shower). I don't really mean any spell though (Town Portal and some other powerful ones are out of the list). I thought it would be cool to have a speciality that relies on a lucky start. So anyway, my script is something like this:
** Aislin(#73)
!!VRy1:S0 R5; [Random Spell]
!!HE73:My1/1; [Starting Spell]
!!VRy2:S10 R10; [Random Spell]
!!HE73:My2/1; [Starting Spell: Curse]
!!VRy3:S27 R10; [Random Spell]
!!HE73:My3/1; [Starting Spell: Curse]
!!VRy4:S40 R10; [Random Spell]
!!HE73:My4/1; [Starting Spell: Curse]
!#VRz532:S^Starts with a random set of spells.^; [Set up text]
!!UN:G2/73/2/532;
I obviously messed up the random part, so can anyone help me with that?
____________
Not idly do the leaves of Lorien fall.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 04, 2020 01:01 AM |
|
|
I don't see anything wrong with the script, the crash is from something else. How is your script triggered?
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted February 04, 2020 12:33 PM |
|
|
I think the one that applies is this (it's the start of neutral town script no11 that I use for my mod):
!?TM2&$day$=1/$once$=1; // only once at day 1
!!UN:P67/?y-1; [check if script is enabled: y-1]
!!FU6104&y-1=1:P; // do conversion if script is enabled
The crashes occur when the game starts (usually upon restart).
____________
Not idly do the leaves of Lorien fall.
|
|
RerryR
Promising
Supreme Hero
Researching Magic
|
posted February 04, 2020 01:07 PM |
|
Edited by RerryR at 13:12, 04 Feb 2020.
|
Hero_of_Light said: I think the one that applies is this (it's the start of neutral town script no11 that I use for my mod):
!?TM2&$day$=1/$once$=1; // only once at day 1
!!UN:P67/?y-1; [check if script is enabled: y-1]
!!FU6104&y-1=1:P; // do conversion if script is enabled
The crashes occur when the game starts (usually upon restart).
Your code seems okay. Which ERA version do you use?
I use 2.97 and have a (maybe?) similar problem with my mod. There's a 30% chance that it crashes at game start or more likely at map reloading (save-reload). And for the hell of it, I cannot track down the error or problem because it seems to be random. Same map and mod, the same starting sequence but test give different results.
|
|
Bersy
Honorable
Supreme Hero
|
posted February 04, 2020 03:13 PM |
|
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted February 04, 2020 03:29 PM |
|
|
I am actually using an older version (v2,76 I think). The crashes occurred mostly on Restarted games, which as Salamandre stated is to be avoided. I will test it further though.
____________
Not idly do the leaves of Lorien fall.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 04, 2020 05:54 PM |
|
|
Do you guys reset v501-v1000 and w51-w100 in instructions? I do that each time for my maps because timers often use variables, thus when you restart without shutting down game, all those vars do not automatically reset. Look for example at commodus.erm start:
!!DO164879255/501/1000/1:P; reset v501-v1000
!!DO164879256/0/31/1:P; reset w51-w100
|
|
RerryR
Promising
Supreme Hero
Researching Magic
|
posted February 04, 2020 08:42 PM |
|
|
Salamandre said: Do you guys reset v501-v1000 and w51-w100 in instructions? I do that each time for my maps because timers often use variables, thus when you restart without shutting down game, all those vars do not automatically reset. Look for example at commodus.erm start:
!!DO164879255/501/1000/1:P; reset v501-v1000
!!DO164879256/0/31/1:P; reset w51-w100
Wasn't aware that this might help. Guess it won't do much for the corrupted saves but for restarting problem maybe. Thanks for the tip!
Bersy I send you debug files, thanks.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 04, 2020 09:10 PM |
|
|
Check "flags and variables/special variables" in Erm to see which do not reset upon restart
"Initializing Variables
Like flags, all variables begin the game with an initial value of 0. However, also like flags, certain variable ranges will NOT be reset between maps without restarting the Heroes game. Again, this is to allow those variables to "carry over" their values to another map as part of a multi-map campaign. When you start a new map, the following variables will be reset to zero (0) or a void string "" for z variables: f...t, v1...v500, v1001-v10000, z1...z300, z501-z1000, w1-w50. The following variables will retain their current values between games (unless you quit and restart Heroes): v501-v1000, z301-z500, w51-w100."
Also, initializing flags:
"Initializing Flags
While all flags initially begin as "not set" (i.e., value of 0 or false), flags 501 to 1000 will retain their last value when you begin a new map (or the same map over) without first quitting and restarting the Heroes game. This is so they can be used for making campaigns in which you want certain flag values to carry over to the next map in the campaign. If you wish to avoid potentially having flags that aren't set to 0 at the start of a game, either stick to using flags 500 and below or initialize to 0 at the start of your map or script (with IF:V statements) all flags that you wish to use"
Imo, they should be reset manually in mods, so at least that crash possibility is removed.
|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted February 04, 2020 09:26 PM |
|
|
I used y1 variables though and I don't see them on the list. I deleted the script and it worked fine so it is no big deal I guess. It would be fun if it worked though. Do you think there's any other way?
____________
Not idly do the leaves of Lorien fall.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 04, 2020 09:29 PM |
|
|
I am 100% it is NOT that script alone which crashes your game, unless you use it inside a loop, or within SN:G, something like that.
|
|
|