Help with new Shield Generator needet

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
User avatar
Sir Squallus
Posts: 687
Joined: Thu, 10. May 07, 17:45
x4

Help with new Shield Generator needet

Post by Sir Squallus » Tue, 14. Dec 21, 22:14

Hello,

I require some help here, I try to create a new Terran M Shield MK4, the result should be massively expensive but also stronger than the petty MK3.

What do I have so far?
Well, I thought I was finished, to be fair, but it seems to be a long way to go.
I used the X4 Vanilla files from the Ter_M_shield standard 1 MK3 and mod them to be my MK4.
I studied the Nav shields mod and other equipment mods to get what is needed to function.

OK, so how does it work so far?
Hmm, I can buy it as a blueprint, that's something I guess?
Sadly other than this, nothing, I cant neither find it in my shipyard nor can I find it in any Terran shipyards.

This annoys me greatly, something must be done right, otherwise, the game would not load at all or I couldn't buy it as a blueprint. But why doesn't it show up in the construction menu?

Anyway, any help is welcome, I created a git repo, so everyone who likes to help me can download it.
Edit/ Link removed to stop people downloading old , broken versions.
Last edited by Sir Squallus on Tue, 21. Dec 21, 16:57, edited 1 time in total.

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Help with new Shield Generator needet

Post by sprIder » Wed, 15. Dec 21, 09:03

I have no option to test your Mod right now but looking in your files you need to rename the data_folder in assets/props/surfaceElements. The folder name includes "ter_l_" but it has to be "ter_m_"

I hope, this helps.

User avatar
Sir Squallus
Posts: 687
Joined: Thu, 10. May 07, 17:45
x4

Re: Help with new Shield Generator needet

Post by Sir Squallus » Wed, 15. Dec 21, 09:35

:shock: umpf, yap, that could be the f**ing problem... :evil:
Thanks, will update later.

Edit:
Nope wasn´t the issue.

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Help with new Shield Generator needet

Post by sprIder » Wed, 15. Dec 21, 17:00

Okay, I found some time to test it and take a closer look.
Besides this morning's correction:

1. in \Ter M Shield Mk4\assets\props\SurfaceElements\shield_ter_m_standard_01_mk4.xml:
The path in line 4 of the source geometry is wrong it targets a non-existent folder.

Code: Select all

<?xml version="1.0"?>
<components>
	<component name="shield_ter_m_standard_01_mk4" class="shieldgenerator">
		<source geometry="extensions\ego_dlc_terran\assets\props\surfaceelements\shield_ter_m_standard_01_mk4_data"/>
		
You have two options to fix the bug:
Either you reference your mod:

Code: Select all

<source geometry="extensions\ter m shield mk4\assets\props\surfaceelements\shield_ter_m_standard_01_mk4_data"/>
Or you target the existing model of the mk3 shield, since you use that model anyway:

Code: Select all

		<source geometry="extensions\ego_dlc_terran\assets\props\surfaceelements\shield_ter_m_standard_01_mk3_data"/>
		
Then you can also omit the "shield_ter_m_standard_01_mk4_data" folder in \Ter M Shield Mk4\assets\props\SurfaceElements.

2. in \index\macro.xml:
There is one "k" too much in the mod name of the "value" value: Ter M Shield MKk4.

Since this mod adds the shield to the Terrans, which are only added via DlC, you should also require in your content.xml that this DlC is present:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<content id="REM_ShieldM_SQL" name="Terran Shield M Mk 4" description="Terran M shield generator MK 4" version="0.01" author="Squallus.l" date="2021-12-14">
	<dependency name="Cradle of Humanity" id="ego_dlc_terran" optional="false"/>
</content>
If you correct this, the shield will be correctly added to your game. But now it has no icon yet. You have already put it in the mod, but the game doesn't "know" yet that the symbol exists.
For this you have to create a file named "icons.xml" in your "libraries" folder, which has the following content:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<icons>

 <icon name="upgrade_*" texture="extensions\Ter M Shield MK4\assets\fx\gui\textures\upgrades\*.tga" height="256" width="256"></icon>
 
</icons>
I hope this helps.

User avatar
Sir Squallus
Posts: 687
Joined: Thu, 10. May 07, 17:45
x4

Re: Help with new Shield Generator needet

Post by Sir Squallus » Wed, 15. Dec 21, 18:30

I will try this tomorrow morning, but you sir, are my hero.

When this mod gets finished with more shields and more stuff, you earned your credit.

Edit: It Works! :D God, do i hate my spelling mistakes!

So now the work really beginns, i want to make a lot of terran tech upgrades, some new ship variants and all of this maybe connected to some new wares.

But the feeling of getting the first mod ingame is something.

Thanks a lot!

|K.O.S.H.
Posts: 3724
Joined: Fri, 19. Dec 03, 10:36
x3tc

Re: Help with new Shield Generator needet

Post by |K.O.S.H. » Fri, 17. Dec 21, 13:55

one thing, that makes me cry: please dont use whitespaces in foldernames.
this my work on windows, but (i guess) not on linux.

Often they make serious trouble.
e.g. you have something like
"string with spaces/another folder/"

you would expect
1 string with spaces
2 another folder

and want to split it you MAY return
1 string
2 with
3 spaces
4 another
5 folder

or
1 string
2 another


rule of thumb: NEVER use any whitespaces in paths...
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!

User avatar
Sir Squallus
Posts: 687
Joined: Thu, 10. May 07, 17:45
x4

Re: Help with new Shield Generator needet

Post by Sir Squallus » Tue, 21. Dec 21, 17:00

Thanks |K.O.S.H. I already changed it, this folder was only meant as a PROC to me. The full mod will have some more, serious high-tech Terran stuff.

On a different note, which program do I need to edit the icons in

Code: Select all

<icon name="module_*" texture="assets\fx\gui\textures\stationmodules\*.tga" height="256" width="256"></icon>
I can't open or modify the .tga files.

|K.O.S.H.
Posts: 3724
Joined: Fri, 19. Dec 03, 10:36
x3tc

Re: Help with new Shield Generator needet

Post by |K.O.S.H. » Wed, 22. Dec 21, 08:05

Most graphics programms should be able top open it.
E.g. Photopshop or IrfanView
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Help with new Shield Generator needet

Post by sprIder » Wed, 22. Dec 21, 09:04

you have to unpack those existing *.gz files with e.g. 7zip. Then rename them to *.dds. E.g. "buildmodule_gen_equip_l_macro.dds". It could also work with .tga but I'm not sure.
Now you can edit them. After it, pack the file again to the "gzip" file format.

Addendum, 23.12.:
If necessary, the file must then be renamed so that the ".dds" or ".tga" part is no longer included in the name -> "*_macro.gz" and not "*_macro.dds.gz".

Now the game can use it.

Post Reply

Return to “X4: Foundations - Scripts and Modding”