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: ERM help and discussion
Thread: ERM help and discussion This Popular Thread is 407 pages long: 1 50 100 150 ... 190 191 192 193 194 ... 200 250 300 350 400 407 · «PREV / NEXT»
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 02:31 AM

It seems even more useless and unfriendly to me to use such terms to criticize preliminary thoughts, as it makes me reluctant to offer further useless ideas. It would have been more useful and friendly to explain from the first that you did not want any simple modification to the script such as my alternates 1, 2 or 3, but something radically different such as Baratorch's version.

Which could be approximated something like this:

Modify the pcx file of the Heroes Visiting Screen to add hot-key reminders under the troop slots (where Baratorch's arrows are), such as:

1-> 2-> ... 7->    <-! (shift-1) <-@ (shift 2) ... <-&

Somewhere else add other hot-key graphics for swapping <=9=> and semi-total movement 8=> and <=0 (or some other choice of hot-keys which does not conflict with those used by Heroes 3).

Then use Bersy's keypress function to check for these hot-keys and the GetGameState dialog number, so that when one of them is pressed within the Visiting Screen, the appropriate function can be performed.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 06:45 AM

I was surprised you offer a 12 choices dialog because I thought you are aware of HD options. There was no need of Bersy keys or whatever, the only problem the script has is the ghost hero, he becomes without creatures-and gods but at least this one I could script with my knowledge, not the other-.

Of course the swap script does not provide all the nice details Baratorch has, but, until better times it helps to economize 6-7 clicks, being mostly used for instant exchange between two heroes or bring reinforcements. At this moment I am not aware of the possibility of adding new buttons in heroes meeting screen so it should go through the unfriendly UN:G as it already does within three options, left to right, right to left and swap between. And we can't modify pcx because swap troops is wog revised option, not a stand alone. But is better than nothing. Nevermind.
____________
Era II mods and utilities

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 02:01 PM

I had never seen Baratorch's excellent version and I am not a mind-reader. The modified pcx could be included in "WoG Revised" by giving it a different name and using Bersy's RedirectFiles option when the script is enabled and not using that option when the script is disabled. The 12 choice version was my first muddling thought, followed by four-choice and six-choice alternates. The issue was how to chose which creature to leave behind. Sometimes I like to leave a secondary Hero a fast creature so it gets more movement and sometimes the primary Hero needs all the reinforcements he can get. Without any hint as to what you wanted I can only go by own experience, which does not include any SoD play over the last eight years.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 02:06 PM

There is no need to be mind reader: reread my initial post. It says clearly that the problem is the hero remaining without creatures. I never asked for a different reorganization of Fnord script, it is good as it is but has only a flaw.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 02:12 PM

Re-read my follow-up post. The issue of what creature to leave behind was not discussed in your post, clearly or at all. I need to know that before I can write a script and I am not a mind-reader.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 02:20 PM
Edited by Salamandre at 14:21, 06 Mar 2013.

My fault, I apologize: Baratorch swap feature was around for 1 year and I thought you already used it. It leaves one of the lower level creatures in case of complete transfer from left to right or vice versa.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 02:39 PM

Thanks for the reply, which was classily done (that is, done with class). I am sorry for my first, muddled, 12-step response - I am a slow thinker. I like Baratorch's version and think we could do something similar but will start with just modifying your script to leave one of the lowest-level creature.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 02:52 PM
Edited by Salamandre at 15:04, 06 Mar 2013.

As far as I know, there is no code for custom buttons in hero meeting screen, but a custom small dialog can be show once the arrows clicked. This custom dialog could have the three Baratorch buttons, left-->right, right-->left and swap all troops between. But this is easy to add once the script is fixed.

Right now I modified the pcx for custom mod, and the clicked icon brings Fnord script.



What I don't like is that you have to read heroes names then find who is who, which takes as much times as manual swap. That's why buttons would be better.



God stays where he was.
____________
Era II mods and utilities

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 03:47 PM
Edited by JimV at 17:16, 06 Mar 2013.

It seems to me that hot-keys are almost as easy to use as clicks, as long as there is a graphical reminder of them on the pcx - e.g. press "1" to move the first (leftmost) troop-slot's creatures from the left Hero to the right Hero; press "2" to move the 2nd troop-slot of the left Hero, and so on as described previously. Although (slow-thinking again), arrows under each troop slot could be clicked instead - but there isn't much room so they would be small and hard to click, so hot-keys might be easier.

But I will proceed with the first request first. Perhaps I should use "Left Hero" and "Right Hero" in the menu instead of the names? For now I will add "Left" and "Right" in parentheses after the names.
____________________________________________________________

A modified version of "Swap troops.erm" is in this Box folder - it still has some flaws:

1) It considers Sylvan Centaurs < Grand Elves. This can fixed but there may not be a simple way to handle all special cases.

2) If it moves the lowest-level troops before the other Hero runs out of troop space, it leaves one behind, although there may be a later troop slot which does not get moved at all. This could be fixed also but requires another level of complexity.

There is probably something else which I have not encountered, so I am releasing it as a beta-test version before attempting improvements.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 06:05 PM

Tested and it works perfect, thanks. I would change the text though, instead of:

Give x's troops to y, I would change to give y x's troops. Dunno why, but I would put the target first. Until someone makes buttons.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 06:36 PM
Edited by JimV at 18:37, 06 Mar 2013.

I have uploaded another version which fixes the two flaws I mentioned and changes the wording (Give B the troops of A). There are so many possible combinations which I haven't tested that I won't be too surprised if some glitch shows up.

I forgot to mention that SN:Pz201 is disabled because I don't have z201.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 06:57 PM
Edited by Salamandre at 19:16, 06 Mar 2013.

Ah, I already finished modifications (tried new concept aka Baratorch). Can you please check if all is ok and add the changes if you agree with result?

Swap troops

Sorry for z201, I forgot to remove it when paste script, is from tew.

Your hints were added on right-click.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 06, 2013 07:54 PM

The buttons look good. I added the latest changes and uploaded it as "Swap Troops with Buttons.erm" (because I don't like to throw old versions away). (I'm an old version myself.)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 06, 2013 08:10 PM

You had the first version, I updated it shortly with right-click hints. I will try to add changes to that one. Thanks.
____________
Era II mods and utilities

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
artu
artu


Promising
Undefeatable Hero
My BS sensor is tingling again
posted March 07, 2013 04:11 PM

Sal, there is this time another bug with cartographer script, when I enable it in mod manager and play Hot Seat on test map, when it's blue's (second player) turn he starts all in dark so you can't even select his starting hero.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 07, 2013 06:38 PM

Which script you used, first or second who fixed cartographer subtypes?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
artu
artu


Promising
Undefeatable Hero
My BS sensor is tingling again
posted March 07, 2013 06:49 PM

Quote:
Which script you used, first or second who fixed cartographer subtypes?


The last one. The one in page 191.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 07, 2013 06:56 PM

I have NO IDEA why !!TRx1/x16/x6:Vx2; [open map], which opens squares visibility for player ID=x2 closes it for other players. Values returned are correct, I am missing something not written in erm help here.
____________
Era II mods and utilities

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
JimV
JimV


Responsible
Supreme Hero
posted March 07, 2013 08:04 PM

The TR:V values are bit-flags. They work the same as the Timer (TM) player codes. E.g., if you want both Red (1) and Blue (2) to see a square, the code should be 1+2=3. For all eight players, use 1+2+4+8+16+32+64+128=255. The VR:| and VR:& operations may be used to set or unset a particular player value. E.g. VR__:|2 sets Blue, VR__:&-3 unsets Blue, where __ is the variable read by TR:V?__ and then set by TR:V__. Note the player bit values (1,2,4,...) are not the same as the player numbers (0,1,2,3,...).

(The UN:C method would be easier, but not as much fun. It works with bit-flags also, but only to set the Cartographer visited or unvisited, which might as well be done for all players (value 0 for all unvisited) at each visit since each will have to pay to re-visit. The Cartographer itself then makes the land or sea terrain visible to the player who paid.)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Salamandre
Salamandre


Admirable
Omnipresent Hero
Wog refugee
posted March 07, 2013 08:17 PM
Edited by Salamandre at 20:34, 07 Mar 2013.

I know is player bits, this is what x2 holds. The problem is not setting bits for multiple players but get the bit of square then add the paying player bit, so this does not change what other players see.
I am stuck here:

!!TRx1/x16/x6:V?n; [get visibility bit]
!!VRn:&x2; [check current player bits]
!!FU&n=x2:E; [if already visible, exit]
!!VRn:+x2; [add player bit to not visible square]
!!TRx1/x16/x6:Vn; [set new bit]

Not working, some obvious mistake I don't see.

____________
Era II mods and utilities

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 150 ... 190 191 192 193 194 ... 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.5977 seconds