December 22, 2024, 11:26:13

Author Topic: Redefining Sets  (Read 8969 times)

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
Redefining Sets
« on: October 27, 2009, 19:14:41 »
As I assume most, if not all, the people reading this forum know, all devices have specific Set numbers associated with them in the tactictypes.ini file. In fact, most have as many as five associated with them, only one of which appears to be used to define which slot they can be set in. Does anyone know the purpose of the other numbers, and has anyone tried simply defining their own? Are they, in some way, hard coded to specific effects?

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
(No subject)
« Reply #1 on: October 28, 2009, 01:09:35 »
you know, that's actually a good question... didn't really asked it to myself before....

Offline Dark-Zero

  • Crewman
  • *
  • Posts: 26
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #2 on: October 29, 2009, 02:42:05 »
If i am not wrong, The ships all have its on SEts, and a weapon matching its sets can Be fitted on this weapon slot,
Take as, Stuff like Data scanner, Blinder, ETC have a special set that only cna be mounted on, Same goes for heavy weapons, and the Sig laser

If a ship does not have  the slot Number matching a Weapon Sets number, then it cannot be loaded on this ship,
An example would be the Sig laser, only 2 Ships have the Matching Slot for that weapon, you can guess wich

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #3 on: October 29, 2009, 07:18:46 »
Oh, I understand the function. A device with a SET number of 55 can only be mounted in a slot with a SET number of 55. I was wondering if these sets were hard coded in any way, which would prevent me from defining them as I choose. For example, I want weapons to be SET 1, Supports SET 2, Shields SET 3, etc.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
(No subject)
« Reply #4 on: October 29, 2009, 08:22:19 »
I'm not too sure about that. I once believed, you could freely define your own sets as you'd like, but ran into problems some time later (like crashes or AI behaving strangely).

There are at least two things to consider, though:
[list=1]
[/li][li]Some mission or command scripts may rely on certain kinds of devices belonging to certain sets, because they use the InSet-command to check for these devices. They may try to collect ECM devices using InSet(S.this, 16), for example. If you define your own sets ignoring these default sets, these missions and/or commands are likely to malfunction.
[/li][li]If your modding the default or your own campaign or if you're doing your own multiplayer mod, you'll need to think of the equipment screen. I believe it categorizes all the devices based on which set they belong to. So if you put devices in your custom sets, the game may either not recognize them at all or place them in the wrong category.
[/li][/list]

I haven't done a lot of testing, though, so you'll probably need to see for yourself. There's a part in the tacticsbase.ini, that you may be interested in:
Code: [Select]
DEVICESLOTS
1  8 - 90 31 32 34 35 ; // normal weapon
9  9 - 110 33 ; // siege weapon
10 13 - 100 39 ; // flak
14 14 - 90 41 42 43 ; // shield
15 15 - 90 51 52 ; // main engine
16 16 - 90 53 ; // aux engine
17 18 - 120 54 55 56 ; // special engine
20 22 M 90 61 62 63 64 65 66 67 81 ; // support devices except weapon generators, and IP drive
23 23 M 60 71 72 73 ; // weapon generator
24 24 M 90 38 ; // mechanoid emitter
DEVICESLOTS
The first two numbers of each line identify the kind of device slot corresponding to the #slot n# and #angle n# parameters needing to be specified in the 3d model (see modding documentation). I have no idea, what the hyphen or the M means, but the last numbers of each line are the actual sets used for that device category. However, there are more sets than that specified in the tacticstypes.ini (like set 16 for ECM devices, which doesn't appear in this list).

So for example, the first line assigns #slot 1# to #slot 8# (which are normal weapon slots) to the tacticstypes sets 90, 31, 32, 34 and 35. Likewise, shields (#angle 14#) belong to at least one of the sets 90, 41, 42 or 43.

Devices belonging to different sets
I'm not too sure about the reason behind this, but I simply believe this to be used for grouping devices based on different criteria. For example you may have a set for light lasers being used by smaller ships, a set only for heavy lasers used by some other shipclass and a set for both light and heavy laser used by just another shipclass. So light lasers belong to the one set, heavy lasers to the other and both kinds of lasers belong to the third set. Also they may be grouped based on the race/civilization using this kind of devices or other arbitrary criteria.

Last but not least, I'd simply advice you to copy the exisiting set definitions of similar devices when inventing your own. That way you should be able to avoid the two problems above and most other problems, that we don't know about yet. If you want to have a better overview of the actual sets, look into "modsNEXUS Skirmisherconfig.ini" - this will contain information about the "DEVICESETS" of the last mod loaded in the Nexus Skirmisher. (scroll down to DEVICESETS, the first column can be ignored, the second column lists the set number, the third colum lists the devices belonging to this set).

Offline Keldane

  • Specialist
  • *
  • Posts: 73
  • Karma: 0
    • View Profile
    • http://
(No subject)
« Reply #5 on: November 01, 2009, 01:54:04 »
That's a real wealth of information, Arparso. Thank you for your most comprehensive reply.  :D