找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 5080|回复: 7

【求助】关于新单位的Portrait_mytank.tga

[复制链接]
发表于 2012-7-9 20:44:57 | 显示全部楼层 |阅读模式
我按照教程把代码都写进去了,而且也用ps把图片弄好了,放在images文件夹里,但进入游戏后单位的图标却是粉红的。。。。。请各位高手帮助一下。
发表于 2012-7-9 22:29:42 | 显示全部楼层
因为你没有写Texture.xml,任何tga不会直接被代码调用,需要Texture.xml先调用
文件里面大概如下:
        <Texture id="Portrait_mytank" File="Portrait_mytank.tga" OutputFormat="A8R8G8B8" GenerateMipMaps="false" AllowAutomaticResize="false"/>
       
        <PackedTextureImage id="Portrait_mytank" Texture="Portrait_mytank" Rotated="false">
                <Dimensions x="106" y="106"/>
                <Coords x="0" y="0"/>
                <TextureDimensions x="106" y="106"/>
        </PackedTextureImage>
这样以后才能用其他代码调用Portrait_mytank这个值,否则Portrait_mytank这个值与图片Portrait_mytank.tga没有联系
回复

使用道具 举报

 楼主| 发表于 2012-7-9 23:11:24 来自手机 | 显示全部楼层
yangqs 发表于 2012-7-9 22:29
因为你没有写Texture.xml,任何tga不会直接被代码调用,需要Texture.xml先调用
文件里面大概如下:
       

这个写了的,而且也添加到了mod.xml里的</include>上方。。。不行啊。怎么办?
回复

使用道具 举报

 楼主| 发表于 2012-7-9 23:30:05 来自手机 | 显示全部楼层
yangqs 发表于 2012-7-9 22:29
因为你没有写Texture.xml,任何tga不会直接被代码调用,需要Texture.xml先调用
文件里面大概如下:
       

那个tga图片要有什么具体要求啊?谢了
回复

使用道具 举报

发表于 2012-7-10 08:37:54 | 显示全部楼层
Darkness 发表于 2012-7-9 23:30
那个tga图片要有什么具体要求啊?谢了

似乎没有要求···
回复

使用道具 举报

 楼主| 发表于 2012-7-10 09:12:03 | 显示全部楼层
<?xml version="1.0" encoding="UTF-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <Tags></Tags>
        <Includes>
                <!--
                        mod.xml is the central include for mod setup data.               
                -->
                <!-- These includes need to be in all mod.xml files -->
                <Include type="reference" source="DATA:static.xml" />
                <Include type="reference" source="DATA:global.xml" />   
                <Include type="reference" source="DATA:audio.xml" />
<Include type="all" source="DATA:jingzhixieyi/Data/PlayerTechs.xml"/>
<Include type="all" source="DATA:jingzhixieyi/data/AdditionalMaps/MapMetaData_Mod.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/LogicCommand.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/LogicCommandSet.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/JapanMechaKing.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/JapanEmperorMecha.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/Weapon.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/AlliedAntiStructureVehicle.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/SpecialPowerTemplates.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/ObjectCreationLists.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/SovietAntiStructureVehicle.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/super.xml"/>
<Include type="all" source="DATA:jingzhixieyi/Data/JapanAntiVehicleInfantry.xml"/>


<!-- New sample portrait -->
<Include type="all" source="ART:Images/SampleUpdatedPackedImages2.xml" />
                       
                    </Includes>

</AssetDeclaration>
这是mod.xml内容
回复

使用道具 举报

 楼主| 发表于 2012-7-10 09:13:00 | 显示全部楼层
<?xml version='1.0' encoding='UTF-8'?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Texture id="Portrait_super.tga" File="Portrait_super.tga" OutputFormat="A8R8G8B8" GenerateMipMaps="false" AllowAutomaticResize="false"/>
<PackedTextureImage id="Portrait_super" Texture="Portrait_super" Rotated="false">
<Dimensions x="106" y="106"/>
<Coords x="0" y="0"/>
<TextureDimensions x="106" y="106"/>
</PackedTextureImage>
</AssetDeclaration>
这是SampleUpdatedPackedImages2.xml内的内容
回复

使用道具 举报

 楼主| 发表于 2012-7-10 12:16:35 来自手机 | 显示全部楼层
解决啦,貌似真是图片的问题,我用先驱者的图片为基础修改,成功了!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|Archiver|手机版|管理员邮箱|红警DIY论坛 |网站地图

GMT+8, 2026-8-25 11:29 , Processed in 0.048842 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表