カテゴリ:解析 > Unity5
7x 解析 (5)
a147
lblActivateInGame
01876.1 → 0x754
file name: level1_00503.-15
mTrueTypeFont: 0x1984 → font_body.ttf
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
lblTooltipLine
00612.1 → 0x264
file name: level1_00167.-15
mTrueTypeFont: 0x0 → null
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
lblStealthIndicator
00045.1 → 0x2D
file name: level1_00009.-15
mTrueTypeFont: 0x0 → null
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
lblCriticalHitText
00520.1 → 0x208
file name: level1_00143.-15
mTrueTypeFont: 0x0 → null
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
a146 との違いは lblActivateInGame のファイル名が変更になったのと mTrueTypeFont の font_body.ttf の値が変わっているので注意する。
何のこと?という感じだろうからこの辺りの解析を自動化してパッチをあてるツールを作成しました。
こちら
pass:zt
動作確認は a147 ですけど、自動解析するので多少のバージョンアップには耐えれると思います。
追記: a15e でも動作しているっぽい。この調子だと何もいじらずに a15 でも行けそうな感じですなー
a15正式版でも大丈夫です。
lblActivateInGame
01876.1 → 0x754
file name: level1_00503.-15
mTrueTypeFont: 0x1984 → font_body.ttf
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
lblTooltipLine
00612.1 → 0x264
file name: level1_00167.-15
mTrueTypeFont: 0x0 → null
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
lblStealthIndicator
00045.1 → 0x2D
file name: level1_00009.-15
mTrueTypeFont: 0x0 → null
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
lblCriticalHitText
00520.1 → 0x208
file name: level1_00143.-15
mTrueTypeFont: 0x0 → null
mFont: 0xA9AE → resources_00002.-15 (UIFont: AgencyB_32p)
a146 との違いは lblActivateInGame のファイル名が変更になったのと mTrueTypeFont の font_body.ttf の値が変わっているので注意する。
何のこと?という感じだろうからこの辺りの解析を自動化してパッチをあてるツールを作成しました。
こちら
pass:zt
動作確認は a147 ですけど、自動解析するので多少のバージョンアップには耐えれると思います。
追記: a15e でも動作しているっぽい。この調子だと何もいじらずに a15 でも行けそうな感じですなー
a15正式版でも大丈夫です。
7x 解析 (4)
今後の version up 対応もあるし難解かもしれませんが書いておきます。
NGUI の部分は変わらないと思うので記述する部分はそう変わらないと思います。
UIlLabel ( : UIWidget : UIRect)
lblActivateInGame
UILabel
UIRect 部分
public abstract class UIRect : MonoBehaviour
{
public AnchorPoint leftAnchor;
public AnchorPoint rightAnchor;
public AnchorPoint bottomAnchor;
public AnchorPoint topAnchor;
public AnchorUpdate updateAnchors;
}
public class AnchorPoint
{
public Transform target;
public float relative;
public int absolute;
}
より
leftAnchor.target = null;
leftAnchor.relative = 0f;
leftAnchor.absolute = 0;
rightAnchor.target = null;
rightAnchor.relative = 1f;
rightAnchor.absolute = 0;
bottomAnchor.target = null;
bottomAnchor.relative = 0f;
bottomAnchor.absolute = 0;
topAnchor.target = null;
topAnchor.relative = 1f;
topAnchor.absolute = 0;
updateAnchors = AnchorUpdate.OnUpdate
UIWidget 部分
public class UIWidget : UIRect
{
protected Color mColor;
protected Pivot mPivot;
protected int mWidth;
protected int mHeight;
protected int mDepth;
public bool autoResizeBoxCollider;
public bool hideIfOffScreen;
public AspectRatioSource keepAspectRatio;
public float aspectRatio;
}
より
mColor = Color.white;
mPivot = Pivot.Center;
mWidth = 114;
mHeight = 30;
mDepth = -20;
autoResizeBoxCollider = false;
hideIfOffScreen = false;
keepAspectRatio = AspectRatioSource.Free;
aspectRatio = 3.736842
UILabel 部分
public class UILabel : UIWidget
{
public Crispness keepCrispWhenShrunk;
Font mTrueTypeFont;
UIFont mFont;
string mText;
int mFontSize;
FontStyle mFontStyle;
Alignment mAlignment;
bool mEncoding;
int mMaxLineCount;
Effect mEffectStyle;
Color mEffectColor;
NGUIText.SymbolStyle mSymbols;
Vector2 mEffectDistance;
Overflow mOverflow;
Material mMaterial;
bool mApplyGradient;
Color mGradientTop;
Color mGradientBottom;
int mSpacingX;
int mSpacingY;
bool mUseFloatSpacing;
float mFloatSpacingX;
float mFloatSpacingY;
bool mOverflowEllipsis;
int mOverflowWidth;
}
より
keepCrispWhenShrunk = Crispness.OnDesktop;
mTrueTypeFont = font_body.ttf;
mFont = resources_00002.-15; (UIFont)
mText = "Pick up Item";
mFontSize = 36;
mFontStyle = FontStyle.Normal;
mAlignment = Alignment.Automatic;
mEncoding = true;
mMaxLineCount = 0;
mEffectStyle = Effect.Outline;
mEffectColor = Color.black;
mSymbols = NGUIText.SymbolStyle.Normal;
mEffectDistance = Vector2.one;
mOverflow = Overflow.ResizeFreely;
mMaterial = null;
mApplyGradient = false;
mGradientTop = Color.white;
mGradientBottom = Color(0.7f, 0.7f, 0.7f);
mSpacingX = 0;
mSpacingY = 0;
mUseFloatSpacing = false;
mFloatSpacingX = 0;
mFloatSpacingY = 0;
mOverflowEllipsis = false;
mOverflowWidth = 1;
となる。
今回いじっているのは UILabel.mTrueTypeFont と UILabel.mFont なのでこのアドレスが理解できると良いです。
NGUI の部分は変わらないと思うので記述する部分はそう変わらないと思います。
UIlLabel ( : UIWidget : UIRect)
lblActivateInGame
UILabel
UIRect 部分
public abstract class UIRect : MonoBehaviour
{
public AnchorPoint leftAnchor;
public AnchorPoint rightAnchor;
public AnchorPoint bottomAnchor;
public AnchorPoint topAnchor;
public AnchorUpdate updateAnchors;
}
public class AnchorPoint
{
public Transform target;
public float relative;
public int absolute;
}
より
leftAnchor.target = null;
leftAnchor.relative = 0f;
leftAnchor.absolute = 0;
rightAnchor.target = null;
rightAnchor.relative = 1f;
rightAnchor.absolute = 0;
bottomAnchor.target = null;
bottomAnchor.relative = 0f;
bottomAnchor.absolute = 0;
topAnchor.target = null;
topAnchor.relative = 1f;
topAnchor.absolute = 0;
updateAnchors = AnchorUpdate.OnUpdate
UIWidget 部分
public class UIWidget : UIRect
{
protected Color mColor;
protected Pivot mPivot;
protected int mWidth;
protected int mHeight;
protected int mDepth;
public bool autoResizeBoxCollider;
public bool hideIfOffScreen;
public AspectRatioSource keepAspectRatio;
public float aspectRatio;
}
より
mColor = Color.white;
mPivot = Pivot.Center;
mWidth = 114;
mHeight = 30;
mDepth = -20;
autoResizeBoxCollider = false;
hideIfOffScreen = false;
keepAspectRatio = AspectRatioSource.Free;
aspectRatio = 3.736842
UILabel 部分
public class UILabel : UIWidget
{
public Crispness keepCrispWhenShrunk;
Font mTrueTypeFont;
UIFont mFont;
string mText;
int mFontSize;
FontStyle mFontStyle;
Alignment mAlignment;
bool mEncoding;
int mMaxLineCount;
Effect mEffectStyle;
Color mEffectColor;
NGUIText.SymbolStyle mSymbols;
Vector2 mEffectDistance;
Overflow mOverflow;
Material mMaterial;
bool mApplyGradient;
Color mGradientTop;
Color mGradientBottom;
int mSpacingX;
int mSpacingY;
bool mUseFloatSpacing;
float mFloatSpacingX;
float mFloatSpacingY;
bool mOverflowEllipsis;
int mOverflowWidth;
}
より
keepCrispWhenShrunk = Crispness.OnDesktop;
mTrueTypeFont = font_body.ttf;
mFont = resources_00002.-15; (UIFont)
mText = "Pick up Item";
mFontSize = 36;
mFontStyle = FontStyle.Normal;
mAlignment = Alignment.Automatic;
mEncoding = true;
mMaxLineCount = 0;
mEffectStyle = Effect.Outline;
mEffectColor = Color.black;
mSymbols = NGUIText.SymbolStyle.Normal;
mEffectDistance = Vector2.one;
mOverflow = Overflow.ResizeFreely;
mMaterial = null;
mApplyGradient = false;
mGradientTop = Color.white;
mGradientBottom = Color(0.7f, 0.7f, 0.7f);
mSpacingX = 0;
mSpacingY = 0;
mUseFloatSpacing = false;
mFloatSpacingX = 0;
mFloatSpacingY = 0;
mOverflowEllipsis = false;
mOverflowWidth = 1;
となる。
今回いじっているのは UILabel.mTrueTypeFont と UILabel.mFont なのでこのアドレスが理解できると良いです。
7x 解析 (3)
この Item pick up 部分は
level1_00504.-15 の UIFont mFont 指定部分を削除する。Font mTrueTypeFont; は記述があるので書き換える必要はない。
スキルアップとか下のアイテム欄の上に表示される lblTooltipLine 部分は level1_00167.-15 を同じように mFont 部分の指定を削除し mTrueTypeFont は記述がないので記述する。値は level1_00504.-15 と同じで良い。
ここまで書いて何のこと?と思われると思うのでどうしたら良いのか書きます。
UnityEx 等で各ファイルを抽出して修正後リパックしても良いのですがたぶん面倒だと思うので
バイナリエディタで修正する方法で書きます。
ファイルは 7DaysToDie_Data/level1 が編集対象(Ver146時点の情報)
バイナリエディタで開きます。
まず、lblTooltipLine 部分
下の level1org がオリジナルのファイルで上が変更内容です。
つまり
E66A0:00 -> 02
E66A4:00 -> CC
E66A5:00 -> 19
E66AC:02 -> 00
E66B0:2A -> 00
E66B1:AA -> 00
と編集します。
次に Item pick up 部分
1366AC:02 -> 00
1366B0:2A -> 00
1366B1:AA -> 00
lblStealthIndicator
level1_00009.-15
C2F60:00 -> 02
C2F64:00 -> CC
C2F65:00 -> 19
C2F6C:02 -> 00
C2F70:2A -> 00
C2F71:AA -> 00
クリティカルヒット部分
lblCriticalHitText
level1_00143.-15
E09C0:00 -> 02
E09C4:00 -> CC
E09C5:00 -> 19
E09CC:02 -> 00
E09D0:2A -> 00
E09D1:AA -> 00
あとローカライズをリリースするときはゾンビ名は今のままでお願いします!w
----------------------------------------------------------------------------------
と編集すると良いです。
配布は差分パッチの形式にすると良いと思います。
以上なんですが、質問あればコメントしてください。
メニュー画面の話は 7x 解析(1) に書いてる通り可能ではあるんですけど
自分的にはそこは english のままでいいような気もするんですが。
ゲーム内の致命的な部分は対応しないと駄目なんでしょうが。
AntiCheat について書かれてる人が居ますが。まぁそこは、公式に Style.xml で上記の変更できない部分も変更できるように要望するしか無いように思います…
7x 解析 (2)
NGUI 解析用メモ たぶん意味不明です。
UIFont
0x0: (0: 同じファイル)
0x4: (GameObject AgencyB_32)
0xC: 不明
0x10: (1: globalgamemanagers.assets)
0x14: (138: UIFont)
0x1C: 不明
public class UIFont : MonoBehaviour
{
[HideInInspector][SerializeField] Material mMat;
[HideInInspector][SerializeField] Rect mUVRect;
[HideInInspector][SerializeField] BMFont mFont;
[HideInInspector][SerializeField] UIAtlas mAtlas;
[HideInInspector][SerializeField] UIFont mReplacement;
[HideInInspector][SerializeField] List<BMSymbol> mSymbols;
[HideInInspector][SerializeField] Font mDynamicFont;
[HideInInspector][SerializeField] int mDynamicFontSize;
[HideInInspector][SerializeField] FontStyle mDynamicFontStyle;
}
mMat = 0x20: (0: 同じファイル) 0x24: (7: Font Atlas.mat)
mUVRect = 0x2C-0x38: 0f, 0f, 0.5f, 1.0f
public class BMFont
{
[HideInInspector][SerializeField] int mSize;
[HideInInspector][SerializeField] int mBase;
[HideInInspector][SerializeField] int mWidth;
[HideInInspector][SerializeField] int mHeight
[HideInInspector][SerializeField] string mSpriteName;
[HideInInspector][SerializeField] List<BMGlyph> mSaved;
}
mSize = 0x27 (39)
mBase = 0x20 (32)
mWidth = 0x100 (256)
mHeight = 0x100 (256)
mSpriteName = "AgencyB_32p"
mSaved.count = 0xBF (191)
public class BMGlyph
{
public int index;
public int x;
public int y;
public int width;
public int height;
public int offsetX;
public int offsetY;
public int advance;
public int channel;
public List<int> kerning;
}
index = 0x20 ' '
x = 9
y = 32
width = 3
height = 1
offsetX = -1
offsetY = 38
advance = 7
channel = 15 (RGBA 1+2+4+8)
kerning = null
0x1E38~
mAtlas = resources_00002.-16
mReplacement = null
mSymbols = null
mDynamicFont = null
mDynamicFontSize = 16
mDynamicFontStyle = FontStyle.Normal
UIAtlas
0x0: (0: 同じファイル)
0x4: (GameObject.Font Atlas)
0xC: 不明
0x10: (1: globalgamemanagers.assets)
0x14: (646: UIAtlas)
0x1C: 不明
public class UIAtlas : MonoBehaviour
{
[HideInInspector][SerializeField] Material material;
[HideInInspector][SerializeField] List<UISpriteData> mSprites;
[HideInInspector][SerializeField] float mPixelSize;
[HideInInspector][SerializeField] UIAtlas mReplacement;
[HideInInspector][SerializeField] Coordinates mCoordinates;
[HideInInspector][SerializeField] List<Sprite> sprites;
}
material = Font Atlas.mat
mSprites.count = 2
public class UISpriteData
{
public string name;
public int x;
public int y;
public int width;
public int height;
public int borderLeft;
public int borderRight;
public int borderTop;
public int borderBottom;
public int paddingLeft;
public int paddingRight;
public int paddingTop;
public int paddingBottom;
}
name = 'Agency_32p'
x = 256
y = 0
width = 256
height = 256
borderLeft = 0
borderRight = 0
borderTop = 0
borderBottom = 0
paddingLeft = 0
paddingRight = 0
paddingTop = 0
paddingBottom = 0
0xB0~
mPixelSize = 1.0f
mReplacement = null
mCoordinates = null
sprites = null
level1_00504.-15
良さそう
最後の部分は styles.xml の修正だけでは pick up item はフォント変更が出来ないのですが level1_00504.-15 をいじれば変更できますという話です。
他にフォント変更できない致命的な部分があれば教えてください。
下のスキルアップ等が表示される部分
lblTooltipLine
00167.-15
UIFont
0x0: (0: 同じファイル)
0x4: (GameObject AgencyB_32)
0xC: 不明
0x10: (1: globalgamemanagers.assets)
0x14: (138: UIFont)
0x1C: 不明
public class UIFont : MonoBehaviour
{
[HideInInspector][SerializeField] Material mMat;
[HideInInspector][SerializeField] Rect mUVRect;
[HideInInspector][SerializeField] BMFont mFont;
[HideInInspector][SerializeField] UIAtlas mAtlas;
[HideInInspector][SerializeField] UIFont mReplacement;
[HideInInspector][SerializeField] List<BMSymbol> mSymbols;
[HideInInspector][SerializeField] Font mDynamicFont;
[HideInInspector][SerializeField] int mDynamicFontSize;
[HideInInspector][SerializeField] FontStyle mDynamicFontStyle;
}
mMat = 0x20: (0: 同じファイル) 0x24: (7: Font Atlas.mat)
mUVRect = 0x2C-0x38: 0f, 0f, 0.5f, 1.0f
public class BMFont
{
[HideInInspector][SerializeField] int mSize;
[HideInInspector][SerializeField] int mBase;
[HideInInspector][SerializeField] int mWidth;
[HideInInspector][SerializeField] int mHeight
[HideInInspector][SerializeField] string mSpriteName;
[HideInInspector][SerializeField] List<BMGlyph> mSaved;
}
mSize = 0x27 (39)
mBase = 0x20 (32)
mWidth = 0x100 (256)
mHeight = 0x100 (256)
mSpriteName = "AgencyB_32p"
mSaved.count = 0xBF (191)
public class BMGlyph
{
public int index;
public int x;
public int y;
public int width;
public int height;
public int offsetX;
public int offsetY;
public int advance;
public int channel;
public List<int> kerning;
}
index = 0x20 ' '
x = 9
y = 32
width = 3
height = 1
offsetX = -1
offsetY = 38
advance = 7
channel = 15 (RGBA 1+2+4+8)
kerning = null
0x1E38~
mAtlas = resources_00002.-16
mReplacement = null
mSymbols = null
mDynamicFont = null
mDynamicFontSize = 16
mDynamicFontStyle = FontStyle.Normal
UIAtlas
0x0: (0: 同じファイル)
0x4: (GameObject.Font Atlas)
0xC: 不明
0x10: (1: globalgamemanagers.assets)
0x14: (646: UIAtlas)
0x1C: 不明
public class UIAtlas : MonoBehaviour
{
[HideInInspector][SerializeField] Material material;
[HideInInspector][SerializeField] List<UISpriteData> mSprites;
[HideInInspector][SerializeField] float mPixelSize;
[HideInInspector][SerializeField] UIAtlas mReplacement;
[HideInInspector][SerializeField] Coordinates mCoordinates;
[HideInInspector][SerializeField] List<Sprite> sprites;
}
material = Font Atlas.mat
mSprites.count = 2
public class UISpriteData
{
public string name;
public int x;
public int y;
public int width;
public int height;
public int borderLeft;
public int borderRight;
public int borderTop;
public int borderBottom;
public int paddingLeft;
public int paddingRight;
public int paddingTop;
public int paddingBottom;
}
name = 'Agency_32p'
x = 256
y = 0
width = 256
height = 256
borderLeft = 0
borderRight = 0
borderTop = 0
borderBottom = 0
paddingLeft = 0
paddingRight = 0
paddingTop = 0
paddingBottom = 0
0xB0~
mPixelSize = 1.0f
mReplacement = null
mCoordinates = null
sprites = null
level1_00504.-15
良さそう
最後の部分は styles.xml の修正だけでは pick up item はフォント変更が出来ないのですが level1_00504.-15 をいじれば変更できますという話です。
他にフォント変更できない致命的な部分があれば教えてください。
下のスキルアップ等が表示される部分
lblTooltipLine
00167.-15