Vanilla WareIDs list?

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Whuppee
Posts: 73
Joined: Mon, 29. Oct 07, 07:47

Vanilla WareIDs list?

Post by Whuppee »

(Given my current difficulties with X3MM...)


I'm looking for a listing of Vanilla WareIDs (SS_WARE_...). I'm assuming they're stored in the TWares file.

I would dearly love someone to link me to such a list, or post / mail me a textdump of said file.

Or.. tell me how to get at those IDs from ingame. If it's possible.

I believe that I've tried every remotely reasonable looking function within the script editor. Including one, I believe, that was titled something like 'get ware ID'. Getting the main type, sub type.. 3 other functions I don't remember..

Using the 'Triplex Scanner' ware as an example.. best I could get were outputs such that it was a main type of 16, subtype of 0 (I may have that backwards). Classed as an Unknown Object. And several outputs along the lines of ??ReadText9-487-9-423?.

For a comparison, I swapped out that ware for a custom ware (that works ingame, displays correctly, has the text files loaded, etc)..

Same output.

:?
Last edited by Whuppee on Tue, 20. Nov 07, 21:03, edited 2 times in total.
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Re: Vanilla WareIDs list?

Post by eladan »

Whuppee wrote:I'm looking for a listing of Vanilla WareIDs (SS_WARE_...). I'm assuming they're stored in the TWares file.

I would dearly love someone to link me to such a list, or post / mail me a textdump of said file.

Or.. tell me how to get at those IDs from ingame. If it's possible.
The SS_WARE codes may correspond to certain main and subtypes, I'm not sure - haven't investigated it. If not, then there's no way that I know of in-game.

You don't have to use the mod manager to look at the cat/dats, though it is the easiest way. You could use x2tool to extract the files from the dat (and to unpack TWares.pck to a readable form.) If you've got the latest plugin manager, x2tool is bundled with it, otherwise you need to download the x2 modding kit.
Whuppee
Posts: 73
Joined: Mon, 29. Oct 07, 07:47

Post by Whuppee »

Awesome, thanks. :)
User avatar
Moonraven
Posts: 968
Joined: Wed, 27. Aug 03, 11:13
x3

Post by Moonraven »

The "SS_WARE"-Codes are only unique identifiers within the TFiles. You can use your own codes, without problems.

If you want a list of available main-/subtypes (used in the script editor), just use this small script:

Code: Select all

0001   $maxMain = 20
0002   $mtc = 0
0003   while $mtc < $maxMain 
0004     $maxSub = get number of subtypes of maintype $mtc
0005     $stc = 0
0006     while $stc < $maxSub
0007        $ware = get ware from maintype $mtc subtype $stc
0008        write to logfile 99 append=[TRUE] printf: "Maintype %s Subtype %s = %s", $mtc, $stc, $ware, null, null
0009        inc($stc)
0010    end
0011    inc($mtc)
0012  end           
0013  return null
This code writes all wares with the main and subtype to a logfile in your x3 folder (log0099.txt or something like this).
Gruß Moonraven
Wer lesen kann, ist ganz klar im Vorteil.
[ external image ]
User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 »

http://www.xai-corp.net/en/node/602

The SS_... constants are indeed the maintypes for those types of wares. SS_MISSILES are the missile wares, SS_TECH is the tech wares, etc.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22437
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

althou theres no way to get the actual SS_WARE name from within a script.

scripts use thier position in the Tfiles as the id. IE, the subtype will match where it is in the file and has no concept of the actual name
Whuppee
Posts: 73
Joined: Mon, 29. Oct 07, 07:47

Post by Whuppee »

Well, I had some luck with x2tool.. only to discover that having the wareIDs actually didn't solve the problem I thought it would :P

Might be able to use the main/sub types for that...


Thank you all for the responses.

@ Moonraven:

That'll be helpful. Didn't know I could do that.

@ moggy2:

Guess it's about time I started reading around sites like yours a bit more :)

@ Cycrow:

Thanks for the confirmation.

Return to “X³: Reunion - Scripts and Modding”