|
Thread: Disabling prisons | |
|
Thorfinn
Tavern Dweller
|
posted October 17, 2011 11:24 PM |
|
|
Disabling prisons
Is there an easy way to get rid of prisons from random maps?
I had a LAN party where four of the people wanted specific heroes. We tried starting games for about 6 hours, never once getting one where at least one of the 4 was not higher level. It seemed to make no difference what template we used, except for one that had nothing but the low-level resources, not even treasure artifacts or anything above 1st level creature dwellings.
I tried even modifying a script to replace prisons with something else (the one that replaces cartographers) but the heroes retained the levels they were assigned, not brought back to 1st.
Or would this have to be a hardcoded option?
Thanks.
|
|
JimV
Responsible
Supreme Hero
|
posted October 18, 2011 03:55 AM |
|
Edited by JimV at 18:28, 18 Oct 2011.
|
Maybe I don't understand what you are trying to do, but why can't you create a random map, then edit it in the Map Editor, to remove Prisons or set the Heroes/Hero Properties in the Prisons?
I think there is a way to set all Heroes to level 1 at the start of a game with a script but it appears that instructions (!#) are executed before map settings are applied to Heroes, and the PI trigger executes after the map settings are applied, so a combination of the two would be needed - which seems overly complicated compared to using the Map Editor.
Just for the fun of it, here is a start at a script to set all Heroes to level 1 at the start of the game. It could also be modified to skip certain Hero numbers, or to do only Heroes which are not assigned to a color.
ZVSE
* set all Heroes to 100 exp. at game start
* instructions take place before map settings applied to Heroes
* PI takes place after map settings applied
* (needs customization for Heroes who have advanced skills at game start -
* currently, all Heroes get their first two skills at basic levels)
* (most Heroes start at L1 with two sec. skills at basic level)
!?FU6305; x16=hero #
!!IF:Wx16;
!!HEx16:F?w1/?w2/?w3/?w4; save L1 primary skills
!!HEx16:S1/?w5/1 S2/?w6/1; ask what skill occupies display slot #1 to #2 var
!#DO6305/0/155/1:P; (instruction - done before map settings)
!?PI; (after map settings)
!!DO6306/0/155/1:P; restore L1 secondary skills (approximately), set E=100
!?FU6306; x16=hero #
!!HEx16:E100;
!!IF:Wx16;
!!HEx16:Fw1/w2/w3/w4;
!!VRy1:Sw4*10;
!!HEx16:Iy1;
* remove all skills
!!HEx16:S0/0 S1/0 S2/0 S3/0 S4/0 S5/0 S6/0 S7/0 S8/0 S9/0 S10/0;
!!HEx16:S11/0 S12/0 S13/0 S14/0 S15/0 S16/0 S17/0 S18/0 S19/0 S20/0;
!!HEx16:S21/0 S22/0 S23/0 S24/0 S25/0 S26/0 S27/0;
* add back 1st two skills at basic level
!!HEx16:Sw5/1;
!!HEx16&w6>-1:Sw6/1;
!!HEx16&w6<0:Sw5/2; if only one skill, it is advanced
!!VRw1:S0; reset w-variables for other scripts
!!VRw2:S0;
!!VRw3:S0;
!!VRw4:S0;
!!VRw5:S0;
!!VRw6:S0;
Update: an error in my initial tests suggested that level-one secondary skills were not set at the time instructions are executed, but I checked again and found that they are. The script has been updated accordingly.
|
|
Thorfinn
Tavern Dweller
|
posted October 19, 2011 09:18 PM |
|
|
Thanks!
I *could* have done it with the editor, but it would have meant that whomever did the editing would know the lay of the land, so we would have been further ahead to use a balanced scenario in the first place. The whole point of the random map being that you don't know where everything is ahead of time.
Again, thanks. I'll give it a whirl.
|
|
|
|