mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-14 17:05:10 +08:00
Vehicle files progress
This commit is contained in:
@@ -0,0 +1,616 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using TC = System.ComponentModel.TypeConverterAttribute;
|
||||
using EXP = System.ComponentModel.ExpandableObjectConverter;
|
||||
using SharpDX;
|
||||
|
||||
namespace CodeWalker.GameFiles
|
||||
{
|
||||
[TC(typeof(EXP))] public class CarColsFile : GameFile, PackedFile
|
||||
{
|
||||
public CarColsFile() : base(null, GameFileType.CarCols)
|
||||
{ }
|
||||
public CarColsFile(RpfFileEntry entry) : base(entry, GameFileType.CarCols)
|
||||
{
|
||||
}
|
||||
|
||||
public void Load(byte[] data, RpfFileEntry entry)
|
||||
{
|
||||
RpfFileEntry = entry;
|
||||
Name = entry.Name;
|
||||
FilePath = Name;
|
||||
|
||||
|
||||
|
||||
//TODO
|
||||
|
||||
//can be PSO .ymt or XML .meta
|
||||
|
||||
|
||||
|
||||
|
||||
//for carcols wheels:
|
||||
//< Item /> < !--VWT_SPORT-- >
|
||||
//< Item /> < !--VWT_MUSCLE-- >
|
||||
//< Item /> < !--VWT_LOWRIDER-- >
|
||||
//< Item /> < !--VWT_SUV-- >
|
||||
//< Item /> < !--VWT_OFFROAD-- >
|
||||
//< Item /> < !--VWT_TUNER-- >
|
||||
//< Item /> < !--VWT_BIKE-- >
|
||||
//< Item /> < !--VWT_HIEND-- >
|
||||
//< Item /> < !--VWT_SUPERMOD1-- >
|
||||
//< Item > < !--VWT_SUPERMOD2-- >
|
||||
|
||||
|
||||
|
||||
|
||||
Loaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[TC(typeof(EXP))] public class CVehicleModelInfoVarGlobal
|
||||
{
|
||||
public CVehicleModelInfoVarGlobal_465922034 VehiclePlates { get; set; }
|
||||
public CVehicleModelColor[] Colors { get; set; }
|
||||
public CVehicleMetallicSetting[] MetallicSettings { get; set; }
|
||||
public CVehicleWindowColor[] WindowColors { get; set; }
|
||||
public vehicleLightSettings[] Lights { get; set; }
|
||||
public sirenSettings[] Sirens { get; set; }
|
||||
public CVehicleKit[] Kits { get; set; }
|
||||
public CVehicleWheel[][] Wheels { get; set; }
|
||||
public CVehicleModelInfoVarGlobal_3062246906 GlobalVariationData { get; set; }
|
||||
public CVehicleModelInfoVarGlobal_2807227399[] XenonLightColors { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModelInfoVarGlobal_465922034 //VehiclePlates
|
||||
{
|
||||
public CVehicleModelInfoVarGlobal_3027500557[] Textures { get; set; }
|
||||
public int DefaultTexureIndex { get; set; }
|
||||
public byte NumericOffset { get; set; }
|
||||
public byte AlphabeticOffset { get; set; }
|
||||
public byte SpaceOffset { get; set; }
|
||||
public byte RandomCharOffset { get; set; }
|
||||
public byte NumRandomChar { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModelInfoVarGlobal_3027500557 //VehiclePlates Texture
|
||||
{
|
||||
public MetaHash TextureSetName { get; set; }
|
||||
public MetaHash DiffuseMapName { get; set; }
|
||||
public MetaHash NormalMapName { get; set; }
|
||||
public Vector4 FontExtents { get; set; }
|
||||
public Vector2 MaxLettersOnPlate { get; set; }
|
||||
public uint FontColor { get; set; }
|
||||
public uint FontOutlineColor { get; set; }
|
||||
public bool IsFontOutlineEnabled { get; set; }
|
||||
public Vector2 FontOutlineMinMaxDepth { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModelColor
|
||||
{
|
||||
public uint Color { get; set; }
|
||||
public CVehicleModelColor_360458334 metallicID { get; set; }
|
||||
public CVehicleModelColor_544262540 audioColor { get; set; }
|
||||
public CVehicleModelColor_2065815796 audioPrefix { get; set; }
|
||||
public MetaHash audioColorHash { get; set; }
|
||||
public MetaHash audioPrefixHash { get; set; }
|
||||
public string colorName { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleMetallicSetting
|
||||
{
|
||||
public float specInt { get; set; }
|
||||
public float specFalloff { get; set; }
|
||||
public float specFresnel { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleWindowColor
|
||||
{
|
||||
public uint color { get; set; }
|
||||
public MetaHash name { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class vehicleLightSettings
|
||||
{
|
||||
public byte id { get; set; }
|
||||
public vehicleLight indicator { get; set; }
|
||||
public vehicleCorona rearIndicatorCorona { get; set; }
|
||||
public vehicleCorona frontIndicatorCorona { get; set; }
|
||||
public vehicleLight tailLight { get; set; }
|
||||
public vehicleCorona tailLightCorona { get; set; }
|
||||
public vehicleCorona tailLightMiddleCorona { get; set; }
|
||||
public vehicleLight headLight { get; set; }
|
||||
public vehicleCorona headLightCorona { get; set; }
|
||||
public vehicleLight reversingLight { get; set; }
|
||||
public vehicleCorona reversingLightCorona { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class vehicleLight
|
||||
{
|
||||
public float intensity { get; set; }
|
||||
public float falloffMax { get; set; }
|
||||
public float falloffExponent { get; set; }
|
||||
public float innerConeAngle { get; set; }
|
||||
public float outerConeAngle { get; set; }
|
||||
public bool emmissiveBoost { get; set; }
|
||||
public uint color { get; set; }
|
||||
public MetaHash textureName { get; set; }
|
||||
public bool mirrorTexture { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class vehicleCorona
|
||||
{
|
||||
public float size { get; set; }
|
||||
public float size_far { get; set; }
|
||||
public float intensity { get; set; }
|
||||
public float intensity_far { get; set; }
|
||||
public uint color { get; set; }
|
||||
public byte numCoronas { get; set; }
|
||||
public byte distBetweenCoronas { get; set; }
|
||||
public byte distBetweenCoronas_far { get; set; }
|
||||
public float xRotation { get; set; }
|
||||
public float yRotation { get; set; }
|
||||
public float zRotation { get; set; }
|
||||
public float zBias { get; set; }
|
||||
public bool pullCoronaIn { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class sirenSettings
|
||||
{
|
||||
public byte id { get; set; }
|
||||
public string name { get; set; }
|
||||
public float timeMultiplier { get; set; }
|
||||
public float lightFalloffMax { get; set; }
|
||||
public float lightFalloffExponent { get; set; }
|
||||
public float lightInnerConeAngle { get; set; }
|
||||
public float lightOuterConeAngle { get; set; }
|
||||
public float lightOffset { get; set; }
|
||||
public MetaHash textureName { get; set; }
|
||||
public uint sequencerBpm { get; set; }
|
||||
public sirenSettings_188820339 leftHeadLight { get; set; }
|
||||
public sirenSettings_188820339 rightHeadLight { get; set; }
|
||||
public sirenSettings_188820339 leftTailLight { get; set; }
|
||||
public sirenSettings_188820339 rightTailLight { get; set; }
|
||||
public byte leftHeadLightMultiples { get; set; }
|
||||
public byte rightHeadLightMultiples { get; set; }
|
||||
public byte leftTailLightMultiples { get; set; }
|
||||
public byte rightTailLightMultiples { get; set; }
|
||||
public bool useRealLights { get; set; }
|
||||
public sirenLight[] sirens { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class sirenSettings_188820339
|
||||
{
|
||||
public uint sequencer { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class sirenLight
|
||||
{
|
||||
public sirenLight_1356743507 rotation { get; set; }
|
||||
public sirenLight_1356743507 flashiness { get; set; }
|
||||
public sirenCorona corona { get; set; }
|
||||
public uint color { get; set; }
|
||||
public float intensity { get; set; }
|
||||
public byte lightGroup { get; set; }
|
||||
public bool rotate { get; set; }
|
||||
public bool scale { get; set; }
|
||||
public byte scaleFactor { get; set; }
|
||||
public bool flash { get; set; }
|
||||
public bool light { get; set; }
|
||||
public bool spotLight { get; set; }
|
||||
public bool castShadows { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class sirenLight_1356743507
|
||||
{
|
||||
public float delta { get; set; }
|
||||
public float start { get; set; }
|
||||
public float speed { get; set; }
|
||||
public uint sequencer { get; set; }
|
||||
public byte multiples { get; set; }
|
||||
public bool direction { get; set; }
|
||||
public bool syncToBpm { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class sirenCorona
|
||||
{
|
||||
public float intensity { get; set; }
|
||||
public float size { get; set; }
|
||||
public float pull { get; set; }
|
||||
public bool faceCamera { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleKit
|
||||
{
|
||||
public MetaHash kitName { get; set; }
|
||||
public ushort id { get; set; }
|
||||
public CVehicleKit_3865430600 kitType { get; set; }
|
||||
public CVehicleModVisible[] visibleMods { get; set; }
|
||||
public CVehicleModLink[] linkMods { get; set; }
|
||||
public CVehicleModStat[] statMods { get; set; }
|
||||
public CVehicleKit_427606548[] slotNames { get; set; }
|
||||
public MetaHash[] liveryNames { get; set; }
|
||||
public MetaHash[] livery2Names { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModVisible
|
||||
{
|
||||
public MetaHash modelName { get; set; }
|
||||
public string modShopLabel { get; set; }
|
||||
public MetaHash[] linkedModels { get; set; }
|
||||
public CVehicleMod_3635907608[] turnOffBones { get; set; }
|
||||
public CVehicleMod_2363989491 type { get; set; }
|
||||
public CVehicleMod_3635907608 bone { get; set; }
|
||||
public CVehicleMod_3635907608 collisionBone { get; set; }
|
||||
public CVehicleMod_3413962745 cameraPos { get; set; }
|
||||
public float audioApply { get; set; }
|
||||
public byte weight { get; set; }
|
||||
public bool turnOffExtra { get; set; }
|
||||
public bool disableBonnetCamera { get; set; }
|
||||
public bool allowBonnetSlide { get; set; }
|
||||
public byte weaponSlot { get; set; } //SByte?
|
||||
public byte Unk_2656206330 { get; set; } //SByte?
|
||||
public bool disableProjectileDriveby { get; set; }
|
||||
public bool disableDriveby { get; set; }
|
||||
public int Unk_161724223 { get; set; }
|
||||
public int Unk_484538291 { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModLink
|
||||
{
|
||||
public MetaHash modelName { get; set; }
|
||||
public CVehicleMod_3635907608 bone { get; set; }
|
||||
public bool turnOffExtra { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModStat
|
||||
{
|
||||
public MetaHash identifier { get; set; }
|
||||
public uint modifier { get; set; }
|
||||
public float audioApply { get; set; }
|
||||
public byte weight { get; set; }
|
||||
public CVehicleMod_2363989491 type { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleKit_427606548
|
||||
{
|
||||
public CVehicleMod_2363989491 slot { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleWheel
|
||||
{
|
||||
public MetaHash wheelName { get; set; }
|
||||
public MetaHash wheelVariation { get; set; }
|
||||
public string modShopLabel { get; set; }
|
||||
public float rimRadius { get; set; }
|
||||
public bool rear { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModelInfoVarGlobal_3062246906 //GlobalVariationData
|
||||
{
|
||||
public uint xenonLightColor { get; set; }
|
||||
public uint xenonCoronaColor { get; set; }
|
||||
public float xenonLightIntensityModifier { get; set; }
|
||||
public float xenonCoronaIntensityModifier { get; set; }
|
||||
}
|
||||
[TC(typeof(EXP))] public class CVehicleModelInfoVarGlobal_2807227399 //XenonLightColors
|
||||
{
|
||||
public uint lightColor { get; set; }
|
||||
public uint coronaColor { get; set; }
|
||||
public float lightIntensityModifier { get; set; }
|
||||
public float coronaIntensityModifier { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public enum CVehicleModelColor_360458334 //vehicle mod color metallic id
|
||||
{
|
||||
none = -1,
|
||||
Unk_815563434 = 0,
|
||||
Unk_969376721 = 1,
|
||||
Unk_731244402 = 2,
|
||||
Unk_3537679873 = 3,
|
||||
Unk_3183119293 = 4,
|
||||
Unk_4039766491 = 5,
|
||||
Unk_3777516184 = 6,
|
||||
Unk_229878718 = 7,
|
||||
Unk_4285337393 = 8,
|
||||
Unk_847803751 = 9
|
||||
}
|
||||
public enum CVehicleModelColor_544262540 //vehicle mod color audio color
|
||||
{
|
||||
Unk_52583446 = 0,
|
||||
Unk_2253400966 = 1,
|
||||
Unk_4012089111 = 2,
|
||||
Unk_2477037232 = 3,
|
||||
Unk_437487559 = 4,
|
||||
Unk_730308174 = 5,
|
||||
Unk_3129410619 = 6,
|
||||
Unk_1762671403 = 7,
|
||||
Unk_2615326998 = 8,
|
||||
Unk_4157715503 = 9,
|
||||
Unk_2969646890 = 10,
|
||||
Unk_1645071976 = 11,
|
||||
Unk_1358390657 = 12
|
||||
}
|
||||
public enum CVehicleModelColor_2065815796 //vehicle mod color audio prefix
|
||||
{
|
||||
none = 0,
|
||||
Unk_2318284788 = 1,
|
||||
Unk_840729009 = 2,
|
||||
Unk_3921902053 = 3
|
||||
}
|
||||
|
||||
public enum CVehicleKit_3865430600 //vehicle mod kit type
|
||||
{
|
||||
MKT_STANDARD = 0,
|
||||
MKT_SPORT = 1,
|
||||
MKT_SUV = 2,
|
||||
MKT_SPECIAL = 3
|
||||
}
|
||||
public enum CVehicleMod_3635907608 //vehicle mod bone
|
||||
{
|
||||
none = -1,
|
||||
chassis = 0,
|
||||
Unk_1970334199 = 48,
|
||||
bumper_f = 49,
|
||||
bumper_r = 50,
|
||||
wing_rf = 51,
|
||||
wing_lf = 52,
|
||||
bonnet = 53,
|
||||
boot = 54,
|
||||
exhaust = 56,
|
||||
exhaust_2 = 57,
|
||||
exhaust_3 = 58,
|
||||
exhaust_4 = 59,
|
||||
Unk_1666652977 = 60,
|
||||
Unk_1972682668 = 61,
|
||||
Unk_3204862618 = 62,
|
||||
Unk_3503093287 = 63,
|
||||
Unk_442599751 = 64,
|
||||
Unk_2600343066 = 65,
|
||||
Unk_3598945568 = 66,
|
||||
Unk_3896619164 = 67,
|
||||
Unk_2989016171 = 68,
|
||||
Unk_3320572913 = 69,
|
||||
Unk_529211190 = 70,
|
||||
Unk_823345734 = 71,
|
||||
extra_1 = 401,
|
||||
extra_2 = 402,
|
||||
extra_3 = 403,
|
||||
extra_4 = 404,
|
||||
extra_5 = 405,
|
||||
Unk_3145755371 = 406,
|
||||
Unk_2360446286 = 407,
|
||||
Unk_2661527858 = 408,
|
||||
Unk_1913477126 = 409,
|
||||
Unk_2125833567 = 410,
|
||||
Unk_2431830489 = 411,
|
||||
Unk_2720558148 = 412,
|
||||
Unk_903844796 = 413,
|
||||
Unk_1202337617 = 414,
|
||||
Unk_2190258525 = 417,
|
||||
Unk_1950749904 = 418,
|
||||
Unk_1709504522 = 419,
|
||||
Unk_1480285367 = 420,
|
||||
Unk_1213709552 = 421,
|
||||
Unk_848662892 = 422,
|
||||
Unk_3990325233 = 423,
|
||||
Unk_367056899 = 424,
|
||||
Unk_3413787451 = 425,
|
||||
Unk_2734584581 = 426,
|
||||
mod_col_1 = 427,
|
||||
mod_col_2 = 428,
|
||||
mod_col_3 = 429,
|
||||
mod_col_4 = 430,
|
||||
mod_col_5 = 431,
|
||||
Unk_1547719720 = 432,
|
||||
Unk_580018373 = 433,
|
||||
Unk_4191162177 = 434,
|
||||
Unk_3257212908 = 435,
|
||||
Unk_3033709986 = 436,
|
||||
Unk_2249285664 = 437,
|
||||
Unk_1498318491 = 438,
|
||||
Unk_1787603223 = 439,
|
||||
Unk_1573326728 = 440,
|
||||
Unk_1862676998 = 441,
|
||||
Unk_1044598917 = 442,
|
||||
misc_a = 369,
|
||||
misc_b = 370,
|
||||
misc_c = 371,
|
||||
misc_d = 372,
|
||||
misc_e = 373,
|
||||
misc_f = 374,
|
||||
misc_g = 375,
|
||||
misc_h = 376,
|
||||
misc_i = 377,
|
||||
misc_j = 378,
|
||||
misc_k = 379,
|
||||
misc_l = 380,
|
||||
misc_m = 381,
|
||||
misc_n = 382,
|
||||
misc_o = 383,
|
||||
misc_p = 384,
|
||||
misc_q = 385,
|
||||
misc_r = 386,
|
||||
misc_s = 387,
|
||||
misc_t = 388,
|
||||
misc_u = 389,
|
||||
misc_v = 390,
|
||||
misc_w = 391,
|
||||
misc_x = 392,
|
||||
misc_y = 393,
|
||||
misc_z = 394,
|
||||
Unk_2690009945 = 395,
|
||||
Unk_1385115596 = 396,
|
||||
Unk_2921986035 = 79,
|
||||
steeringwheel = 80,
|
||||
Unk_3929033220 = 29,
|
||||
Unk_837923007 = 21,
|
||||
Unk_991413023 = 22,
|
||||
headlight_l = 91,
|
||||
headlight_r = 92,
|
||||
Unk_3979005071 = 97,
|
||||
indicator_lf = 95,
|
||||
Unk_112742354 = 98,
|
||||
indicator_rf = 96,
|
||||
Unk_3008822349 = 93,
|
||||
Unk_914195096 = 94,
|
||||
window_lf = 42,
|
||||
window_rf = 43,
|
||||
Unk_2355575415 = 45,
|
||||
Unk_2639884295 = 44,
|
||||
Unk_2675373130 = 46,
|
||||
Unk_3523659197 = 47,
|
||||
hub_lf = 30,
|
||||
hub_rf = 31,
|
||||
windscreen_r = 41,
|
||||
Unk_4084563217 = 104,
|
||||
Unk_556062831 = 105,
|
||||
Unk_3850133799 = 106,
|
||||
Unk_728001778 = 107,
|
||||
door_dside_f = 3,
|
||||
door_dside_r = 4,
|
||||
door_pside_f = 5,
|
||||
door_pside_r = 6,
|
||||
bobble_head = 361,
|
||||
bobble_base = 362,
|
||||
Unk_785162942 = 363,
|
||||
engineblock = 364,
|
||||
Unk_3654959273 = 474,
|
||||
Unk_808381781 = 475,
|
||||
Unk_4268165574 = 476,
|
||||
Unk_3579951032 = 477,
|
||||
Unk_2733953759 = 478,
|
||||
Unk_4123490435 = 479,
|
||||
Unk_3342441320 = 480,
|
||||
Unk_1726175929 = 481,
|
||||
Unk_1947366679 = 482,
|
||||
Unk_2065498928 = 483,
|
||||
Unk_2572238744 = 484,
|
||||
Unk_730555402 = 485,
|
||||
Unk_4194074861 = 486,
|
||||
Unk_1343696161 = 487,
|
||||
Unk_506677594 = 488,
|
||||
Unk_4167728581 = 489,
|
||||
Unk_3326122354 = 490,
|
||||
Unk_217851628 = 491,
|
||||
Unk_3666821647 = 492,
|
||||
Unk_2168885119 = 493,
|
||||
Unk_2399611648 = 494,
|
||||
Unk_3519328378 = 495,
|
||||
Unk_2958716326 = 496,
|
||||
Unk_3292501248 = 497,
|
||||
Unk_2651277456 = 498,
|
||||
Unk_3888995355 = 499,
|
||||
Unk_3843353624 = 500,
|
||||
Unk_3135215534 = 501,
|
||||
Unk_3364434689 = 502,
|
||||
Unk_2723112578 = 503,
|
||||
Unk_2970026993 = 504,
|
||||
Unk_2245832093 = 505,
|
||||
Unk_2492156666 = 506,
|
||||
Unk_1765012564 = 507,
|
||||
Unk_2014155263 = 508,
|
||||
Unk_1286290243 = 509,
|
||||
Unk_1535367412 = 510,
|
||||
Unk_3992710274 = 511,
|
||||
Unk_1077448950 = 512,
|
||||
Unk_1382757723 = 513,
|
||||
Unk_614062521 = 514,
|
||||
Unk_3783807571 = 524,
|
||||
Unk_2839830988 = 525,
|
||||
Unk_3138651499 = 526,
|
||||
Unk_2400824695 = 527,
|
||||
Unk_4141162370 = 560,
|
||||
Unk_451472348 = 561,
|
||||
Unk_1768767594 = 562,
|
||||
Unk_3599310922 = 563,
|
||||
Unk_1496111458 = 564,
|
||||
Unk_3929521030 = 565,
|
||||
Unk_1157497495 = 566,
|
||||
Unk_1032498025 = 567,
|
||||
Unk_2573434709 = 568,
|
||||
Unk_930609265 = 569,
|
||||
Unk_879315983 = 570,
|
||||
Unk_411536741 = 571,
|
||||
Unk_1086719913 = 572,
|
||||
Unk_3237490897 = 573,
|
||||
Unk_3375838140 = 574,
|
||||
Unk_2381840182 = 575,
|
||||
Unk_3607058940 = 576,
|
||||
Unk_3607058940_again = 577,
|
||||
Unk_1208798824 = 578,
|
||||
Unk_303656220 = 579,
|
||||
Unk_660207018 = 580,
|
||||
Unk_2796607005 = 581,
|
||||
Unk_3045655218 = 582,
|
||||
Unk_2017296145 = 583,
|
||||
Unk_3978311755 = 584,
|
||||
Unk_1122332083 = 585,
|
||||
Unk_1123212214 = 586,
|
||||
Unk_4063416457 = 587,
|
||||
Unk_4011591561 = 588,
|
||||
Unk_2320654166 = 589,
|
||||
Unk_2292220415 = 590,
|
||||
Unk_2166816405 = 591,
|
||||
Unk_2486991428 = 592
|
||||
}
|
||||
public enum CVehicleMod_2363989491 //vehicle mod type
|
||||
{
|
||||
VMT_SPOILER = 0,
|
||||
VMT_BUMPER_F = 1,
|
||||
VMT_BUMPER_R = 2,
|
||||
VMT_SKIRT = 3,
|
||||
VMT_EXHAUST = 4,
|
||||
VMT_CHASSIS = 5,
|
||||
VMT_GRILL = 6,
|
||||
VMT_BONNET = 7,
|
||||
VMT_WING_L = 8,
|
||||
VMT_WING_R = 9,
|
||||
VMT_ROOF = 10,
|
||||
VMT_PLTHOLDER = 11,
|
||||
VMT_PLTVANITY = 12,
|
||||
VMT_INTERIOR1 = 13,
|
||||
VMT_INTERIOR2 = 14,
|
||||
VMT_INTERIOR3 = 15,
|
||||
VMT_INTERIOR4 = 16,
|
||||
VMT_INTERIOR5 = 17,
|
||||
VMT_SEATS = 18,
|
||||
VMT_STEERING = 19,
|
||||
VMT_KNOB = 20,
|
||||
VMT_PLAQUE = 21,
|
||||
VMT_ICE = 22,
|
||||
VMT_TRUNK = 23,
|
||||
VMT_HYDRO = 24,
|
||||
VMT_ENGINEBAY1 = 25,
|
||||
VMT_ENGINEBAY2 = 26,
|
||||
VMT_ENGINEBAY3 = 27,
|
||||
VMT_CHASSIS2 = 28,
|
||||
VMT_CHASSIS3 = 29,
|
||||
VMT_CHASSIS4 = 30,
|
||||
VMT_CHASSIS5 = 31,
|
||||
VMT_DOOR_L = 32,
|
||||
Unk_514696742 = 33,
|
||||
VMT_LIVERY_MOD = 34,
|
||||
Unk_3409280882 = 35,
|
||||
VMT_ENGINE = 36,
|
||||
VMT_BRAKES = 37,
|
||||
VMT_GEARBOX = 38,
|
||||
VMT_HORN = 39,
|
||||
VMT_SUSPENSION = 40,
|
||||
VMT_ARMOUR = 41,
|
||||
Unk_3278520444 = 42,
|
||||
Unk_2334449168 = 43,
|
||||
Unk_1675686396 = 44,
|
||||
Unk_3968559424 = 45,
|
||||
Unk_3919652883 = 46,
|
||||
Unk_2656522436 = 47,
|
||||
VMT_WHEELS = 48,
|
||||
VMT_WHEELS_REAR_OR_HYDRAULICS = 49
|
||||
}
|
||||
public enum CVehicleMod_3413962745 //vehicle mod camera position
|
||||
{
|
||||
VMCP_DEFAULT = 0,
|
||||
Unk_3001706694 = 1,
|
||||
Unk_1148399176 = 2,
|
||||
Unk_2057559994 = 3,
|
||||
Unk_1556139353 = 4,
|
||||
Unk_1830737308 = 5,
|
||||
Unk_457854237 = 6,
|
||||
Unk_1629770278 = 7,
|
||||
Unk_2879151926 = 8,
|
||||
Unk_3193071790 = 9,
|
||||
Unk_2770495034 = 10
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CodeWalker.GameFiles
|
||||
{
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class CarModColsFile : GameFile, PackedFile
|
||||
{
|
||||
public CarModColsFile() : base(null, GameFileType.CarModCols)
|
||||
{ }
|
||||
public CarModColsFile(RpfFileEntry entry) : base(entry, GameFileType.CarModCols)
|
||||
{
|
||||
}
|
||||
|
||||
public void Load(byte[] data, RpfFileEntry entry)
|
||||
{
|
||||
RpfFileEntry = entry;
|
||||
Name = entry.Name;
|
||||
FilePath = Name;
|
||||
|
||||
//TODO
|
||||
|
||||
//always PSO .ymt
|
||||
|
||||
|
||||
Loaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CodeWalker.GameFiles
|
||||
{
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class CarVariationsFile : GameFile, PackedFile
|
||||
{
|
||||
public CarVariationsFile() : base(null, GameFileType.CarVariations)
|
||||
{ }
|
||||
public CarVariationsFile(RpfFileEntry entry) : base(entry, GameFileType.CarVariations)
|
||||
{
|
||||
}
|
||||
|
||||
public void Load(byte[] data, RpfFileEntry entry)
|
||||
{
|
||||
RpfFileEntry = entry;
|
||||
Name = entry.Name;
|
||||
FilePath = Name;
|
||||
|
||||
//TODO
|
||||
|
||||
//can be PSO .ymt or XML .meta
|
||||
|
||||
|
||||
Loaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CodeWalker.GameFiles
|
||||
{
|
||||
[TypeConverter(typeof(ExpandableObjectConverter))]
|
||||
public class VehicleLayoutsFile : GameFile, PackedFile
|
||||
{
|
||||
public VehicleLayoutsFile() : base(null, GameFileType.VehicleLayouts)
|
||||
{ }
|
||||
public VehicleLayoutsFile(RpfFileEntry entry) : base(entry, GameFileType.VehicleLayouts)
|
||||
{
|
||||
}
|
||||
|
||||
public void Load(byte[] data, RpfFileEntry entry)
|
||||
{
|
||||
RpfFileEntry = entry;
|
||||
Name = entry.Name;
|
||||
FilePath = Name;
|
||||
|
||||
//TODO
|
||||
|
||||
//always XML .meta
|
||||
|
||||
|
||||
Loaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SharpDX;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -10,9 +11,9 @@ namespace CodeWalker.GameFiles
|
||||
public class VehiclesFile : GameFile, PackedFile
|
||||
{
|
||||
|
||||
public RbfFile Rbf { get; set; }
|
||||
|
||||
|
||||
public string ResidentTxd { get; set; }
|
||||
public List<VehicleInitData> InitDatas { get; set; }
|
||||
public Dictionary<string, string> TxdRelationships { get; set; }
|
||||
|
||||
|
||||
@@ -48,7 +49,10 @@ namespace CodeWalker.GameFiles
|
||||
XmlDocument xmldoc = new XmlDocument();
|
||||
xmldoc.LoadXml(xml);
|
||||
|
||||
LoadVehicles(xmldoc);
|
||||
|
||||
ResidentTxd = Xml.GetChildInnerText(xmldoc.SelectSingleNode("CVehicleModelInfo__InitDataList"), "residentTxd");
|
||||
|
||||
LoadInitDatas(xmldoc);
|
||||
|
||||
LoadTxdRelationships(xmldoc);
|
||||
|
||||
@@ -57,12 +61,17 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
|
||||
|
||||
private void LoadVehicles(XmlDocument xmldoc)
|
||||
private void LoadInitDatas(XmlDocument xmldoc)
|
||||
{
|
||||
XmlNodeList items = xmldoc.SelectNodes("CVehicleModelInfo__InitDataList/InitDatas/Item | CVehicleModelInfo__InitDataList/InitDatas/item");
|
||||
|
||||
InitDatas = new List<VehicleInitData>();
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
//TODO...
|
||||
var node = items[i];
|
||||
VehicleInitData d = new VehicleInitData();
|
||||
d.Load(node);
|
||||
InitDatas.Add(d);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,10 +91,318 @@ namespace CodeWalker.GameFiles
|
||||
{
|
||||
TxdRelationships.Add(childstr, parentstr);
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class VehicleInitData
|
||||
{
|
||||
|
||||
public string modelName { get; set; } //<modelName>impaler3</modelName>
|
||||
public string txdName { get; set; } //<txdName>impaler3</txdName>
|
||||
public string handlingId { get; set; } //<handlingId>IMPALER3</handlingId>
|
||||
public string gameName { get; set; } //<gameName>IMPALER3</gameName>
|
||||
public string vehicleMakeName { get; set; } //<vehicleMakeName>DECLASSE</vehicleMakeName>
|
||||
public string expressionDictName { get; set; } //<expressionDictName>null</expressionDictName>
|
||||
public string expressionName { get; set; } //<expressionName>null</expressionName>
|
||||
public string animConvRoofDictName { get; set; } //<animConvRoofDictName>null</animConvRoofDictName>
|
||||
public string animConvRoofName { get; set; } //<animConvRoofName>null</animConvRoofName>
|
||||
public string animConvRoofWindowsAffected { get; set; } //<animConvRoofWindowsAffected />
|
||||
public string ptfxAssetName { get; set; } //<ptfxAssetName>weap_xs_vehicle_weapons</ptfxAssetName>
|
||||
public string audioNameHash { get; set; } //<audioNameHash />
|
||||
public string layout { get; set; } //<layout>LAYOUT_STD_ARENA_1HONLY</layout>
|
||||
public string coverBoundOffsets { get; set; } //<coverBoundOffsets>IMPALER_COVER_OFFSET_INFO</coverBoundOffsets>
|
||||
public string explosionInfo { get; set; } //<explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
|
||||
public string scenarioLayout { get; set; } //<scenarioLayout />
|
||||
public string cameraName { get; set; } //<cameraName>FOLLOW_CHEETAH_CAMERA</cameraName>
|
||||
public string aimCameraName { get; set; } //<aimCameraName>DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA</aimCameraName>
|
||||
public string bonnetCameraName { get; set; } //<bonnetCameraName>VEHICLE_BONNET_CAMERA_STANDARD_LONG_DEVIANT</bonnetCameraName>
|
||||
public string povCameraName { get; set; } //<povCameraName>REDUCED_NEAR_CLIP_POV_CAMERA</povCameraName>
|
||||
public Vector3 FirstPersonDriveByIKOffset { get; set; } //<FirstPersonDriveByIKOffset x="0.020000" y="-0.065000" z="-0.050000" />
|
||||
public Vector3 FirstPersonDriveByUnarmedIKOffset { get; set; } //<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="-0.100000" z="0.000000" />
|
||||
public Vector3 FirstPersonProjectileDriveByIKOffset { get; set; } //<FirstPersonProjectileDriveByIKOffset x="0.000000" y="-0.130000" z="-0.050000" />
|
||||
public Vector3 FirstPersonProjectileDriveByPassengerIKOffset { get; set; } //<FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="-0.100000" z="0.000000" />
|
||||
public Vector3 FirstPersonDriveByRightPassengerIKOffset { get; set; } //<FirstPersonDriveByRightPassengerIKOffset x="-0.020000" y="-0.065000" z="-0.050000" />
|
||||
public Vector3 FirstPersonDriveByRightPassengerUnarmedIKOffset { get; set; }//<FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="-0.100000" z="0.000000" />
|
||||
public Vector3 FirstPersonMobilePhoneOffset { get; set; } //<FirstPersonMobilePhoneOffset x="0.146000" y="0.220000" z="0.510000" />
|
||||
public Vector3 FirstPersonPassengerMobilePhoneOffset { get; set; } //<FirstPersonPassengerMobilePhoneOffset x="0.234000" y="0.169000" z="0.395000" />
|
||||
public Vector3 PovCameraOffset { get; set; } //<PovCameraOffset x="0.000000" y="-0.195000" z="0.640000" />
|
||||
public Vector3 PovCameraVerticalAdjustmentForRollCage { get; set; } //<PovCameraVerticalAdjustmentForRollCage value="0.000000" />
|
||||
public Vector3 PovPassengerCameraOffset { get; set; } //<PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
public Vector3 PovRearPassengerCameraOffset { get; set; } //<PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
public string vfxInfoName { get; set; } //<vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
|
||||
public bool shouldUseCinematicViewMode { get; set; } //<shouldUseCinematicViewMode value="true" />
|
||||
public bool shouldCameraTransitionOnClimbUpDown { get; set; } //<shouldCameraTransitionOnClimbUpDown value="false" />
|
||||
public bool shouldCameraIgnoreExiting { get; set; } //<shouldCameraIgnoreExiting value="false" />
|
||||
public bool AllowPretendOccupants { get; set; } //<AllowPretendOccupants value="true" />
|
||||
public bool AllowJoyriding { get; set; } //<AllowJoyriding value="true" />
|
||||
public bool AllowSundayDriving { get; set; } //<AllowSundayDriving value="true" />
|
||||
public bool AllowBodyColorMapping { get; set; } //<AllowBodyColorMapping value="true" />
|
||||
public float wheelScale { get; set; } //<wheelScale value="0.202300" />
|
||||
public float wheelScaleRear { get; set; } //<wheelScaleRear value="0.0.201800" />
|
||||
public float dirtLevelMin { get; set; } //<dirtLevelMin value="0.000000" />
|
||||
public float dirtLevelMax { get; set; } //<dirtLevelMax value="0.450000" />
|
||||
public float envEffScaleMin { get; set; } //<envEffScaleMin value="0.000000" />
|
||||
public float envEffScaleMax { get; set; } //<envEffScaleMax value="1.000000" />
|
||||
public float envEffScaleMin2 { get; set; } //<envEffScaleMin2 value="0.000000" />
|
||||
public float envEffScaleMax2 { get; set; } //<envEffScaleMax2 value="1.000000" />
|
||||
public float damageMapScale { get; set; } //<damageMapScale value="0.000000" />
|
||||
public float damageOffsetScale { get; set; } //<damageOffsetScale value="0.100000" />
|
||||
public Color4 diffuseTint { get; set; } //<diffuseTint value="0x00FFFFFF" />
|
||||
public float steerWheelMult { get; set; } //<steerWheelMult value="0.700000" />
|
||||
public float HDTextureDist { get; set; } //<HDTextureDist value="5.000000" />
|
||||
public float[] lodDistances { get; set; } //<lodDistances content="float_array">// 10.000000// 25.000000// 60.000000// 120.000000// 500.000000// 500.000000//</lodDistances>
|
||||
public float minSeatHeight { get; set; } //<minSeatHeight value="0.844" />
|
||||
public float identicalModelSpawnDistance { get; set; } //<identicalModelSpawnDistance value="20" />
|
||||
public int maxNumOfSameColor { get; set; } //<maxNumOfSameColor value="1" />
|
||||
public float defaultBodyHealth { get; set; } //<defaultBodyHealth value="1000.000000" />
|
||||
public float pretendOccupantsScale { get; set; } //<pretendOccupantsScale value="1.000000" />
|
||||
public float visibleSpawnDistScale { get; set; } //<visibleSpawnDistScale value="1.000000" />
|
||||
public float trackerPathWidth { get; set; } //<trackerPathWidth value="2.000000" />
|
||||
public float weaponForceMult { get; set; } //<weaponForceMult value="1.000000" />
|
||||
public float frequency { get; set; } //<frequency value="30" />
|
||||
public string swankness { get; set; } //<swankness>SWANKNESS_4</swankness>
|
||||
public int maxNum { get; set; } //<maxNum value="10" />
|
||||
public string[] flags { get; set; } //<flags>FLAG_RECESSED_HEADLIGHT_CORONAS FLAG_EXTRAS_STRONG FLAG_AVERAGE_CAR FLAG_HAS_INTERIOR_EXTRAS FLAG_CAN_HAVE_NEONS FLAG_HAS_JUMP_MOD FLAG_HAS_NITROUS_MOD FLAG_HAS_RAMMING_SCOOP_MOD FLAG_USE_AIRCRAFT_STYLE_WEAPON_TARGETING FLAG_HAS_SIDE_SHUNT FLAG_HAS_WEAPON_SPIKE_MODS FLAG_HAS_SUPERCHARGER FLAG_INCREASE_CAMBER_WITH_SUSPENSION_MOD FLAG_DISABLE_DEFORMATION</flags>
|
||||
public string type { get; set; } //<type>VEHICLE_TYPE_CAR</type>
|
||||
public string plateType { get; set; } //<plateType>VPT_FRONT_AND_BACK_PLATES</plateType>
|
||||
public string dashboardType { get; set; } //<dashboardType>VDT_DUKES</dashboardType>
|
||||
public string vehicleClass { get; set; } //<vehicleClass>VC_MUSCLE</vehicleClass>
|
||||
public string wheelType { get; set; } //<wheelType>VWT_MUSCLE</wheelType>
|
||||
public string[] trailers { get; set; } //<trailers />
|
||||
public string[] additionalTrailers { get; set; } //<additionalTrailers />
|
||||
public VehicleDriver[] drivers { get; set; } //<drivers />
|
||||
public string[] extraIncludes { get; set; } //<extraIncludes />
|
||||
public string[] doorsWithCollisionWhenClosed { get; set; } //<doorsWithCollisionWhenClosed />
|
||||
public string[] driveableDoors { get; set; } //<driveableDoors />
|
||||
public bool bumpersNeedToCollideWithMap { get; set; } //<bumpersNeedToCollideWithMap value="false" />
|
||||
public bool needsRopeTexture { get; set; } //<needsRopeTexture value="false" />
|
||||
public string[] requiredExtras { get; set; } //<requiredExtras>EXTRA_1 EXTRA_2 EXTRA_3</requiredExtras>
|
||||
public string[] rewards { get; set; } //<rewards />
|
||||
public string[] cinematicPartCamera { get; set; } //<cinematicPartCamera>// <Item>WHEEL_FRONT_RIGHT_CAMERA</Item>// <Item>WHEEL_FRONT_LEFT_CAMERA</Item>// <Item>WHEEL_REAR_RIGHT_CAMERA</Item>// <Item>WHEEL_REAR_LEFT_CAMERA</Item>//</cinematicPartCamera>
|
||||
public string NmBraceOverrideSet { get; set; } //<NmBraceOverrideSet />
|
||||
public Vector3 buoyancySphereOffset { get; set; } //<buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
|
||||
public float buoyancySphereSizeScale { get; set; } //<buoyancySphereSizeScale value="1.000000" />
|
||||
public VehicleOverrideRagdollThreshold pOverrideRagdollThreshold { get; set; } //<pOverrideRagdollThreshold type="NULL" />
|
||||
public string[] firstPersonDrivebyData { get; set; } //<firstPersonDrivebyData>// <Item>STD_IMPALER2_FRONT_LEFT</Item>// <Item>STD_IMPALER2_FRONT_RIGHT</Item>//</firstPersonDrivebyData>
|
||||
|
||||
|
||||
public void Load(XmlNode node)
|
||||
{
|
||||
modelName = Xml.GetChildInnerText(node, "modelName");
|
||||
txdName = Xml.GetChildInnerText(node, "txdName");
|
||||
handlingId = Xml.GetChildInnerText(node, "handlingId");
|
||||
gameName = Xml.GetChildInnerText(node, "gameName");
|
||||
vehicleMakeName = Xml.GetChildInnerText(node, "vehicleMakeName");
|
||||
expressionDictName = Xml.GetChildInnerText(node, "expressionDictName");
|
||||
expressionName = Xml.GetChildInnerText(node, "expressionName");
|
||||
animConvRoofDictName = Xml.GetChildInnerText(node, "animConvRoofDictName");
|
||||
animConvRoofName = Xml.GetChildInnerText(node, "animConvRoofName");
|
||||
animConvRoofWindowsAffected = Xml.GetChildInnerText(node, "animConvRoofWindowsAffected");//?
|
||||
ptfxAssetName = Xml.GetChildInnerText(node, "ptfxAssetName");
|
||||
audioNameHash = Xml.GetChildInnerText(node, "audioNameHash");
|
||||
layout = Xml.GetChildInnerText(node, "layout");
|
||||
coverBoundOffsets = Xml.GetChildInnerText(node, "coverBoundOffsets");
|
||||
explosionInfo = Xml.GetChildInnerText(node, "explosionInfo");
|
||||
scenarioLayout = Xml.GetChildInnerText(node, "scenarioLayout");
|
||||
cameraName = Xml.GetChildInnerText(node, "cameraName");
|
||||
aimCameraName = Xml.GetChildInnerText(node, "aimCameraName");
|
||||
bonnetCameraName = Xml.GetChildInnerText(node, "bonnetCameraName");
|
||||
povCameraName = Xml.GetChildInnerText(node, "povCameraName");
|
||||
FirstPersonDriveByIKOffset = Xml.GetChildVector3Attributes(node, "FirstPersonDriveByIKOffset", "x", "y", "z");
|
||||
FirstPersonDriveByUnarmedIKOffset = Xml.GetChildVector3Attributes(node, "FirstPersonDriveByUnarmedIKOffset", "x", "y", "z");
|
||||
FirstPersonProjectileDriveByIKOffset = Xml.GetChildVector3Attributes(node, "FirstPersonProjectileDriveByIKOffset", "x", "y", "z");
|
||||
FirstPersonProjectileDriveByPassengerIKOffset = Xml.GetChildVector3Attributes(node, "FirstPersonProjectileDriveByPassengerIKOffset", "x", "y", "z");
|
||||
FirstPersonDriveByRightPassengerIKOffset = Xml.GetChildVector3Attributes(node, "FirstPersonDriveByRightPassengerIKOffset", "x", "y", "z");
|
||||
FirstPersonDriveByRightPassengerUnarmedIKOffset = Xml.GetChildVector3Attributes(node, "FirstPersonDriveByRightPassengerUnarmedIKOffset", "x", "y", "z");
|
||||
FirstPersonMobilePhoneOffset = Xml.GetChildVector3Attributes(node, "FirstPersonMobilePhoneOffset", "x", "y", "z");
|
||||
FirstPersonPassengerMobilePhoneOffset = Xml.GetChildVector3Attributes(node, "FirstPersonPassengerMobilePhoneOffset", "x", "y", "z");
|
||||
PovCameraOffset = Xml.GetChildVector3Attributes(node, "PovCameraOffset", "x", "y", "z");
|
||||
PovCameraVerticalAdjustmentForRollCage = Xml.GetChildVector3Attributes(node, "PovCameraVerticalAdjustmentForRollCage", "x", "y", "z");
|
||||
PovPassengerCameraOffset = Xml.GetChildVector3Attributes(node, "PovPassengerCameraOffset", "x", "y", "z");
|
||||
PovRearPassengerCameraOffset = Xml.GetChildVector3Attributes(node, "PovRearPassengerCameraOffset", "x", "y", "z");
|
||||
vfxInfoName = Xml.GetChildInnerText(node, "vfxInfoName");
|
||||
shouldUseCinematicViewMode = Xml.GetChildBoolAttribute(node, "shouldUseCinematicViewMode", "value");
|
||||
shouldCameraTransitionOnClimbUpDown = Xml.GetChildBoolAttribute(node, "shouldCameraTransitionOnClimbUpDown", "value");
|
||||
shouldCameraIgnoreExiting = Xml.GetChildBoolAttribute(node, "shouldCameraIgnoreExiting", "value");
|
||||
AllowPretendOccupants = Xml.GetChildBoolAttribute(node, "AllowPretendOccupants", "value");
|
||||
AllowJoyriding = Xml.GetChildBoolAttribute(node, "AllowJoyriding", "value");
|
||||
AllowSundayDriving = Xml.GetChildBoolAttribute(node, "AllowSundayDriving", "value");
|
||||
AllowBodyColorMapping = Xml.GetChildBoolAttribute(node, "AllowBodyColorMapping", "value");
|
||||
wheelScale = Xml.GetChildFloatAttribute(node, "wheelScale", "value");
|
||||
wheelScaleRear = Xml.GetChildFloatAttribute(node, "wheelScaleRear", "value");
|
||||
dirtLevelMin = Xml.GetChildFloatAttribute(node, "dirtLevelMin", "value");
|
||||
dirtLevelMax = Xml.GetChildFloatAttribute(node, "dirtLevelMax", "value");
|
||||
envEffScaleMin = Xml.GetChildFloatAttribute(node, "envEffScaleMin", "value");
|
||||
envEffScaleMax = Xml.GetChildFloatAttribute(node, "envEffScaleMax", "value");
|
||||
envEffScaleMin2 = Xml.GetChildFloatAttribute(node, "envEffScaleMin2", "value");
|
||||
envEffScaleMax2 = Xml.GetChildFloatAttribute(node, "envEffScaleMax2", "value");
|
||||
damageMapScale = Xml.GetChildFloatAttribute(node, "damageMapScale", "value");
|
||||
damageOffsetScale = Xml.GetChildFloatAttribute(node, "damageOffsetScale", "value");
|
||||
diffuseTint = new Color4(Convert.ToUInt32(Xml.GetChildStringAttribute(node, "diffuseTint", "value").Replace("0x", ""), 16));
|
||||
steerWheelMult = Xml.GetChildFloatAttribute(node, "steerWheelMult", "value");
|
||||
HDTextureDist = Xml.GetChildFloatAttribute(node, "HDTextureDist", "value");
|
||||
lodDistances = GetFloatArray(node, "lodDistances", '\n');
|
||||
minSeatHeight = Xml.GetChildFloatAttribute(node, "minSeatHeight", "value");
|
||||
identicalModelSpawnDistance = Xml.GetChildFloatAttribute(node, "identicalModelSpawnDistance", "value");
|
||||
maxNumOfSameColor = Xml.GetChildIntAttribute(node, "maxNumOfSameColor", "value");
|
||||
defaultBodyHealth = Xml.GetChildFloatAttribute(node, "defaultBodyHealth", "value");
|
||||
pretendOccupantsScale = Xml.GetChildFloatAttribute(node, "pretendOccupantsScale", "value");
|
||||
visibleSpawnDistScale = Xml.GetChildFloatAttribute(node, "visibleSpawnDistScale", "value");
|
||||
trackerPathWidth = Xml.GetChildFloatAttribute(node, "trackerPathWidth", "value");
|
||||
weaponForceMult = Xml.GetChildFloatAttribute(node, "weaponForceMult", "value");
|
||||
frequency = Xml.GetChildFloatAttribute(node, "frequency", "value");
|
||||
swankness = Xml.GetChildInnerText(node, "swankness");
|
||||
maxNum = Xml.GetChildIntAttribute(node, "maxNum", "value");
|
||||
flags = GetStringArray(node, "flags", ' ');
|
||||
type = Xml.GetChildInnerText(node, "type");
|
||||
plateType = Xml.GetChildInnerText(node, "plateType");
|
||||
dashboardType = Xml.GetChildInnerText(node, "dashboardType");
|
||||
vehicleClass = Xml.GetChildInnerText(node, "vehicleClass");
|
||||
wheelType = Xml.GetChildInnerText(node, "wheelType");
|
||||
trailers = GetStringItemArray(node, "trailers");
|
||||
additionalTrailers = GetStringItemArray(node, "additionalTrailers");
|
||||
var dnode = node.SelectSingleNode("drivers");
|
||||
if (dnode != null)
|
||||
{
|
||||
var items = dnode.SelectNodes("Item");
|
||||
if (items.Count > 0)
|
||||
{
|
||||
drivers = new VehicleDriver[items.Count];
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
var item = items[i];
|
||||
var driver = new VehicleDriver();
|
||||
driver.driverName = Xml.GetChildInnerText(item, "driverName");
|
||||
driver.npcName = Xml.GetChildInnerText(item, "npcName");
|
||||
drivers[i] = driver;
|
||||
}
|
||||
}
|
||||
}
|
||||
extraIncludes = GetStringItemArray(node, "extraIncludes");
|
||||
doorsWithCollisionWhenClosed = GetStringItemArray(node, "doorsWithCollisionWhenClosed");
|
||||
driveableDoors = GetStringItemArray(node, "driveableDoors");
|
||||
bumpersNeedToCollideWithMap = Xml.GetChildBoolAttribute(node, "bumpersNeedToCollideWithMap", "value");
|
||||
needsRopeTexture = Xml.GetChildBoolAttribute(node, "needsRopeTexture", "value");
|
||||
requiredExtras = GetStringArray(node, "requiredExtras", ' ');
|
||||
rewards = GetStringItemArray(node, "rewards");
|
||||
cinematicPartCamera = GetStringItemArray(node, "cinematicPartCamera");
|
||||
NmBraceOverrideSet = Xml.GetChildInnerText(node, "NmBraceOverrideSet");
|
||||
buoyancySphereOffset = Xml.GetChildVector3Attributes(node, "buoyancySphereOffset", "x", "y", "z");
|
||||
buoyancySphereSizeScale = Xml.GetChildFloatAttribute(node, "buoyancySphereSizeScale", "value");
|
||||
var tnode = node.SelectSingleNode("pOverrideRagdollThreshold");
|
||||
if (tnode != null)
|
||||
{
|
||||
var ttype = tnode.Attributes["type"]?.Value;
|
||||
switch (ttype)
|
||||
{
|
||||
case "NULL": break;
|
||||
case "CVehicleModelInfo__CVehicleOverrideRagdollThreshold":
|
||||
pOverrideRagdollThreshold = new VehicleOverrideRagdollThreshold();
|
||||
pOverrideRagdollThreshold.MinComponent = Xml.GetChildIntAttribute(tnode, "MinComponent", "value");
|
||||
pOverrideRagdollThreshold.MaxComponent = Xml.GetChildIntAttribute(tnode, "MaxComponent", "value");
|
||||
pOverrideRagdollThreshold.ThresholdMult = Xml.GetChildFloatAttribute(tnode, "ThresholdMult", "value");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
firstPersonDrivebyData = GetStringItemArray(node, "firstPersonDrivebyData");
|
||||
}
|
||||
|
||||
private string[] GetStringItemArray(XmlNode node, string childName)
|
||||
{
|
||||
var cnode = node.SelectSingleNode(childName);
|
||||
if (cnode == null) return null;
|
||||
var items = cnode.SelectNodes("Item");
|
||||
if (items == null) return null;
|
||||
getStringArrayList.Clear();
|
||||
foreach (XmlNode inode in items)
|
||||
{
|
||||
var istr = inode.InnerText;
|
||||
if (!string.IsNullOrEmpty(istr))
|
||||
{
|
||||
getStringArrayList.Add(istr);
|
||||
}
|
||||
}
|
||||
if (getStringArrayList.Count == 0) return null;
|
||||
return getStringArrayList.ToArray();
|
||||
}
|
||||
private string[] GetStringArray(XmlNode node, string childName, char delimiter)
|
||||
{
|
||||
var ldastr = Xml.GetChildInnerText(node, childName);
|
||||
var ldarr = ldastr?.Split(delimiter);
|
||||
if (ldarr == null) return null;
|
||||
getStringArrayList.Clear();
|
||||
foreach (var ldstr in ldarr)
|
||||
{
|
||||
var ldt = ldstr?.Trim();
|
||||
if (!string.IsNullOrEmpty(ldt))
|
||||
{
|
||||
getStringArrayList.Add(ldt);
|
||||
}
|
||||
}
|
||||
if (getStringArrayList.Count == 0) return null;
|
||||
return getStringArrayList.ToArray();
|
||||
}
|
||||
private float[] GetFloatArray(XmlNode node, string childName, char delimiter)
|
||||
{
|
||||
var ldastr = Xml.GetChildInnerText(node, childName);
|
||||
var ldarr = ldastr?.Split(delimiter);
|
||||
if (ldarr == null) return null;
|
||||
getFloatArrayList.Clear();
|
||||
foreach (var ldstr in ldarr)
|
||||
{
|
||||
var ldt = ldstr?.Trim();
|
||||
if (!string.IsNullOrEmpty(ldt))
|
||||
{
|
||||
float f;
|
||||
if (FloatUtil.TryParse(ldt, out f))
|
||||
{
|
||||
getFloatArrayList.Add(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getFloatArrayList.Count == 0) return null;
|
||||
return getFloatArrayList.ToArray();
|
||||
}
|
||||
|
||||
private static List<string> getStringArrayList = new List<string>(); //kinda hacky..
|
||||
private static List<float> getFloatArrayList = new List<float>(); //kinda hacky..
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return modelName;
|
||||
}
|
||||
}
|
||||
|
||||
public class VehicleOverrideRagdollThreshold
|
||||
{
|
||||
public int MinComponent { get; set; }
|
||||
public int MaxComponent { get; set; }
|
||||
public float ThresholdMult { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return MinComponent.ToString() + ", " + MaxComponent.ToString() + ", " + ThresholdMult.ToString();
|
||||
}
|
||||
}
|
||||
public class VehicleDriver
|
||||
{
|
||||
public string driverName { get; set; }
|
||||
public string npcName { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return driverName + ", " + npcName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -71,6 +71,10 @@ namespace CodeWalker.GameFiles
|
||||
Yvr = 15,
|
||||
Gtxd = 16,
|
||||
Vehicles = 17,
|
||||
CarCols = 18,
|
||||
CarModCols = 19,
|
||||
CarVariations = 20,
|
||||
VehicleLayouts = 21,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -78,12 +78,17 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
public Dictionary<uint, World.TimecycleMod> TimeCycleModsDict = new Dictionary<uint, World.TimecycleMod>();
|
||||
|
||||
public Dictionary<MetaHash, VehicleInitData> VehiclesInitDict { get; set; }
|
||||
|
||||
|
||||
public List<RpfFile> BaseRpfs { get; private set; }
|
||||
public List<RpfFile> AllRpfs { get; private set; }
|
||||
public List<RpfFile> DlcRpfs { get; private set; }
|
||||
|
||||
public bool DoFullStringIndex = false;
|
||||
|
||||
public bool BuildExtendedJenkIndex = true;
|
||||
public bool LoadArchetypes = true;
|
||||
public bool LoadVehicles = false;
|
||||
private bool PreloadedMode = false;
|
||||
|
||||
private string GTAFolder;
|
||||
@@ -149,13 +154,14 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
if (RpfMan == null)
|
||||
{
|
||||
EnableDlc = !string.IsNullOrEmpty(SelectedDlc);
|
||||
//EnableDlc = !string.IsNullOrEmpty(SelectedDlc);
|
||||
|
||||
|
||||
|
||||
RpfMan = new RpfManager();
|
||||
RpfMan.ExcludePaths = GetExcludePaths();
|
||||
RpfMan.EnableMods = EnableMods;
|
||||
RpfMan.BuildExtendedJenkIndex = BuildExtendedJenkIndex;
|
||||
RpfMan.Init(GTAFolder, UpdateStatus, ErrorLog);//, true);
|
||||
|
||||
//RE test area!
|
||||
@@ -255,6 +261,9 @@ namespace CodeWalker.GameFiles
|
||||
|
||||
UpdateStatus("Loading strings...");
|
||||
InitStringDicts();
|
||||
|
||||
UpdateStatus("Loading vehicles...");
|
||||
InitVehicles();
|
||||
}
|
||||
|
||||
private void InitDlcList()
|
||||
@@ -410,6 +419,14 @@ namespace CodeWalker.GameFiles
|
||||
if ((sfile == null) || (sfile.DlcFile == null)) continue;
|
||||
DlcNameList.Add(GetDlcNameFromPath(sfile.DlcFile.Path));
|
||||
}
|
||||
|
||||
if (DlcNameList.Count > 0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(SelectedDlc))
|
||||
{
|
||||
SelectedDlc = DlcNameList[DlcNameList.Count - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InitImagesMetas()
|
||||
@@ -1058,7 +1075,7 @@ namespace CodeWalker.GameFiles
|
||||
}
|
||||
else if (entry.NameLower == "vehicles.meta")
|
||||
{
|
||||
VehiclesFile vf = RpfMan.GetFile<VehiclesFile>(entry);
|
||||
VehiclesFile vf = RpfMan.GetFile<VehiclesFile>(entry);//could also get loaded in InitVehicles...
|
||||
if (vf.TxdRelationships != null)
|
||||
{
|
||||
addTxdRelationships(vf.TxdRelationships);
|
||||
@@ -1243,6 +1260,8 @@ namespace CodeWalker.GameFiles
|
||||
archetypesLoaded = false;
|
||||
archetypeDict.Clear();
|
||||
|
||||
if (!LoadArchetypes) return;
|
||||
|
||||
|
||||
var rpfs = EnableDlc ? AllRpfs : BaseRpfs;
|
||||
|
||||
@@ -1424,6 +1443,104 @@ namespace CodeWalker.GameFiles
|
||||
StatsNames.FullIndexBuilt = true;
|
||||
}
|
||||
|
||||
public void InitVehicles()
|
||||
{
|
||||
if (!LoadVehicles) return;
|
||||
|
||||
|
||||
//Neos7
|
||||
//Involved files(at least for rendering purpose )
|
||||
//Vehicles.meta
|
||||
//Carcols.meta
|
||||
//Carvariations.meta
|
||||
//Vehiclelayouts.meta
|
||||
//The other metas shouldn't be important for rendering
|
||||
//Then the global carcols.ymt is required too
|
||||
//As it contains the general shared tuning options
|
||||
//Carcols for modkits and lights kits definitions
|
||||
//Carvariations links such modkits and lights kits to each vehicle plus defines colours combinations of spawned vehicles
|
||||
//Vehiclelayouts mostly to handle ped interactions with the vehicle
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IEnumerable <RpfFile> rpfs = PreloadedMode ? AllRpfs : (IEnumerable<RpfFile>)ActiveMapRpfFiles.Values;
|
||||
|
||||
|
||||
var allVehicles = new Dictionary<MetaHash, VehicleInitData>();
|
||||
|
||||
var addVehicleFiles = new Action<IEnumerable<RpfFile>>((from) =>
|
||||
{
|
||||
foreach (RpfFile file in from)
|
||||
{
|
||||
if (file.AllEntries == null) continue;
|
||||
foreach (RpfEntry entry in file.AllEntries)
|
||||
{
|
||||
#if !DEBUG
|
||||
try
|
||||
#endif
|
||||
{
|
||||
if (entry.NameLower == "vehicles.meta")
|
||||
{
|
||||
VehiclesFile vf = RpfMan.GetFile<VehiclesFile>(entry);
|
||||
if (vf.InitDatas != null)
|
||||
{
|
||||
foreach (var initData in vf.InitDatas)
|
||||
{
|
||||
var name = initData.modelName.ToLowerInvariant();
|
||||
var hash = JenkHash.GenHash(name);
|
||||
if (allVehicles.ContainsKey(hash))
|
||||
{ }
|
||||
allVehicles[hash] = initData;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((entry.NameLower == "carcols.ymt") || (entry.NameLower == "carcols.meta"))
|
||||
{
|
||||
var cf = RpfMan.GetFile<CarColsFile>(entry);
|
||||
|
||||
}
|
||||
if (entry.NameLower == "carmodcols.ymt")
|
||||
{
|
||||
var cf = RpfMan.GetFile<CarModColsFile>(entry);
|
||||
|
||||
}
|
||||
if ((entry.NameLower == "carvariations.ymt") || (entry.NameLower == "carvariations.meta"))
|
||||
{
|
||||
var cf = RpfMan.GetFile<CarVariationsFile>(entry);
|
||||
|
||||
}
|
||||
if (entry.NameLower.StartsWith("vehiclelayouts") && entry.NameLower.EndsWith(".meta"))
|
||||
{
|
||||
var lf = RpfMan.GetFile<VehicleLayoutsFile>(entry);
|
||||
|
||||
}
|
||||
}
|
||||
#if !DEBUG
|
||||
catch (Exception ex)
|
||||
{
|
||||
string errstr = entry.Path + "\n" + ex.ToString();
|
||||
ErrorLog(errstr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
addVehicleFiles(rpfs);
|
||||
|
||||
if (EnableDlc)
|
||||
{
|
||||
addVehicleFiles(DlcActiveRpfs);
|
||||
}
|
||||
|
||||
|
||||
VehiclesInitDict = allVehicles;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool SetDlcLevel(string dlc, bool enable)
|
||||
|
||||
@@ -3469,12 +3469,30 @@ namespace CodeWalker.GameFiles
|
||||
TB_COLD = 3827341951,
|
||||
TB_HOT = 2709699671,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
vehicleLight = 1339481019,
|
||||
vehicleLightSettings = 2581049192,
|
||||
vehicleCorona = 1860240263,
|
||||
CVehicleKit = 679130282,
|
||||
CVehicleModVisible = 4238291236,
|
||||
CVehicleModLink = 2730707380,
|
||||
CVehicleModStat = 243590259,
|
||||
CVehicleModelColor = 4213335822,
|
||||
CVehicleWindowColor = 2561269966,
|
||||
CVehicleMetallicSetting = 2073371064,
|
||||
PlateProbabilities = 2135495316,
|
||||
CVehicleModColors = 2858318490,
|
||||
CVehicleModColor = 1443412025,
|
||||
metallic = 2204727143,
|
||||
classic = 2458459502,
|
||||
matte = 1951049216,
|
||||
metals = 2740125593,
|
||||
chrome = 1114790148,
|
||||
pearlescent = 3095366650,
|
||||
spec = 1912906641,
|
||||
sirens = 2047330294,
|
||||
CCreditItem = 113388969,
|
||||
JOB_MED = 568575574,
|
||||
JOB_SMALL = 4127034762,
|
||||
|
||||
|
||||
|
||||
@@ -3638,6 +3656,9 @@ namespace CodeWalker.GameFiles
|
||||
//rage__spdAABB = 4084721864,
|
||||
scaleBySunIntensity = 59101696,
|
||||
|
||||
CVehicleModPearlescentColors = 1380492417,
|
||||
baseCols = 2645876692,
|
||||
specCols = 666439252,
|
||||
|
||||
|
||||
|
||||
@@ -3816,6 +3837,13 @@ namespace CodeWalker.GameFiles
|
||||
ASSET_TYPE_DRAWABLEDICTIONARY = 1580165652,
|
||||
ASSET_TYPE_ASSETLESS = 4161085041,
|
||||
|
||||
aLevelsData = 1643066032,
|
||||
cFriendlyName = 2077026003,
|
||||
cTitle = 834048882,
|
||||
cFilename = 3760135447,
|
||||
cBugstarName = 3970741067,
|
||||
|
||||
|
||||
|
||||
//openIV carcols.ymt
|
||||
VehiclePlates = 593302648,
|
||||
@@ -3881,7 +3909,11 @@ namespace CodeWalker.GameFiles
|
||||
xenonCoronaColor = 4113209874,
|
||||
xenonLightIntensityModifier = 849227792,
|
||||
xenonCoronaIntensityModifier = 3145775573,
|
||||
|
||||
XenonLightColors = 2580788834,
|
||||
lightColor = 78766281,
|
||||
coronaColor = 3615736814,
|
||||
lightIntensityModifier = 1981979787,
|
||||
coronaIntensityModifier = 3155797354,
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -821,8 +821,8 @@ namespace CodeWalker.GameFiles
|
||||
break;
|
||||
case 1: //unsigned int
|
||||
var int6bVal = MetaTypes.SwapBytes(BitConverter.ToUInt32(data, eoffset));
|
||||
ValueTag(sb, cind, ename, int6bVal.ToString());
|
||||
//ValueTag(sb, cind, ename, "0x" + int6bVal.ToString("X").PadLeft(8, '0'));
|
||||
//ValueTag(sb, cind, ename, int6bVal.ToString());
|
||||
ValueTag(sb, cind, ename, "0x" + int6bVal.ToString("X").PadLeft(8, '0'));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -350,29 +350,29 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.fCycleOffset, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.fCycleDuration, PsoDataType.Float, 20, 0, 0)
|
||||
);
|
||||
case MetaName.CVehicleModelInfoVarGlobal:
|
||||
case MetaName.CVehicleModelInfoVarGlobal: //carcols.ymt root
|
||||
return new PsoStructureInfo(MetaName.CVehicleModelInfoVarGlobal, 0, 0, 392,
|
||||
new PsoStructureEntryInfo(MetaName.VehiclePlates, PsoDataType.Structure, 8, 0, (MetaName)465922034),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4213335822),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModelColor),
|
||||
new PsoStructureEntryInfo(MetaName.Colors, PsoDataType.Array, 48, 0, (MetaName)1),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2073371064),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleMetallicSetting),
|
||||
new PsoStructureEntryInfo(MetaName.MetallicSettings, PsoDataType.Array, 64, 0, (MetaName)3),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2561269966),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleWindowColor),
|
||||
new PsoStructureEntryInfo(MetaName.WindowColors, PsoDataType.Array, 80, 0, (MetaName)5),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2581049192),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.vehicleLightSettings),
|
||||
new PsoStructureEntryInfo(MetaName.Lights, PsoDataType.Array, 96, 0, MetaName.POINTER),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sirenSettings),
|
||||
new PsoStructureEntryInfo(MetaName.Sirens, PsoDataType.Array, 112, 0, (MetaName)9),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)679130282),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleKit),
|
||||
new PsoStructureEntryInfo(MetaName.Kits, PsoDataType.Array, 128, 0, (MetaName)11),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleWheel),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Array, 0, 0, (MetaName)13),
|
||||
new PsoStructureEntryInfo(MetaName.Wheels, PsoDataType.Array, 144, 4, (MetaName)851982),
|
||||
new PsoStructureEntryInfo(MetaName.GlobalVariationData, PsoDataType.Structure, 352, 0, (MetaName)3062246906),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2807227399),
|
||||
new PsoStructureEntryInfo((MetaName)2580788834, PsoDataType.Array, 376, 0, MetaName.BYTE)
|
||||
new PsoStructureEntryInfo(MetaName.XenonLightColors, PsoDataType.Array, 376, 0, MetaName.BYTE)
|
||||
);
|
||||
case (MetaName)465922034:
|
||||
case (MetaName)465922034: //CVehicleModelInfoVarGlobal VehiclePlates
|
||||
return new PsoStructureInfo((MetaName)465922034, 0, 0, 40,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3027500557),
|
||||
new PsoStructureEntryInfo(MetaName.Textures, PsoDataType.Array, 8, 0, 0),
|
||||
@@ -383,14 +383,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.RandomCharOffset, PsoDataType.UByte, 31, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.NumRandomChar, PsoDataType.UByte, 32, 0, 0)
|
||||
);
|
||||
case (MetaName)3062246906:
|
||||
return new PsoStructureInfo((MetaName)3062246906, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.xenonLightColor, PsoDataType.UInt, 8, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.xenonCoronaColor, PsoDataType.UInt, 12, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.xenonLightIntensityModifier, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.xenonCoronaIntensityModifier, PsoDataType.Float, 20, 0, 0)
|
||||
);
|
||||
case (MetaName)3027500557:
|
||||
case (MetaName)3027500557: //CVehicleModelInfoVarGlobal VehiclePlates Texture
|
||||
return new PsoStructureInfo((MetaName)3027500557, 0, 0, 80,
|
||||
new PsoStructureEntryInfo(MetaName.TextureSetName, PsoDataType.String, 8, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.DiffuseMapName, PsoDataType.String, 12, 7, 0),
|
||||
@@ -402,8 +395,22 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.IsFontOutlineEnabled, PsoDataType.Bool, 64, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.FontOutlineMinMaxDepth, PsoDataType.Float2, 68, 0, 0)
|
||||
);
|
||||
case (MetaName)4213335822:
|
||||
return new PsoStructureInfo((MetaName)4213335822, 0, 0, 32,
|
||||
case (MetaName)3062246906: //CVehicleModelInfoVarGlobal GlobalVariationData
|
||||
return new PsoStructureInfo((MetaName)3062246906, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.xenonLightColor, PsoDataType.UInt, 8, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.xenonCoronaColor, PsoDataType.UInt, 12, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.xenonLightIntensityModifier, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.xenonCoronaIntensityModifier, PsoDataType.Float, 20, 0, 0)
|
||||
);
|
||||
case (MetaName)2807227399: //CVehicleModelInfoVarGlobal XenonLightColors //vehicle xenon light color
|
||||
return new PsoStructureInfo((MetaName)2807227399, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.lightColor, PsoDataType.UInt, 8, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.coronaColor, PsoDataType.UInt, 12, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.lightIntensityModifier, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.coronaIntensityModifier, PsoDataType.Float, 20, 0, 0)
|
||||
);
|
||||
case MetaName.CVehicleModelColor: //CVehicleModelInfoVarGlobal Colors
|
||||
return new PsoStructureInfo(MetaName.CVehicleModelColor, 0, 0, 32,
|
||||
new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 8, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.metallicID, PsoDataType.Enum, 12, 2, (MetaName)360458334),
|
||||
new PsoStructureEntryInfo(MetaName.audioColor, PsoDataType.Enum, 13, 2, (MetaName)544262540),
|
||||
@@ -412,34 +419,34 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.audioPrefixHash, PsoDataType.UInt, 20, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.colorName, PsoDataType.String, 24, 1, 0)
|
||||
);
|
||||
case (MetaName)2073371064:
|
||||
return new PsoStructureInfo((MetaName)2073371064, 0, 0, 24,
|
||||
case MetaName.CVehicleMetallicSetting: //CVehicleModelInfoVarGlobal MetallicSettings
|
||||
return new PsoStructureInfo(MetaName.CVehicleMetallicSetting, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.specInt, PsoDataType.Float, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.specFalloff, PsoDataType.Float, 12, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.specFresnel, PsoDataType.Float, 16, 0, 0)
|
||||
);
|
||||
case (MetaName)2561269966:
|
||||
return new PsoStructureInfo((MetaName)2561269966, 0, 0, 16,
|
||||
case MetaName.CVehicleWindowColor: //CVehicleModelInfoVarGlobal WindowColors
|
||||
return new PsoStructureInfo(MetaName.CVehicleWindowColor, 0, 0, 16,
|
||||
new PsoStructureEntryInfo(MetaName.color, PsoDataType.UInt, 8, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 12, 7, 0)
|
||||
);
|
||||
case (MetaName)2581049192:
|
||||
return new PsoStructureInfo((MetaName)2581049192, 0, 0, 552,
|
||||
case MetaName.vehicleLightSettings: //CVehicleModelInfoVarGlobal Lights
|
||||
return new PsoStructureInfo(MetaName.vehicleLightSettings, 0, 0, 552,
|
||||
new PsoStructureEntryInfo(MetaName.id, PsoDataType.UByte, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.indicator, PsoDataType.Structure, 16, 0, (MetaName)1339481019),
|
||||
new PsoStructureEntryInfo(MetaName.rearIndicatorCorona, PsoDataType.Structure, 64, 0, (MetaName)1860240263),
|
||||
new PsoStructureEntryInfo(MetaName.frontIndicatorCorona, PsoDataType.Structure, 120, 0, (MetaName)1860240263),
|
||||
new PsoStructureEntryInfo(MetaName.tailLight, PsoDataType.Structure, 176, 0, (MetaName)1339481019),
|
||||
new PsoStructureEntryInfo(MetaName.tailLightCorona, PsoDataType.Structure, 224, 0, (MetaName)1860240263),
|
||||
new PsoStructureEntryInfo(MetaName.tailLightMiddleCorona, PsoDataType.Structure, 280, 0, (MetaName)1860240263),
|
||||
new PsoStructureEntryInfo(MetaName.headLight, PsoDataType.Structure, 336, 0, (MetaName)1339481019),
|
||||
new PsoStructureEntryInfo(MetaName.headLightCorona, PsoDataType.Structure, 384, 0, (MetaName)1860240263),
|
||||
new PsoStructureEntryInfo(MetaName.reversingLight, PsoDataType.Structure, 440, 0, (MetaName)1339481019),
|
||||
new PsoStructureEntryInfo(MetaName.reversingLightCorona, PsoDataType.Structure, 488, 0, (MetaName)1860240263),
|
||||
new PsoStructureEntryInfo(MetaName.indicator, PsoDataType.Structure, 16, 0, MetaName.vehicleLight),
|
||||
new PsoStructureEntryInfo(MetaName.rearIndicatorCorona, PsoDataType.Structure, 64, 0, MetaName.vehicleCorona),
|
||||
new PsoStructureEntryInfo(MetaName.frontIndicatorCorona, PsoDataType.Structure, 120, 0, MetaName.vehicleCorona),
|
||||
new PsoStructureEntryInfo(MetaName.tailLight, PsoDataType.Structure, 176, 0, MetaName.vehicleLight),
|
||||
new PsoStructureEntryInfo(MetaName.tailLightCorona, PsoDataType.Structure, 224, 0, MetaName.vehicleCorona),
|
||||
new PsoStructureEntryInfo(MetaName.tailLightMiddleCorona, PsoDataType.Structure, 280, 0, MetaName.vehicleCorona),
|
||||
new PsoStructureEntryInfo(MetaName.headLight, PsoDataType.Structure, 336, 0, MetaName.vehicleLight),
|
||||
new PsoStructureEntryInfo(MetaName.headLightCorona, PsoDataType.Structure, 384, 0, MetaName.vehicleCorona),
|
||||
new PsoStructureEntryInfo(MetaName.reversingLight, PsoDataType.Structure, 440, 0, MetaName.vehicleLight),
|
||||
new PsoStructureEntryInfo(MetaName.reversingLightCorona, PsoDataType.Structure, 488, 0, MetaName.vehicleCorona),
|
||||
new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 544, 1, 0)
|
||||
);
|
||||
case (MetaName)1339481019:
|
||||
return new PsoStructureInfo((MetaName)1339481019, 0, 0, 48,
|
||||
case MetaName.vehicleLight: //CVehicleModelInfoVarGlobal Lights Light info
|
||||
return new PsoStructureInfo(MetaName.vehicleLight, 0, 0, 48,
|
||||
new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.falloffMax, PsoDataType.Float, 12, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.falloffExponent, PsoDataType.Float, 16, 0, 0),
|
||||
@@ -450,8 +457,8 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.textureName, PsoDataType.String, 36, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.mirrorTexture, PsoDataType.Bool, 40, 0, 0)
|
||||
);
|
||||
case (MetaName)1860240263:
|
||||
return new PsoStructureInfo((MetaName)1860240263, 0, 0, 56,
|
||||
case MetaName.vehicleCorona: //CVehicleModelInfoVarGlobal Lights Corona info
|
||||
return new PsoStructureInfo(MetaName.vehicleCorona, 0, 0, 56,
|
||||
new PsoStructureEntryInfo(MetaName.size, PsoDataType.Float, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.size_far, PsoDataType.Float, 12, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.intensity, PsoDataType.Float, 16, 0, 0),
|
||||
@@ -488,7 +495,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.rightTailLightMultiples, PsoDataType.UByte, 123, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.useRealLights, PsoDataType.Bool, 124, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sirenLight),
|
||||
new PsoStructureEntryInfo((MetaName)2047330294, PsoDataType.Array, 128, 1, (MetaName)1310739)
|
||||
new PsoStructureEntryInfo(MetaName.sirens, PsoDataType.Array, 128, 1, (MetaName)1310739)
|
||||
);
|
||||
case (MetaName)188820339:
|
||||
return new PsoStructureInfo((MetaName)188820339, 0, 0, 16,
|
||||
@@ -527,17 +534,17 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.pull, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.faceCamera, PsoDataType.Bool, 20, 0, 0)
|
||||
);
|
||||
case (MetaName)679130282:
|
||||
return new PsoStructureInfo((MetaName)679130282, 0, 0, 120,
|
||||
case MetaName.CVehicleKit:
|
||||
return new PsoStructureInfo(MetaName.CVehicleKit, 0, 0, 120,
|
||||
new PsoStructureEntryInfo(MetaName.kitName, PsoDataType.String, 8, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.id, PsoDataType.UShort, 12, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.kitType, PsoDataType.Enum, 16, 0, (MetaName)3865430600),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)4238291236),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModVisible),
|
||||
new PsoStructureEntryInfo(MetaName.visibleMods, PsoDataType.Array, 24, 0, (MetaName)3),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2730707380),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModLink),
|
||||
new PsoStructureEntryInfo(MetaName.linkMods, PsoDataType.Array, 40, 0, (MetaName)5),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)243590259),
|
||||
new PsoStructureEntryInfo(MetaName.statMods, PsoDataType.Array, 56, 0, MetaName.POINTER),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModStat),
|
||||
new PsoStructureEntryInfo(MetaName.statMods, PsoDataType.Array, 56, 0, (MetaName)7),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)427606548),
|
||||
new PsoStructureEntryInfo(MetaName.slotNames, PsoDataType.Array, 72, 0, (MetaName)9),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.String, 0, 2, 0),
|
||||
@@ -545,16 +552,16 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.String, 0, 2, 0),
|
||||
new PsoStructureEntryInfo(MetaName.livery2Names, PsoDataType.Array, 104, 0, (MetaName)13)
|
||||
);
|
||||
case (MetaName)243590259:
|
||||
return new PsoStructureInfo((MetaName)243590259, 0, 0, 32,
|
||||
case MetaName.CVehicleModStat:
|
||||
return new PsoStructureInfo(MetaName.CVehicleModStat, 0, 0, 32,
|
||||
new PsoStructureEntryInfo(MetaName.identifier, PsoDataType.String, 8, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.modifier, PsoDataType.UInt, 12, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.audioApply, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.weight, PsoDataType.UByte, 20, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.type, PsoDataType.Enum, 24, 0, (MetaName)2363989491)
|
||||
);
|
||||
case (MetaName)4238291236:
|
||||
return new PsoStructureInfo((MetaName)4238291236, 0, 0, 96,
|
||||
case MetaName.CVehicleModVisible:
|
||||
return new PsoStructureInfo(MetaName.CVehicleModVisible, 0, 0, 96,
|
||||
new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.modShopLabel, PsoDataType.String, 16, 2, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.String, 0, 7, 0),
|
||||
@@ -582,8 +589,8 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.slot, PsoDataType.Enum, 8, 0, (MetaName)2363989491),
|
||||
new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 16, 2, 0)
|
||||
);
|
||||
case (MetaName)2730707380:
|
||||
return new PsoStructureInfo((MetaName)2730707380, 0, 0, 24,
|
||||
case MetaName.CVehicleModLink:
|
||||
return new PsoStructureInfo(MetaName.CVehicleModLink, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.bone, PsoDataType.Enum, 12, 0, (MetaName)3635907608),
|
||||
new PsoStructureEntryInfo(MetaName.turnOffExtra, PsoDataType.Bool, 16, 0, 0)
|
||||
@@ -596,39 +603,39 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.rimRadius, PsoDataType.Float, 24, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.rear, PsoDataType.Bool, 28, 0, 0)
|
||||
);
|
||||
case (MetaName)2858318490:
|
||||
return new PsoStructureInfo((MetaName)2858318490, 0, 0, 128,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)2204727143, PsoDataType.Array, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)2458459502, PsoDataType.Array, 24, 0, (MetaName)2),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)1951049216, PsoDataType.Array, 40, 0, (MetaName)4),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)2740125593, PsoDataType.Array, 56, 0, (MetaName)6),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)1114790148, PsoDataType.Array, 72, 0, (MetaName)8),
|
||||
new PsoStructureEntryInfo((MetaName)3095366650, PsoDataType.Structure, 88, 0, (MetaName)1380492417)
|
||||
case MetaName.CVehicleModColors: //carmodcols.ymt root
|
||||
return new PsoStructureInfo(MetaName.CVehicleModColors, 0, 0, 128,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.metallic, PsoDataType.Array, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.classic, PsoDataType.Array, 24, 0, (MetaName)2),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.matte, PsoDataType.Array, 40, 0, (MetaName)4),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.metals, PsoDataType.Array, 56, 0, (MetaName)6),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.chrome, PsoDataType.Array, 72, 0, (MetaName)8),
|
||||
new PsoStructureEntryInfo(MetaName.pearlescent, PsoDataType.Structure, 88, 0, MetaName.CVehicleModPearlescentColors)
|
||||
);
|
||||
case (MetaName)1380492417:
|
||||
return new PsoStructureInfo((MetaName)1380492417, 0, 0, 40,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)2645876692, PsoDataType.Array, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1443412025),
|
||||
new PsoStructureEntryInfo((MetaName)666439252, PsoDataType.Array, 24, 0, (MetaName)2)
|
||||
case MetaName.CVehicleModPearlescentColors:
|
||||
return new PsoStructureInfo(MetaName.CVehicleModPearlescentColors, 0, 0, 40,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.baseCols, PsoDataType.Array, 8, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CVehicleModColor),
|
||||
new PsoStructureEntryInfo(MetaName.specCols, PsoDataType.Array, 24, 0, (MetaName)2)
|
||||
);
|
||||
case (MetaName)1443412025:
|
||||
return new PsoStructureInfo((MetaName)1443412025, 0, 0, 24,
|
||||
case MetaName.CVehicleModColor:
|
||||
return new PsoStructureInfo(MetaName.CVehicleModColor, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.name, PsoDataType.String, 8, 2, 0),
|
||||
new PsoStructureEntryInfo(MetaName.col, PsoDataType.UByte, 16, 0, 0),
|
||||
new PsoStructureEntryInfo((MetaName)1912906641, PsoDataType.UByte, 17, 0, 0)
|
||||
new PsoStructureEntryInfo(MetaName.spec, PsoDataType.UByte, 17, 0, 0)
|
||||
);
|
||||
case MetaName.CVehicleModelInfoVariation:
|
||||
case MetaName.CVehicleModelInfoVariation: //carvariations.ymt root
|
||||
return new PsoStructureInfo(MetaName.CVehicleModelInfoVariation, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)418053801),
|
||||
new PsoStructureEntryInfo(MetaName.variationData, PsoDataType.Array, 8, 0, 0)
|
||||
);
|
||||
case (MetaName)418053801:
|
||||
case (MetaName)418053801: //CVehicleModelInfoVariation variationData
|
||||
return new PsoStructureInfo((MetaName)418053801, 0, 0, 96,
|
||||
new PsoStructureEntryInfo(MetaName.modelName, PsoDataType.String, 8, 1, 0),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)2575850962),
|
||||
@@ -637,34 +644,34 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.kits, PsoDataType.Array, 32, 0, (MetaName)3),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.String, 0, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.windowsWithExposedEdges, PsoDataType.Array, 48, 0, (MetaName)5),
|
||||
new PsoStructureEntryInfo(MetaName.plateProbabilities, PsoDataType.Structure, 64, 0, (MetaName)2135495316),
|
||||
new PsoStructureEntryInfo(MetaName.plateProbabilities, PsoDataType.Structure, 64, 0, MetaName.PlateProbabilities),
|
||||
new PsoStructureEntryInfo(MetaName.lightSettings, PsoDataType.UByte, 88, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.sirenSettings, PsoDataType.UByte, 89, 0, 0)
|
||||
);
|
||||
case (MetaName)2135495316:
|
||||
return new PsoStructureInfo((MetaName)2135495316, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)938618322),
|
||||
new PsoStructureEntryInfo(MetaName.Probabilities, PsoDataType.Array, 8, 0, 0)
|
||||
);
|
||||
case (MetaName)2575850962:
|
||||
case (MetaName)2575850962: //CVehicleModelInfoVariation variationData colors
|
||||
return new PsoStructureInfo((MetaName)2575850962, 0, 0, 44 /*40*/,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.indices, PsoDataType.Array, 8, 4, (MetaName)393216 /*262144*/),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Bool, 0, 0, 0),
|
||||
new PsoStructureEntryInfo(MetaName.liveries, PsoDataType.Array, 14 /*12*/, 4, (MetaName)1966082 /*1638402*/)
|
||||
);
|
||||
case MetaName.PlateProbabilities:
|
||||
return new PsoStructureInfo(MetaName.PlateProbabilities, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)938618322),
|
||||
new PsoStructureEntryInfo(MetaName.Probabilities, PsoDataType.Array, 8, 0, 0)
|
||||
);
|
||||
case (MetaName)938618322:
|
||||
return new PsoStructureInfo((MetaName)938618322, 0, 0, 16,
|
||||
new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0),
|
||||
new PsoStructureEntryInfo(MetaName.Value, PsoDataType.UInt, 12, 0, 0)
|
||||
);
|
||||
case (MetaName)1998252412:
|
||||
case (MetaName)1998252412: //credits.ymt root
|
||||
return new PsoStructureInfo((MetaName)1998252412, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)113388969),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CCreditItem),
|
||||
new PsoStructureEntryInfo(MetaName.CreditItems, PsoDataType.Array, 8, 0, 0)
|
||||
);
|
||||
case (MetaName)113388969:
|
||||
return new PsoStructureInfo((MetaName)113388969, 0, 0, 48,
|
||||
case MetaName.CCreditItem:
|
||||
return new PsoStructureInfo(MetaName.CCreditItem, 0, 0, 48,
|
||||
new PsoStructureEntryInfo(MetaName.LineType, PsoDataType.Enum, 8, 0, (MetaName)1795685103),
|
||||
new PsoStructureEntryInfo(MetaName.cTextId1, PsoDataType.String, 16, 3, 0),
|
||||
new PsoStructureEntryInfo(MetaName.cTextId2, PsoDataType.String, 32, 3, 0)
|
||||
@@ -701,19 +708,19 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.contents, PsoDataType.Enum, 168, 0, MetaName.DataFileContents),
|
||||
new PsoStructureEntryInfo(MetaName.installPartition, PsoDataType.Enum, 172, 0, MetaName.InstallPartition)
|
||||
);
|
||||
case MetaName.CLevelData:
|
||||
case MetaName.CLevelData: //levels.ymt root
|
||||
return new PsoStructureInfo(MetaName.CLevelData, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.sLevelData),
|
||||
new PsoStructureEntryInfo((MetaName)1643066032, PsoDataType.Array, 8, 0, 0)
|
||||
new PsoStructureEntryInfo(MetaName.aLevelsData, PsoDataType.Array, 8, 0, 0)
|
||||
);
|
||||
case MetaName.sLevelData:
|
||||
return new PsoStructureInfo(MetaName.sLevelData, 0, 0, 72,
|
||||
new PsoStructureEntryInfo((MetaName)2077026003, PsoDataType.String, 8, 3, 0),
|
||||
new PsoStructureEntryInfo((MetaName)834048882, PsoDataType.String, 24, 3, 0),
|
||||
new PsoStructureEntryInfo((MetaName)3760135447, PsoDataType.String, 40, 3, 0),
|
||||
new PsoStructureEntryInfo((MetaName)3970741067, PsoDataType.String, 56, 3, 0)
|
||||
new PsoStructureEntryInfo(MetaName.cFriendlyName, PsoDataType.String, 8, 3, 0),
|
||||
new PsoStructureEntryInfo(MetaName.cTitle, PsoDataType.String, 24, 3, 0),
|
||||
new PsoStructureEntryInfo(MetaName.cFilename, PsoDataType.String, 40, 3, 0),
|
||||
new PsoStructureEntryInfo(MetaName.cBugstarName, PsoDataType.String, 56, 3, 0)
|
||||
);
|
||||
case (MetaName)1056751197:
|
||||
case (MetaName)1056751197: //mapdatacullboxes.ymt root
|
||||
return new PsoStructureInfo((MetaName)1056751197, 0, 0, 24,
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)322201475),
|
||||
new PsoStructureEntryInfo((MetaName)934859523, PsoDataType.Array, 8, 0, 0)
|
||||
@@ -741,7 +748,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CTxdRelationship),
|
||||
new PsoStructureEntryInfo(MetaName.txdRelationships, PsoDataType.Array, 56, 0, (MetaName)5),
|
||||
new PsoStructureEntryInfo(MetaName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CMultiTxdRelationship),
|
||||
new PsoStructureEntryInfo(MetaName.multiTxdRelationships, PsoDataType.Array, 72, 0, MetaName.POINTER)
|
||||
new PsoStructureEntryInfo(MetaName.multiTxdRelationships, PsoDataType.Array, 72, 0, (MetaName)7)
|
||||
);
|
||||
case MetaName.CPedModelInfo__InitData:
|
||||
return new PsoStructureInfo(MetaName.CPedModelInfo__InitData, 0, 0, 296,
|
||||
@@ -14185,13 +14192,6 @@ namespace CodeWalker.GameFiles
|
||||
new PsoStructureEntryInfo((MetaName)2721898107, PsoDataType.UInt, 0, 0, 0),
|
||||
new PsoStructureEntryInfo((MetaName)1084559223, PsoDataType.SInt, 4, 0, 0)
|
||||
);
|
||||
case (MetaName)2807227399:
|
||||
return new PsoStructureInfo((MetaName)2807227399, 0, 0, 24,
|
||||
new PsoStructureEntryInfo((MetaName)78766281, PsoDataType.UInt, 8, 1, 0),
|
||||
new PsoStructureEntryInfo((MetaName)3615736814, PsoDataType.UInt, 12, 1, 0),
|
||||
new PsoStructureEntryInfo((MetaName)1981979787, PsoDataType.Float, 16, 0, 0),
|
||||
new PsoStructureEntryInfo((MetaName)3155797354, PsoDataType.Float, 20, 0, 0)
|
||||
);
|
||||
case MetaName.camMotionBlurSettingsMetadata:
|
||||
return new PsoStructureInfo(MetaName.camMotionBlurSettingsMetadata, 0, 0, 64,
|
||||
new PsoStructureEntryInfo(MetaName.Name, PsoDataType.String, 8, 7, 0),
|
||||
@@ -14285,7 +14285,7 @@ namespace CodeWalker.GameFiles
|
||||
//to generate enuminfos
|
||||
switch (name)
|
||||
{
|
||||
case (MetaName)360458334:
|
||||
case (MetaName)360458334: //vehicle mod color metallic id
|
||||
return new PsoEnumInfo((MetaName)360458334, 1,
|
||||
new PsoEnumEntryInfo(MetaName.none, -1),
|
||||
new PsoEnumEntryInfo((MetaName)815563434, 0),
|
||||
@@ -14299,7 +14299,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)4285337393, 8),
|
||||
new PsoEnumEntryInfo((MetaName)847803751, 9)
|
||||
);
|
||||
case (MetaName)544262540:
|
||||
case (MetaName)544262540: //vehicle mod color audio color
|
||||
return new PsoEnumInfo((MetaName)544262540, 1,
|
||||
new PsoEnumEntryInfo((MetaName)52583446, 0),
|
||||
new PsoEnumEntryInfo((MetaName)2253400966, 1),
|
||||
@@ -14315,21 +14315,21 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)1645071976, 11),
|
||||
new PsoEnumEntryInfo((MetaName)1358390657, 12)
|
||||
);
|
||||
case (MetaName)2065815796:
|
||||
case (MetaName)2065815796: //vehicle mod color audio prefix
|
||||
return new PsoEnumInfo((MetaName)2065815796, 1,
|
||||
new PsoEnumEntryInfo(MetaName.none, 0),
|
||||
new PsoEnumEntryInfo((MetaName)2318284788, 1),
|
||||
new PsoEnumEntryInfo((MetaName)840729009, 2),
|
||||
new PsoEnumEntryInfo((MetaName)3921902053, 3)
|
||||
);
|
||||
case (MetaName)3865430600:
|
||||
case (MetaName)3865430600: //vehicle mod kit type
|
||||
return new PsoEnumInfo((MetaName)3865430600, 1,
|
||||
new PsoEnumEntryInfo(MetaName.MKT_STANDARD, 0),
|
||||
new PsoEnumEntryInfo(MetaName.MKT_SPORT, 1),
|
||||
new PsoEnumEntryInfo(MetaName.MKT_SUV, 2),
|
||||
new PsoEnumEntryInfo(MetaName.MKT_SPECIAL, 3)
|
||||
);
|
||||
case (MetaName)2363989491:
|
||||
case (MetaName)2363989491: //vehicle mod type
|
||||
return new PsoEnumInfo((MetaName)2363989491, 1,
|
||||
new PsoEnumEntryInfo(MetaName.VMT_SPOILER, 0),
|
||||
new PsoEnumEntryInfo(MetaName.VMT_BUMPER_F, 1),
|
||||
@@ -14382,7 +14382,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo(MetaName.VMT_WHEELS, 48),
|
||||
new PsoEnumEntryInfo(MetaName.VMT_WHEELS_REAR_OR_HYDRAULICS, 49)
|
||||
);
|
||||
case (MetaName)3635907608:
|
||||
case (MetaName)3635907608: //vehicle mod bone
|
||||
return new PsoEnumInfo((MetaName)3635907608, 1,
|
||||
new PsoEnumEntryInfo(MetaName.none, -1),
|
||||
new PsoEnumEntryInfo(MetaName.chassis, 0),
|
||||
@@ -14590,7 +14590,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)2166816405, 591),
|
||||
new PsoEnumEntryInfo((MetaName)2486991428, 592)
|
||||
);
|
||||
case (MetaName)3413962745:
|
||||
case (MetaName)3413962745: //vehicle mod camera position
|
||||
return new PsoEnumInfo((MetaName)3413962745, 1,
|
||||
new PsoEnumEntryInfo(MetaName.VMCP_DEFAULT, 0),
|
||||
new PsoEnumEntryInfo((MetaName)3001706694, 1),
|
||||
@@ -14604,11 +14604,11 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)3193071790, 9),
|
||||
new PsoEnumEntryInfo((MetaName)2770495034, 10)
|
||||
);
|
||||
case (MetaName)1795685103:
|
||||
case (MetaName)1795685103: //credit item job line type
|
||||
return new PsoEnumInfo((MetaName)1795685103, 1,
|
||||
new PsoEnumEntryInfo(MetaName.JOB_BIG, 0),
|
||||
new PsoEnumEntryInfo((MetaName)568575574, 1),
|
||||
new PsoEnumEntryInfo((MetaName)4127034762, 2),
|
||||
new PsoEnumEntryInfo(MetaName.JOB_MED, 1),
|
||||
new PsoEnumEntryInfo(MetaName.JOB_SMALL, 2),
|
||||
new PsoEnumEntryInfo((MetaName)1877679104, 3),
|
||||
new PsoEnumEntryInfo((MetaName)2980984179, 4),
|
||||
new PsoEnumEntryInfo((MetaName)298596333, 5),
|
||||
@@ -14904,7 +14904,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)551739454, 3),
|
||||
new PsoEnumEntryInfo((MetaName)462532381, 4)
|
||||
);
|
||||
case (MetaName)3029795674:
|
||||
case (MetaName)3029795674: //CPedModelInfo__InitData ScenarioPopStreamingSlot
|
||||
return new PsoEnumInfo((MetaName)3029795674, 1,
|
||||
new PsoEnumEntryInfo(MetaName.SCENARIO_POP_STREAMING_NORMAL, 0),
|
||||
new PsoEnumEntryInfo((MetaName)1152280719, 1)
|
||||
@@ -14923,7 +14923,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)3916722287, 2),
|
||||
new PsoEnumEntryInfo((MetaName)157616235, 3)
|
||||
);
|
||||
case (MetaName)224899699:
|
||||
case (MetaName)224899699: //animation clip flags
|
||||
return new PsoEnumInfo((MetaName)224899699, 1,
|
||||
new PsoEnumEntryInfo((MetaName)2933717348, 0),
|
||||
new PsoEnumEntryInfo((MetaName)892548521, 1),
|
||||
@@ -14958,7 +14958,7 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)1321103795, 30),
|
||||
new PsoEnumEntryInfo((MetaName)3765996064, 31)
|
||||
);
|
||||
case (MetaName)1498349301:
|
||||
case (MetaName)1498349301: //animation clip priority
|
||||
return new PsoEnumInfo((MetaName)1498349301, 1,
|
||||
new PsoEnumEntryInfo(MetaName.AP_LOW, 0),
|
||||
new PsoEnumEntryInfo(MetaName.AP_MEDIUM, 1),
|
||||
@@ -14967,13 +14967,13 @@ namespace CodeWalker.GameFiles
|
||||
new PsoEnumEntryInfo((MetaName)3509068476, 4),
|
||||
new PsoEnumEntryInfo((MetaName)611607097, 5)
|
||||
);
|
||||
case (MetaName)1631789397:
|
||||
case (MetaName)1631789397: //anim clip dictionary streaming policy
|
||||
return new PsoEnumInfo((MetaName)1631789397, 1,
|
||||
new PsoEnumEntryInfo(MetaName.SP_STREAMING, 0),
|
||||
new PsoEnumEntryInfo(MetaName.SP_SINGLEPLAYER_RESIDENT, 1),
|
||||
new PsoEnumEntryInfo(MetaName.SP_MULTIPLAYER_RESIDENT, 2)
|
||||
);
|
||||
case (MetaName)733577798:
|
||||
case (MetaName)733577798: //anim clip dictionary streaming priority
|
||||
return new PsoEnumInfo((MetaName)733577798, 1,
|
||||
new PsoEnumEntryInfo((MetaName)3866220764, 0),
|
||||
new PsoEnumEntryInfo(MetaName.SP_Low, 1),
|
||||
|
||||
@@ -166,7 +166,17 @@ namespace CodeWalker.GameFiles
|
||||
Write(sval, data, entry.DataOffset);
|
||||
break;
|
||||
case 1: //unsigned int
|
||||
var uval = Convert.ToUInt32(cnode.Attributes["value"].Value);
|
||||
var ustr = cnode.Attributes["value"].Value;
|
||||
uint uval = 0;
|
||||
if (ustr.StartsWith("0x"))
|
||||
{
|
||||
ustr = ustr.Substring(2);
|
||||
uval = Convert.ToUInt32(ustr, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
uval = Convert.ToUInt32(ustr);
|
||||
}
|
||||
Write(uval, data, entry.DataOffset);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CodeWalker.GameFiles
|
||||
public string Folder { get; private set; }
|
||||
public string[] ExcludePaths { get; set; }
|
||||
public bool EnableMods { get; set; }
|
||||
public bool BuildExtendedJenkIndex { get; set; } = true;
|
||||
public Action<string> UpdateStatus { get; private set; }
|
||||
public Action<string> ErrorLog { get; private set; }
|
||||
|
||||
@@ -381,102 +382,105 @@ namespace CodeWalker.GameFiles
|
||||
JenkIndex.Ensure(entry.Name);
|
||||
JenkIndex.Ensure(nlow);
|
||||
}
|
||||
if (nlow.EndsWith(".ydr") || nlow.EndsWith(".yft"))
|
||||
if (BuildExtendedJenkIndex)
|
||||
{
|
||||
var sname = nlow.Substring(0, nlow.Length - 4);
|
||||
JenkIndex.Ensure(sname + "_lod");
|
||||
JenkIndex.Ensure(sname + "_loda");
|
||||
JenkIndex.Ensure(sname + "_lodb");
|
||||
}
|
||||
if (nlow.EndsWith(".ydd"))
|
||||
{
|
||||
if (nlow.EndsWith("_children.ydd"))
|
||||
if (nlow.EndsWith(".ydr") || nlow.EndsWith(".yft"))
|
||||
{
|
||||
var strn = nlow.Substring(0, nlow.Length - 13);
|
||||
JenkIndex.Ensure(strn);
|
||||
JenkIndex.Ensure(strn + "_lod");
|
||||
JenkIndex.Ensure(strn + "_loda");
|
||||
JenkIndex.Ensure(strn + "_lodb");
|
||||
var sname = nlow.Substring(0, nlow.Length - 4);
|
||||
JenkIndex.Ensure(sname + "_lod");
|
||||
JenkIndex.Ensure(sname + "_loda");
|
||||
JenkIndex.Ensure(sname + "_lodb");
|
||||
}
|
||||
var idx = nlow.LastIndexOf('_');
|
||||
if (idx > 0)
|
||||
if (nlow.EndsWith(".ydd"))
|
||||
{
|
||||
var str1 = nlow.Substring(0, idx);
|
||||
var idx2 = str1.LastIndexOf('_');
|
||||
if (idx2 > 0)
|
||||
if (nlow.EndsWith("_children.ydd"))
|
||||
{
|
||||
var str2 = str1.Substring(0, idx2);
|
||||
JenkIndex.Ensure(str2 + "_lod");
|
||||
var maxi = 100;
|
||||
for (int i = 1; i <= maxi; i++)
|
||||
var strn = nlow.Substring(0, nlow.Length - 13);
|
||||
JenkIndex.Ensure(strn);
|
||||
JenkIndex.Ensure(strn + "_lod");
|
||||
JenkIndex.Ensure(strn + "_loda");
|
||||
JenkIndex.Ensure(strn + "_lodb");
|
||||
}
|
||||
var idx = nlow.LastIndexOf('_');
|
||||
if (idx > 0)
|
||||
{
|
||||
var str1 = nlow.Substring(0, idx);
|
||||
var idx2 = str1.LastIndexOf('_');
|
||||
if (idx2 > 0)
|
||||
{
|
||||
var str3 = str2 + "_" + i.ToString().PadLeft(2, '0');
|
||||
//JenkIndex.Ensure(str3);
|
||||
JenkIndex.Ensure(str3 + "_lod");
|
||||
var str2 = str1.Substring(0, idx2);
|
||||
JenkIndex.Ensure(str2 + "_lod");
|
||||
var maxi = 100;
|
||||
for (int i = 1; i <= maxi; i++)
|
||||
{
|
||||
var str3 = str2 + "_" + i.ToString().PadLeft(2, '0');
|
||||
//JenkIndex.Ensure(str3);
|
||||
JenkIndex.Ensure(str3 + "_lod");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nlow.EndsWith(".awc")) //create audio container path hashes...
|
||||
{
|
||||
string[] parts = entry.Path.Split('\\');
|
||||
int pl = parts.Length;
|
||||
if (pl > 2)
|
||||
if (nlow.EndsWith(".awc")) //create audio container path hashes...
|
||||
{
|
||||
string fn = parts[pl - 1];
|
||||
string fd = parts[pl - 2];
|
||||
string hpath = fn.Substring(0, fn.Length - 4);
|
||||
if (fd.EndsWith(".rpf"))
|
||||
string[] parts = entry.Path.Split('\\');
|
||||
int pl = parts.Length;
|
||||
if (pl > 2)
|
||||
{
|
||||
fd = fd.Substring(0, fd.Length - 4);
|
||||
}
|
||||
hpath = fd + "/" + hpath;
|
||||
if (parts[pl - 3] != "sfx")
|
||||
{ }//no hit
|
||||
|
||||
JenkIndex.Ensure(hpath);
|
||||
}
|
||||
}
|
||||
if (nlow.EndsWith(".nametable"))
|
||||
{
|
||||
RpfBinaryFileEntry binfe = entry as RpfBinaryFileEntry;
|
||||
if (binfe != null)
|
||||
{
|
||||
byte[] data = file.ExtractFile(binfe);
|
||||
if (data != null)
|
||||
{
|
||||
sb.Clear();
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
string fn = parts[pl - 1];
|
||||
string fd = parts[pl - 2];
|
||||
string hpath = fn.Substring(0, fn.Length - 4);
|
||||
if (fd.EndsWith(".rpf"))
|
||||
{
|
||||
byte c = data[i];
|
||||
if (c == 0)
|
||||
fd = fd.Substring(0, fd.Length - 4);
|
||||
}
|
||||
hpath = fd + "/" + hpath;
|
||||
if (parts[pl - 3] != "sfx")
|
||||
{ }//no hit
|
||||
|
||||
JenkIndex.Ensure(hpath);
|
||||
}
|
||||
}
|
||||
if (nlow.EndsWith(".nametable"))
|
||||
{
|
||||
RpfBinaryFileEntry binfe = entry as RpfBinaryFileEntry;
|
||||
if (binfe != null)
|
||||
{
|
||||
byte[] data = file.ExtractFile(binfe);
|
||||
if (data != null)
|
||||
{
|
||||
sb.Clear();
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
{
|
||||
string str = sb.ToString();
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
byte c = data[i];
|
||||
if (c == 0)
|
||||
{
|
||||
string strl = str.ToLowerInvariant();
|
||||
//JenkIndex.Ensure(str);
|
||||
JenkIndex.Ensure(strl);
|
||||
string str = sb.ToString();
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
{
|
||||
string strl = str.ToLowerInvariant();
|
||||
//JenkIndex.Ensure(str);
|
||||
JenkIndex.Ensure(strl);
|
||||
|
||||
////DirMod_Sounds_ entries apparently can be used to infer SP audio strings
|
||||
////no luck here yet though
|
||||
//if (strl.StartsWith("dirmod_sounds_") && (strl.Length > 14))
|
||||
//{
|
||||
// strl = strl.Substring(14);
|
||||
// JenkIndex.Ensure(strl);
|
||||
//}
|
||||
////DirMod_Sounds_ entries apparently can be used to infer SP audio strings
|
||||
////no luck here yet though
|
||||
//if (strl.StartsWith("dirmod_sounds_") && (strl.Length > 14))
|
||||
//{
|
||||
// strl = strl.Substring(14);
|
||||
// JenkIndex.Ensure(strl);
|
||||
//}
|
||||
}
|
||||
sb.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append((char)c);
|
||||
}
|
||||
sb.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append((char)c);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user