|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 10, 2013 08:53 PM |
|
|
Do I need a timer? There are a few IF:M messages on first turn, generated by a timer already, placed your code at the end (and plugin in folder), nothing happens. Maybe conflict with messages?
@Edit: removed messages, same result. Noticed that Battle poker has scripts inside map? Is rather hard to search anything from exported text format, I see you used function&1000 to bring the code, tried same, still nothing happens.
|
|
JimV
Responsible
Supreme Hero
|
posted January 10, 2013 09:07 PM |
|
|
Messages, such as the automatic "Week of the ..." do interfere. The "E" keypress must come after all messages are closed, because if you press "E" while a dialog box is being shown, your turn does not end. That is, the trick only works when an actual "E" press (or click on End Turn) would end a turn.
That is, assuming your Heroes program uses the Keyboard Shortcuts as shown in the Heroes Manual (H3Manual.pdf). Perhaps on your system there is a different hotkey for End Turn.
Do you get any automatic End Turns in Battle Poker 2?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 10, 2013 09:11 PM |
|
|
I don't know how to play such map: I recruit an hero, when he touches border guard, he dies, town is gone. When he touches keymasters tent, turn ends. And yes, E key is what I use as well.
!?CM0;
!!SN:L^XFiles.dll^/?y2; get address of XFiles.dll in y2
!!SN:Ay2/^KeyPress^/?y3; y3 — address of function KeyPress
!!SN:Ey3/1/69/1042; send "E" to end turn
is giving nothing. Is there anything I could miss?
____________
Era II mods and utilities
|
|
JimV
Responsible
Supreme Hero
|
posted January 10, 2013 09:30 PM |
|
Edited by JimV at 21:33, 10 Jan 2013.
|
(You must visit the Cashier Tent to get your Poker Chips before going to the Dealer (Gate), as the first message states. If you try to join a poker game without any chips (money) you won't be allowed to play, sorry.)
Anyway, good, the E will work for you, so it is just a question of finding the proper time to send it. If you upload your test map I will find some trigger which works - maybe at the first click or keypress after the messages, or maybe just a delay (!?TL0) after the last message. There is a way to tell whether the user is in the Adventure Map screen or a dialog (thanks to Bersy).
P.S. I didn't see your update with the CM0 script before typing the above. As a test case (not the final version) I think it needs a CM:R0 to prevent a message dialog from popping up to swallow the "E".
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 10, 2013 09:41 PM |
|
|
Yes,I tried also in battle poker to enable with CM0, doesn't work. I am cleaning an old map ToP from doubtful scripts, and trying to get to day 2 after messages show. If I understand well, your code must be delayed a bit, according to which action was done previously. I am not sure I keep the messages for first day (probably will move them on second day, I will upload the map when I am sure how will be, so you don't lose your time searching for a way and me screwing everything by using a different pattern. Thanks!
____________
Era II mods and utilities
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted January 10, 2013 09:44 PM |
|
Edited by OxFEA at 22:01, 10 Jan 2013.
|
Pass turn to next player
!!UN:C6919480/4/?y1;
!!SN:E5008544/2/y1;
Quote: Very interesting. How?
All procedures like getting-creature-for-castle-type was modified to getting-creature-for-castle.
Quote: Possible with WoG?
Only if you inject dll in process manually - and write necessary wrappers for dll core.
Quote: I'd like to add that as a scripted option to some heroes, depending on speciality.
I can imagine some more interesting options. Altered units MoP-style (and HotA-style, yes); different versions of cities - like Red Castle and Blue Castle on one map; Rampart with elves and centaurs and Rampart with sidhe and ravens..
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 10, 2013 09:47 PM |
|
|
|
JimV
Responsible
Supreme Hero
|
posted January 10, 2013 09:51 PM |
|
Edited by JimV at 21:54, 10 Jan 2013.
|
This is the test script I used when I developed the concept (very similar to yours):
ZVSE
* TestAutoEndTurn, JHV, Dec. 27, 2012
!?CM0; RMB Adv Map
!!CM:R0;
!!SN:L^XFiles.dll^/?y2; get address of XFiles.dll in y2
!!SN:Ay2/^KeyPress^/?y3; y3 — address of function KeyPress
!!SN:Ey3/1/69/1042; "E" to end turn
This worked for me in a test map (right-click on Adventure Screen, get End of Turn). I guess XFiles must get loaded as otherwise y3 would be invalid for the SN:E command. If this doesn't work on your system we have a bigger problem - but you did get the automatic End Turn in BP2 at the Cashier's Tent, if I understood you correctly.
Edit - sorry for beating a dead horse, I didn't see OxFEA's comment when I posted this.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 10, 2013 09:53 PM |
|
|
No, the above script does not work on my system (in fact, the CM:R0 seems to have no effect, strange)
@Edit: found the reason, there were two others CM0 triggers in displaying mithril and display movement. Disabling them enabled CM:R0 and end turn.
____________
Era II mods and utilities
|
|
JimV
Responsible
Supreme Hero
|
posted January 10, 2013 10:03 PM |
|
|
I don't understand the test script (with the CM:R0) not working, but the similar script in BP2 working:
Quote: ...When he touches keymasters tent, turn ends.
(Assuming that means what I think it does.)
However, as usual OxFEA has a better method anyway.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 10, 2013 10:06 PM |
|
|
|
Siegfried
Famous Hero
|
posted January 13, 2013 11:52 AM |
|
|
A short question
Hi,
!!OW:G$1/$2; says: check if current player is human player here (sitting before the PC). In this case Flag 999 is set. For AI and remote human players the result is 0 and flag 999 it cleared.
How do both behave in multiplayer hotseat?
____________
|
|
JimV
Responsible
Supreme Hero
|
posted January 13, 2013 02:46 PM |
|
|
Actually (for the benefit of anyone who has not read the actual OW:G description), ERM Help says this:
----------------
Check if a player IS a player that is sitting before the PC screen
Multiplayer command
$1 - Player (color). (see Format E1)
$2 - Check the Player
1=yes, it is me,
0=no, this is another human player
Comments:
This is important for multiplayer only. The point is that there are more than one human player and we have to know whether a player is a human here (1) or there (0). Of course, the main syntax is check or get the value, but you can also set it (though we did not try it :-)
For AI this is always 0.
Flag 999 is set to 1 if the current player (when trigger worked out) is a player "here" and 0 if he is at other PC.
The AI has it always at 0. If flag 999 is set, you can be sure that this is a human and he is here. Flag 999 works for all triggers.
---------------
Flag 999 is also described in "Flags and Variables" under "Special Flags":
--------------
Flag 999 is set to 1 if the current player (when trigger executes) is a player "here" and 0 if he or she is at another PC. The AI has it always set to 0. If flag 999 is set, you can be sure that this is human and he is here. It's working for all triggers.
---------------
That is, OW:G and flag 999 both relate to remote Multiplayer (e.g., over a LAN), but one can be used to check any player by number, and the other checks the player who has caused the current trigger to execute.
In Hotseat there is no remote PC, so any human player should have a value of 1 (same as flag 1000).
|
|
Siegfried
Famous Hero
|
posted January 14, 2013 09:17 AM |
|
|
|
greendrag
Bad-mannered
Adventuring Hero
young dragon,changed
|
posted January 14, 2013 09:29 AM |
|
|
Hello there! I have a question.
Is it possible to edit commanders? Not only their skills, but also their appearance and animation? If so, how?
I don't want to change them for the whole game but just for one scenario I have in mind.
|
|
kegolo
Promising
Famous Hero
of infamy
|
posted January 14, 2013 01:54 PM |
|
|
Quote: Hello there! I have a question.
Is it possible to edit commanders? Not only their skills, but also their appearance and animation? If so, how?
I don't want to change them for the whole game but just for one scenario I have in mind.
Their battle defs will have to be changed using SN:E similar to many examples like Dragon Peaks or Covenant Town. As for the above picture, it can be found in data/zvs/Lib1.res and is named npc#.def where # is the town # (1-8)
|
|
JimV
Responsible
Supreme Hero
|
posted January 14, 2013 03:37 PM |
|
Edited by JimV at 15:38, 14 Jan 2013.
|
Commander skills can be set and changed via ERM commands (the CO receiver), as described in ERM Help.
See modding threads for how to modify Heroes 3 graphics. I think there are some threads here which present new Commander graphics.
|
|
go_titans
Tavern Dweller
|
posted January 15, 2013 01:33 AM |
|
|
Is this the only WOG chat thread? 180 pages long? I'm new here, and I can't find an actual forum page for WOG, only this thread, so I guess I'll post my question here.
The tents can heal and resurrect themselves. I know cos I've seen them do it when I don't have control (when I don't have the warfare skill). I want to know what key I have to press to activate this ability in battle when I DO have control.
It's like when you hit a two-way door, a well, a water wheel or windmill and you don't wish to move. The enemy can activate those things without moving, and I finally discovered a few years ago that pressing the space bar activates the item and allows you to do the same. YAY!
So there must be a key that also activates the healing tent to self heal during battle, but I can't find it! Can anyone please help?
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 15, 2013 10:10 AM |
|
|
Tents can heal themselves, but not resurrect. Just use as healing target the tent (a bit tricky because is the edge of the battlefield).
No key shortcuts, only mouse.
____________
Era II mods and utilities
|
|
Bersy
Honorable
Supreme Hero
|
posted January 15, 2013 04:13 PM |
|
|
But it can be implemented.
|
|
|