lbebusiness
New Member
- Reaction score
- 3
Okay I've deleted my old post and updated it here to reflect new information I have read about. Same post as the one on the bottom.
P.S. I would have kept the original post here and put it in a spoiler at the bottom but spoilers don't seem to work here....anyways heres the new info enjoy:
WESTRING_UEVAL_UHOT=Hotkey
eval hotkey?
ESC
Hotkey=512
// Trigger Non-Variable Types - Utility, only used to simplify triggers
keyeventtype=1,0,0,WESTRING_TRIGTYPE_keyeventtype,integer
keyeventkey=1,0,0,WESTRING_TRIGTYPE_keyeventkey,integer
Keep that in mind
Check this out:
Im going to create a valid trigger that will throw no errors but wont run due to missing an event:
Key in example will be the page up key:
Key is defined here:
(there are alot more here)
worldeditstrings.txt
Add key to list of usable keyevents in GUI
triggerdata.txt
Add string name to key for use in GUI editor:
worldeditstrings.txt
Declare my key event constant here:
Blizzard.j
Modify Funtions to recognise Key and return Event
Blizzard.j
Add Key event's eventid here: (need event id though)
Common.j
Whats left? Someone has to open the .dll up (storm I belive) and make a list of every event.
Storm.dll is like a book that blizzard ADD's funtions to (or events).
You could take warcraft III Storm.dll and run starcraft with it. But not vise vesa.
So every update adds something new and doesn't take anything out of it.
I have no clue how to take apart a dll. But I do know its hell (blizzard made it hard to use Storm.dll) but I do have a Storm API which is documented here
http://www.campaigncreations.org/starcraft/inside_mopaq/chapter4.htm#using_the_storm_api
It talks about how to initialize it etc.
You can also download it.
Read me:
/*****************************************************************************/
/* StormIL.zip Copyright Justin Olbrantz(Quantam) 2000 */
/* */
/* Storm Interface Library v1.0 for Windows */
/* */
/* Author : Justin Olbrantz(Quantam) */
/* E-mail : [email protected] */
/* WWW : www.campaigncreations.com/starcraft/mpq2k/inside_mopaq/ */
/*---------------------------------------------------------------------------*/
/* Companion pack for Inside MoPaQ chapter 3 */
/*****************************************************************************/
This package contains the following files:
STORM.H Function prototypes for Storm.dll
STORM.LIB Import library for accessing Storm.dll. This is not a static
library! You still need Storm.dll
STORM.EXP Export file used in some rare scenarios
You may freely distribute this package as long as all of it (including this
file) remain intact and unchanged.
Have fun if you know what I'm talking about.
Thanks for listening.
:banghead::banghead::banghead::banghead::banghead::banghead:
P.S. I would have kept the original post here and put it in a spoiler at the bottom but spoilers don't seem to work here....anyways heres the new info enjoy:
WESTRING_UEVAL_UHOT=Hotkey
eval hotkey?
ESC
Hotkey=512
// Trigger Non-Variable Types - Utility, only used to simplify triggers
keyeventtype=1,0,0,WESTRING_TRIGTYPE_keyeventtype,integer
keyeventkey=1,0,0,WESTRING_TRIGTYPE_keyeventkey,integer
Keep that in mind
Check this out:
Im going to create a valid trigger that will throw no errors but wont run due to missing an event:
Key in example will be the page up key:
Key is defined here:
(there are alot more here)
worldeditstrings.txt
JASS:
WESTRING_HOTKEY_UP="Up"
WESTRING_HOTKEY_DOWN="Down"
WESTRING_HOTKEY_LEFT="Left"
WESTRING_HOTKEY_RIGHT="Right"
/////////////////////////
WESTRING_HOTKEY_PAGEUP="Pg Up"
/////////////////////////
Add key to list of usable keyevents in GUI
triggerdata.txt
JASS:
// Keyboard Event Keys
KeyEventKeyLeft=1,keyeventkey,bj_KEYEVENTKEY_LEFT,WESTRING_KEYEVENTKEY_LEFT
KeyEventKeyRight=1,keyeventkey,bj_KEYEVENTKEY_RIGHT,WESTRING_KEYEVENTKEY_RIGHT
KeyEventKeyDown=1,keyeventkey,bj_KEYEVENTKEY_DOWN,WESTRING_KEYEVENTKEY_DOWN
KeyEventKeyUp=1,keyeventkey,bj_KEYEVENTKEY_UP,WESTRING_KEYEVENTKEY_UP
/////////////////////////
KeyEventKeyPageUp=1,keyeventkey,bj_KEYEVENTKEY_PAGE_UP,WESTRING_KEYEVENTKEY_PAGE_UP
/////////////////////////
Add string name to key for use in GUI editor:
worldeditstrings.txt
JASS:
// Trigger keyboard events
WESTRING_KEYEVENTKEY_LEFT="Left Arrow"
WESTRING_KEYEVENTKEY_RIGHT="Right Arrow"
WESTRING_KEYEVENTKEY_DOWN="Down Arrow"
WESTRING_KEYEVENTKEY_UP="Up Arrow"
/////////////////////////
WESTRING_KEYEVENTKEY_PAGE_UP="Page Up"
/////////////////////////
Declare my key event constant here:
Blizzard.j
JASS:
// Keyboard Event Types
constant integer bj_KEYEVENTTYPE_DEPRESS = 0
constant integer bj_KEYEVENTTYPE_RELEASE = 1
// Keyboard Event Keys
constant integer bj_KEYEVENTKEY_LEFT = 0
constant integer bj_KEYEVENTKEY_RIGHT = 1
constant integer bj_KEYEVENTKEY_DOWN = 2
constant integer bj_KEYEVENTKEY_UP = 3
/////////////////////////
constant integer bj_KEYEVENTKEY_PAGE_UP = 4
/////////////////////////
Modify Funtions to recognise Key and return Event
Blizzard.j
JASS:
function TriggerRegisterPlayerKeyEventBJ takes trigger trig, player whichPlayer, integer keType, integer keKey returns event
if (keType == bj_KEYEVENTTYPE_DEPRESS) then
// Depress event - find out what key
if (keKey == bj_KEYEVENTKEY_LEFT) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif (keKey == bj_KEYEVENTKEY_RIGHT) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif (keKey == bj_KEYEVENTKEY_DOWN) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_DOWN_DOWN)
elseif (keKey == bj_KEYEVENTKEY_UP) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_UP_DOWN)
////////////////////////
elseif (keKey == bj_KEYEVENTKEY_PAGE_UP) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_PAGE_UP_DOWN)
////////////////////////
else
// Unrecognized key - ignore the request and return failure.
return null
endif
elseif (keType == bj_KEYEVENTTYPE_RELEASE) then
// Release event - find out what key
if (keKey == bj_KEYEVENTKEY_LEFT) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_LEFT_UP)
elseif (keKey == bj_KEYEVENTKEY_RIGHT) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_RIGHT_UP)
elseif (keKey == bj_KEYEVENTKEY_DOWN) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_DOWN_UP)
elseif (keKey == bj_KEYEVENTKEY_UP) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_ARROW_UP_UP)
/////////////////////////
elseif (keKey == bj_KEYEVENTKEY_PAGE_UP) then
return TriggerRegisterPlayerEvent(trig, whichPlayer, EVENT_PLAYER_PAGE_UP_UP)
////////////////////////
else
// Unrecognized key - ignore the request and return failure.
return null
endif
else
// Unrecognized type - ignore the request and return failure.
return null
endif
endfunction
Add Key event's eventid here: (need event id though)
Common.j
JASS:
//===================================================
// For use with TriggerRegisterPlayerEvent
//===================================================
constant playerevent EVENT_PLAYER_ARROW_LEFT_DOWN = ConvertPlayerEvent(261)
constant playerevent EVENT_PLAYER_ARROW_LEFT_UP = ConvertPlayerEvent(262)
constant playerevent EVENT_PLAYER_ARROW_RIGHT_DOWN = ConvertPlayerEvent(263)
constant playerevent EVENT_PLAYER_ARROW_RIGHT_UP = ConvertPlayerEvent(264)
constant playerevent EVENT_PLAYER_ARROW_DOWN_DOWN = ConvertPlayerEvent(265)
constant playerevent EVENT_PLAYER_ARROW_DOWN_UP = ConvertPlayerEvent(266)
constant playerevent EVENT_PLAYER_ARROW_UP_DOWN = ConvertPlayerEvent(267)
constant playerevent EVENT_PLAYER_ARROW_UP_UP = ConvertPlayerEvent(268)
/////////////////////////
constant playerevent EVENT_PLAYER_PAGE_UP_UP = ConvertPlayerEvent(260)
constant playerevent EVENT_PLAYER_PAGE_UP_DOWN = ConvertPlayerEvent(260)
/////////////////////////
Whats left? Someone has to open the .dll up (storm I belive) and make a list of every event.
Storm.dll is like a book that blizzard ADD's funtions to (or events).
You could take warcraft III Storm.dll and run starcraft with it. But not vise vesa.
So every update adds something new and doesn't take anything out of it.
Following this practice, Blizzard uses a shared library called Storm (Storm.dll on PCs, Storm.bin on Macs). This library is used by all modern Blizzard games to store important functions like MPQ reading (discussed in chapter 3), Battle.net, and even some graphics routines. When Blizzard releases a new game, it adds functions to Storm without changing old functions. This means that an old game can use a new version of Storm just fine. But, like all shared libraries, Storm makes its functions available to any program that wants to use them, which is not very good for security. It is for this reason that Storm only contains MPQ reading functions. The MPQ writing functions are Blizzard's prized possessions, and they're not going to let just anyone use them.
I have no clue how to take apart a dll. But I do know its hell (blizzard made it hard to use Storm.dll) but I do have a Storm API which is documented here
http://www.campaigncreations.org/starcraft/inside_mopaq/chapter4.htm#using_the_storm_api
It talks about how to initialize it etc.
You can also download it.
Read me:
/*****************************************************************************/
/* StormIL.zip Copyright Justin Olbrantz(Quantam) 2000 */
/* */
/* Storm Interface Library v1.0 for Windows */
/* */
/* Author : Justin Olbrantz(Quantam) */
/* E-mail : [email protected] */
/* WWW : www.campaigncreations.com/starcraft/mpq2k/inside_mopaq/ */
/*---------------------------------------------------------------------------*/
/* Companion pack for Inside MoPaQ chapter 3 */
/*****************************************************************************/
This package contains the following files:
STORM.H Function prototypes for Storm.dll
STORM.LIB Import library for accessing Storm.dll. This is not a static
library! You still need Storm.dll
STORM.EXP Export file used in some rare scenarios
You may freely distribute this package as long as all of it (including this
file) remain intact and unchanged.
Have fun if you know what I'm talking about.
Thanks for listening.
:banghead::banghead::banghead::banghead::banghead::banghead: