View Single Post
Old 11-10-11, 08:00 AM   #1279
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,547
Downloads: 26
Uploads: 3
Default

@CapnScurvy

The lists you refer too are not the same. The picklists in S3D's property editor are all predefined enumerations. Their names have NO meaning to the game, only the actual value that they represent (an integer type), unlike actual commands which are of type 'strings'. The example ConningDeck you gave for all we care could be named 'SomeStupidName'. But the value in the DAT-file is actually stored as an integer value '5'.

The reason I chose for these descriptions is:
a) readibility
b) conformance to C# coding style

The descriptions are actually taken from C-style declarations stored in the .ACT files. These are much less readable, because they usually are all caps, and with meaningless prefixes (to non-coders, mind you).

Since S3D was written to assist modders, I chose to transform these C-style declarations to C#-style declarations which are easier to read.

This enumeration in particular may put you on the wrong foot, since you see similar commands like Conning_deck, but make no mistake, the enum type here is a list of defined Camera's, while the Conning_deck command is a command that jumps to a specific station, which is not the same (per se). If the ACT-file does not have the definition, then adding them to the .CS file like privateer says may more than likely NOT work, even though a companion command may exist. I've copied all enumerations from the .ACT-files (from SH4, which may be the reason why the german camera is not there), and while I may have made a mistake here or there, 99% chance is that the enums are correct so if something is missing, it likely is NOT implemented by the devs.

Just be carefull with changing enumerations, each entry is associated with an integer value, even if no number is assigned to it, in which they are anonymous and autoincrement. With these types of enumerations (and S3D has many of them), changing a name has no effect, but changing the order will actually change the value that each entry represents!!!

So, to recap:

- Enumerations are value types (integers), their 'name' is not stored and could be named anything you like (as long as it adheres to C# naming specs, meaning it can't start with a number, and can't contain most 'special' characters).
- Commands are string types, their 'name' IS stored and must match exactly with whatever commands the game supports.

[edit] Lastly, making the TBT clickable or highlightable on the bridge seems to be an actual game bug. Many have attempted to fix this. I can at least assure you that it has nothing to do with your question in particular, although perhaps it might be related (perhaps the value is actually incorrectly '5').

Last edited by skwasjer; 11-10-11 at 08:12 AM.
skwasjer is offline   Reply With Quote