deestar12 / keeperfx

Automatically exported from code.google.com/p/keeperfx
0 stars 0 forks source link

Add missing buttons on TUTORIAL_FLASH_BUTTON command #639

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The TUTORIAL_FLASH_BUTTON command can be used by mapmakers to flash interface 
elements. See: 
http://keeper.lubiki.pl/dk1_docs/dk_scripting_ref.htm#scrpt_cmd_tutorial_flash_b
utton

Some rooms/spells cannot be flashed: Scavenger room, Call to Arms, Chicken and 
Hold Audience.

These are simply not included. Please add them.

Original issue reported on code.google.com by Loobinex on 22 Jun 2015 at 10:17

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Keepeing this command in its current form doesn't make much sense now, because 
icons within tabs are switchable.

Maybe it would be better to introduce a new variant of the command:
TUTORIAL_FLASH_BUTTON([group],​[button],​[player])

Where [group] would be INFO, ROOM, POWER, DOOR, TRAP, CREATURE, MESSAGE etc., 
and [button] would be a text identifying specific item?

Original comment by mefistotelis on 24 Jun 2015 at 10:48

GoogleCodeExporter commented 8 years ago
I don't think that would be worth it,...

Sure there is a potential mismatch if somebody modded his own game and playing 
a map where this command is used. This gives this player potential issues with 
all maps out there now, including the campaign maps.
The more likely situation would be for somebody to make a campaign where the 
buttons are switched. In which case the current command would work just 
fine,... except for the missing buttons.

This is not just a theoretical situation. It is nice to flash a button when a 
player gets access to a new room/spell, and I've had it on maps I made where I 
ran into the missing buttons, and I've seen it on Keeperklan as well.

Original comment by Loobinex on 25 Jun 2015 at 12:37

GoogleCodeExporter commented 8 years ago
In that case, I'm not sure if it is worth documenting every ID.

I only have general ranges:
          6..20 rooms tab
          21..36 spells tab
          53..61 manufacture tab
          68..71 Info tab
          72..74 creatures tab

Original comment by mefistotelis on 26 Jun 2015 at 12:27

GoogleCodeExporter commented 8 years ago
The problem is not the documentation, a few months ago I tested all the numbers 
and there are simply a few buttons that cannot be flashed.(unless they have 
numbers way beyond 75 which I think is unlikely.)
There are more than 74 buttons,.. .

Original comment by Loobinex on 26 Jun 2015 at 7:43

GoogleCodeExporter commented 8 years ago
I ordered all the IDs, everything should be working now.

List:
    BID_INFO_TAB = 1,
    BID_ROOM_TAB,
    BID_SPELL_TAB,
    BID_MNFCT_TAB,
    BID_CREATR_TAB,//5
    BID_ROOM_TD01,
    BID_ROOM_TD02,
    BID_ROOM_TD03,
    BID_ROOM_TD04,
    BID_ROOM_TD05,//10
    BID_ROOM_TD06,
    BID_ROOM_TD07,
    BID_ROOM_TD08,
    BID_ROOM_TD09,
    BID_ROOM_TD10,//15
    BID_ROOM_TD11,
    BID_ROOM_TD12,
    BID_ROOM_TD13,
    BID_ROOM_TD14,
    //BID_ROOM_TD15, -- no such index
    BID_ROOM_TD16,//20
    BID_POWER_TD01,
    BID_POWER_TD02,
    BID_POWER_TD03,
    BID_POWER_TD04,
    BID_POWER_TD05,//25
    BID_POWER_TD06,
    BID_POWER_TD07,
    BID_POWER_TD08,
    BID_POWER_TD09,
    BID_POWER_TD10,//30
    BID_POWER_TD11,
    BID_POWER_TD12,
    BID_POWER_TD13,
    BID_POWER_TD14,
    BID_POWER_TD15,//35
    BID_POWER_TD16,
    BID_MAP_ZOOM_FS,
    BID_MAP_ZOOM_IN,
    BID_MAP_ZOOM_OU,
    BID_MSG_EV01,//40
    BID_MSG_EV02,
    BID_MSG_EV03,
    BID_MSG_EV04,
    BID_MSG_EV05,
    BID_MSG_EV06,//45
    BID_MSG_EV07,
    BID_MSG_EV08,
    BID_MSG_EV09,
    BID_MSG_EV10,
    BID_MSG_EV11,//50
    BID_MSG_EV12,
    BID_MSG_EV13,
    BID_MNFCT_TD01,
    BID_MNFCT_TD02,
    BID_MNFCT_TD03,//55
    BID_MNFCT_TD04,
    BID_MNFCT_TD05,
    BID_MNFCT_TD06,
    BID_MNFCT_TD07,
    BID_MNFCT_TD08,//60
    BID_MNFCT_TD09,
    BID_MNFCT_TD10,
    BID_MNFCT_TD11,
    BID_MNFCT_TD12,
    BID_MNFCT_TD13,//65
    BID_MNFCT_TD14,
    BID_MNFCT_TD15,
    BID_MNFCT_TD16,
    BID_QRY_IMPRSN,
    BID_QRY_FLEE,//70
    BID_QRY_BTN3,
    BID_CRTR_NXWNDR,
    BID_CRTR_NXWRKR,
    BID_CRTR_NXFIGT,

Original comment by mefistotelis on 27 Jun 2015 at 12:19

GoogleCodeExporter commented 8 years ago
Yes, it works now. These numbers:

14, Scavenger room
23, Call to Arms
30, Chicken
34, Hold Audience

Do you want to have this documented? In the scripting ref or on the wiki?
In case of the former you'll have to add them yourself.

Original comment by Loobinex on 27 Jun 2015 at 6:27

GoogleCodeExporter commented 8 years ago
Retested back to r976 and it worked there as well, sorry. Updated document 
attached.

The documentation says the command is formatted 
'TUTORIAL_FLASH_BUTTON(​[button],​[player])' though, which doesn't work for 
me as PLAYER0 is never accepted. As far as I can tell only numbers are accepted.

Original comment by Loobinex on 27 Jun 2015 at 9:04

Attachments:

GoogleCodeExporter commented 8 years ago
Yes, the 2nd parameter is player index, not player name.

Original comment by mefistotelis on 28 Jun 2015 at 9:35

GoogleCodeExporter commented 8 years ago
It is used for timings.

Original comment by Loobinex on 28 Jun 2015 at 9:36

GoogleCodeExporter commented 8 years ago
After checking the code - it's not even player index, it is a duration of the 
highlight. Set it to -1 will make no time limit, otherwise it's amount of game 
turns.

Original comment by mefistotelis on 28 Jun 2015 at 10:45

GoogleCodeExporter commented 8 years ago
Loobinex, could you provide a set of changed lines only for the HTML file?

You file was interpreted and changed by a browser, so comparing it to my source 
file generates quite lot of changes...

Original comment by mefistotelis on 28 Jun 2015 at 11:09

GoogleCodeExporter commented 8 years ago
I just added the 4 missing items to the table.

New are lines 2913~2916, 2949~2952, 2977~2980 and 2993~2996. Attached new file, 
made a typo.

Original comment by Loobinex on 28 Jun 2015 at 11:15

Attachments: