Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Disabling prisons
Thread: Disabling prisons
Thorfinn
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Thorfinn
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.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0246 seconds