去掉 E 后缀(E begone)
移除新款 L、XL 飞船名称中的 E 后缀,隐藏旧款飞船蓝图,并将 Faulty Logic 中废弃的 Odysseus Vanguard 替换为新模型。适用于新存档;中途安装可能不会更新已有蓝图或废弃飞船。兼容 VRO。
提供用于生成此模组的简单 XSLT,稍作调整还能用于更多用途。生成新开局的相关代码已被注释掉。
这里提供生成此模组所用的简单 XSLT。稍作调整还能实现更多功能。作者注释掉了生成新开局的代码;作者认为许多有用内容都在这部分:
<!-- 运行示例:
transform -xsl:"C:\\Games\\Steam\\steamapps\\common\\X4 Foundations\\region_ff_delete.xslt" -it:main inF="D:/Games/Steam/steamapps/common/X4 Foundations/" modID="region_ff_delete" outF="D:/X4_out/" root="X4_extracted/" universe="xu_ep2_universe" region="region_cluster_45_sector_001"
-->
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" />
<xsl:strip-space elements="*" />
<xsl:param name="inF" select="inF"/>
<xsl:param name="modID" select="modID"/>
<xsl:param name="outF" select="outF"/>
<!-- root 应以 / 结尾 -->
<xsl:param name="root" select="root"/>
<xsl:param name="universe" select="universe"/>
<xsl:variable name="otherExtensionFolder" select="replace($root,'^[^/]*/','')"/>
<xsl:param name="region" select="region"/>
<xsl:variable name="sourceString" select="concat($inF,$root)"/>
<xsl:variable name="outputString" select="concat($outF,$modID,'/')"/>
<xsl:variable name="sourceURI" select="concat('file:///',encode-for-uri(replace($sourceString,'\\\\','/')))"/>
<xsl:variable name="outputURI" select="concat('file:///',encode-for-uri(replace($outputString,'\\\\','/')))"/>
<xsl:template name="main">
<xsl:variable name="clusters">
<xsl:choose>
<xsl:when test="starts-with($universe,'demo')">
<xsl:value-of select="concat('demo_','clusters')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(replace(replace($root,'^[^/]*/',''),'^[^/]*/ego_(.*)/','$1_'),'clusters')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:result-document href="{concat($outputURI,'content.xml')}">
<content id="{$modID}"
name="{$modID}" description="" author="{concat('metame','''','s Generator')}"
date="{format-date(current-date(),'[Y0001]-[M01]-[D01]')}"
version="100" save="0">
</content>
</xsl:result-document>
<xsl:result-document href="{concat($outputURI,'libraries/region_definitions.xml')}">
<diff>
<remove sel="/regions/region[@name='{$region}']/fields/object[@ref='weapon_gen_mine_03_macro']" />
</diff>
</xsl:result-document>
<!--
<xsl:result-document href="{concat($outputURI,'libraries/gamestarts.xml')}">
<diff>
<add sel="/gamestarts">
<xsl:variable name="thisSector" select="collection(concat($sourceURI,'maps/',$universe,'?recurse=no;select=',$clusters,'.xml'))/macros/macro[connections/connection/macro/properties/region[@ref=$region]]/connections/connection[@ref='sectors']/macro/@ref"/>
<gamestart id="{lower-case(concat('cstart_',$thisSector))}" name="{lower-case(concat('cstart_',$thisSector))}" description="" image="gamestart_5" group="1">
<location galaxy="{concat($universe,'_macro')}" sector="{lower-case($thisSector)}"/>
<player macro="character_player_scenario_advanced_argon_macro" female="false" money="5000" name="Ren">
<ship macro="ship_ter_s_scout_01_a_macro">
<loadout>
<macros>
<engine macro="engine_ter_s_combat_01_mk3_macro" path="../con_engine_01" />
<shield macro="shield_ter_s_standard_01_mk3_macro" path="../con_shield_01" />
</macros>
<ammunition>
<ammunition macro="env_deco_nav_beacon_t1_macro" exact="5" />
<ammunition macro="eq_arg_satellite_01_macro" exact="5" />
<ammunition macro="eq_arg_resourceprobe_01_macro" exact="5" />
</ammunition>
<software>
<software ware="software_flightassistmk1" />
<software ware="software_scannerlongrangemk1" />
<software ware="software_scannerobjectmk1" />
<software ware="software_targetmk1" />
<software ware="software_dockmk2" />
</software>
<virtualmacros>
<thruster macro="thruster_gen_s_allround_01_mk3_macro" />
</virtualmacros>
</loadout>
</ship>
<inventory>
<ware ware="weapon_gen_spacesuit_repairlaser_01_mk1" amount="1" />
<ware ware="software_scannerobjectmk3" amount="1" />
<ware ware="inv_timewarp" amount="1" />
</inventory>
<blueprints>
<ware ware="clothingmod_0001" />
<ware ware="clothingmod_0002" />
<ware ware="paintmod_0006" />
<ware ware="paintmod_0048" />
<ware ware="paintmod_0049" />
<ware ware="paintmod_0050" />
</blueprints>
<research>
<ware ware="research_radioreceiver" />
<ware ware="research_sensorbooster" />
<ware ware="research_tradeinterface" />
</research>
<encyclopedia>
<entry type="warebasket" ref="research_gamestart_common" />
</encyclopedia>
<theme paint="painttheme_player_01" />
</player>
<universe ventures="false" visitors="false" />
</gamestart>
</add>
</diff>
</xsl:result-document>
-->
</xsl:template>
</xsl:stylesheet>
**作者:**metame。
前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:x4foundations:781 -->