This repository has been archived by the owner on Apr 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparsing.js
1907 lines (1867 loc) · 120 KB
/
parsing.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const fs = require('fs')
const path = require('path')
const rimraf = require('rimraf')
module.exports = () => {
var patchDate = require(path.join(__dirname, 'patchDate.json'))['patchDate']
var language = 'english'
var statEnum = require(path.join(__dirname, 'StatEnum.json'))
var categoryEnum = require(path.join(__dirname, 'AICategoryEnum.json'))
var elementEnum = require(path.join(__dirname, 'ElementalEnum.json'))
var itemClassEnum = require(path.join(__dirname, 'ItemClassEnum.json'))
var classEnum = require(path.join(__dirname, 'ClassEnum.json'))
var craftingCategoryEnum = require(path.join(__dirname, 'CraftingCategoryEnum.json'))
var craftingRarityEnumAndValue = require(path.join(__dirname, 'CraftingRarityEnumAndValue.json'))
var soundListEnum = require(path.join(__dirname, 'SoundListEnum.json'))
var statusEffectEnum = require(path.join(__dirname, 'StatusEffectTypeEnum.json'))
var ancestralRarityEnum = require(path.join(__dirname, 'AncestralRarityEnum.json'))
var itemModifierCategoryEnum = require(path.join(__dirname, 'ItemModifierCategoryEnum.json'))
var npcCategoryEnum = require(path.join(__dirname, 'NPCCategoryEnum.json'))
var fileNameMap = require(path.join(__dirname, 'Raw data', patchDate, 'map.json'))
var procTriggerEnum = require(path.join(__dirname, 'ProcTriggerEnum.json'))
var procTriggerActionEnum = require(path.join(__dirname, 'ProcTriggerActionEnum.json'))
var procTriggerChanceSourceEnum = require(path.join(__dirname, 'ProcTriggerChanceSourceEnum.json'))
var biomeTypeEnum = require(path.join(__dirname, 'BiomeTypeEnum.json'))
var translate = require(path.join(__dirname, `${language}.json`))
let folder = {
'ItemDefinition': path.join(__dirname, 'Raw data', patchDate, 'ItemDefinition'),
'Monster': path.join(__dirname, 'Raw data', patchDate, 'Monster'),
'LootTable': path.join(__dirname, 'Raw data', patchDate, 'LootTable'),
'Other': path.join(__dirname, 'Raw data', patchDate, 'Other'),
'Ancestral': path.join(__dirname, 'Raw data', patchDate, 'Ancestral'),
'CraftingRecipe': path.join(__dirname, 'Raw data', patchDate, 'CraftingRecipe'),
'ItemModifier': path.join(__dirname, 'Raw data', patchDate, 'ItemModifier'),
'LootBox': path.join(__dirname, 'Raw data', patchDate, 'LootBox'),
'NPC': path.join(__dirname, 'Raw data', patchDate, 'NPC'),
'Player': path.join(__dirname, 'Raw data', patchDate, 'Player'),
'Challenge': path.join(__dirname, 'Raw data', patchDate, 'Challenge'),
'SpawnerDef': path.join(__dirname, 'Raw data', patchDate, 'SpawnerDef'),
'WeeklyChallenge': path.join(__dirname, 'Raw data', patchDate, 'WeeklyChallenge'),
'StatusEffect': path.join(__dirname, 'Raw data', patchDate, 'StatusEffect')
//'Quest': path.join(__dirname, 'Raw data', patchDate, 'Quest')
}
var mono = '0 MonoBehaviour Base'
var game = '0 GameObject Base'
var fileID = '0 int m_FileID'
var pathID = '0 SInt64 m_PathID'
var pairData = '0 pair data'
var componentSecond = '0 PPtr<Component> second'
var ptrGameObject = '0 PPtr<GameObject> m_GameObject'
var ptrGameObjectData = '0 PPtr<$GameObject> data'
var array = '0 Array Array'
var stringName = '1 string m_Name'
var vectorComponent = '0 vector m_Component'
function hasFlag(a, b) {
return (a & b) === b;
}
if (!fs.existsSync(path.join(__dirname, 'Patch'))) {
fs.mkdirSync(path.join(__dirname, 'Patch'), { recursive: true })
} else {
rimraf.sync(path.join(__dirname, 'Patch'))
fs.mkdirSync(path.join(__dirname, 'Patch'), { recursive: true })
}
function fileMap(num) {
/**
* 4 = 0
* 0 = 4
* Should only be added if you only selected the one file in UABE named sharedassets2.assets.
* if (num === 0) num = 4
* else if (num === 4) num = 0
*/
return fileNameMap.files.find(v => v.absFileID === num)['name'] + '-'
}
function statusEffect(f, z) {
if (f) f[mono]['0 PPtr<$StatusEffect> StatusEffect'] = f[mono]['0 PPtr<$StatusEffect> StatusEffect'] ? f[mono]['0 PPtr<$StatusEffect> StatusEffect'] : f[mono]['0 PPtr<$StatusEffect> statusEffect']
let s = z ? z : require(path.join(folder['StatusEffect'], fileMap(f[mono]['0 PPtr<$StatusEffect> StatusEffect'][fileID]) + f[mono]['0 PPtr<$StatusEffect> StatusEffect'][pathID] + '.json'))
let go = require(path.join(folder['Other'], fileMap(s[mono][ptrGameObject][fileID]) + s[mono][ptrGameObject][pathID] + '.json'))
return {
name: s[mono]['1 string Name'].length > 0 ? (s[mono]['1 string Name'].startsWith('string') ? translate[s[mono]['1 string Name']] : s[mono]['1 string Name']) : go[game][stringName],
alias: (s[mono]['1 string Name'].length > 0 ? (s[mono]['1 string Name'].startsWith('string') ? translate[s[mono]['1 string Name']] : s[mono]['1 string Name']) : go[game][stringName]) !== go[game][stringName] ? go[game][stringName] : undefined,
floatingText: s[mono]['1 string floatingText'] || undefined,
type: Object.keys(statusEffectEnum).map(e => {
if (statusEffectEnum[e] === s[mono]['0 int Type']) return e
else return undefined
}).filter(Boolean).join(''),
duration: parseFloat(s[mono]['0 float Duration'].toFixed(2)),
stats: s[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
}),
relatedLevelStat: s[mono]['0 int RelatedLevelStat'] > -1 ? Object.keys(statEnum).map(e => {
if (statEnum[e] === s[mono]['0 int RelatedLevelStat']) return e
else return undefined
}).filter(Boolean).join('') : undefined,
characterEffectPrefab: s[mono]['0 PPtr<$GameObject> CharacterEffectPrefab'][pathID] ? {
name: require(path.join(folder['Other'], fileMap(s[mono]['0 PPtr<$GameObject> CharacterEffectPrefab'][fileID]) + s[mono]['0 PPtr<$GameObject> CharacterEffectPrefab'][pathID] + '.json'))[game][stringName]
} : undefined,
projectile: s[mono]['0 int Projectile'] > -1 ? s[mono]['0 int Projectile'] : undefined,
// skin: {},
// ignoreIf : s[mono]['0 Array IgnoreIf'].length > 0 ? s[mono]['0 int Projectile'][array].map(v => {
//
// return statusEffect()
// }) : undefined,
// overwrite: s[mono]['0 Array Overwrite'].length > 0 ? s[mono]['0 Array Overwrite'].map(v => {
// return statusEffect()
// }) : undefined,
nextStackingStatusEffect: s[mono]['0 PPtr<$StatusEffect> NextStackingStatusEffect'][pathID]
? statusEffect(null, require(path.join(folder['StatusEffect'], fileMap(s[mono]['0 PPtr<$StatusEffect> NextStackingStatusEffect'][fileID]) + s[mono]['0 PPtr<$StatusEffect> NextStackingStatusEffect'][pathID] + '.json')))
: undefined,
statusEffectOnExpire: s[mono]['0 PPtr<$StatusEffect> StatusEffectOnExpire'][pathID]
? statusEffect(null, require(path.join(folder['StatusEffect'], fileMap(s[mono]['0 PPtr<$StatusEffect> StatusEffectOnExpire'][fileID]) + s[mono]['0 PPtr<$StatusEffect> StatusEffectOnExpire'][pathID] + '.json')))
: undefined,
disableSpecialAbility: !!s[mono]['1 UInt8 DisableSpecialAbility'] || undefined,
doesNotStackWithSelf: !!s[mono]['1 UInt8 DoesntStackWithSelf'] || undefined,
doNotRefresh: !!s[mono]['1 UInt8 DoNotRefresh'] || undefined,
hasLevels: !!s[mono]['1 UInt8 HasLevels'] || undefined,
isAccountWide: !!s[mono]['1 UInt8 IsAccountWide'] || undefined,
trackedForChallenge: !!s[mono]['1 UInt8 TrackedForChallenge'] || undefined,
ignoreDurationModifiers: (typeof s[mono]['1 UInt8 IgnoreDurrationModifiers'] === 'number' ? !!s[mono]['1 UInt8 IgnoreDurrationModifiers'] : !!s[mono]['1 UInt8 IgnoreDurationModifiers']) || undefined,
isBuff: !!s[mono]['1 UInt8 IsBuff'] || undefined,
removeOnAttack: !!s[mono]['1 UInt8 RemoveOnAttack'] || undefined,
coolDownTime: s[mono]['0 float CoolDownTime'] ? parseFloat(s[mono]['0 float CoolDownTime'].toFixed(2)) : undefined,
noTimeOut: !!s[mono]['1 UInt8 NoTimeOut'] || undefined,
flashDuration: s[mono]['0 float flashDuration'] ? parseFloat(s[mono]['0 float flashDuration'].toFixed(2)) : undefined,
isFullscreenFlash: s[mono]['0 float flashDuration'] ? !!s[mono]['1 UInt8 fullscreenFlash'] : undefined
}
}
function projectile (f, z) {
return {
projectile: {
name: require(path.join(folder['Other'], fileMap(f[mono][ptrGameObject][fileID]) + f[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
projectileName: f[mono]['1 string ProjectileName'],
rotationSpeed: f[mono]['0 float RotationSpeed'] ? parseFloat(f[mono]['0 float RotationSpeed'].toFixed(2)) : undefined,
orbitSpeed: f[mono]['0 float orbitSpeed'] ? parseFloat(f[mono]['0 float orbitSpeed'].toFixed(2)) : undefined,
launchOffset: f[mono]['0 Vector2f launchOffset'] ? {
x: parseFloat(f[mono]['0 Vector2f launchOffset']['0 float x'].toFixed(2)),
y: parseFloat(f[mono]['0 Vector2f launchOffset']['0 float y'].toFixed(2))
} : undefined,
launchOffsetDistance: f[mono]['0 float launchOffsetDistance'] ? parseFloat(f[mono]['0 float launchOffsetDistance'].toFixed(2)) : undefined,
lightScale: f[mono]['0 float LightScale'] ? parseFloat(f[mono]['0 float LightScale'].toFixed(2)) : undefined,
tangentProjectileFireRate: f[mono]['0 float TangentProjectileFireRate'] ? parseFloat(f[mono]['0 float TangentProjectileFireRate'].toFixed(2)) : undefined,
waveFrequency: f[mono]['0 float WaveFrequency'] ? parseFloat(f[mono]['0 float WaveFrequency'].toFixed(2)) : undefined,
nextProjectileIndex: f[mono]['0 int NextProjectileIndex'] > -1 ? f[mono]['0 int NextProjectileIndex'] : undefined,
tangentProjectileIndex: f[mono]['0 int TangentProjectileIndex'] > -1 ? f[mono]['0 int TangentProjectileIndex'] : undefined,
repeatHitTime: f[mono]['0 float RepeatHitTime'] ? parseFloat(f[mono]['0 float RepeatHitTime'].toFixed(2)) : undefined,
alignToDirection: !!f[mono]['1 UInt8 AlignToDirection'] || undefined,
isNextProjectileGlobal: !!f[mono]['1 UInt8 IsNextProjectileGlobal'] || undefined,
isTangentProjectileGlobal: !!f[mono]['1 UInt8 IsTangentProjectileGlobal'] || undefined,
maintainOrbitRange: !!f[mono]['1 UInt8 maintainOrbitRange'] || undefined,
ownerRelative: !!f[mono]['1 UInt8 OwnerRelative'] || undefined,
sineWaveMotion: !!f[mono]['1 UInt8 SineWaveMotion'] || undefined,
/** MISSING
* 0 PPtr<$GAMEOBJECT> ESSENCEPARTICLE,
* 0 PPtr<$GAMEOBJECT> EXPLOSION,
* 0 PPtr<$GAMEOBJECT> FIZZLE,
* 0 PPtr<$GAMEOBJECT> LIGHTPREFAB,
* 0 PPtr<$SOUNDLIST> PROJECTILESPAWNER,
* 0 PPtr<$TILESYSTEMBODY2D> body
* 1 UInt16 DefIndex
*/
essenceDamageMultiplier: f[mono]['0 float EssenceDamageMultiplier'] ? parseFloat(f[mono]['0 float EssenceDamageMultiplier'].toFixed(2)) : undefined, // Made constant in patch 2019-02-20
speed: parseFloat(f[mono]['0 float Speed'].toFixed(2)),
acceleration: f[mono]['0 float Acceleration'] ? parseFloat(f[mono]['0 float Acceleration'].toFixed(2)) : undefined,
damage: f[mono]['0 int Damage'],
damageMultiplier: f[mono]['0 float DamageMultiplier'] ? parseFloat(f[mono]['0 float DamageMultiplier'].toFixed(2)) : undefined,
range: parseFloat(f[mono]['0 float Range'].toFixed(2)),
useTargetForRange: !!f[mono]['1 UInt8 UseTargetForRange'] || undefined,
useRandomRange: !!f[mono]['1 UInt8 UseRandomRange'] || undefined,
randomRangeMax: f[mono]['0 float RandomRangeMax'] ? parseFloat(f[mono]['0 float RandomRangeMax'].toFixed(2)) : undefined,
maxHits: f[mono]['0 int MaxHits'],
arcSeparation: f[mono]['0 float ArcSeparation'] ? parseFloat(f[mono]['0 float ArcSeparation'].toFixed(2)) : undefined,
/*maxLifetime: parseFloat(f[mono]['0 float MaxLifetime'].toFixed(2)),*/ // Deleted in patch 2019-02-20
lifeTime: f[mono]['0 float Lifetime'] ? parseFloat(f[mono]['0 float Lifetime'].toFixed(2)) : undefined,
delayRate: f[mono]['0 float DelayRate'] ? parseFloat(f[mono]['0 float DelayRate'].toFixed(2)) : undefined,
rageMultiplier: f[mono]['0 float RageMultiplier'],
bounceBetweenEnemies: !!f[mono]['1 UInt8 BounceBetweenEnemies'],
pierceWorld: !!f[mono]['1 UInt8 PierceWorld'] || undefined,
statusEffect: f[mono]['0 PPtr<$StatusEffect> statusEffect'][pathID]
? statusEffect(f)
: undefined,
color: {
r: parseFloat(f[mono]['0 ColorRGBA LightColor']['0 float r'].toFixed(2)),
g: parseFloat(f[mono]['0 ColorRGBA LightColor']['0 float g'].toFixed(2)),
b: parseFloat(f[mono]['0 ColorRGBA LightColor']['0 float b'].toFixed(2)),
a: parseFloat(f[mono]['0 ColorRGBA LightColor']['0 float a'].toFixed(2)),
}
}
}
}
function collision (f) {
return {
bPlayerProjectile: !!f[mono]['1 UInt8 bPlayerProjectile'] || undefined,
bEnemyProjectile: !!f[mono]['1 UInt8 bEnemyProjectile'] || undefined,
bSlide: !!f[mono]['1 UInt8 bSlide'] || undefined,
bPlayer: !!f[mono]['1 UInt8 bPlayer'] || undefined,
bEnemy: !!f[mono]['1 UInt8 bEnemy'] || undefined,
bSkipWorld: !!f[mono]['1 UInt8 bSkipWorld'] || undefined,
bSlowedDownByWater: !!f[mono]['1 UInt8 bSlowedDownByWater'] || undefined,
bBlockedByLava: !!f[mono]['1 UInt8 bBlockedByLava'] || undefined,
bFlying: !!f[mono]['1 UInt8 bFlying'] || undefined
}
}
let folderName1 = 'ItemDefinition'
if (folder[folderName1]) {
fs.mkdirSync(path.join(__dirname, 'Patch', folderName1))
var count = 0
var announceAtNextCount = 500
fs.readdirSync(folder[folderName1]).forEach(val => {
var file = require(path.join(folder[folderName1], val))
var itemDefinition = {
name: (translate[file[mono]['1 string Name']] || file[mono]['1 string Name']),
alias: (translate[file[mono]['1 string Name']] || file[mono]['1 string Name']) === require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
? undefined
: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
description: file[mono]['1 string Description'].length > 0 ? typeof translate[file[mono]['1 string Description']] === 'string' ? translate[file[mono]['1 string Description']] : file[mono]['1 string Description'] : undefined,
premiumOffer: file[mono]['1 string PremiumOffer'].length > 0 ? (translate[file[mono]['1 string PremiumOffer']] || file[mono]['1 string PremiumOffer']) : undefined,
price: file[mono]['0 int Price'] || undefined,
sellPrice: file[mono]['0 int SellPrice'] || undefined,
consumable: !!file[mono]['1 UInt8 bConsumable'] || undefined,
consumableEffect: file[mono]['0 PPtr<$StatusEffect> ConsumableEffectPrefab'][pathID] ?
statusEffect(null, require(path.join(folder['StatusEffect'], fileMap(file[mono]['0 PPtr<$StatusEffect> ConsumableEffectPrefab'][fileID]) + file[mono]['0 PPtr<$StatusEffect> ConsumableEffectPrefab'][pathID] + '.json')))
: undefined,
requiredLevel: file[mono]['0 int RequiredLevel'],
type: Object.keys(itemClassEnum).map(e => {
if (itemClassEnum[e] === file[mono]['0 int Class']) return e
else return undefined
}).filter(Boolean).join(''),
autoRedeem: !!file[mono]['1 UInt8 autoRedeem'] || undefined,
ability: file[mono]['0 PPtr<$BaseSpecialAbility> Ability'][pathID] ? (function () {
var f = require(path.join(folder['Other'], fileMap(file[mono]['0 PPtr<$BaseSpecialAbility> Ability'][fileID]) + file[mono]['0 PPtr<$BaseSpecialAbility> Ability'][pathID] + '.json'))
return {
name: require(path.join(folder['Other'], fileMap(f[mono][ptrGameObject][fileID]) + f[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
pets: f[mono]['0 Array pets'] && f[mono]['0 Array pets'].length > 0
? f[mono]['0 Array pets'].map(v => {
return {
alias: require(path.join(folder['Other'], fileMap(v['0 Deity.Shared.PetOptions data']['0 PPtr<$GameObject> PetPrefab'][fileID]) + v['0 Deity.Shared.PetOptions data']['0 PPtr<$GameObject> PetPrefab'][pathID] + '.json'))[game][stringName]
}
}) : undefined,
markPrefab: f[mono]['0 PPtr<$GameObject> MarkPrefab'] && f[mono]['0 PPtr<$GameObject> MarkPrefab'][pathID]
? {
alias: require(path.join(folder['Other'], fileMap(f[mono]['0 PPtr<$GameObject> MarkPrefab'][fileID]) + f[mono]['0 PPtr<$GameObject> MarkPrefab'][pathID] + '.json'))[game][stringName]
}
: undefined,
/* f[mono]['0 PPtr<$PlayerOwnedObject> prefab'] Ward, needed? */
projectilesOnActivate: f[mono]['0 Array ProjectilesOnActivate'] && f[mono]['0 Array ProjectilesOnActivate'].length > 0
? f[mono]['0 Array ProjectilesOnActivate'].map(v => {
return v['0 int data']
}) : undefined,
statusEffectsOnActivate: f[mono]['0 Array StatusEffectsOnActivate'] && f[mono]['0 Array StatusEffectsOnActivate'].length > 0
? f[mono]['0 Array StatusEffectsOnActivate'].map(v => {
var z = require(path.join(folder['StatusEffect'], fileMap(v['0 PPtr<$StatusEffect> data'][fileID]) + v['0 PPtr<$StatusEffect> data'][pathID] + '.json'))
return statusEffect(null, z)
}) : undefined,
statusEffectsOnDeactivate: f[mono]['0 Array StatusEffectsOnDeactivate'] && f[mono]['0 Array StatusEffectsOnDeactivate'].length > 0
? f[mono]['0 Array StatusEffectsOnDeactivate'].map(v => {
var z = require(path.join(folder['StatusEffect'], fileMap(v['0 PPtr<$StatusEffect> data'][fileID]) + v['0 PPtr<$StatusEffect> data'][pathID] + '.json'))
return statusEffect(null, z)
}) : undefined,
statusEffectWhenCharging: f[mono]['0 Array StatusEffectsWhenCharging'] && f[mono]['0 Array StatusEffectsWhenCharging'].length > 0
? f[mono]['0 Array StatusEffectsWhenCharging'].map(v => {
var z = require(path.join(folder['StatusEffect'], fileMap(v['0 PPtr<$StatusEffect> data'][fileID]) + v['0 PPtr<$StatusEffect> data'][pathID] + '.json'))
return statusEffect(null, z)
}) : undefined,
chargingProjectileAutoFireRate: f[mono]['0 float ChargingProjectileAutoFireRate'] ? parseFloat(f[mono]['0 float ChargingProjectileAutoFireRate'].toFixed(2)) : undefined,
specialAbilityDuration: f[mono]['0 float SpecialAbilityDuration'] ? parseFloat(f[mono]['0 float SpecialAbilityDuration'].toFixed(2)) : undefined,
timeToPauseAfterCharge: f[mono]['0 float TimeToPauseAfterCharge'] ? parseFloat(f[mono]['0 float TimeToPauseAfterCharge'].toFixed(2)) : undefined,
chargingAnimType: f[mono]['0 int ChargingAnimType'] ? parseFloat(f[mono]['0 int ChargingAnimType'].toFixed(2)) : undefined,
useDelay: f[mono]['0 float UseDelay'] ? parseFloat(f[mono]['0 float UseDelay'].toFixed(2)) : undefined,
projectileIndex: f[mono]['0 int ProjectileIndex'],
minionProjectileIndex: f[mono]['0 int MinionProjectileIndex'] > -1 ? f[mono]['0 int MinionProjectileIndex'] : undefined,
mode: f[mono]['0 int Mode'],
projectileOnDeactivate: f[mono]['0 int ProjectileOnDeactivate'] && f[mono]['0 int ProjectileOnDeactivate'] > -1 ? f[mono]['0 int ProjectileOnDeactivate'] : undefined,
projectileWhenActive: f[mono]['0 int ProjectileWhenActive'] && f[mono]['0 int ProjectileWhenActive'] > -1 ? f[mono]['0 int ProjectileWhenActive'] : undefined,
projectileWhenCharging: f[mono]['0 int ProjectileWhenCharging'] && f[mono]['0 int ProjectileWhenCharging'] > -1 ? f[mono]['0 int ProjectileWhenCharging'] : undefined,
activateSnd: f[mono]['1 string activateSnd'] && f[mono]['1 string activateSnd'].length > 0 ? f[mono]['1 string activateSnd'] : undefined,
aimSnd: f[mono]['1 string aimSnd'] && f[mono]['1 string aimSnd'].length > 0 ? f[mono]['1 string aimSnd'] : undefined,
fireSnd: f[mono]['1 string fireSnd'] && f[mono]['1 string fireSnd'].length > 0 ? f[mono]['1 string fireSnd'] : undefined,
markSnd: f[mono]['1 string markSnd'] && f[mono]['1 string markSnd'].length > 0 ? f[mono]['1 string markSnd'] : undefined,
disableOtherSpecials: !!f[mono]['1 UInt8 disableOtherSpecials'] || undefined,
secondaryTogglesOff: !!f[mono]['1 UInt8 SecondaryTogglesOff'] || undefined,
autoTarget: f[mono]['1 UInt8 AutoTarget'] ? !!f[mono]['1 UInt8 AutoTarget'] : undefined,
range: f[mono]['0 float Range'] ? parseFloat(f[mono]['0 float Range'].toFixed(2)) : undefined,
maxTargets: f[mono]['0 int MaxTargets'] || undefined
}
})() : undefined,
maxStack: file[mono]['0 int MaxStackAmount'],
tier: file[mono]['0 int Tier'],
data: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][vectorComponent][array].map(v => {
if (!fs.existsSync(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))) return undefined
var f = require(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))
if (f[mono] && typeof f[mono]['0 int netObjectType'] === 'number') return undefined
if (f[mono] && f[mono]['0 float CraftingTime'] > 0) {
return {
crafting: {
craftingTime: parseFloat(f[mono]['0 float CraftingTime'].toFixed(2)),
leveledRecipes: f[mono]['0 Array LeveledRecipes'].length > 0
? f[mono]['0 Array LeveledRecipes'].map(v => {
return {
level: v['0 Deity.Shared.Recipe data']['0 int Level'],
craftingTime: parseFloat(v['0 Deity.Shared.Recipe data']['0 float CraftingTime'].toFixed(2)),
requiredItems: v['0 Deity.Shared.Recipe data']['0 Array RequiredItems'].map(v => {
var f = require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.CraftRecipeItem data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.CraftRecipeItem data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))
return {
name: translate[f[mono]['1 string Name']] || f[mono]['1 string Name'],
count: v['0 Deity.Shared.CraftRecipeItem data']['0 unsigned int count'],
requiredLevel: v['0 Deity.Shared.CraftRecipeItem data']['0 unsigned int requiredLevel']
}
}),
craftCost: v['0 Deity.Shared.Recipe data']['0 int CraftCost'],
craftNowCost: v['0 Deity.Shared.Recipe data']['0 int CraftNowCost'],
craftingStat: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Recipe data']['CraftingStat']) return e
else return undefined
}).filter(Boolean).join('')
}
})
: undefined,
requiredItems: f[mono]['0 Array RequiredItems'].map(v => {
var f = require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.CraftRecipeItem data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.CraftRecipeItem data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))
return {
name: translate[f[mono]['1 string Name']] || f[mono]['1 string Name'],
count: v['0 Deity.Shared.CraftRecipeItem data']['0 unsigned int count'],
requiredLevel: v['0 Deity.Shared.CraftRecipeItem data']['0 unsigned int requiredLevel']
}
}),
craftCost: f[mono]['0 int CraftCost'],
craftNowCost: f[mono]['0 int CraftNowCost'],
craftingStat: Object.keys(statEnum).map(e => {
if (statEnum[e] === f[mono]['0 int CraftingStat']) return e
else return undefined
}).filter(Boolean).join(''),
craftingCategory: Object.keys(craftingCategoryEnum).map(e => {
if (craftingCategoryEnum[e] === f[mono]['0 int craftingCategory']) return e
else return undefined
}).filter(Boolean).join('')
}
}
} else if (f[mono] && typeof f[mono]['1 string estimatedPrice'] === 'string') {
return {
sale: {
packName: f[mono]['1 string packName'].length > 0 ? f[mono]['1 string packName'] : undefined,
estimatedPrice: f[mono]['1 string estimatedPrice'],
price: f[mono]['1 string price']
}
}
} else if (f[mono] && f[mono]['1 UInt8 IsAccountBound']) {
return {
isAccountBound: !!f[mono]['1 UInt8 IsAccountBound']
}
} else if (f[mono] && f[mono]['0 Array snds']) {
return {
sounds: f[mono]['0 Array snds'].map(sound => sound['1 string data'])
}
} else if (f[mono] && f[mono]['1 UInt8 isCardPack']) {
return {
isCardPack: !!f[mono]['1 UInt8 isCardPack']
}
} else if (f[mono] && typeof f[mono]['0 float timeToFuse'] === 'number') {
return {
socketableItem: {
craftTime: parseFloat(f[mono]['0 float craftTime'].toFixed(2)),
costToApply: f[mono]['0 int costToApply'],
timeToFuse: parseFloat(f[mono]['0 float timeToFuse'].toFixed(2)),
isGenericCharm: !!f[mono]['1 UInt8 IsGenericCharm'] || undefined
}
}
} else if (f[mono] && f[mono]['0 Array NearbySpawnersToActivate']) {
return {
nearbySpawnersToActivate: {
spawners: f[mono]['0 Array NearbySpawnersToActivate'].map(v => {
var f = require(path.join(folder['Other'], fileMap(v['0 PPtr<$Spawner> data'][fileID]) + v['0 PPtr<$Spawner> data'][pathID] + '.json'))
return {
name: require(path.join(folder['Other'], fileMap(f[mono][ptrGameObject][fileID]) + f[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
}
}),
nearbySpawnerRange: f[mono]['0 int NearbySpawnerRange']
}
}
} else if (f[mono] && f[mono]['0 Array prequisites']) {
return f[mono]['0 Array prequisites'].length > 0 ? {
prequisites: f[mono]['0 Array prequisites'].map(v => {
var f = require(path.join(folder['Other'], fileMap(v['0 PPtr<$Relic> data'][fileID]) + v['0 PPtr<$Relic> data'][pathID] + '.json'))
return {
alias: require(path.join(folder['Other'], fileMap(f[mono][ptrGameObject][fileID]) + f[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
}
})
} : undefined
} else if (f[mono] && f[mono]['0 PPtr<$ItemModifier> temporaryModifierToApply']) {
var f = require(path.join(folder['Other'], fileMap(f[mono]['0 PPtr<$ItemModifier> temporaryModifierToApply'][fileID]) + f[mono]['0 PPtr<$ItemModifier> temporaryModifierToApply'][pathID] + '.json'))
return {
temporaryModifierToApply: {
craftLevelDeduction: f[mono]['0 int craftLevelDeduction'],
nameMod: f[mono]['1 string nameMod'].length > 0 ? translate[f[mono]['1 string nameMod']] || f[mono]['1 string nameMod'] : undefined,
equipmentSet: f[mono]['0 PPtr<$EquipmentSet> Set'][pathID]
? (function () {
var e = require(path.join(folder['Other'], fileMap(f[mono]['0 PPtr<$EquipmentSet> Set'][fileID]) + f[mono]['0 PPtr<$EquipmentSet> Set'][pathID] + '.json'))
return {
name: require(path.join(folder['Other'], fileMap(e[mono][ptrGameObject][fileID]) + e[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
description: translate[e[mono]['1 string Description']] || e[mono]['1 string Description'],
minimumRequiredAmount: e[mono]['0 int minimumNumberOfItemsToEnable'],
stats: e[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
})
}
})()
: undefined,
expireTime: parseFloat(f[mono]['0 float expireTime'].toFixed(2)),
validClasses: Object.keys(classEnum).map(e => {
if (e !== 'None' && classEnum[e] === f[mono]['0 int validEquipMask']) return e
else if (e !== 'None' && hasFlag(f[mono]['0 int validEquipMask'], classEnum[e])) return e
else return undefined
}).filter(Boolean),
type: Object.keys(itemClassEnum).map(e => {
if (e !== 'None' && itemClassEnum[e] === f[mono]['0 int validClasses']) return e
else if (e !== 'None' && hasFlag(f[mono]['0 int validClasses'], itemClassEnum[e])) return e
else return undefined
}).filter(Boolean),
minTier: f[mono]['0 int minTier'],
maxTier: f[mono]['0 int maxTier'],
chanceToApply: parseFloat(f[mono]['0 float chanceToApply'].toFixed(2)),
stats: f[mono]['0 Array stat'].length > 0 ? f[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
}) : undefined,
category: Object.keys(itemModifierCategoryEnum).map(e => {
if (itemModifierCategoryEnum[e] === f[mono]['0 int category']) return e
else return undefined
}).filter(Boolean).join('')
}
}
} else if (f[mono] && f[mono]['1 string emojiCode']) {
return {
emoji: {
displayName: translate[f[mono]['1 string displayName']] || f[mono]['1 string displayName'],
emojiCode: f[mono]['1 string emojiCode']
}
}
} else if (f[mono] && typeof f[mono]['0 int unlockTier'] === 'number') {
return {
unlockTier: f[mono]['0 int unlockTier']
}
} else if (f[mono] && f[mono]['0 PPtr<$Sprite> m_Sprite'] && f[mono]['0 PPtr<$Sprite> m_Sprite'][pathID]) {
var srd = require(path.join(folder['Other'], fileMap(f[mono]['0 PPtr<$Sprite> m_Sprite'][fileID]) + f[mono]['0 PPtr<$Sprite> m_Sprite'][pathID] + '.json'))['0 Sprite Base']['1 SpriteRenderData m_RD']
var s = require(path.join(folder['Other'], fileMap(srd['0 PPtr<Texture2D> texture'][fileID]) + srd['0 PPtr<Texture2D> texture'][pathID] + '.json'))['0 Texture2D Base']
return {
sprite: {
name: s[stringName],
baseSize: {
width: s['0 int m_Width'],
height: s['0 int m_Height']
},
textureRectangle: {
x: parseFloat(srd['0 Rectf textureRect']['0 float x'].toFixed(0)),
y: parseFloat(srd['0 Rectf textureRect']['0 float y'].toFixed(0)),
width: parseFloat(srd['0 Rectf textureRect']['0 float width'].toFixed(0)),
height: parseFloat(srd['0 Rectf textureRect']['0 float height'].toFixed(0))
},
textureOffset: {
x: parseFloat(srd['0 Vector2f textureRectOffset']['0 float x'].toFixed(0)),
y: parseFloat(srd['0 Vector2f textureRectOffset']['0 float y'].toFixed(0))
},
color: {
r: parseFloat(f[mono]['0 ColorRGBA m_Color']['0 float r'].toFixed(2)),
g: parseFloat(f[mono]['0 ColorRGBA m_Color']['0 float g'].toFixed(2)),
b: parseFloat(f[mono]['0 ColorRGBA m_Color']['0 float b'].toFixed(2)),
a: parseFloat(f[mono]['0 ColorRGBA m_Color']['0 float a'].toFixed(2)),
}
}
}
} else return undefined
}).filter(Boolean),
stats: file[mono]['0 Array stat'].length > 0 ? file[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
}) : undefined,
experiencePerLevel: file[mono]['0 Array ExperiencePerLevel'].map(v => {
return v['0 int data']
}),
class: file[mono]['0 int EquipMask'] ? Object.keys(classEnum).map(e => {
if (e !== 'None' && classEnum[e] === file[mono]['0 int EquipMask']) return e
else if (e !== 'None' && hasFlag(file[mono]['0 int EquipMask'], classEnum[e])) return e
else return undefined
}).filter(Boolean) : undefined,
modifiers: file[mono]['0 Array initialModifiers'].length > 0
? file[mono]['0 Array initialModifiers'].map(v => {
var f = require(path.join(folder['Other'], fileMap(v['0 PPtr<$ItemModifier> data'][fileID]) + v['0 PPtr<$ItemModifier> data'][pathID] + '.json'))
if (f[mono] && f[mono]['0 PPtr<$EquipmentSet> Set']) {
return {
nameMod: f[mono]['1 string nameMod'].length > 0 ? translate[f[mono]['1 string nameMod']] || f[mono]['1 string nameMod'] : undefined,
equipmentSet: f[mono]['0 PPtr<$EquipmentSet> Set'][pathID]
? (function () {
var e = require(path.join(folder['Other'], fileMap(f[mono]['0 PPtr<$EquipmentSet> Set'][fileID]) + f[mono]['0 PPtr<$EquipmentSet> Set'][pathID] + '.json'))
return {
name: require(path.join(folder['Other'], fileMap(e[mono][ptrGameObject][fileID]) + e[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
description: translate[e[mono]['1 string Description']] || e[mono]['1 string Description'],
minimumRequiredAmount: e[mono]['0 int minimumNumberOfItemsToEnable'],
stats: e[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
})
}
})()
: undefined,
expireTime: parseFloat(f[mono]['0 float expireTime'].toFixed(2)),
validClasses: Object.keys(classEnum).map(e => {
if (e !== 'None' && classEnum[e] === f[mono]['0 int validEquipMask']) return e
else if (e !== 'None' && hasFlag(f[mono]['0 int validEquipMask'], classEnum[e])) return e
else return undefined
}).filter(Boolean),
type: Object.keys(itemClassEnum).map(e => {
if (e !== 'None' && itemClassEnum[e] === f[mono]['0 int validClasses']) return e
else if (e !== 'None' && hasFlag(f[mono]['0 int validClasses'], itemClassEnum[e])) return e
else return undefined
}).filter(Boolean),
minTier: f[mono]['0 int minTier'],
maxTier: f[mono]['0 int maxTier'],
chanceToApply: parseFloat(f[mono]['0 float chanceToApply'].toFixed(2)),
stats: f[mono]['0 Array stat'].length > 0 ? f[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
}) : undefined
}
} else return undefined
})
: undefined,
bonusDismantleLoot: file[mono]['0 PPtr<$LootTable> BonusDismantleLoot'][pathID]
? (function () {
var lootTable = require(path.join(folder['LootTable'], fileMap(file[mono]['0 PPtr<$LootTable> BonusDismantleLoot'][fileID]) + file[mono]['0 PPtr<$LootTable> BonusDismantleLoot'][pathID] + '.json'))
return require(path.join(folder['Other'], fileMap(lootTable[mono][ptrGameObject][fileID]) + lootTable[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
})()
: undefined,
fusionUpgradeItem: file[mono]['0 PPtr<$ItemDefinition> FusionUpgradeItem'][pathID]
? (function () {
var f = require(path.join(folder['ItemDefinition'], fileMap(file[mono]['0 PPtr<$ItemDefinition> FusionUpgradeItem'][fileID]) + file[mono]['0 PPtr<$ItemDefinition> FusionUpgradeItem'][pathID] + '.json'))[mono]
return translate[f['1 string Name']] || f['1 string Name']
})()
: undefined,
bound: file[mono]['1 UInt8 AlwaysSoulbound'] || file[mono]['1 UInt8 AlwaysAccountbound'] ? {
account: file[mono]['1 UInt8 AlwaysSoulbound'] ? !!file[mono]['1 UInt8 AlwaysSoulbound'] : undefined,
soul: file[mono]['1 UInt8 AlwaysAccountbound'] ? !!file[mono]['1 UInt8 AlwaysAccountbound'] : undefined
} : undefined,
isHeirloom: file[mono]['1 UInt8 IsHeirloomItem'] ? !!file[mono]['1 UInt8 IsHeirloomItem'] : undefined,
requiresDiscovery: file[mono]['1 UInt8 RequiresDiscovery'] ? !!file[mono]['1 UInt8 RequiresDiscovery'] : undefined,
recoverCost: file[mono]['0 int RecoverCost'] || undefined,
insureCost: file[mono]['0 int InsureCost'] || undefined,
currency: file[mono]['0 PPtr<$GameObject> Currency'][pathID]
? require(path.join(folder['Other'], fileMap(file[mono]['0 PPtr<$GameObject> Currency'][fileID]) + file[mono]['0 PPtr<$GameObject> Currency'][pathID] + '.json'))[game][stringName]
: undefined,
coolDown: parseFloat(file[mono]['0 float CoolDown'].toFixed(2)) ? parseFloat(file[mono]['0 float CoolDown'].toFixed(2)) : undefined,
craftNowCostMultiplier: parseFloat(file[mono]['0 float CraftNowCostMultiplier'].toFixed(2)) === 1 ? undefined : parseFloat(file[mono]['0 float CraftNowCostMultiplier'].toFixed(2)),
modifierChance: parseFloat(file[mono]['0 float ModifierChance'].toFixed(2)),
craftingRarity: file[mono]['0 int craftingRarity']
? [
craftingRarityEnumAndValue[Object.keys(craftingRarityEnumAndValue)[file[mono]['0 int craftingRarity']]],
Object.keys(craftingRarityEnumAndValue)[file[mono]['0 int craftingRarity']]
]
: undefined,
doesNotCountTowardMax: file[mono]['1 UInt8 DoesntCountTowardMax'] ? !!file[mono]['1 UInt8 DoesntCountTowardMax'] : undefined
}
var filename = path.join(__dirname, 'Patch', folderName1, `${itemDefinition.name.replace(/[\/\?\<\>\\\:\*\|\"]/g, '')}.json`)
if (fs.existsSync(filename)) {
var file = JSON.parse(fs.readFileSync(filename, 'utf-8'))
file.push(itemDefinition)
fs.writeFileSync(filename, JSON.stringify(file, null, 2))
} else fs.writeFileSync(filename, JSON.stringify([itemDefinition], null, 2))
count++
if (count === announceAtNextCount) {
announceAtNextCount += 500
console.log(folderName1, 'at', count, '...')
}
})
console.log(folderName1, 'completed', 'at', count)
}
let folderName2 = 'LootTable'
if (folder[folderName2]) {
fs.mkdirSync(path.join(__dirname, 'Patch', folderName2))
var count = 0
var announceAtNextCount = 500
fs.readdirSync(folder[folderName2]).forEach(val => {
var file = require(path.join(folder[folderName2], val))
var lootTable = {
from: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
guaranteeItemCount: file[mono]['0 int guaranteeItemCount'],
maximumItemCount: file[mono]['0 int maximumItemCount'],
lootTable: file[mono]['0 Array lootTable'].map(v => {
return {
item: translate[require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))[mono]['1 string Name']] || require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))[mono]['1 string Name'],
count: {
dice: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int dice'],
faces: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int faces'],
add: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int add']
},
chance: v['0 Deity.Shared.LootEntry data']['0 double chance'],
allowModifiers: !!v['0 Deity.Shared.LootEntry data']['1 UInt8 allowModifiers'] || undefined
}
}),
reference: file[mono]['0 PPtr<$LootTable> ReferenceObject'][pathID] > 0
? (function () {
var lootTable = require(path.join(folder['LootTable'], fileMap(file[mono]['0 PPtr<$LootTable> ReferenceObject'][fileID]) + file[mono]['0 PPtr<$LootTable> ReferenceObject'][pathID] + '.json'))
return require(path.join(folder['Other'], fileMap(lootTable[mono][ptrGameObject][fileID]) + lootTable[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
})()
: undefined,
questLootTable: file[mono]['0 PPtr<$GameObject> questTargetTrigger'] && file[mono]['0 PPtr<$GameObject> questTargetTrigger'][pathID] > 0
? (function () {
var lootTable = require(path.join(folder['Other'], fileMap(file[mono]['0 PPtr<$GameObject> questTargetTrigger'][fileID]) + file[mono]['0 PPtr<$GameObject> questTargetTrigger'][pathID] + '.json'))[game]
return {
name: lootTable[stringName]
}
})()
: undefined
}
var filename = path.join(__dirname, 'Patch', folderName2, `${lootTable.from}.json`)
if (fs.existsSync(filename)) {
var file = JSON.parse(fs.readFileSync(filename, 'utf-8'))
file.push(lootTable)
fs.writeFileSync(filename, JSON.stringify(file, null, 2))
} else fs.writeFileSync(filename, JSON.stringify([lootTable], null, 2))
count++
if (count === announceAtNextCount) {
announceAtNextCount += 500
console.log(folderName2, 'at', count, '...')
}
})
console.log(folderName2, 'completed', 'at', count)
}
let folderName3 = 'Monster'
if (folder[folderName3]) {
fs.mkdirSync(path.join(__dirname, 'Patch', folderName3))
var count = 0
var announceAtNextCount = 500
fs.readdirSync(folder[folderName3]).forEach(val => {
var file = require(path.join(folder[folderName3], val))
var monsterInfo = {
name: file[mono]['1 string MonsterName'].length > 0
? (translate[file[mono]['1 string MonsterName']] || file[mono]['1 string MonsterName'])
: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
alias: file[mono]['1 string MonsterName'].length > 0
? (translate[file[mono]['1 string MonsterName']] || file[mono]['1 string MonsterName']) === require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
? undefined
: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
: undefined,
description: file[mono]['1 string MonsterDescription'].length > 0 ? translate[file[mono]['1 string MonsterDescription']] || file[mono]['1 string MonsterDescription'] : undefined,
isBoss: !!file[mono]['1 UInt8 IsBoss'] || undefined,
isElite: !!file[mono]['1 UInt8 IsElite'] || undefined,
isSetPieceMonster: !!file[mono]['1 UInt8 IsSetPieceMonster'] || undefined,
weapons: file[mono]['0 Array WeaponPrefabs'].map(v => {
if (!fs.existsSync(path.join(folder['Other'], fileMap(v[ptrGameObjectData][fileID]) + v[ptrGameObjectData][pathID] + '.json'))) return undefined
var w = require(path.join(folder['Other'], fileMap(v[ptrGameObjectData][fileID]) + v[ptrGameObjectData][pathID] + '.json'))
if (w) return {
name: w[game][stringName],
data: w[game][vectorComponent][array].map(v => {
if (!fs.existsSync(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))) return undefined
var f = require(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))
if (f[mono] && f[mono]['1 string ProjectileName']) {
return projectile(f)
} else if (f['0 SpriteRenderer Base'] && f['0 SpriteRenderer Base']['0 PPtr<Sprite> m_Sprite'][pathID]) {
var srd = require(path.join(folder['Other'], fileMap(f['0 SpriteRenderer Base']['0 PPtr<Sprite> m_Sprite'][fileID]) + f['0 SpriteRenderer Base']['0 PPtr<Sprite> m_Sprite'][pathID] + '.json'))['0 Sprite Base']['1 SpriteRenderData m_RD']
var s = require(path.join(folder['Other'], fileMap(srd['0 PPtr<Texture2D> texture'][fileID]) + srd['0 PPtr<Texture2D> texture'][pathID] + '.json'))['0 Texture2D Base']
return {
sprite: {
name: s[stringName],
baseSize: {
width: s['0 int m_Width'],
height: s['0 int m_Height']
},
textureRectangle: {
x: parseFloat(srd['0 Rectf textureRect']['0 float x'].toFixed(0)),
y: parseFloat(srd['0 Rectf textureRect']['0 float y'].toFixed(0)),
width: parseFloat(srd['0 Rectf textureRect']['0 float width'].toFixed(0)),
height: parseFloat(srd['0 Rectf textureRect']['0 float height'].toFixed(0))
},
textureOffset: {
x: parseFloat(srd['0 Vector2f textureRectOffset']['0 float x'].toFixed(0)),
y: parseFloat(srd['0 Vector2f textureRectOffset']['0 float y'].toFixed(0))
},
color: {
r: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float r'].toFixed(2)),
g: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float g'].toFixed(2)),
b: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float b'].toFixed(2)),
a: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float a'].toFixed(2))
}
}
}
} else return undefined
}).filter(Boolean)
}
}).filter(Boolean),
data: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][vectorComponent][array].map(v => {
if (fs.existsSync(path.join(folder['LootTable'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))) {
var f = require(path.join(folder['LootTable'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))
if (f[mono] && (f[mono]['0 Array lootTable'].length > 0 || f[mono]['0 PPtr<$LootTable> ReferenceObject'][pathID] > 0)) {
return {
loot: {
lootTable: {
name: require(path.join(folder['Other'], fileMap(f[mono][ptrGameObject][fileID]) + f[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
},
// ...f[mono]['0 Array lootTable'].length > 0 ? {
// guaranteeItemCount: f[mono]['0 int guaranteeItemCount'],
// maximumItemCount: f[mono]['0 int maximumItemCount'],
// lootTable: f[mono]['0 Array lootTable'].map(v => {
// return {
// item: translate[require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))[mono]['1 string Name']] || require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))[mono]['1 string Name'],
// count: {
// dice: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int dice'],
// faces: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int faces'],
// add: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int add']
// },
// chance: v['0 Deity.Shared.LootEntry data']['0 double chance'],
// allowModifiers: !!v['0 Deity.Shared.LootEntry data']['1 UInt8 allowModifiers']
// }
// })
// } : undefined
}
}
}
}
if (!fs.existsSync(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))) return undefined
var f = require(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))
if (f[mono] && typeof f[mono]['0 int netObjectType'] === 'number') return undefined
else if (f[mono] && f[mono]['0 Array stat'] && f[mono]['0 Array stat'].length > 0) {
return {
stats: f[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
})
}
} else if (f[mono] && f[mono]['0 Deity.Shared.CollisionShape shape']) {
return collision(f)
} else if (f['0 SpriteRenderer Base'] && f['0 SpriteRenderer Base']['0 PPtr<Sprite> m_Sprite'][pathID]) {
var srd = require(path.join(folder['Other'], fileMap(f['0 SpriteRenderer Base']['0 PPtr<Sprite> m_Sprite'][fileID]) + f['0 SpriteRenderer Base']['0 PPtr<Sprite> m_Sprite'][pathID] + '.json'))['0 Sprite Base']['1 SpriteRenderData m_RD']
var s = require(path.join(folder['Other'], fileMap(srd['0 PPtr<Texture2D> texture'][fileID]) + srd['0 PPtr<Texture2D> texture'][pathID] + '.json'))['0 Texture2D Base']
return {
sprite: {
name: s[stringName],
baseSize: {
width: s['0 int m_Width'],
height: s['0 int m_Height']
},
textureRectangle: {
x: parseFloat(srd['0 Rectf textureRect']['0 float x'].toFixed(0)),
y: parseFloat(srd['0 Rectf textureRect']['0 float y'].toFixed(0)),
width: parseFloat(srd['0 Rectf textureRect']['0 float width'].toFixed(0)),
height: parseFloat(srd['0 Rectf textureRect']['0 float height'].toFixed(0))
},
textureOffset: {
x: parseFloat(srd['0 Vector2f textureRectOffset']['0 float x'].toFixed(0)),
y: parseFloat(srd['0 Vector2f textureRectOffset']['0 float y'].toFixed(0))
},
color: {
r: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float r'].toFixed(2)),
g: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float g'].toFixed(2)),
b: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float b'].toFixed(2)),
a: parseFloat(f['0 SpriteRenderer Base']['1 ColorRGBA m_Color']['0 float a'].toFixed(2))
}
}
}
} else if (f[mono] && f[mono]['0 Array snds'] && f[mono]['0 Array snds'].length > 0) {
return {
sound: {
soundType: Object.keys(soundListEnum).map(e => {
if (soundListEnum[e] === f[mono]['0 int soundListType']) return e
else return undefined
}).filter(Boolean).join(''),
sounds: f[mono]['0 Array snds'].map(v => {
return v['1 string data']
}),
}
}
} else if (f[mono] && f[mono]['0 Array healthDialogue'] && f[mono]['0 Array healthDialogue'].length > 0) {
return {
healthDialogue: f[mono]['0 Array healthDialogue'].map(v => {
return {
healthPercentage: parseFloat(v['0 Deity.HealthDialogue data']['0 float percentage'].toFixed(2)),
message: translate[v['0 Deity.HealthDialogue data']['1 string dialogue']] || v['0 Deity.HealthDialogue data']['1 string dialogue']
}
})
}
} else if (f[mono] && f[mono]['0 Array dialogue'] && f[mono]['0 Array dialogue'].length > 0) {
return {
dialogue: f[mono]['0 Array dialogue'].map(v => {
var d = require(path.join(folder['Other'], fileMap(v['0 PPtr<$AudioMessage> data'][fileID]) + v['0 PPtr<$AudioMessage> data'][pathID] + '.json'))[mono]
return {
name: require(path.join(folder['Other'], fileMap(d[ptrGameObject][fileID]) + d[ptrGameObject][pathID] + '.json'))[game][stringName],
message: translate[d['1 string message']] || d['1 string message']
}
})
}
} else if (f[mono] && f[mono]['0 Array lootTable'] && (f[mono]['0 Array lootTable'].length > 0 || f[mono]['0 PPtr<$LootTable> ReferenceObject'][pathID] > 0)) {
return {
loot: {
inheritedLootTable: f[mono]['0 PPtr<$LootTable> ReferenceObject'][pathID] > 0
? (function () {
var lootTable = require(path.join(folder['LootTable'], fileMap(f[mono]['0 PPtr<$LootTable> ReferenceObject'][fileID]) + f[mono]['0 PPtr<$LootTable> ReferenceObject'][pathID] + '.json'))
return {
name: require(path.join(folder['Other'], fileMap(lootTable[mono][ptrGameObject][fileID]) + lootTable[mono][ptrGameObject][pathID] + '.json'))[game][stringName]
}
})()
: undefined,
...f[mono]['0 Array lootTable'].length > 0 ? {
guaranteeItemCount: f[mono]['0 int guaranteeItemCount'],
maximumItemCount: f[mono]['0 int maximumItemCount'],
lootTable: f[mono]['0 Array lootTable'].map(v => {
return {
item: translate[require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))[mono]['1 string Name']] || require(path.join(folder['ItemDefinition'], fileMap(v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][fileID]) + v['0 Deity.Shared.LootEntry data']['0 PPtr<$ItemDefinition> item'][pathID] + '.json'))[mono]['1 string Name'],
count: {
dice: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int dice'],
faces: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int faces'],
add: v['0 Deity.Shared.LootEntry data']['0 Deity.Shared.DiceParm count']['0 int add']
},
chance: v['0 Deity.Shared.LootEntry data']['0 double chance'],
allowModifiers: !!v['0 Deity.Shared.LootEntry data']['1 UInt8 allowModifiers'] || undefined
}
})
}
: undefined,
questLootTable: f[mono]['0 PPtr<$GameObject> questTargetTrigger'] && f[mono]['0 PPtr<$GameObject> questTargetTrigger'][pathID] > 0
? (function () {
var lootTable = require(path.join(folder['Other'], fileMap(f[mono]['0 PPtr<$GameObject> questTargetTrigger'][fileID]) + f[mono]['0 PPtr<$GameObject> questTargetTrigger'][pathID] + '.json'))[game]
return {
name: lootTable[stringName]
}
})()
: undefined
}
}
} else return undefined
}).filter(Boolean),
zenithEffects: file[mono]['0 Array ZenithEffects'].map(v => {
var z = require(path.join(folder['StatusEffect'], fileMap(v['0 PPtr<$StatusEffect> data'][fileID]) + v['0 PPtr<$StatusEffect> data'][pathID] + '.json'))
return statusEffect(null, z)
}),
category: Object.keys(categoryEnum).map(e => {
if (categoryEnum[e] === file[mono]['0 int Category']) return e
else return undefined
}).filter(Boolean).join(''),
element: Object.keys(elementEnum).map(e => {
if (elementEnum[e] === file[mono]['0 int Element']) return e
else return undefined
}).filter(Boolean).join('')
}
var filename = path.join(__dirname, 'Patch', folderName3, `${monsterInfo.name.replace(/[\/\?\<\>\\\:\*\|\"]/g, '')}.json`)
if (fs.existsSync(filename)) {
var file = JSON.parse(fs.readFileSync(filename, 'utf-8'))
file.push(monsterInfo)
fs.writeFileSync(filename, JSON.stringify(file, null, 2))
} else fs.writeFileSync(filename, JSON.stringify([monsterInfo], null, 2))
count++
if (count === announceAtNextCount) {
announceAtNextCount += 500
console.log(folderName3, 'at', count, '...')
}
})
console.log(folderName3, 'completed', 'at', count)
}
let folderName4 = 'Ancestral'
if (folder[folderName4]) {
fs.mkdirSync(path.join(__dirname, 'Patch', folderName4))
var count = 0
var announceAtNextCount = 500
fs.readdirSync(folder[folderName4]).forEach(val => {
var file = require(path.join(folder[folderName4], val))
var ancestral = {
name: (translate[file[mono]['1 string displayName']] || file[mono]['1 string displayName']),
alias: require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
description: translate[file[mono]['1 string benefitDescription']] || file[mono]['1 string benefitDescription'],
doNotAward: file[mono]['1 UInt8 DoNotAward'] > 0 ? true : false,
data: file[mono][ptrGameObject][pathID]
? require(path.join(folder['Other'], fileMap(file[mono][ptrGameObject][fileID]) + file[mono][ptrGameObject][pathID] + '.json'))[game][vectorComponent][array].map(v => {
if (!fs.existsSync(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))) return undefined
var f = require(path.join(folder['Other'], fileMap(v[pairData][componentSecond][fileID]) + v[pairData][componentSecond][pathID] + '.json'))
if (f[mono] && f[mono]['0 Array triggers']) {
return {
proc: {
name: translate[f[mono][stringName]] || require(path.join(folder['Other'], fileMap(f[mono][ptrGameObject][fileID]) + f[mono][ptrGameObject][pathID] + '.json'))[game][stringName],
description: translate[f[mono]['1 string Description']] || f[mono]['1 string Description'],
counterMax: f[mono]['0 int CounterMax'],
timerValue: parseFloat(f[mono]['0 float TimerValue'].toFixed(2)),
statusEffect: f[mono]['0 PPtr<$StatusEffect> StatusEffect'][pathID]
? statusEffect(f)
: undefined,
/*projectileDamageMultiplier: parseFloat(f[mono]['0 float ProjectileDamageMultiplier'].toFixed(2)),*/ // Obscured by anti-cheat added in 2019-02-20 (? Why).
useAncestralBenefitForDamage: !!f[mono]['0 UInt8 UseAncestralBenefitForDamage'] || undefined,
triggers: f[mono]['0 Array triggers'].length > 0
? f[mono]['0 Array triggers'].map(v => {
return {
trigger: Object.keys(procTriggerEnum).map(e => {
if (procTriggerEnum[e] === v['0 Deity.Shared.ProcTrigger data']['0 int trigger']) return e
else return undefined
}).filter(Boolean).join(''),
chance: parseFloat(v['0 Deity.Shared.ProcTrigger data']['0 double chance'].toFixed(2)),
chanceSource: Object.keys(procTriggerChanceSourceEnum).map(e => {
if (procTriggerChanceSourceEnum[e] === v['0 Deity.Shared.ProcTrigger data']['0 int chanceSource']) return e
else return undefined
}).filter(Boolean).join(''),
action: Object.keys(procTriggerActionEnum).map(e => {
if (procTriggerActionEnum[e] === v['0 Deity.Shared.ProcTrigger data']['0 int action']) return e
else return undefined
}).filter(Boolean).join('')
}
})
: undefined
}
}
} else return undefined
}).filter(Boolean)
: undefined,
validClasses: Object.keys(classEnum).map(e => {
if (e !== 'None' && classEnum[e] === file[mono]['0 int validArchetypes']) return e
else if (e !== 'None' && hasFlag(file[mono]['0 int validArchetypes'], classEnum[e])) return e
else return undefined
}).filter(Boolean),
rarity: Object.keys(ancestralRarityEnum).map(e => {
if (ancestralRarityEnum[e] === file[mono]['0 int rarity']) return e
else return undefined
}).filter(Boolean).join(''),
stats: file[mono]['0 Array stat'].map(v => {
return {
key: Object.keys(statEnum).map(e => {
if (statEnum[e] === v['0 Deity.Shared.Stat data']['0 int key']) return e
else return undefined
}).filter(Boolean).join(''),
equation: v['0 Deity.Shared.Stat data']['1 string equation'],
value: parseFloat(v['0 Deity.Shared.Stat data']['0 float value'].toFixed(2))
}
}),
ordinaries: file[mono]['0 Array ordinaries'].length > 0
? file[mono]['0 Array ordinaries'].map(v => {
if (!fs.existsSync(path.join(folder['Other'], fileMap(v['0 PPtr<$Sprite> data'][fileID]) + v['0 PPtr<$Sprite> data'][pathID]) + '.json')) return undefined
var f = require(path.join(folder['Other'], fileMap(v['0 PPtr<$Sprite> data'][fileID]) + v['0 PPtr<$Sprite> data'][pathID]) + '.json')
if (f['0 Sprite Base'] && f['0 Sprite Base']['1 SpriteRenderData m_RD']['0 PPtr<Texture2D> texture'][pathID]) {
var s = require(path.join(folder['Other'], fileMap(f['0 Sprite Base']['1 SpriteRenderData m_RD']['0 PPtr<Texture2D> texture'][fileID]) + f['0 Sprite Base']['1 SpriteRenderData m_RD']['0 PPtr<Texture2D> texture'][pathID] + '.json'))['0 Texture2D Base']
return {
sprite: {
name: s[stringName],
baseSize: {
width: s['0 int m_Width'],
height: s['0 int m_Height']
},
textureRectangle: {