New modder looking for some guidance with tags and language files

The place to discuss scripting and game modifications for X Rebirth.

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

Post Reply
heyjustarooni
Posts: 4
Joined: Mon, 3. Jul 17, 00:30
x4

New modder looking for some guidance with tags and language files

Post by heyjustarooni » Mon, 3. Jul 17, 01:08

Hi everyone, new modder here looking for some help. I created a new weapon turret and successfully attached it to a ship by using diff/replace on the ship macro. Now I am running into 2 hurdles I can't seem to get over:

1. How do you correctly display the new weapon on the ship details page? I found the element on the ship components page that I'm pretty sure controls this:

Code: Select all

tags="turret_small_mg "


But where are the tags defined? For example, if I change it to:

Code: Select all

tags="new_weapon "
Where does the game look for the tag? How do I associate the tag to the new weapon text?



2. How do you create new encyclopedia entries without using the diff? I see in other mods they create a /t/0001.xml file and add all their new text there, but when I try the same I receive a text page not found error. I created a random number string for the page id. I match the page id with what is in the turret macro. Is there somewhere I need to define the location of the 0001.xml file?

Thanks in advance for any help!


**Edit**
I may have answered my own question by diff/adding the text to the English language file 0001-L044, and then using the following code in the unit's component file:

Code: Select all

<diff>
  <replace sel="//connection[@name='connection_turret_medium_lb01']/@tags">new_weapon </replace>
If there is an easier way to do this, or a way to add the text universally to all languages without making a file for each language, please let me know! :)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Mon, 3. Jul 17, 05:53

1. tags are widely used in the game (not just for weapons, but many purposes) and not defined/managed centrally. when the Game encounters a new tag it doesnt know yet it will create it ;) so basically you just have to make sure your tags match at all relevant places.

2. are your page id and t id botch numbers only? can you post the t-file here? (and the files/Snippets referencng them) because its easier to spot errors/mistakes this way.
aslo no, no need to specify the place, just put it in the t-folder inside your mod.

related to the t-file: the t/0001.xml is used when no language-specific t-file ( t/0001-L049.xml for example) is found.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

heyjustarooni
Posts: 4
Joined: Mon, 3. Jul 17, 00:30
x4

Post by heyjustarooni » Tue, 4. Jul 17, 20:49

Hi UniTrader, I was able to get the tags and language files working properly. Your explanation of the t/0001.xml file explains why I wasn't able to get it working in the beginning. I greatly appreciate the help!

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Tue, 4. Jul 17, 21:26

no problem, if further questions/issues arise feel free to ask. :) i cannt refuse to help someone to learn modding XR ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Post Reply

Return to “X Rebirth - Scripts and Modding”