[MOD] Custom descriptions and names

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
Spectre2032
Posts: 12
Joined: Mon, 6. Feb 06, 00:51
x3

[MOD] Custom descriptions and names

Post by Spectre2032 » Sun, 9. Nov 08, 03:02

Okay I remember reading this somewhere but don't know were.

I am attempting to add names and descriptions for a few custom wares and other various items. I know that it;s all kept in the XML files in the t directory but what I want to know is how I tell a created object to get it's description from a certain page and entry number and also what are the restrictions on where I can put said player made entries.

User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse » Sun, 9. Nov 08, 10:50

I've not done it myself, but my understanding is that the EMP wares just refer to 'empty' places in the T files, and modders claim them as necessary.

I would look at the EMP stuff and the basic modding tutorials (in the X3:R forum if necessary - this won't have changed).
Irrational factors are clearly at work.

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Sun, 9. Nov 08, 21:26

Well, you can create custom wares in two ways. You can either claim an empty ware slot or create a custom ware with Cycrow's Plugin Manager (using the Packager).

Claiming an Empty Slot:
  1. Go into the Community Script & Mod Download Library for X3: Terran Conflict to check if that ware has already been taken by another person.
  2. If the ware has not been taken, open up the TWareT.txt in Notepad (or in the X3 Editor by doubleshadow).
  3. With TWareT open, look for the ware that you want to use. In this example, it is SS_WARE_SW_NEW4. When you've found that ware's line, look for the sixth value on that line. This is the ware name ID. In this case, it is 5783. The next highest number, 5784, is your ware description ID.
  4. Now, you need to make a xml file to contain your name and description. Again, refer to the Community Script & Mod page for a list of used xml files. Use one that is not on that list. The format for the xml file name is "TextFileID-LanguageCode.xml". EXAMPLE: 7800-L044.xml. The 7800 File ID for the English version of the game. Save this file in "EGOSOFT\X3 Terran Conflict\t\"
  5. Next, you need your XML structure, simply copy this:

    Code: Select all

    <?xml version="1.0" encoding="UTF-8" ?>
    <language id="44">
    </language>
    It is between the <language id="44"> and the </language> tags that you will put your name and description.
  6. Lastly, you need to write the name and description. You now need the Page ID for the ware lists, this is Page 17. Using the previous example, it would be like this:

    Code: Select all

    <page id="17">
     <t id="5783">***WARE NAME***</t>
     <t id="5784">***WARE DESCRIPTION***</t>
    </page>
    Remember to always close any opened tags with the appropriate closing.
  7. Save your file now, and you have just named and given a description to a new ware.
Using the Plugin Manager:
  1. Open the Plugin Manager - Packager.
  2. Go to the Wares tab.
  3. Right click within the first list field and select Add Ware.
  4. Add some serial name after the "SS_WARE_" string in the Ware ID text field.
  5. Select a ware type from the combo box labeled Ware Type.
  6. Type in a price in the Price counter field.
  7. Select a size class from the Size Class combo box. This determines what ships will be able to carry the ware.
  8. Type in a volume for the ware in the Volume counter field.
  9. Type in the minimum notoriety value for the ware in the Min. Notoriety counter field. This determines at what rank the player must be in order to buy this ware.
  10. Press Done.
  11. With the new ware selected in the first list box, right click in the second list box and choose Add Ware Text
  12. Select the language code for the game in which you want people to be able to use your ware in the Language ID counter field. 44 is English, 49 is German.
  13. Type in a ware name in the text field Ware Name.
  14. Type in a description in the text field Ware Description.
  15. Press Done.
  16. Save your new SPK file.

The North Wind
Last edited by WindsOfBoreas on Tue, 11. Nov 08, 19:44, edited 2 times in total.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Spectre2032
Posts: 12
Joined: Mon, 6. Feb 06, 00:51
x3

Post by Spectre2032 » Mon, 10. Nov 08, 06:06

Helpful... yes

But not exactly what I was getting at I was wondering what the restrictions were on what numbers I can use in the 0001.L044.xml file since I just been kinda looking up a number using my XML editor and looking for a gap following that and start putting in my custom descriptions their. Of course all my custom ones I save into a separate file 0003-L044.xml in this case since 0002 is occupied by a Pck that apparently controls the labels for the startup screen.

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Mon, 10. Nov 08, 06:21

Well, first off, you don't want to use a text file under file ID 1000 or above 9999.

The best way to find out what numbers are open is to use doubleshadow's X3 Editor tool set and use "Text Resource Editor". This program takes all of the XML files and puts together a comprehensive list of all the numbers used every file. It also breaks down each Page ID into what it is used for. Page 17, however, is the page that you will use for all object names and descriptions. As far as the Text ID values are concerned, I'm not sure what the limit is. I've seen them up to seven digits.

Hope this is more helpful, sorry that I did not understand what you were asking.

The North Wind
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Spectre2032
Posts: 12
Joined: Mon, 6. Feb 06, 00:51
x3

Post by Spectre2032 » Tue, 11. Nov 08, 00:22

yeah what I've seen is that Page 17 is used and something else about to give more space they added page 300017 to give more space in X3 for wares beyond that I don't know. so I can pretty much assume that any number not in use between 1000-9999 on page 17 is fair game unless it conflicts with someone's MOD.

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Tue, 11. Nov 08, 02:51

Almost. The 1000-9999 limitation is for your XML file that adds the new information. Meaning that you should not make an XML file of 0002-L044.xml, but 1002-L044.xml instead.

Other than that, you're spot on.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Spectre2032
Posts: 12
Joined: Mon, 6. Feb 06, 00:51
x3

Post by Spectre2032 » Tue, 11. Nov 08, 03:08

Oh then I guess my 0003-L044.XML is a bad idea. well it works so I dunno I just advanced the counter to a number that wasn't being used.

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Sun, 5. Jul 09, 08:18

WindsOfBoreas wrote:Well, you can create custom wares in two ways. You can either claim an empty ware slot or create a custom ware with Cycrow's Plugin Manager (using the Packager).
Not sure if you can answer this or not, but I tried to use the Plugin Manager and everything worked as you said, but when I go to load the .spk I created there are no files listed at all in the installer and after I installed it I saw no new t files or script files and the ware was not showing up in the master list in the game.

So my question is this does the Plugin Manager create a t file for me? And if so what is it named so I can refer to it in my scripts? I have no idea how to create a custom ware.

I have a decent script written where when you hit a preset hotkey the game checks what type of ship you are flying checks to see how many ecells you have and then depending on what ship you are in and if you have enough ecells your ship will use a preset amount to recharge your weapons and shields. I just want to be able to attatch this script to a custom ware that has to be installed on your ship as a final conditional statment before it will run. Any help will be appreciated thx.
Don't make me slap Ye!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Sun, 5. Jul 09, 15:33

this might help

http://cycrow.thexuniverse.us/scripts/h ... index.html

there are a few difference between this and X3TC, but the basics are the same.

the scripts to use are plugin.plugman, instead of plugin.scriptmanager

also remember to enable custom wares in the plugin manager

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Mon, 6. Jul 09, 02:42

Cycrow wrote:this might help

http://cycrow.thexuniverse.us/scripts/h ... index.html

there are a few difference between this and X3TC, but the basics are the same.

the scripts to use are plugin.plugman, instead of plugin.scriptmanager

also remember to enable custom wares in the plugin manager
Yes this is very helpful thank you again for all your hard work on the script, hotkey, and plugin managers. They have made it so scripting is easy enough for me a person that knows nothing about programming.
Don't make me slap Ye!

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Mon, 6. Jul 09, 03:49

ok I hate to pester you all with questions, but this time there is something very odd going on. I have the plugin.plugman... scripts in my scripts folder, but they are not showing up in the game under the list where you create and manipulate existing scripts or in the list for the call script command. I have the custom wares activated and the custom wares controls activated, but the plugin.plugman scripts are not showing up. Any idea whats gone wrong?

-edit-
even after uninstalling all scripts and the plugin manager and then reinstalling only the plugin manager those scripts are in the folder, but not available for use in the script manager. In the mean time I will be making a ware via the EMP mod, but I would prefer to use the plugin manager as it allows me to set custom ware price and noteriety and there is less chance of someone else using the same ware slot
Don't make me slap Ye!

palzxc
Posts: 32
Joined: Sun, 28. Aug 16, 21:30

Post by palzxc » Sun, 28. Aug 16, 21:41

I tried to create a new ware but I don't believe I am doing it right.
I find this tutorial difficult to follow.
And my plugin manager does not seem to have a "wares" tab. :cry:

Let's suppose that I want to create a new food type ware, call it majaglit special.

Can anyone please instruct the complete noob how to do it, as in a step by step directions.
Assume that I know nothing.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”