X4: Foundations

X4: Foundations

Not enough ratings
NPC Loadout Missing Fix² [8.00]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
1.809 MB
22 Aug @ 5:06am
10 Sep @ 9:12pm
15 Change Notes ( view )

Subscribe to download
NPC Loadout Missing Fix² [8.00]

In 1 collection by EBI
EBIMODS
41 items
Description
Requires game version 8.00 or later

I have completely rebuilt the previous mod, which in reality was not functioning as intended.

This new version fixes the issue where NPCs often spawn without proper turrets or shields, filling in the missing slots.

Why I made this mod:

When I first started playing X4, I had a strong question in mind:
“It makes sense that pirate ships might be poorly supplied and badly maintained, but why do the main factions’ capital fleets fail to equip their carriers and destroyers with sufficient weapons and shields?”

This behavior is not only visually unnatural, but it also prevents NPC fleets from showing their true firepower.
This mod should fix the problem

The patch works as follows, and it applies automatically to vanilla, DLC, and other mods.
Specifically, it will automatically patch up to 5,000 jobs that match the given conditions.

I sincerely regret that the previous version will be discontinued. To fix the folder name, I had to push an empty update and then retire it.
If you were subscribed to the old mod, please switch over to this one instead.
Doing so should not prevent you from loading your save.

<add sel="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()]" if="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()]">
<quantity exact="1">
<variation exact="0"/>
</quantity>
<quality exact="1">
<variation exact="1"/>
</quality>
</add>
<add sel="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()-1]" if="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()-1]">
<quantity exact="1">
<variation exact="0"/>
</quantity>
<quality exact="1">
<variation exact="1"/>
</quality>
</add>
<add sel="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()-2]" if="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()-2]">
<quantity exact="1">
<variation exact="0"/>
</quantity>
<quality exact="1">
<variation exact="1"/>
</quality>
</add>
<add sel="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()-etc]" if="( /jobs/job/ship/loadout[not(@ref) and not(@loadout) and (level or @level)] )[last()-3]">
<quantity exact="1">
<variation exact="0"/>
</quantity>
<quality exact="1">
<variation exact="1"/>
</quality>
</add>
22 Comments
shilum_nehum 21 Sep @ 1:35pm 
unfortunately i am still running into ships and stations that have empty hardpoints
Eldahmyr 19 Sep @ 1:28pm 
I’m sorry to bother you on this mod, but I’m such a fan of your Astral Empire and Novatech Coporation faction mods (comments are disabled for these mods). I wanted to know if you are considering the possibility of bringing the diplomacy of update 8.0 to your superb factions? This is so wonderful ;-)
Schwarzemona 11 Sep @ 5:01pm 
ありがとうございます。個別ジョブはまあ仕方ないです。
EBI  [author] 10 Sep @ 9:16pm 
8.00がリリースされたのでひとまずエラー原因になってた部分だけ削除して更新しました
個別の例外jobへの対応はまだ出来ていません…
Schwarzemona 31 Aug @ 5:14am 
コロナですか‥‥お大事になさってください。
EBI  [author] 30 Aug @ 8:44pm 
おっと返信遅れてしまいすみません
ご指摘ありがとうございます
覚えておきます
色々あって今X4から離れてて次の更新少し先になるかもしれません…
最近コロナウイルス再流行してるっぽいのでお気をつけください…(1敗)
Schwarzemona 30 Aug @ 8:45am 
ご対応ありがとうございます。修正されているのを確認しました。

build.shiptrader.xmlの9〜11行目の記述の消去をお願いします。
$qtyvarがもう存在しない変数なのでエラーとなっています。

以下はタレットを満載していませんが、個別に対処するしかなさそうなジョブです。

loadoutがなく、特殊な処理も無いようです。
xenon_terraformer_patrol_l_rare
xenon_terraformer_patrol_l_sector

sizeの設定が無いです。
zyarth_resupplier_xl
freesplit_resupplier_xl
terran_resupplier_xl
pioneers_resupplier_xl

sizeの設定が無く、かつ中型艦と大型艦共通のジョブです。
*_free_miner_ml_*_deepspace_single
fallensplit_raider_mixed_cluster
fallensplit_marauder_mixed_cluster
[RoTA] BarricadePrime 25 Aug @ 9:58am 
the khaak obliterator has no full turret/shield loadout yet can you fix it?
Schwarzemona 24 Aug @ 9:29am 
ごめんなさい。まだ何点かありました。
簡単に言いますと、
1. holyorder_fighter_patrol_s_zoneにsizeがないため適応されてしまう
2. ロードアウトが減少しても小中型のquantityが減少しない
3. ロードアウトが減少しても小中型のquantityのvariationの値が入りばらつきが生じる?

対策は、
1.はjobs.xmlにsizeがあるか確認する条件を追加
2.はbuild.shiptrader.xmlにquantityのlevelを小中型なら$newloadoutlevel、そうでないなら1
3.はgenerate_loadoutにquantityのvariationを設定しない(元のvariation="0"があるので大型に対して問題ないはず)

平日になってしまったのでまた来週の土日か時間のある時に確認します‥‥
何度も何度もすいません‥‥
EBI  [author] 24 Aug @ 1:55am 
ありがとうございます
今更新しました
ウェア不足時にロードアウトが減少しても大型特大型のquantityは維持されるようになったと思います
現在ロードアウト最大化のパッチの適用外になっている小型中型には影響がないはずなのでウェアが不足するとスプリットが大量の装備品を発注し始める…って状況は回避できるのかなと思います
何かありましたらよろしければお知らせください…
それとフォルダ名変更はかなり前に出来ないか不具合が出ると聞いてそのまま信じてました
一回試してみればよかった
実際には後から変更出来ると知ってたらこんな事しなかったのに…まあ後の祭りです