|
Thread: Prisoners Of Erm | This thread is pages long: 1 2 · NEXT» |
|
Brian_The_Fist
Hired Hero
|
posted May 15, 2005 01:28 PM |
|
|
Prisoners Of Erm
When I set a hero disabled to hire (using !#HE#:R3/0, the hero may still appear in prisons.
If I enter the prison, the hero and his creatures do not join but attack.
When I have these prisons replaced by other objects, the game crashes while replacing.
Why? How to ban heroes effectively (and for random maps with prisons holding them)?
|
|
numi
Hired Hero
|
posted May 15, 2005 06:29 PM |
|
|
you could use UN:U (short version) to count the prisons on map and then use UN:U (long version) to hop from one prison to the next checking for and replacing banned heroes.
|
|
Brian_The_Fist
Hired Hero
|
posted May 16, 2005 01:07 PM |
|
|
Hop
... use UN:U (long version) to hop from one prison to the next checking for and replacing banned heroes.
Thank you so far!
But how?
What is the format for prisons?
Is is Type Subtype Hero#?
Would you please be a very little bit more precise!
____________
Bring out number weight & measure in a year of dearth.
|
|
numi
Hired Hero
|
posted May 16, 2005 06:49 PM |
|
|
honestly never messed with prisons. but it's almost certain that either the prison's subtype or the prison's control word is the hero number. just make a quicky test map. have ERM change the prison's subtype to 0 and its control word to 100 and see which hero you get when you visit it. simple.
|
|
fnord
Promising
Famous Hero
|
posted May 17, 2005 07:34 AM |
|
|
Quote: honestly never messed with prisons. but it's almost certain that either the prison's subtype or the prison's control word is the hero number. just make a quicky test map. have ERM change the prison's subtype to 0 and its control word to 100 and see which hero you get when you visit it. simple.
While I believe you can check which hero is in a prison, I never had any success actually setting it. In "Choices", where you have a choice of two town types per player and each has a prison that should match, I ended up including two prisons instead and then deleting one of them after the maps starts (and the player had made their town choice).
____________
|
|
Brian_The_Fist
Hired Hero
|
posted May 17, 2005 08:37 PM |
|
|
Better Off Dead
I'd be happy if I could delete or replace prisons with banned heroes. Replacing with the replacing FU from script00 results in crashing.
I did not try that UN:U method yet. If I understand Fnord correctly, that would be futile.
|
|
fnord
Promising
Famous Hero
|
posted May 18, 2005 07:40 AM |
|
|
Quote: I'd be happy if I could delete or replace prisons with banned heroes. Replacing with the replacing FU from script00 results in crashing.
I did not try that UN:U method yet. If I understand Fnord correctly, that would be futile.
You should be able to loop through the prisons with UN:U and delete the ones with banned heroes. All I'm saying is that I couldn't find any way to actually change a hero inside a prison to another one (although perhaps this will be added in an ERM update for 3.59 if we're lucky).
____________
|
|
Brian_The_Fist
Hired Hero
|
posted May 27, 2005 06:34 AM |
|
|
To Poke A Tunnel To The Neighbouring Cell
How to delete them?
Ad as replacement by other objects like coded in script00.erm does not work and leads to crashes, can it really be succesful?
Could you please give me an idea of what the script would look alike?
Quote:
You should be able to loop through the prisons with UN:U and delete the ones with banned heroes. All I'm saying is that I couldn't find any way to actually change a hero inside a prison to another one (although perhaps this will be added in an ERM update for 3.59 if we're lucky).
|
|
fnord
Promising
Famous Hero
|
posted May 27, 2005 10:53 AM |
|
|
Quote: How to delete them?
Ad as replacement by other objects like coded in script00.erm does not work and leads to crashes, can it really be succesful?
Could you please give me an idea of what the script would look alike?
Okay. I could be wrong but I think it should work. If it crashes, I guess I was wrong.
ZVSE
[Post-Instruction trigger]
!?PI;
!!UN:U63/-1/?y-1; [Number of Prisons on Map: y-1]
!!VRv1:S-2; [Set v1 to -2 for faster looping method]
!!DO99/1/y-1/1&y-1>0; [Loop through all prisons]
[Loop through all prisons backwards to avoid problems]
[due to deletion and internal numbering]
!?FU99;
!!UN:U63/-1/-2/1; [Store prison coordinates in v1/v2/v3]
!!UNv1/v2/v3; [Delete prison]
Hmm...I think this will work but I'm a bit tired to test it so I'll let you do that.
____________
|
|
Brian_The_Fist
Hired Hero
|
posted May 30, 2005 05:59 PM |
|
|
Lifelong
Dear Fnord,
I tried your script
!?PI; [Post-Instruction trigger]
!!UN:U63/-1/?y-1; [Number of Prisons on Map: y-1]
!!VRv1:S-2; [Set v1 to -2 for faster looping method]
!!DO99/1/y-1/1&y-1>0; [Loop through all prisons]
!?FU99; [Loop through all prisons backwards to avoid problems due to deletion and internal numbering]
!!UN:U63/-1/-2/1; [Store prison coordinates in v1/v2/v3]
!!UNv1/v2/v3; [Delete prison]
but that doesn't seem to work.
!!UN:U cannot get object coordinates, wog says.
And how do I check which hero is inside? I suppose your script is meant to delete all prisons.
Why y-1? Is y-1 a var like y1, y2...?
|
|
fnord
Promising
Famous Hero
|
posted June 01, 2005 08:55 AM |
|
Edited By: fnord on 1 Jun 2005
|
Quote: Dear Fnord,
I tried your script
(old script deleted)
but that doesn't seem to work.
!!UN:U cannot get object coordinates, wog says.
And how do I check which hero is inside? I suppose your script is meant to delete all prisons.
Why y-1? Is y-1 a var like y1, y2...?
Okay, it seems I made a mistake and put 63 when it should have been 62 for the object number.
Also, I checked what I had done on my Choices map (it's been awhile) and see now that I was able to both check and set heroes in prisons, using the OB receiver and control number.
However, if a hero isn't already in a prison, it can't be set to be in a prison (if that makes any sense) so in Choices I had to include extra prisons with the possible imprisoned hero choices that I wanted, and then delete them at map start after setting the prisoner in the remaining prison.
As for the y-1, yes it's a variable like y1, but where the y variables are temporary variables for Functions (each function has its own), the y- variables are temporary variables for other triggers (each trigger has its own). All y- variables used in a particular trigger keep the same value throughout all functions called by that trigger. Also note that each instance of a trigger is considered a different trigger for purposes of y- variables (e.g., if you have two or more !?TM1; triggers in your code, each has its own set of y- variables).
Anyway, here's a revised script that might work. It checks the hero in the prison and only deletes the prison if it's disabled:
[Post-Instruction trigger]
!?PI;
!!UN:U62/-1/?y-1; [Number of Prisons on Map: y-1]
!!VRv1:S-2; [Set v1 to -2 for faster looping method]
!!DO99/1/y-1/1&y-1>0; [Loop through all prisons]
[Loop through all prisons backwards to avoid problems]
[due to deletion and internal numbering]
!?FU99;
!!UN:U62/-1/-2/1; [Store prison coordinates in v1/v2/v3]
!!OBv1/v2/v3:C?y1; [Check hero in prison: y1]
!!FU&y1<0:E; [Exit if no hero there]
!!HEy1:R3/?y2; [Check if hero is enabled or disabled: y1=0 if disabled]
!!UN&y2=0v1/v2/v3; [Delete prison if hero is disabled]
____________
|
|
Brian_The_Fist
Hired Hero
|
posted June 01, 2005 11:18 PM |
|
|
Tungistan Prisons
Thank you for advisory once more, dear Fnord!
I tried it, but this script...
---------------------------------------------------------
ZVSE
AUTO_PoweredBy=ERM Script Editor v.1.2.6.10
!?PI; [Post-Instruction trigger]
!!UN:U62/-1/?y-1; [Number of Prisons on Map: y-1]
!!VRv1:S-2; [Set v1 to -2 for faster looping method]
!!DO99/1/y-1/1&y-1>0: P; [Loop through all prisons, loop backwards to avoid problems due to deletion and internal numbering]
!?FU99; [Function to Delete Prisons with banned heroes]
!!VRx1&x1<1:S1;
!!UN:U62/-1/-2/1; [Store prison coordinates in v1/v2/v3]
!!OBv1/v2/v3:C?y1; [Check hero in prison: y1]
!!FU&y1<0:E; [Exit if no hero there]
!!HEy1:R3/?y2; [Check if hero is enabled or disabled: y1=0 if disabled]
!!UN&y2=0: Ov1/v2/v3; [Delete prison if hero is disabled]
** end of function
---------------------------------------------------------
brings up... (from wogermlog.txt)
Line:1930 Reason:"!!UN:U"-cannot get object coordinates
ContextU62/-1/-2/1;
What's wrong? I do not know what the -2 is meant to do.
I tried x1 instead, but no. How far am I off the track?
|
|
fnord
Promising
Famous Hero
|
posted June 02, 2005 12:23 AM |
|
|
Quote: Thank you for advisory once more, dear Fnord!
I tried it, but this script...
(ERM lines deleted to save space)
brings up... (from wogermlog.txt)
Line:1930 Reason:"!!UN:U"-cannot get object coordinates
ContextU62/-1/-2/1;
What's wrong? I do not know what the -2 is meant to do.
I tried x1 instead, but no. How far am I off the track?
It worked when I tried it on a medium-sized 2-layer random map. Were you using a random map or a specific map?
Also, what WoG version are you using? If it's WoG 3.58 and not WoG 3.58f, then the UN:U wouldn't work correctly since that faster syntax was added in 3.58f.
____________
|
|
Brian_The_Fist
Hired Hero
|
posted June 02, 2005 05:52 PM |
|
|
la France
It worked when I tried it on a medium-sized 2-layer random map. Were you using a random map or a specific map?
XXL random 2lvl.
Also, what WoG version are you using? If it's WoG 3.58 and not WoG 3.58f, then the UN:U wouldn't work correctly since that faster syntax was added in 3.58f.
Okay. I'll patch.
|
|
fnord
Promising
Famous Hero
|
posted June 03, 2005 02:05 AM |
|
|
Quote: It worked when I tried it on a medium-sized 2-layer random map. Were you using a random map or a specific map?
XXL random 2lvl.
Also, what WoG version are you using? If it's WoG 3.58 and not WoG 3.58f, then the UN:U wouldn't work correctly since that faster syntax was added in 3.58f.
Okay. I'll patch.
Let me know if it's working once you've updated to 3.58f. It's a good idea to use 3.58f anyway since a number of bugs in 3.58 were fixed.
____________
|
|
Brian_The_Fist
Hired Hero
|
posted June 04, 2005 03:29 AM |
|
|
Nonvolatile Delinquents
Let me know if it's working once you've updated to 3.58f.
·························································
No, it is not.
I updated wog.
Still, the script isn't working.
Latest executed erm reveiver:
!!UN&y2=0: Ov1/v2/v3; [Delete prison if hero is disabled]
** end of function
& then it now crashes.
It only crashes when I disable heroes that are in the map's prisons.
So it seems to me the un: (to get coords and delete obj) does better this time.
No wogermlog available.
ZVSE
AUTO_PoweredBy=ERM Script Editor v.1.2.6.10
!?PI; [Post-Instruction trigger]
!!UN:U62/-1/?y-1; [Number of Prisons on Map: y-1]
!!VRv1:S-2; [Set v1 to -2 for faster looping method]
!!DO99/1/y-1/1&y-1>0: P; [Loop through all prisons loop backwards to avoid problems due to deletion and internal numbering]
!?FU99; [Function to Delete Prisons with banned heroes]
!!UN:U62/-1/-2/1; [Store prison coordinates in v1/v2/v3]
!!OBv1/v2/v3:C?y1; [Check hero in prison: y1]
!!FU&y1<0:E; [Exit if no hero there]
!!HEy1:R3/?y2; [Check if hero is enabled or disabled: y2=0 if disabled]
!!HEy1&y2=0:K;
!!HEy1&y2=0:R3/0;
!!UN&y2=0: Ov1/v2/v3; [Delete prison if hero is disabled]
** end of function
|
|
fnord
Promising
Famous Hero
|
posted June 04, 2005 06:46 AM |
|
|
[quote
No, it is not.
I updated wog.
Still, the script isn't working.
Latest executed erm reveiver:
!!UN&y2=0: Ov1/v2/v3; [Delete prison if hero is disabled]
** end of function
& then it now crashes.
It only crashes when I disable heroes that are in the map's prisons.
So it seems to me the un: (to get coords and delete obj) does better this time.
No wogermlog available.
Very odd, although I see you did add two extra lines so I'm not sure about those. Anyway, I just tested again (without your extra lines) and this time I created a random XL 2-layer map in the SoD editor and then changed it to WoG format (in the WoG editor).
I selected a prison and the prisoner was Theodorus so I disabled him at the start of the script (after the !?PI; trigger) and wogified the map.
It worked fine and deleted that prison without any crash so the script seems to be working as far as I can see. Perhaps your extra lines are causing a problem?
How did you plan on using this anyway? I mean, you must be planning to disable certain heroes with a custom script, right?
____________
|
|
Brian_The_Fist
Hired Hero
|
posted June 04, 2005 10:44 PM |
|
|
Pulverized Prisons
It worked fine and deleted that prison without any crash so the script seems to be working as far as I can see. Perhaps your extra lines are causing a problem?
How did you plan on using this anyway? I mean, you must be planning to disable certain heroes with a custom script, right?
Mine does not.
Well, yes, I had a banning script (for eagleeyeglists, navigators, resourcerers and many more).
I don't know, why mine is not working.
I removed the additional kill and banish lines I added and "** end of function".
Still the game crashes (without ermlog).
Would you send me the script you used?
Maybe something went wrong with the patching to 3.58f.
I started the install.exe before putting the .wog file to the update folder.
So I patched it twice.
After the first try, my script's un: problem still appeared and (I could make a wogermlog).
After the second patching, the problem changed in the way I mentioned.
Did I create a rudimentary wog 3.58f?
A big thanks nevertheless!
|
|
fnord
Promising
Famous Hero
|
posted June 05, 2005 01:34 AM |
|
|
Quote:
Mine does not.
Well, yes, I had a banning script (for eagleeyeglists, navigators, resourcerers and many more).
I don't know, why mine is not working.
I removed the additional kill and banish lines I added and "** end of function".
Still the game crashes (without ermlog).
Would you send me the script you used?
Maybe something went wrong with the patching to 3.58f.
I started the install.exe before putting the .wog file to the update folder.
So I patched it twice.
After the first try, my script's un: problem still appeared and (I could make a wogermlog).
After the second patching, the problem changed in the way I mentioned.
Did I create a rudimentary wog 3.58f?
A big thanks nevertheless!
Sure, I can send you the script I used and you can try that--what email shall I send it to?
I don't know about your installation update though. Maybe it worked or maybe not..hard to say.
____________
|
|
Brian_The_Fist
Hired Hero
|
posted June 08, 2005 01:39 PM |
|
|
Fnordic Powerwalking
Sure, I can send you the script I used and you can try that--what email shall I send it to?
I don't know about your installation update though. Maybe it worked or maybe not..hard to say.
Hello Fnord!
My local mailbox here is : S1. [#=1 AI always receives mail]
Please send it to this one!
I let those prisoners sit and mope (with but one final ray of hope) .
I willingly gave up the rescue mission when I found out that it's well possible to change hero specialities.
I'd like to see that script working anyway.
I am thinking of a script that moves mountains and objects a little as time passes.
Vulcanos spitting gargoyle hordes and pyramids landing for 12 days or so .
It takes me this long to do simple scripts that I of course do wish, Lord British would chant them.
A question I have:
Can I enable (and set statistics for) heroes above #155?
(Though I think there is faq-information on this somewhere.)
Those unchangeable in-tavern-heroes do me a bit of dismay either.
Do they receive at all?
Thank you one more time for wog!
WoG - Increases HoMM's effect by 5% per lvl of erm scribe.
|
|
|