2009-10-17, 10:34 AM
Here is what an ini file will look like:
We will need documentation for all of this stuff on the website somewhere. I mean, documentation can come with the SDK, but it wouldn't be right to include documentation with each game. Still the ini file itself can be a little self documenting with comments.
Quote:;Anything not in a section (delimited by brackets, ie. [])
;Should be named with the section in which it belongs, then
;followed by a period and the key name. This practiced is
;better used sparingly and only for casual testing of values??
[Player]
;This section can assign different ini files per Windows user
;account (instead of this one)
[Remote]
;This section will fetch/merge additional configuration info
;from somewhere on the internet.
[Locale]
;This section is for manually overriding the environment locale
;settings (of your Microsoft Windows enivironment)
[Keymap]
;Each key (named variable) in this section represents a key
;on a keyboard and the corresponding value assigned is the
;key the player must press instead of the original key...
;Sword of Moonlight assigns the following keys to the
;following actions...
;In normal play
;TAB: Enter menu? ? ? ? ?? ;0F
;LCONTROL: Shoot magic? ?? ;1D
;LSHIFT: Swing weapon? ? ? ;2A
;SPACE: Dash/Interact? ? ? ;39
;END: Reset view? ? ? ? ?? ;CF
;PGDN: Look up? ? ? ? ? ?? ;D1 (also known as NEXT)
;DELETE: Look down? ? ? ?? ;D3
;UP: Walk forward? ? ? ? ? ;C8
;LEFT: Turn left? ? ? ? ?? ;CB
;RIGHT: Turn right? ? ? ?? ;CD
;DOWN: Walk backward? ? ?? ;D0
;??: Step left
;??: Step right
?
;In the menu of message dialog
;ENTER: Choose/Choice #1
;ESCAPE: Leave/Choice #2
;Any hexidecimal number or DirectInput code can be used to
;name a key or value. For a complete reference please visit:
;https://www.gamespp.com/directx/directInputKeyboardScanCodes.html
;Or search the WWW for "DirectInput keyboard scan codes"
[Action]
;The Action section assigns action names to keys (like a macro)
;The action names are up to you, and will supercede the names of
;keys during assignment. Actions can be a series of keys as well
Enter_menu = TAB
Shoot_magic = LCONTROL
Swing_weapon = LSHIFT
Dash_or_interact = SPACE
Dash = SPACE
Interact = SPACE
Reset_view = END
Look_up = PGDN
Look_down = DELETE
Walk_forawrd = UP
Turn_left = LEFT
Turn_right = RIGHT
Walk_backward = DOWN
Step_left = ??
Step_right = ??
Select = ENTER
Exit = ESCAPE
Yes = ENTER
No = ESCAPE
[Joypad]
;This section can be used to spoof Sword of Moonlight's keyboard
;inputs, by simulating a keyboard via a Windows "Game Controller"
;you should set hide_controllers_from_som = yes so to avoid any
;conflicts with your Sword of Moonlight game.
hide_controllers_from_som = yes ;SOM will not detect any controllers
joypad_to_use_for_play = 0 ;A number or name with wildcards will do?
;"Analog" stick/button functions
simulate_analog_signals = yes ;throttles look/move keys per frame
?
;Pseudo-Buttons: you can create digital and analog buttons from your
;controller's feature set, such as joystick axes and pov hats. Even
;button combinations. This is necessary because only buttons can
;be used to simulate the keyboard.?
?
pseudo_x_axis = 13
pseudo_y_axis = 14
pseudo_z_axis = 15
pseudo_z_rotation = 16
pseudo_hat_north = 17
pseudo_hat_east = 18
pseudo_hat_south = 19
pseudo_hat_west = 20
?
;Buttons: each button is a number (see: Control Panel->Game Controllers)
;which is assigned to a key values (see: [Keymap] section) or series of
;keys called a macro. Assigned keys should correspond to the keymap!!
1 = Look_down
2 = Enter_menu
3 = Look_up
6 = Interact
7 = Shoot_magic
8 = Swing_weapon
11 = Dash
12 = Reset_view
;Negative/positive numbers have meaning for calibrated analog "buttons"
-13 = Step_left
+13 = Step_right
-14 = Walk_backward
+14 = Walk_forward
-15 = Turn_left
+15 = Turn_right
-16 = Look_down
+16 = Look_up
;Menu buttons are special. They begin with an M
M2 = Select
M3 = Exit
M17 = UP
M18 = RIGHT
M19 = DOWN
M20 = LEFT
;Message buttons begin with a question mark
?17 = Yes
?19 = No
;The following keys can be used for on the fly modification of the
;existing joypad configuration
;flip_button_poles = ;list of analog buttons for which to flip polarity
;swap_button_pairs =? ;list of button pairs for which to swap assignments?
[Joypad1]
;Here you could define another joypad configuration...
[Motion]
;This section lets you simulate keys with a mouse-type devices
[Memmap]
;Changing this section is not advised for players and may
;break your game or very likely constitute cheating.?
[Editor]
;This section is for dynamically rewriting text on the fly before
;it is drawn to the screen for the player to see. Not to be confused
;with translation or menu customization.
[MenuRx]
;This section is for menu customization
[Module]
;Section for modules to be loaded...
;Sections for each module should be named after the loaded module
[System]
;This section should not be edited by anyone
[Config]
;This section (Config) should not be edited by hand!!
;It is reserved for saving the player's menu settings
;per Windows user account.
We will need documentation for all of this stuff on the website somewhere. I mean, documentation can come with the SDK, but it wouldn't be right to include documentation with each game. Still the ini file itself can be a little self documenting with comments.