Log in

View Full Version : Editing Commands_en.cfg


Darkbluesky
03-28-10, 04:37 AM
Hello

I am sure this was asked and answered before but I have not found it. Is there is a little explanation or guide on how to edit commands_en.cfg?

The "Name" and "GoBack" seem obvious, but what about the other labels (MnID, Ctxt, Page, the modifiers of Key0, etc)?

Thanks

EDIT: I see some brief description in the header of the file itself, but still wondering if there is an explanation of the utility of each one, because it is not clear.

Darkbluesky
03-28-10, 11:35 AM
Another question. I am trying to mod some camera views with S3D and I have not managed to understand how zorks the "Rotation" values (x, y, z) of the nodes.

I understand the Position coordinates (they are relative to the parent one), but the rotation coordinates seems to act strangely...

I would thank if someone could explain it to me.

irish1958
03-28-10, 03:47 PM
Hello

I am sure this was asked and answered before but I have not found it. Is there is a little explanation or guide on how to edit commands_en.cfg?

The "Name" and "GoBack" seem obvious, but what about the other labels (MnID, Ctxt, Page, the modifiers of Key0, etc)?

Thanks

EDIT: I see some brief description in the header of the file itself, but still wondering if there is an explanation of the utility of each one, because it is not clear.
Just to edit the keys, use SetKeys for SH3. http://www.subsim.com/radioroom/downloads.php?do=file&id=1016
The labels refer to location of the action of the stated key command.

Darkbluesky
03-29-10, 03:29 PM
Tx irish. I want to know also which is the use of the other parameters.

Anyway, in relation to the Cameras.dat, nobody can explaina little how the rotation settings works? I bet that some modders here know something about it. :O:

badwolf
03-29-10, 06:44 PM
Hi Darkbluesky,
I think you'll get a better response if you give an example of what your trying to mod and the problem. The questions you ask is more like a request for a tutorial which could get very involved.

[Contexts]
ContextsNb=11; max contexts nb is 16
Context0=None; default - should not be changed
Context1=Game
Context2=Pause
Context3=Spectator
Context4=Console
Context5=Museum
Context6=Effects
Context7=Final
Context8=Edit
Context9=Replay
Context10=ModalMsg

[Commands]
CommandsNb=500
MaxKeyCommandsNb=170; Keys number shoud be smaller than this value (in order to accelerate the loading)

;Name = command name -> will be translated in command index
;Ctxt = command context(s) as indexes -> see [Contexts] section
;MnID = menu item id associated with this command
;Str = string id (from en_menu.txt) associated with this command
;KeyX = an entry containing <key_code>,<flags chars>,<help text id>; flags chars could be C=executed by the crew, R=repeat key, c=with control, s=with shift, m=only when mouse is captured (enabled), n=only when mouse is not captured (enabled)
;Page = <page_id>,<title_id>; associated page (only for user commands) and a title if is necessary

(Taken from Erweiterte_Befehle_Mod)
Take the MnID for instance.
The MnID is followed by the identification code i.e.

Commands_en.cfg
[Cmd42]
Name=Mission_order
Ctxt=1
MnID=0x3F02000A
Key0=0x77,,"F8"
Page=0x36000000,3743

menu_1024_768.ini
[G3F I26]
Name=&Mission orders
Type=1032;Button
ItemID=0x3F02000A
ParentID=0x3F020000
Pos=1,-424,62,45
Materials=4
Display=0;No stretch
Mat 0=data/menu/gui/layout/Shortcuts.tga
Crop 0=0.0078125,0.818532,1,1
Mat 1=data/menu/gui/layout/Shortcuts.tga
Crop 1=0.0078125,0.818532,1,1
Mat 2=data/menu/gui/layout/Shortcuts.tga
Crop 2=0.0078125,0.818532,1,1
Mat 3=data/menu/gui/layout/Shortcuts.tga
Crop 3=0.0078125,0.818532,1,1
MatFlags=0x1
TexFmt=0x9
Font=1
TextFlags=0x0
StatesColors=0xB0B0B0FF, 0xFF, 0xFFFFFFFF, 0xFFFFFFFF
ToolTipText=2719

As you can see when the Mission orders button icon is pressed it sends the code 0x3F02000A as defined by the menu_1024_768.ini. The Commands_en.cfg recognises this and also key F8 as Mission_order. Page=0x36000000,3743 if you paste 0x36000000 into edit in menu_1024_768.ini it will find the Mission orders Page and if you search en_menu.txt with 3743 you'll find 3743=ORDERS. You'll find a great many instances where files communicate with one another via a unique code.

Darkbluesky
03-30-10, 01:31 AM
Thank you. And tx for the advice.

Well I was analyzing the Conning_Tower_OH Commads_en.cfg because I saw that the right click changed to free cam but I didn't find a bind to that key/button so I was guessing that could be a bind/link not so obvious as the Key0 label... I'll check the other files. I would like to know how the author as done that.

About the other question, about the rotation, it is a bit difficult to explain but I'll try.

I am finding some problem. In the first node of lets say for example RadioRoomRadar station I define some coordinates in Position fields where I want the camera when I exit the station, then in another node inside the main RadioRoomRadar I define just the contrary of the coordinates defined in the main node, which will put back the camera to the default position (in this example just in face the radar) when in the station. That works, when entering the station I sit in face the radar and when I exit it I am in another coordinates (the ones defined int he main node), let's say in the corridor facing the hatch.

But the problems comes if for example I want to be looking to the radioman instead of facing the hatch. To do that I need to turn the camera around the vertical axis (Y) and also around one of the horizontal axis (X). So I put some values for the Rotation fields for the main node.

The result is that the camera is positioned and points as I want but when I enter in the station, then the AxisRotation works strangely (far away from the 'expected' point (in face Radar), sometimes tilted in Z and as if it had a big rotation radius, etc.

If I try to compensate de rotation values put in the main node by putting the contraries (same value, different sign) in the second node (the one that contains the two -X,Y- AxisRotation proprierties, and where I put also the contrary values for compensation of the position, as explained), the behaviour of the camera is also strange (tilted in axis Z, big rotation radius)

Can someone please enlight me? I have tested a lot of combinations and looked another examples which uses the Rotation fields but I have not concluded how it works.

Thanks you for any help!

Darkbluesky
03-31-10, 09:00 AM
I am rellay sorry to insist but I am getting crazy trying to understand how they work. Any clue about the "Rotation" parameters in relation to AxisRotation (as explained)?

Thank you very much for any clue you may give...