├── .gitignore ├── Decompiler ├── 3rdEffectFile.py ├── ActionHelper.py ├── Assembler │ ├── Assembler1.py │ ├── Assembler2.py │ └── InstructionTable.py ├── Base │ ├── BaseType.py │ ├── ED6FCBase.py │ ├── EDAOBase.py │ └── compile2pyc.py ├── BattleActionScript.py ├── BattleMonsterStatus.py ├── CompileDirectory.py ├── ED6FCScenaFile.py ├── ED6FCScenarioScript.py ├── ED6ScenarioHelper.py ├── EDAOScenaFile.py ├── EffectFile.py ├── FieldAttackChr.py ├── GameData │ ├── Gen_BonusBox.py │ ├── Gen_ItemNameMap.py │ └── ItemNameMap.py ├── Instruction │ ├── ActionOpTableEDAO.py │ ├── ScenaOpTableED6FC.py │ └── ScenaOpTableEDAO.py ├── NameList2py.py ├── ScenarioHelper.py ├── ScenarioScript.py ├── cleanup.bat ├── declallas.bat ├── declallfcscn.bat ├── declallms.bat ├── declallscn.bat ├── extractsame.py ├── itp2itc.py ├── p │ ├── Arianrhod │ │ ├── Arianrhod_Crafts.py │ │ ├── as90010.dat.py │ │ ├── bface176.itp │ │ ├── bface176.psd │ │ ├── cface176.itp │ │ ├── cface176.psd │ │ ├── chrimg176.itp │ │ ├── chrimg176.psd │ │ ├── chrimg176_text.psd │ │ ├── ea_2.py │ │ ├── fachr176._bn.py │ │ ├── ms90010.py │ │ ├── ms90011.py │ │ ├── sysatk77.eff │ │ └── sysatk77.eff.py │ ├── Campanella │ │ ├── as90020.dat.py │ │ ├── bface177.itp │ │ ├── bface177.psd │ │ └── ms90020.py │ ├── Cassius │ │ ├── Cassius.py │ │ ├── ChrFile.py │ │ ├── SysCraft.py │ │ ├── Voice.py │ │ ├── as04670.py │ │ ├── bgm │ │ │ ├── 20. 儀礼.ogg │ │ │ ├── t_bgm._dt │ │ │ └── time.txt │ │ ├── chr │ │ │ ├── ch93670.itc │ │ │ ├── ch93671.itc │ │ │ ├── ch93672.itc │ │ │ ├── ch94670.itc │ │ │ ├── ch94671.itc │ │ │ ├── ch94672.itc │ │ │ ├── ch94673.itc │ │ │ ├── ch94674.itc │ │ │ ├── ch94675.itc │ │ │ ├── ch94678.itc │ │ │ └── ch94679.itc │ │ ├── effect │ │ │ └── battle │ │ │ │ ├── cr006401.eff │ │ │ │ └── cr006402.eff │ │ ├── ms04670.py │ │ ├── sy04670.png │ │ ├── symbol │ │ │ ├── 2015-04-08-082626.jpg │ │ │ ├── 2015-04-08-095809.jpg │ │ │ └── The-Legend-of-Heroes-Trails-in-the-Sky-Evolution_2015_03-04-15_003.jpg │ │ ├── voice │ │ │ ├── ed7v10000.wav │ │ │ ├── ed7v10001.wav │ │ │ ├── ed7v10002.wav │ │ │ ├── ed7v10003.wav │ │ │ ├── ed7v10004.wav │ │ │ ├── ed7v10005.wav │ │ │ ├── ed7v10006.wav │ │ │ ├── ed7v10007.wav │ │ │ ├── ed7v10008.wav │ │ │ ├── ed7v10009.wav │ │ │ ├── ed7v10010.wav │ │ │ ├── ed7v10011.wav │ │ │ ├── ed7v10012.wav │ │ │ ├── ed7v10013.wav │ │ │ ├── ed7v10014.wav │ │ │ ├── ed7v10015.wav │ │ │ ├── ed7v10016.wav │ │ │ ├── ed7v10017.wav │ │ │ ├── ed7v10018.wav │ │ │ ├── ed7v10019.wav │ │ │ ├── ed7v10020.wav │ │ │ ├── ed7v10021.wav │ │ │ ├── ed7v10022.wav │ │ │ ├── ed7v10023.wav │ │ │ ├── ed7v10024.wav │ │ │ ├── ed7v10025.wav │ │ │ ├── ed7v10026.wav │ │ │ ├── ed7v10026_old.wav │ │ │ ├── ed7v10027.wav │ │ │ ├── ed7v10028.wav │ │ │ ├── ed7v10029.wav │ │ │ ├── ed7v10030.wav │ │ │ ├── ed7v10031.wav │ │ │ ├── ed7v10032.wav │ │ │ ├── ed7v10033.wav │ │ │ ├── ed7v10034.wav │ │ │ ├── ed7v10035.wav │ │ │ ├── ed7v10036.wav │ │ │ ├── ed7v10037.wav │ │ │ ├── reduce_size.bat │ │ │ ├── ここより.wav │ │ │ ├── ここより世界に痛みを.wav │ │ │ └── 世界に痛みを.wav │ │ ├── 百烈击.py │ │ ├── 神罗天征.eff.py │ │ ├── 神罗天征.py │ │ ├── 神罗天征.地面.eff.py │ │ ├── 钢盔回旋踢.py │ │ └── 钢盔断.py │ ├── as90000.dat.py │ ├── build.bat │ ├── buildall.bat │ ├── itp │ │ ├── YamaNeko.exe │ │ ├── battle.itp │ │ ├── bface9999.itp │ │ ├── chrimg9999.itp │ │ └── png8.jsf │ ├── scena │ │ ├── Arianrhod_2nd_battle.py │ │ ├── TiosBed.py │ │ ├── a0000.bin.py │ │ ├── a0000_1.bin.py │ │ ├── a0000_2.bin.py │ │ ├── c0130.特别任务支援科.bin.py │ │ ├── e3020.梅尔卡瓦.bin.py │ │ ├── e302b.羁绊选择.bin.py │ │ ├── e440c.羁绊.bin.py │ │ ├── m1090.bin.py.old │ │ ├── m4000.阿尔泰尔据点.bin.py │ │ └── m4250.红色湿地.bin.py │ ├── t_dbmon.py │ └── t_name.py ├── png32toitx.py └── tools │ ├── itpcnv.exe │ ├── nconvert.exe │ └── pngquant.exe └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.lnk 3 | *.bmp 4 | */.vscode/.ropeproject 5 | /Decompiler2/.idea 6 | -------------------------------------------------------------------------------- /Decompiler/3rdEffectFile.py: -------------------------------------------------------------------------------- 1 | from ml import * 2 | from Base.EDAOBase import * 3 | import xmltodict 4 | 5 | CODE_PAGE = '932' 6 | partDataCount = 16 7 | NameByteArray = BYTE * 16 8 | MagicByteArray = BYTE * 4 9 | 10 | class ED63EffFileHeader(Structure): 11 | _fields_ = [ 12 | ('Texture', NameByteArray * 4), # 0x0000 13 | ('Children', NameByteArray), # 0x0040 14 | ('TexturePtr', PVOID * 4), # 0x0050 15 | ] 16 | # PartData PartData[] # 0x0060 17 | 18 | class EffCoord(Structure): 19 | _fields_ = [ 20 | ('X', FLOAT), 21 | ('Y', FLOAT), 22 | ('Z', FLOAT), 23 | ] 24 | 25 | def serialize(self): 26 | return '%s, %s, %s' % (self.X, self.Y, self.Z) 27 | return OrderedDict([ 28 | ('@X', str(self.X)), 29 | ('@Y', str(self.Y)), 30 | ('@Z', str(self.Z)), 31 | ]) 32 | 33 | def unserialize(self, data): 34 | data = data.split(',') 35 | self.X = FLOAT(float(data[0].strip())) 36 | self.Y = FLOAT(float(data[1].strip())) 37 | self.Z = FLOAT(float(data[2].strip())) 38 | return self 39 | 40 | class PartDataFlags: 41 | NoTextureName = 0x00000001 42 | BlendMode1 = 0x00000002 43 | BlendMode2 = 0x00000004 44 | BlendMode3 = 0x00000040 45 | Culling1 = 0x00000800 46 | Culling2 = 0x00008000 47 | 48 | class ED63PartData(Structure): # 0x03F4 bytes 49 | class _Header(Structure): # 0x0050 bytes 50 | _fields_ = [ 51 | ('Name', NameByteArray), # 0x0000 52 | ('Byte_10', BYTE), # 0x0010 53 | ('Byte_11', BYTE), # 0x0011 54 | ('ExtraCount', BYTE), # 0x0012 55 | ('Byte_13', BYTE), # 0x0013 56 | ('Flags', ULONG), # 0x0014 57 | ('Uint_18', ULONG), # 0x0018 58 | ('Float_1C', FLOAT), # 0x001C 59 | ('Byte_1C', BYTE * 0x1C), # 0x0020 60 | ('Byte_3C', BYTE), # 0x003C 61 | ('Byte_3D', BYTE), # 0x003D 62 | ('TextureIndex', BYTE), # 0x003E 63 | ('Byte_3F', BYTE), # 0x003F 64 | ('Byte_40', BYTE), # 0x0040 65 | ('Byte_41', BYTE), # 0x0041 66 | ('Byte_42', BYTE), # 0x0042 67 | ('Byte_43', BYTE), # 0x0043 68 | ('Coord_44', EffCoord), # 0x0044 69 | ] 70 | 71 | class _Struct_3A4(Structure): 72 | _fields_ = [ 73 | ('Ushort_3A4', USHORT), # 0x03A4 74 | ('Ushort_3A6', USHORT), # 0x03A6 75 | ('Uint_3A8', ULONG), # 0x03A8 76 | ('Uint_3AC', ULONG), # 0x03AC 77 | ('Uint_3B0', ULONG), # 0x03B0 78 | ('Uint_3B4', ULONG), # 0x03B4 79 | ] 80 | 81 | _fields_ = [ 82 | ('Header', _Header), # 0x0000 83 | ('Coord_50', EffCoord), # 0x0050 84 | ('Coord_5C', EffCoord), # 0x005C 85 | ('Float_68', FLOAT), # 0x0068 86 | ('Float_6C', FLOAT), # 0x006C 87 | ('Float_70', FLOAT), # 0x0070 88 | ('Float_74', FLOAT), # 0x0074 89 | ('Uint_78', ULONG), # 0x0078 90 | ('Float_7C', FLOAT), # 0x007C 91 | ('Float_80', FLOAT), # 0x0080 92 | ('Float_84', FLOAT), # 0x0084 93 | ('Float_88', FLOAT), # 0x0088 94 | ('Float_8C', FLOAT), # 0x008C 95 | ('Float_90', FLOAT), # 0x0090 96 | ('Float_94', FLOAT), # 0x0094 97 | ('Float_98', FLOAT), # 0x0098 98 | ('Uint_9C', ULONG), # 0x009C 99 | ('Uint_A0', ULONG), # 0x00A0 100 | ('Coord_A4', EffCoord), # 0x00A4 101 | ('Coord_B0', EffCoord), # 0x00B0 102 | ('Coord_BC', EffCoord), # 0x00BC 103 | ('Ushort_C8', USHORT), # 0x00C8 104 | ('Ushort_CA', USHORT), # 0x00CA 105 | ('Ushort_CC', USHORT), # 0x00CC 106 | ('Ushort_CE', USHORT), # 0x00CE 107 | ('Ushort_D0', USHORT), # 0x00D0 108 | ('Ushort_D2', USHORT), # 0x00D2 109 | ('Uint_D4', ULONG), # 0x00D4 110 | ('Uint_D8', ULONG), # 0x00D8 111 | ('Float_DC', FLOAT * 36), # 0x00DC 112 | ('Float_16C', FLOAT * 36), # 0x016C 113 | ('Float_1FC', FLOAT * 36), # 0x01FC 114 | ('Float_28C', FLOAT * 36), # 0x028C 115 | ('Uint_31C', ULONG * 16), # 0x031C 116 | ('Uint_35C', ULONG * 16), # 0x035C 117 | ('Options', BYTE * 8), # 0x039C 118 | ('Struct_3A4', _Struct_3A4), # 0x039C 119 | 120 | # ED63PartDataExtra[Header.ExtraCount] 121 | ] 122 | 123 | def __init__(self, *args, **kwargs): 124 | super().__init__(*args, **kwargs) 125 | self.extra = [] # ED63PartDataExtra 126 | 127 | class ED63PartDataExtra(Structure): 128 | _fields_ = [ 129 | ('Byte_00', BYTE), 130 | ('Byte_01', BYTE), 131 | ('Byte_02', BYTE), 132 | ('Byte_03', BYTE), 133 | ('Uint_04', ULONG), 134 | ('Uint_08', ULONG), 135 | ('Coord_0C', EffCoord), 136 | ] 137 | 138 | def bytesToString(b): 139 | return bytes(b).split(b'\x00', 1)[0].decode(CODE_PAGE) 140 | 141 | def stringToBytes(s, typ): 142 | return typ.from_buffer_copy((s or '').encode(CODE_PAGE).ljust(ctypes.sizeof(typ), b'\x00')) 143 | 144 | def stringToInt(s): 145 | return int(s, s.lower().startswith('0x') and 16 or 10) 146 | 147 | def stringToFloat(s): 148 | return float(s) if s.lower() != 'nan' else struct.unpack('f', b'\xff\xff\xff\xff')[0] 149 | 150 | def serializeStructure(obj): 151 | if hasattr(obj, 'serialize'): 152 | return obj.serialize() 153 | 154 | p = OrderedDict() 155 | for name, typ in obj._fields_: 156 | value = getattr(obj, name) 157 | 158 | if isinstance(value, Structure): 159 | p[name] = serializeStructure(value) 160 | 161 | elif not isinstance(value, ctypes.Array): 162 | if isinstance(value, int): 163 | value = '0x%X' % value 164 | 165 | p[name] = value 166 | 167 | else: 168 | if typ in (MagicByteArray, NameByteArray): 169 | p[name] = bytesToString(value) 170 | 171 | elif isinstance(value[0], NameByteArray): 172 | p[name] = [bytesToString(v) for v in value] 173 | 174 | else: 175 | p[name] = ', '.join([str(v) for v in value]) 176 | 177 | return p 178 | 179 | def unserializeStructure(obj, data): 180 | if hasattr(obj, 'unserialize'): 181 | obj.unserialize(data) 182 | return 183 | 184 | for name, typ in obj._fields_: 185 | value = getattr(obj, name) 186 | 187 | if isinstance(value, Structure): 188 | unserializeStructure(value, data[name]) 189 | 190 | elif not isinstance(value, ctypes.Array): 191 | if typ is FLOAT: 192 | value = stringToFloat(data[name]) 193 | else: 194 | i = data[name] 195 | value = stringToInt(i) 196 | 197 | setattr(obj, name, typ(value)) 198 | 199 | else: 200 | if typ in (MagicByteArray, NameByteArray): 201 | setattr(obj, name, stringToBytes(data[name], typ)) 202 | 203 | elif isinstance(value[0], NameByteArray): 204 | names = data[name] 205 | for i in range(min(len(value), len(names))): 206 | value[i] = stringToBytes(names[i], NameByteArray) 207 | 208 | else: 209 | values = data[name].split(',') 210 | typ = type(value[0]) 211 | for i, v in enumerate(values): 212 | v = v.strip() 213 | value[i] = stringToFloat(v) if typ is float else stringToInt(v) 214 | 215 | def generateEff(xml): 216 | eff = ED63EffectFile() 217 | eff.loadAndSave(xml) 218 | 219 | class ED63EffectFile: 220 | def __init__(self): 221 | self.header = ED63EffFileHeader() 222 | self.partData = [None for _ in range(partDataCount)] 223 | self.name = '' 224 | 225 | @property 226 | def magic(self): 227 | return bytesToString(self.header.Magic) 228 | 229 | @property 230 | def partDataBits(self): 231 | return self.header.PartDataBits 232 | 233 | @property 234 | def textures(self): 235 | return [bytesToString(t) for t in self.header.Texture] 236 | 237 | @property 238 | def children(self): 239 | return [bytesToString(c) for c in self.header.Children] 240 | 241 | def open(self, efffile): 242 | fs = FileStream(efffile) 243 | self.header = ED63EffFileHeader(fs) 244 | self.name = os.path.basename(efffile) 245 | 246 | for i in range(partDataCount): 247 | if ((1 << i) & self.partDataBits) == 0: 248 | continue 249 | 250 | part = ED63PartData(fs) 251 | self.partData[i] = part 252 | 253 | for i in range(part.Header.ExtraCount): 254 | part.extra.append(ED63PartDataExtra(fs)) 255 | 256 | def saveTo(self, fileName): 257 | xml = OrderedDict() 258 | root = OrderedDict() 259 | parts = [] 260 | 261 | xml['eff'] = root 262 | root['FileName'] = self.name 263 | root['header'] = serializeStructure(self.header) 264 | root['parts'] = {'part': parts} 265 | 266 | for index, part in enumerate(self.partData): 267 | if not part: 268 | parts.append({'@index': str(index)}) 269 | continue 270 | 271 | p = serializeStructure(part) 272 | if part.extra: 273 | p['extraData'] = { 274 | 'extra': [serializeStructure(e) for e in part.extra], 275 | } 276 | 277 | p['@index'] = str(index) 278 | parts.append(p) 279 | 280 | xml = xmltodict.unparse(xml, pretty = True, indent = ' ').splitlines() 281 | xml.insert(0, "xml = '''\\") 282 | xml.append("'''") 283 | 284 | module = os.path.splitext(os.path.basename(__file__))[0] 285 | xml.extend([ 286 | '', 287 | 'def main():', 288 | ' generateEff(xml)', 289 | '', 290 | "if __name__ == '__main__':", 291 | ' from %s import *' % module, 292 | " Try(main)", 293 | "", 294 | ]) 295 | 296 | open(fileName, 'wb').write('\r\n'.join(xml).encode('utf8')) 297 | 298 | def loadAndSave(self, xml): 299 | xml = xmltodict.parse(xml) 300 | root = xml['eff'] 301 | self.name = root['FileName'] 302 | parts = root['parts']['part'] 303 | 304 | unserializeStructure(self.header, root['header']) 305 | for i in range(len(self.partData)): 306 | if ((1 << i) & self.partDataBits) == 0: 307 | continue 308 | 309 | part = ED63PartData() 310 | self.partData[i] = part 311 | unserializeStructure(part, parts[i]) 312 | 313 | try: 314 | extra = parts[i]['extraData']['extra'] 315 | except KeyError: 316 | continue 317 | 318 | if not isinstance(extra, (list, tuple)): 319 | extra = [extra] 320 | 321 | part.Header.ExtraCount = len(extra) 322 | for i in range(len(extra)): 323 | e = ED63PartDataExtra() 324 | unserializeStructure(e, extra[i]) 325 | part.extra.append(e) 326 | 327 | fs = FileStream(os.path.join(os.path.dirname(sys.argv[0]), self.name), 'wb') 328 | fs.Write(bytes(self.header)) 329 | 330 | for part in self.partData: 331 | if not part: 332 | continue 333 | 334 | fs.Write(bytes(part)) 335 | for e in part.extra: 336 | fs.Write(bytes(e)) 337 | 338 | def procfile(file): 339 | print('processing %s' % file) 340 | ms = ED63EffectFile() 341 | ms.open(file) 342 | ms.saveTo(file + '.py') 343 | 344 | if __name__ == '__main__': 345 | TryForEachFileMP(sys.argv[1:], procfile, '*.eff') 346 | -------------------------------------------------------------------------------- /Decompiler/ActionHelper.py: -------------------------------------------------------------------------------- 1 | from BattleActionScript import * 2 | import random 3 | import uuid 4 | 5 | def GenerateUniqueLable(): 6 | return uuid.uuid4().hex 7 | #return '%X' % int(random.random() * 100000000000) 8 | 9 | def JumpToLabelIfHasTarget(label_name): 10 | Jc(0x16, 0x1, 0x0, label_name) 11 | 12 | def Random_Execute(Probability, LabelName): 13 | Jc(0x14, 0x4, Probability, LabelName) 14 | 15 | def ChrSetSize(chr, x, z, y): 16 | AS_8D(0x7, chr, x, z, y) 17 | 18 | def ForeachTargetEx(func, reset = True): 19 | if reset: 20 | ResetTarget() 21 | 22 | foreach_begin = GenerateUniqueLable() 23 | foreach_end = GenerateUniqueLable() 24 | 25 | label(foreach_begin) 26 | 27 | ForeachTarget(foreach_end) 28 | 29 | func() 30 | 31 | NextTarget() 32 | Jump(foreach_begin) 33 | 34 | label(foreach_end) 35 | 36 | def SetCondition(target, buf, rate, time): 37 | AS_8D(0x15, target, buf, rate, time) 38 | 39 | def ClearCondition(target, buf): 40 | AS_8D(0x4B, target, buf, buf != CraftConditionFlags.Vanish and -1 or 0, 0) 41 | 42 | class _ResourceLock: 43 | def __enter__(self): 44 | AS_78(1) 45 | 46 | def __exit__(self, *exc_info): 47 | AS_78(0) 48 | 49 | ResourceLock = _ResourceLock() 50 | del _ResourceLock 51 | 52 | def nativeCall(function, param1 = 0, param2 = 0, param3 = 0, param4 = 0): 53 | AS_8D(function, param1, param2, param3, param4) 54 | 55 | def ReiJiMaiGo(): 56 | nativeCall(0x70) 57 | 58 | def LoadAvatar(msFile): 59 | nativeCall(0x71, BattleScriptFileIndex(msFile).Index()) 60 | -------------------------------------------------------------------------------- /Decompiler/Assembler/Assembler1.py: -------------------------------------------------------------------------------- 1 | from BaseType import * 2 | from InstructionTable import * 3 | 4 | def plog(*args): 5 | pass 6 | 7 | #plog = print 8 | 9 | offsetlist = {} 10 | disasmtbl = {} 11 | fuck = False 12 | 13 | class Disassembler: 14 | def __init__(self, InstructionTable, DiasmInstructionCallback = None): 15 | self.InstructionTable = InstructionTable 16 | self.DiasmInstructionCallback = DiasmInstructionCallback 17 | self.DisasmTable = {} 18 | 19 | def DisasmBlock(self, Stream, InstructionTable = None): 20 | if InstructionTable == None: 21 | InstructionTable = self.InstructionTable 22 | 23 | DisasmTable = self.DisasmTable 24 | 25 | ret = self.DisasmBlockWorker(Stream, InstructionTable, DisasmTable) 26 | 27 | #for offset, inst in DisasmTable.items(): disasmtbl[offset] = inst 28 | 29 | return ret 30 | 31 | def DefaultDisasmInstruction(self, data): 32 | inst = data.Instruction 33 | fs = data.FileStream 34 | entry = data.TableEntry 35 | 36 | for opr in inst.OperandFormat: 37 | inst.Operand.append(entry.GetOperand(opr, fs)) 38 | if opr.lower() == 'o': 39 | inst.BranchTargets.append(inst.Operand[-1]) 40 | 41 | return inst 42 | 43 | def DisasmInstruction(self, data): 44 | inst = data.Instruction 45 | entry = data.TableEntry 46 | 47 | inst.OperandFormat = entry.Operand 48 | 49 | handler = entry.Handler if entry.Handler != None else self.DefaultDisasmInstruction 50 | inst = handler(data) 51 | if inst == None: 52 | inst = self.DefaultDisasmInstruction(data) 53 | 54 | if self.DiasmInstructionCallback: 55 | self.DiasmInstructionCallback(inst, data.FileStream) 56 | 57 | return inst 58 | 59 | def DisasmBlockWorker(self, Stream, InstructionTable, DisasmTable): 60 | pos = Stream.tell() 61 | 62 | if pos in DisasmTable: 63 | inst = DisasmTable[pos] 64 | inst.RefCount += 1 65 | return None 66 | 67 | block = CodeBlock(pos) 68 | block.Name = InstructionTable.GetLabelName(pos) 69 | 70 | plog('block: %08X' % block.Offset) 71 | 72 | blockref = {} 73 | 74 | IsJumpTarget = False 75 | 76 | while True: 77 | pos = Stream.tell() 78 | #if pos in DisasmTable: break 79 | 80 | offsetlist[pos] = True 81 | 82 | print('%08X: ' % pos, end = '') 83 | op = InstructionTable.GetOpCode(Stream) 84 | print('%02X' % op) 85 | 86 | entry = InstructionTable[op] 87 | 88 | plog(' %08X: %s' % (pos, entry.OpName)) 89 | 90 | data = HandlerData(HANDLER_REASON_DISASM) 91 | 92 | data.Instruction = Instruction(op) 93 | data.Instruction.Flags = entry.Flags 94 | data.Instruction.Offset = pos 95 | data.FileStream = Stream 96 | data.TableEntry = entry 97 | data.Disasm = self.DisasmInstruction 98 | 99 | inst = self.DisasmInstruction(data) 100 | 101 | if IsJumpTarget: 102 | inst.RefCount += 1 103 | IsJumpTarget = False 104 | 105 | if inst == None: 106 | raise Exception('disasm op %02X @ %08X failed' % (op, pos)) 107 | 108 | for i in range(pos, Stream.tell()): offsetlist[i] = True 109 | 110 | DisasmTable[inst.Offset] = inst 111 | block.AddInstruction(inst) 112 | 113 | targets = [] 114 | 115 | if inst.Flags.EndBlock: 116 | if len(inst.BranchTargets) == 0: 117 | break 118 | 119 | elif len(inst.BranchTargets) != 1: 120 | raise Exception('end block instruction has multiple branch') 121 | 122 | #Stream.seek(inst.BranchTargets[0]) 123 | #block.Instructions.pop() 124 | #IsJumpTarget = True 125 | #continue 126 | targets = inst.BranchTargets 127 | 128 | elif inst.Flags.StartBlock: 129 | targets = inst.BranchTargets 130 | 131 | if len(targets) == 0: 132 | continue 133 | 134 | inst.BranchTargets = [] 135 | for offset in targets: 136 | blockref[offset] = inst 137 | 138 | plog('block end: %08X' % block.Offset) 139 | 140 | for offset, inst in blockref.items(): 141 | Stream.seek(offset) 142 | newblock = self.DisasmBlockWorker(Stream, InstructionTable, DisasmTable) 143 | if newblock != None: 144 | newblock.Parent = block 145 | block.AddBlock(newblock) 146 | inst.BranchTargets.append(newblock) 147 | 148 | return block 149 | 150 | def DefaultFormatInstruction(self, data): 151 | inst = data.Instruction 152 | entry = data.TableEntry 153 | 154 | opname = entry.OpName 155 | oprlist = entry.FormatAllOperand( 156 | BuildFormatOperandParameterList( 157 | inst.OperandFormat, 158 | inst.Operand, 159 | inst.Flags, 160 | data.LabelMap 161 | ) 162 | ) 163 | 164 | return '%s(%s)' % (opname, oprlist) 165 | 166 | def FormatInstruction(self, data): 167 | inst = data.Instruction 168 | entry = data.TableEntry 169 | 170 | handler = entry.Handler if entry.Handler != None else self.DefaultFormatInstruction 171 | inst = handler(data) 172 | if inst == None: 173 | inst = self.DefaultFormatInstruction(data) 174 | 175 | return inst 176 | 177 | def FormatCodeBlock(self, block, InstructionTable = None, LabeledMap = None): 178 | if InstructionTable == None: 179 | InstructionTable = self.InstructionTable 180 | 181 | if LabeledMap == None: 182 | LabeledMap = {} 183 | 184 | text = [] 185 | 186 | def AddLabel(name): 187 | text.append('') 188 | text.append('label("%s")' % name) 189 | text.append('') 190 | 191 | if block.Offset not in LabeledMap: 192 | AddLabel(block.Name if block.Name != None else InstructionTable.GetLabelName(block.Offset)) 193 | LabeledMap[block.Offset] = block.Name 194 | 195 | for inst in block.Instructions: 196 | 197 | data = HandlerData(HANDLER_REASON_FORMAT) 198 | 199 | data.Instruction = inst 200 | data.TableEntry = InstructionTable[inst.OpCode] 201 | data.Format = self.FormatInstruction 202 | data.LabeledMap = LabeledMap 203 | 204 | #print('%08X' % inst.Offset) 205 | #del disasmtbl[inst.Offset] 206 | 207 | #print('%08X %02X: ' % (inst.Offset, inst.OpCode), end = '') 208 | symbol = self.FormatInstruction(data) 209 | #print(symbol) 210 | 211 | if inst.RefCount != 0: 212 | name = InstructionTable.GetLabelName(inst.Offset) 213 | if inst.Offset not in LabeledMap or name != LabeledMap[inst.Offset]: 214 | AddLabel(name) 215 | 216 | text.append(symbol) 217 | 218 | text.append('') 219 | 220 | for subblock in block.CodeBlocks: 221 | text += self.FormatCodeBlock(subblock, InstructionTable) 222 | 223 | return text 224 | -------------------------------------------------------------------------------- /Decompiler/Assembler/InstructionTable.py: -------------------------------------------------------------------------------- 1 | from Base.EDAOBase import * 2 | 3 | def DefaultOpCodeHandler(data): 4 | entry = data.TableEntry 5 | fs = data.FileStream 6 | inst = data.Instruction 7 | oprs = inst.OperandFormat 8 | values = data.Arguments 9 | 10 | entry.Container.WriteOpCode(fs, inst.OpCode) 11 | 12 | if len(oprs) != len(values): 13 | raise Exception('operand: does not match values') 14 | 15 | for i in range(len(oprs)): 16 | entry.WriteOperand(data, oprs[i], values[i]) 17 | 18 | return inst 19 | 20 | def OpCodeHandlerPrivate(data): 21 | op = data.Instruction.OpCode 22 | entry = data.TableEntry 23 | 24 | handler = entry.Handler if entry.Handler != None else DefaultOpCodeHandler 25 | inst = handler(data) 26 | 27 | if inst == None: 28 | inst = DefaultOpCodeHandler(data) 29 | 30 | return inst 31 | 32 | 33 | HANDLER_REASON_DISASM = 0 34 | HANDLER_REASON_WRITE = 1 35 | HANDLER_REASON_FORMAT = 2 36 | HANDLER_REASON_FUNCTION = 3 37 | HANDLER_REASON_ASSEMBLE = 4 38 | 39 | class HandlerData: 40 | def __init__(self, reason): 41 | self.Reason = reason 42 | self.FileStream = None 43 | self.Instruction = None 44 | self.Arguments = None 45 | self.LabelMap = {} 46 | 47 | # list of LabelEntry 48 | self.Labels = [] 49 | 50 | self.InstructionTable = None 51 | self.TableEntry = None 52 | 53 | self.Disasm = None 54 | self.DisasmBlock = None 55 | self.Format = None 56 | self.Assemble = None 57 | 58 | def CreateBranch(self): 59 | data = HandlerData(self.Reason) 60 | 61 | data.FileStream = self.FileStream 62 | data.Instruction = Instruction() 63 | 64 | data.Labels = [] 65 | data.InstructionTable = self.InstructionTable 66 | data.TableEntry = None 67 | 68 | data.Disasm = self.Disasm 69 | data.DisasmBlock = self.DisasmBlock 70 | data.Format = self.Format 71 | data.Assemble = self.Assemble 72 | 73 | if self.Reason == HANDLER_REASON_FORMAT: 74 | data.LabelMap = self.LabelMap 75 | 76 | return data 77 | 78 | # 79 | # def inst_handler(data): 80 | # 81 | # if data.Reason == HANDLER_REASON_DISASM: 82 | # 83 | # data.fs = BytesStream 84 | # return Instruction object 85 | # 86 | # elif data.Reason == HANDLER_REASON_WRITE: 87 | # 88 | # data.inst = Instruction object 89 | # data.inst.labels.append(LabelEntry('label name', label_offset_in_bytes)) 90 | # return Instruction object 91 | # 92 | # elif data.Reason == HANDLER_REASON_FORMAT: 93 | # 94 | # return 'formatted instruction' 95 | # 96 | # return None 97 | # 98 | 99 | def DefaultGetLabelName(offset): 100 | return 'loc_%X' % offset 101 | 102 | class InstructionTable(dict): 103 | def __init__(self, GetOpCode, WriteOpCode, GetLabelName = DefaultGetLabelName, CodePage = CODE_PAGE): 104 | self.GetOpCode = GetOpCode 105 | self.WriteOpCode = WriteOpCode 106 | self.GetLabelName = GetLabelName 107 | self.CodePage = CodePage 108 | 109 | NO_OPERAND = '' 110 | 111 | class FormatOperandParameter: 112 | def __init__(self, Operand = NO_OPERAND, Value = None, Flags = None, LabelMap = None): 113 | self.Operand = Operand 114 | self.Value = Value 115 | self.Flags = Flags 116 | self.LabelMap = LabelMap if LabelMap != None else {} 117 | 118 | def BuildFormatOperandParameterList(OperandFormats, ValueList, Flags = 0, LabelMap = None): 119 | oprs = list(OperandFormats) 120 | values = ValueList 121 | 122 | if len(oprs) != len(values): 123 | raise Exception('operand: does not match values (%d / %d)' % (len(oprs), len(values))) 124 | 125 | paramlist = [] 126 | for i in range(len(oprs)): 127 | paramlist.append(FormatOperandParameter(oprs[i], values[i], Flags, LabelMap)) 128 | 129 | return paramlist 130 | 131 | class InstructionTableEntry: 132 | def __init__(self, op, name = '', operand = NO_OPERAND, flags = 0, handler = None): 133 | self.OpCode = op 134 | self.OpName = name 135 | self.Operand = operand 136 | self.Flags = InstructionFlags(flags) 137 | self.Handler = handler 138 | self.Container = None 139 | 140 | def WriteOperand(self, data, opr, value): 141 | 142 | fs = data.FileStream 143 | labels = data.Instruction.Labels 144 | 145 | def wlabel(): 146 | labels.append(LabelEntry(value, fs.tell())) 147 | fs.WriteULong(INVALID_OFFSET) 148 | 149 | def wlabelshort(): 150 | labels.append(LabelEntry(value, fs.tell())) 151 | fs.WriteUShort(INVALID_OFFSET) 152 | 153 | oprtype = \ 154 | { 155 | 'c' : lambda : fs.WriteChar(value), 156 | 'C' : lambda : fs.WriteByte(value), 157 | 158 | 'b' : lambda : fs.WriteChar(value), 159 | 'B' : lambda : fs.WriteByte(value), 160 | 161 | 'w' : lambda : fs.WriteShort(value), 162 | 'W' : lambda : fs.WriteUShort(value), 163 | 164 | 'h' : lambda : fs.WriteShort(value), 165 | 'H' : lambda : fs.WriteUShort(value), 166 | 167 | 'l' : lambda : fs.WriteLong(value), 168 | 'L' : lambda : fs.WriteULong(value), 169 | 170 | 'i' : lambda : fs.WriteLong(value), 171 | 'I' : lambda : fs.WriteULong(value), 172 | 173 | 'q' : lambda : fs.WriteLong64(value), 174 | 'Q' : lambda : fs.WriteULong64(value), 175 | 176 | 'f' : lambda : fs.WriteFloat(value), 177 | 'd' : lambda : fs.WriteFloat(value), 178 | 179 | 's' : lambda : fs.Write(value), 180 | 'S' : lambda : fs.Write(value.encode(data.TableEntry.Container.CodePage) + b'\x00'), 181 | 182 | 'o' : wlabelshort, 183 | 'O' : wlabel, 184 | } 185 | 186 | return oprtype[opr]() 187 | 188 | def FormatAllOperand(self, paramlist): 189 | oprs = 0 190 | values = 0 191 | for param in paramlist: 192 | if param.Operand != None: oprs += 1 193 | if param.Value != None: values += 1 194 | 195 | if oprs != values: 196 | raise Exception('operand: does not match values (%d / %d)' % (oprs, values)) 197 | 198 | if oprs == 0: 199 | return '' 200 | 201 | oprtext = self.FormatOperand(paramlist[0]) 202 | 203 | for i in range(1, len(paramlist)): 204 | tmp = ', ' + self.FormatOperand(paramlist[i]) 205 | oprtext += tmp 206 | 207 | return oprtext 208 | 209 | def FormatOperand(self, param): 210 | 211 | labelmap = param.LabelMap 212 | value = param.Value 213 | opr = param.Operand 214 | 215 | oprtype = \ 216 | { 217 | 'c' : lambda : '%d' % value, 218 | 'C' : lambda : '%d' % value, 219 | 220 | 'b' : lambda : '0x%X' % value, 221 | 'B' : lambda : '0x%X' % value, 222 | 223 | 'w' : lambda : '0x%X' % value, 224 | 'W' : lambda : '0x%X' % value, 225 | 226 | 'h' : lambda : '%d' % value, 227 | 'H' : lambda : '%d' % value, 228 | 229 | 'l' : lambda : '0x%X' % value, 230 | 'L' : lambda : '0x%X' % value, 231 | 232 | 'i' : lambda : '%d' % value, 233 | 'I' : lambda : '%d' % value, 234 | 235 | 'q' : lambda : '0x%X' % value, 236 | 'Q' : lambda : '0x%X' % value, 237 | 238 | 'f' : lambda : '%f' % value, 239 | 'd' : lambda : '%f' % value, 240 | 241 | 's' : lambda : '%s' % value, 242 | 'S' : lambda : '"%s"' % value, 243 | 244 | 'o' : lambda : '"%s"' % (labelmap[value] if value in labelmap else DefaultGetLabelName(value)), 245 | 'O' : lambda : '"%s"' % (labelmap[value] if value in labelmap else DefaultGetLabelName(value)), 246 | } 247 | 248 | opr = oprtype[opr] 249 | return opr() 250 | 251 | def GetAllOperand(self, oprs, fs): 252 | operand = [] 253 | for opr in oprs: 254 | operand.append(self.GetOperand(opr, fs)) 255 | 256 | return operand 257 | 258 | def GetOperand(self, opr, fs): 259 | def readstr(): 260 | string = fs.ReadMultiByte(self.Container.CodePage) 261 | return string 262 | 263 | oprtype = \ 264 | { 265 | 'c' : lambda : struct.unpack(' '\x80': 68 | n += 1 69 | 70 | return n + len(string) 71 | 72 | def ljust_cn(string, n): 73 | cncount = 0 74 | for ch in string: 75 | if ch > '\x80': 76 | cncount += 1 77 | 78 | return string.ljust(n - cncount) 79 | 80 | def rjust_cn(string, n): 81 | cncount = 0 82 | for ch in string: 83 | if ch > '\x80': 84 | cncount += 1 85 | 86 | return string.rjust(n - cncount) 87 | 88 | def AdjustParam(param, spacelist, sep = ', '): 89 | param = param.split(sep) 90 | for i in range(len(param) - 1): 91 | param[i] = ljust_cn(param[i] + sep, int(spacelist[i])) 92 | 93 | return ''.join(param) 94 | 95 | def alignFormatArg(align, fmt, *params): 96 | if params: 97 | fmt = fmt % (params) 98 | 99 | return ljust_cn(fmt + ',', align) 100 | 101 | def alignFormatKw(align, fmt, *params): 102 | if params: 103 | fmt = fmt % (params) 104 | 105 | return ljust_cn(fmt, align) + '=' 106 | 107 | def GetValidLabelName(name): 108 | filter = \ 109 | [ 110 | (' ', ''), 111 | ('-', ''), 112 | #('_', ''), 113 | (' ', ''), 114 | ('·', ''), 115 | ('+', '_Plus'), 116 | ('%', ''), 117 | ('⑿', '12'), 118 | ('『', '_'), 119 | ('』', ''), 120 | ('「', '_'), 121 | ('」', ''), 122 | ('!', ''), 123 | 124 | ('①', '1'), 125 | ('②', '2'), 126 | ('③', '3'), 127 | ('④', '4'), 128 | ('⑤', '5'), 129 | ('⑥', '6'), 130 | ('⑦', '7'), 131 | ('⑧', '8'), 132 | ('⑨', '9'), 133 | ('⑩', '10'), 134 | ('⑾', '11'), 135 | ] 136 | 137 | for f in filter: 138 | name = name.replace(f[0], f[1]) 139 | 140 | return name 141 | 142 | def CombineMultiline(text): 143 | if len(text) == 1: 144 | return text[0] 145 | 146 | text2 = [] 147 | for line in text: 148 | text2.append(line.strip()) 149 | 150 | text2 = ' '.join(text2) 151 | return text2 -------------------------------------------------------------------------------- /Decompiler/Base/ED6FCBase.py: -------------------------------------------------------------------------------- 1 | from Base.BaseType import * 2 | 3 | CODE_PAGE = 'GBK' 4 | 5 | GAME_PATH = r'E:\Game\Steam\steamapps\common\Trails in the Sky FC' 6 | 7 | SEPITH_CHI = 0 8 | SEPITH_MIZU = 1 9 | SEPITH_HONO = 3 10 | SEPITH_KAZE = 2 11 | SEPITH_TOKI = 4 12 | SEPITH_SORA = 5 13 | SEPITH_GEN = 6 14 | 15 | CHIP_TYPE_CHAR = 7 16 | CHIP_TYPE_APL = 8 17 | CHIP_TYPE_MONSTER = 9 18 | 19 | DatFileNameTable = CaseInsensitiveDict() 20 | 21 | def initDatFileNameTable(gamePath): 22 | if not os.path.exists(gamePath): 23 | print('[warning] %s not exists' % gamePath) 24 | return 25 | 26 | for file in fileio.getDirectoryFiles(gamePath, '*.dir'): 27 | fs = fileio.FileStream(file) 28 | if fs.Length <= 0x10: 29 | continue 30 | 31 | file = os.path.splitext(os.path.basename(file))[0] 32 | names = [] 33 | 34 | fs.Position = 0x10 35 | buf = fs.Read() 36 | for i in range(0, len(buf), 0x24): 37 | n = buf[i:i+0x10].split(b'\x00', 1)[0].decode(CODE_PAGE) 38 | if n != '/_______.___': 39 | names.append(n) 40 | 41 | DatFileNameTable[file] = names 42 | 43 | initDatFileNameTable(GAME_PATH) 44 | 45 | class FileIndexBase: 46 | def __init__(self, param): 47 | self.Value = param 48 | self.IsIndexInvalid = False 49 | 50 | if isinstance(param, int): 51 | self.FileIndex = param 52 | 53 | if param == 0xFFFFFFFF: 54 | self.FileName = '' 55 | return 56 | 57 | dat = 'ED6_DT%02d' % (param >> 16) 58 | self.FileName = '%s/%s' % (dat, DatFileNameTable[dat][param & 0xFFFF]) 59 | 60 | elif isinstance(param, str): 61 | self.FileName = param 62 | if not param: 63 | self.FileIndex = 0xFFFFFFFF 64 | return 65 | 66 | dat, name = param.replace('\\', '/').split('/', 1) 67 | index = DatFileNameTable[dat].index(name) 68 | 69 | self.FileIndex = (int(dat[-2:], 16) << 16) | index 70 | 71 | else: 72 | raise Exception('unsupported input type') 73 | 74 | def Name(self): 75 | return self.FileName 76 | 77 | def Index(self): 78 | return self.FileIndex 79 | 80 | class ScenarioChipInfo(FileIndexBase): 81 | def __init__(self, fs = None): 82 | if isinstance(fs, fileio.FileStream): 83 | fs = fs.ReadULong() 84 | 85 | super().__init__(fs) 86 | 87 | def __str__(self): 88 | return self.Name() 89 | 90 | def fileindex(self): 91 | return self.Index() 92 | 93 | def binary(self): 94 | return struct.pack(' 20 | self.StringListTable = {} # map 21 | self.DelayFixLabels = [] # list of LabelEntry 22 | self.DelayFixString = [] # list of LabelEntry 23 | self.PrevousHandlerData = None 24 | 25 | self.ScpFunctionList = [] 26 | 27 | scena = None 28 | 29 | def CreateScenaFile( 30 | FileName, 31 | MapName, 32 | Location, 33 | MapIndex, 34 | MapDefaultBGM, 35 | Flags, 36 | EntryFunctionIndex, 37 | Reserved, 38 | IncludedScenario, 39 | ): 40 | 41 | global scena 42 | 43 | scena = ScenarioInfoPort() 44 | 45 | scena.MapName = MapName 46 | scena.Location = Location 47 | scena.MapIndex = MapIndex 48 | scena.MapDefaultBGM = BGMFileIndex(MapDefaultBGM) 49 | scena.Flags = Flags 50 | scena.EntryFunctionIndex = EntryFunctionIndex 51 | scena.Reserved = Reserved 52 | 53 | if len(IncludedScenario) > NUMBER_OF_INCLUDE_FILE: 54 | raise Exception('incorrect include list length') 55 | 56 | while len(IncludedScenario) < NUMBER_OF_INCLUDE_FILE: 57 | IncludedScenario.append('') 58 | 59 | scena.IncludedScenario = [ScenarioFileIndex(scp).Index() for scp in IncludedScenario] 60 | 61 | scena.fs = fileio.FileStream(FileName, 'wb+') 62 | scena.fs.seek(0x64) 63 | 64 | updateScnInfoOffset(-1) 65 | 66 | def BuildStringList(*strlist): 67 | scena.StringTable = list(strlist) 68 | 69 | def AddStringToStringList(string, offset): 70 | scena.DelayFixString.append(LabelEntry(string, offset)) 71 | if string not in scena.StringTable: 72 | scena.StringTable.append(string) 73 | 74 | def AddScnInfo(index): 75 | if len(scena.ScnInfo[index]) == 0: 76 | scena.ScnInfo[index].append(0) 77 | scena.ScnInfoOffset[index] = scena.fs.tell() 78 | 79 | scena.ScnInfoNumber[index] += 1 80 | 81 | def label(labelname): 82 | pos = scena.fs.tell() 83 | if scena.PrevousHandlerData is not None: 84 | pos += scena.PrevousHandlerData.FileStream.tell() 85 | 86 | plog('%08X: %s' % (pos, labelname)) 87 | if labelname in scena.Labels and scena.Labels[labelname] != pos: 88 | raise Exception('label name conflict') 89 | 90 | scena.Labels[labelname] = pos 91 | 92 | def getlabel(name): 93 | return scena.Labels[name] 94 | 95 | def AddCharChip(*chips): 96 | scena.ScnInfoOffset[SCN_INFO_CHIP] = scena.fs.tell() 97 | scena.ScnInfoNumber[SCN_INFO_CHIP] = len(chips) 98 | 99 | plog('chip index: %X' % scena.fs.tell()) 100 | 101 | for chip in chips: 102 | chip = ScenarioChipInfo(chip) 103 | scena.fs.write(chip.binary()) 104 | 105 | scena.fs.WriteByte(0xFF) 106 | 107 | updateScnInfoOffset(SCN_INFO_CHIP_PAT) 108 | 109 | def AddCharChipPat(*pats): 110 | scena.ScnInfoOffset[SCN_INFO_CHIP_PAT] = scena.fs.tell() 111 | scena.ScnInfoNumber[SCN_INFO_CHIP_PAT] = len(pats) 112 | 113 | plog('chip index: %X' % scena.fs.tell()) 114 | 115 | for chip in pats: 116 | chip = ScenarioChipInfo(chip) 117 | scena.fs.write(chip.binary()) 118 | 119 | scena.fs.WriteByte(0xFF) 120 | 121 | updateScnInfoOffset(SCN_INFO_CHIP_PAT) 122 | 123 | def declImpl(type, kwargs): 124 | obj = type() 125 | 126 | for k, v in kwargs.items(): 127 | getattr(obj, k) 128 | setattr(obj, k, v) 129 | 130 | scena.fs.write(obj.binary()) 131 | 132 | def updateScnInfoOffset(current): 133 | scena.HeaderEndOffset = scena.fs.tell() 134 | for i in range(current + 1, SCN_INFO_MAXIMUM): 135 | scena.ScnInfoOffset[i] = scena.HeaderEndOffset 136 | 137 | def DeclEntryPoint(**kwargs): 138 | declImpl(ScenarioEntryPoint, kwargs) 139 | updateScnInfoOffset(-1) 140 | 141 | def DeclNpc(**kwargs): 142 | AddScnInfo(SCN_INFO_NPC) 143 | declImpl(ScenarioNpcInfo, kwargs) 144 | updateScnInfoOffset(SCN_INFO_NPC) 145 | 146 | def DeclMonster(**kwargs): 147 | AddScnInfo(SCN_INFO_MONSTER) 148 | declImpl(ScenarioMonsterInfo, kwargs) 149 | updateScnInfoOffset(SCN_INFO_MONSTER) 150 | 151 | def DeclEvent(**kwargs): 152 | AddScnInfo(SCN_INFO_EVENT) 153 | declImpl(ScenarioEventInfo, kwargs) 154 | updateScnInfoOffset(SCN_INFO_EVENT) 155 | 156 | def DeclActor(**kwargs): 157 | AddScnInfo(SCN_INFO_ACTOR) 158 | declImpl(ScenarioActorInfo, kwargs) 159 | updateScnInfoOffset(SCN_INFO_ACTOR) 160 | 161 | def ScpFunction(*FunctionList): 162 | scena.ScenaFunctionTable.Offset = scena.fs.tell() 163 | scena.ScenaFunctionTable.Size += len(FunctionList) * 4 164 | 165 | for func in FunctionList: 166 | scena.ScpFunctionList.append(func) 167 | 168 | def GetFuntionId(FunctionLabel): 169 | return scena.ScpFunctionList.index(FunctionLabel) 170 | 171 | for op, inst in ed6fc.ed6fc_op_table.items(): 172 | 173 | func = [] 174 | func.append('def %s(*args):' % inst.OpName) 175 | func.append(' return OpCodeHandler(0x%02X, args)' % inst.OpCode) 176 | func.append('') 177 | 178 | exec('\r\n'.join(func)) 179 | 180 | opx = 'OP_%02X' % inst.OpCode 181 | 182 | if inst.OpName != opx: 183 | func[0] = 'def %s(*args):' % opx 184 | exec('\r\n'.join(func)) 185 | 186 | def AssembleForExec(expr): 187 | return eval(expr) 188 | 189 | def OpCodeHandler(op, args): 190 | entry = ed6fc.ed6fc_op_table[op] 191 | 192 | data = HandlerData(HANDLER_REASON_ASSEMBLE) 193 | data.Instruction = Instruction(op) 194 | data.Arguments = list(args) 195 | data.TableEntry = entry 196 | data.Assemble = AssembleForExec 197 | 198 | data.Instruction.OperandFormat = entry.Operand 199 | 200 | UsePrevous = bool(scena.PrevousHandlerData != None) 201 | 202 | if UsePrevous: 203 | data.FileStream = scena.PrevousHandlerData.FileStream 204 | data.Instruction.Labels = scena.PrevousHandlerData.Instruction.Labels 205 | else: 206 | data.FileStream = fileio.FileStream(b'') 207 | scena.PrevousHandlerData = data 208 | 209 | #print(entry.OpName) 210 | inst = OpCodeHandlerPrivate(data) 211 | 212 | if UsePrevous: 213 | return inst 214 | 215 | scena.PrevousHandlerData = None 216 | 217 | offset = scena.fs.tell() 218 | for lb in inst.Labels: 219 | scena.DelayFixLabels.append(LabelEntry(lb.Label, lb.Offset + offset)) 220 | 221 | data.FileStream.seek(0) 222 | scena.fs.write(data.FileStream.read()) 223 | 224 | return inst 225 | 226 | def scpexpr(operation, *args): 227 | return ScpExpression(operation, list(args)) 228 | 229 | def scpstr(ctrlcode, value = None): 230 | if type(ctrlcode) == str: 231 | return ctrlcode 232 | 233 | if ctrlcode == SCPSTR_CODE_ITEM and type(value) == str: 234 | value = ItemTrueNameMap[value] 235 | 236 | ScpStrCtrlCode = \ 237 | { 238 | SCPSTR_CODE_COLOR : lambda : '\\x%02X\\x%02X' % (ctrlcode, value), 239 | SCPSTR_CODE_LINE_FEED : lambda : '\\x%02X' % (ctrlcode), 240 | 0x0A : lambda : '\\x%02X' % (ctrlcode), 241 | SCPSTR_CODE_ENTER : lambda : '\\x%02X' % (ctrlcode), 242 | SCPSTR_CODE_CLEAR : lambda : '\\x%02X' % (ctrlcode), 243 | 0x04 : lambda : '\\x%02X' % (ctrlcode), 244 | 0x05 : lambda : '\\x%02X' % (ctrlcode), 245 | 0x06 : lambda : '\\x%02X' % (ctrlcode), 246 | 0x09 : lambda : '\\x%02X' % (ctrlcode), 247 | 0x18 : lambda : '\\x%02X' % (ctrlcode), 248 | SCPSTR_CODE_ITEM : lambda : '\\x%02X\\x%02X\\x%02X' % (ctrlcode, value & 0xFF, value >> 8), 249 | } 250 | 251 | string = ScpStrCtrlCode[ctrlcode]() 252 | 253 | string = eval('b"%s"' % string) 254 | 255 | return string 256 | 257 | def SaveToFile(): 258 | fs = scena.fs 259 | 260 | # fs.write(b'\x00' * (16 - fs.tell() % 16)) 261 | 262 | scena.ScenaFunctionTable.Offset = fs.tell() 263 | scena.ScenaFunctionTable.Size = len(scena.ScpFunctionList) * 2 264 | 265 | for func in scena.ScpFunctionList: 266 | fs.WriteUShort(getlabel(func)) 267 | 268 | scena.StringTableOffset = fs.tell() 269 | 270 | fs.Write('\x00'.join(scena.StringTable).encode(CODE_PAGE) + b'\x00\x00') 271 | 272 | zerostr = fs.tell() - 1 273 | 274 | for lb in scena.DelayFixLabels: 275 | fs.seek(lb.Offset) 276 | fs.WriteUShort(getlabel(lb.Label)) 277 | 278 | for lb in scena.DelayFixString: 279 | raise 280 | fs.seek(lb.Offset) 281 | pos = zerostr if lb.Label == '' else scena.StringListTable[lb.Label] 282 | 283 | plog('%X -> %X : %s' % (lb.Offset, pos, lb.Label)) 284 | 285 | fs.WriteUShort(pos) 286 | 287 | for i in range(len(scena.ScnInfoOffset)): 288 | plog('%04X : %02X' % (scena.ScnInfoOffset[i], scena.ScnInfoNumber[i])) 289 | 290 | fs.seek(0) 291 | fs.write(scena.binary()) 292 | 293 | fs.close() 294 | 295 | print('done') 296 | 297 | #input() 298 | -------------------------------------------------------------------------------- /Decompiler/ED6ScenarioHelper.py: -------------------------------------------------------------------------------- 1 | from ED6FCScenaFile import * 2 | import random, hashlib 3 | 4 | SCENA_FLAGS_OFFSET_1 = 0x212 5 | 6 | 7 | SCENA_FLAGS_BIT_ARIANRHOD = 0 8 | 9 | def GenerateUniqueLable(): 10 | return '%X' % int(random.random() * 100000000000) 11 | 12 | def UniqueLabel(LableName): 13 | sha256 = hashlib.sha256() 14 | sha256.update(LableName.encode(CODE_PAGE)) 15 | 16 | return label(sha256.hexdigest()) 17 | 18 | def IfScenaFlagOn(offset, bit, default_label): 19 | Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(offset, bit)), scpexpr(EXPR_END)), default_label) 20 | 21 | def IfScenaFlagOff(offset, bit, default_label): 22 | on_label = GenerateUniqueLable() 23 | Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags(offset, bit)), scpexpr(EXPR_END)), on_label) 24 | Jump(default_label) 25 | label(on_label) 26 | 27 | def IfLastBattleLostGoto(lost_label): 28 | Jc((scpexpr(EXPR_PUSH_VALUE_INDEX, 0x3), scpexpr(EXPR_PUSH_LONG, 0x0), scpexpr(EXPR_EQU), scpexpr(EXPR_END)), lost_label) 29 | 30 | def CreateMenuAndShow(itemlist, layer = 0, x = -1, y = -1): 31 | MenuCmd(0, layer) 32 | for item in itemlist: 33 | if strlen(item) >= 0x32: 34 | raise Exception('menu item too long, must be less than 0x32 bytes: %s' % item) 35 | 36 | MenuCmd(1, layer, item) 37 | 38 | MenuCmd(0x2, layer, x, y, 0x1) 39 | MenuEnd(0x0) 40 | -------------------------------------------------------------------------------- /Decompiler/FieldAttackChr.py: -------------------------------------------------------------------------------- 1 | from Assembler.Assembler2 import * 2 | from Base.EDAOBase import * 3 | 4 | def GetOpCode(fs): 5 | return fs.ReadByte() 6 | 7 | def WriteOpCode(fs, op): 8 | return fs.WriteByte(op) 9 | 10 | edao_fa_op_table = InstructionTable(GetOpCode, WriteOpCode, DefaultGetLabelName, CODE_PAGE) 11 | 12 | InstructionNames = {} 13 | 14 | InstructionNames[0x00] = 'Return' 15 | InstructionNames[0x01] = 'SetChrSubChip' 16 | InstructionNames[0x02] = 'Sleep' 17 | InstructionNames[0x03] = 'PlayEffect' 18 | InstructionNames[0x04] = 'Sound' 19 | InstructionNames[0x05] = 'Voice' 20 | InstructionNames[0x06] = 'FA_06' 21 | InstructionNames[0x07] = 'FA_07' 22 | InstructionNames[0x08] = 'FA_08' 23 | InstructionNames[0x09] = 'FA_09' 24 | InstructionNames[0x0A] = 'BlurSwitch' 25 | InstructionNames[0x0B] = 'FA_0B' 26 | InstructionNames[0x0C] = 'FA_0C' 27 | InstructionNames[0x0D] = 'FA_0D' 28 | 29 | 30 | for op, name in InstructionNames.items(): 31 | expr = '%s = 0x%08X' % (name, op) 32 | exec(expr) 33 | 34 | class EDAOFAOpTableEntry(InstructionTableEntry): 35 | def __init__(self, op, name = '', operand = NO_OPERAND, flags = 0, handler = None): 36 | super().__init__(op, name, operand, flags, handler) 37 | 38 | def inst(op, operand = NO_OPERAND, flags = 0, handler = None): 39 | return EDAOFAOpTableEntry(op, InstructionNames[op], operand, flags, handler) 40 | 41 | 42 | edao_fa_op_list = \ 43 | [ 44 | inst(Return, NO_OPERAND, INSTRUCTION_END_BLOCK), 45 | inst(SetChrSubChip, 'C'), 46 | inst(Sleep, 'H'), 47 | inst(PlayEffect, 'WHHHHHB'), 48 | inst(Sound, 'H'), 49 | inst(Voice, 'HHHH'), 50 | inst(FA_06, NO_OPERAND), 51 | inst(FA_07, NO_OPERAND), 52 | inst(FA_08, 'h'), 53 | inst(FA_09, 'HH'), 54 | inst(BlurSwitch, 'HH'), 55 | inst(FA_0B, 'H'), 56 | inst(FA_0C, 'WW'), 57 | inst(FA_0D, NO_OPERAND), 58 | ] 59 | 60 | 61 | for op in edao_fa_op_list: 62 | edao_fa_op_table[op.OpCode] = op 63 | op.Container = edao_fa_op_table 64 | 65 | 66 | class FieldAttackFileInfo: 67 | 68 | def __init__(self): 69 | self.HeaderSize = 0 70 | self.ChipFile = ChipFileIndex() 71 | self.EffectName = '' 72 | self.CodeBlock = None 73 | 74 | def open(self, buf): 75 | if type(buf) == str: 76 | buf = open(buf, 'rb').read() 77 | 78 | fs = fileio.FileStream(buf) 79 | 80 | self.HeaderSize = fs.ReadUShort() 81 | self.ChipFile = ChipFileIndex(fs.ReadULong()) 82 | self.EffectName = fs.ReadMultiByte() 83 | 84 | fs.seek(self.HeaderSize) 85 | 86 | self.CodeBlock = Disassembler(edao_fa_op_table).DisasmBlock(fs) 87 | 88 | def SaveToFile(self, filename): 89 | 90 | lines = [] 91 | 92 | lines.append('from %s import *' % os.path.splitext(os.path.basename(__file__))[0]) 93 | lines.append('') 94 | 95 | name = os.path.splitext(os.path.basename(filename))[0] 96 | name = os.path.splitext(name)[0] 97 | 98 | lines.append('CreateFieldAttack("%s", "%s", "%s")' % (name + '._bn', self.ChipFile.Name(), self.EffectName)) 99 | lines.append('') 100 | 101 | LabelMap = { self.CodeBlock.Offset : '' } 102 | 103 | blocks = [Disassembler(edao_fa_op_table).FormatCodeBlock(self.CodeBlock, LabelMap)] 104 | for block in blocks: 105 | lines += block 106 | 107 | txt = '\r\n'.join(lines) 108 | 109 | lines = txt.replace('\r\n', '\n').replace('\r', '\n').split('\n') 110 | 111 | for i in range(2, len(lines)): 112 | if lines[i] != '': 113 | lines[i] = ' %s' % lines[i] 114 | 115 | lines.insert(2, 'def main():') 116 | lines.append('Try(main)') 117 | lines.append('') 118 | 119 | fs = open(filename, 'wb') 120 | fs.write(''.encode('utf_8_sig')) 121 | fs.write('\r\n'.join(lines).encode('UTF8')) 122 | 123 | 124 | ############################################################################################ 125 | # support functions 126 | ############################################################################################ 127 | 128 | fafile = None 129 | 130 | def label(*args): 131 | pass 132 | 133 | def CreateFieldAttack(FileName, ChipFile, EffectName): 134 | EffectName = EffectName.encode(CODE_PAGE) + b'\x00' 135 | 136 | global fafile 137 | 138 | fafile = fileio.FileStream(FileName, 'wb') 139 | hdrsize = 2 + 4 + len(EffectName) 140 | 141 | fafile.WriteUShort(hdrsize) 142 | fafile.WriteULong(ChipFileIndex(ChipFile).Index()) 143 | fafile.Write(EffectName) 144 | 145 | 146 | for op, inst in edao_fa_op_table.items(): 147 | 148 | func = [] 149 | func.append('def %s(*args):' % inst.OpName) 150 | func.append(' return OpCodeHandler(0x%02X, args)' % inst.OpCode) 151 | func.append('') 152 | 153 | exec('\r\n'.join(func)) 154 | 155 | opx = 'FA_%02X' % inst.OpCode 156 | 157 | if inst.OpName != opx: 158 | func[0] = 'def %s(*args):' % opx 159 | exec('\r\n'.join(func)) 160 | 161 | 162 | def OpCodeHandler(op, args): 163 | entry = edao_fa_op_table[op] 164 | fs = fafile 165 | 166 | data = HandlerData(HANDLER_REASON_ASSEMBLE) 167 | data.Instruction = Instruction(op) 168 | data.Arguments = list(args) 169 | data.FileStream = fs 170 | data.TableEntry = entry 171 | 172 | data.Instruction.OperandFormat = entry.Operand 173 | 174 | data.FileStream = fileio.FileStream(b'') 175 | 176 | #print(entry.OpName) 177 | inst = OpCodeHandlerPrivate(data) 178 | 179 | data.FileStream.seek(0) 180 | fs.write(data.FileStream.read()) 181 | 182 | return inst 183 | 184 | 185 | 186 | if __name__ == '__main__': 187 | 188 | def procfile(file): 189 | print('disasm %s' % file) 190 | asdat = FieldAttackFileInfo() 191 | asdat.open(file) 192 | asdat.SaveToFile(file + '.py') 193 | 194 | def main(): 195 | ForEachFile(sys.argv[1:], procfile, '*._bn') 196 | 197 | Try(main) 198 | 199 | -------------------------------------------------------------------------------- /Decompiler/GameData/Gen_BonusBox.py: -------------------------------------------------------------------------------- 1 | from ml import * 2 | from ItemNameMap import * 3 | 4 | scena_path = 'D:\\Game\\Falcom\\ED_AO\\data\\scena\\' 5 | 6 | class ItemInfo: 7 | def __init__(self): 8 | self.Offset = 0 9 | self.Bit = 0 10 | self.Item = '' 11 | self.Line = 0 12 | self.File = '' 13 | 14 | self.TriggerX = 0 15 | self.TriggerZ = 0 16 | self.TriggerY = 0 17 | self.TriggerRange = 0 18 | self.ActorX = 0 19 | self.ActorZ = 0 20 | self.ActorY = 0 21 | self.TalkScenaIndex = 0 22 | self.TalkFunctionIndex = 0 23 | 24 | 25 | class ScenaInfo: 26 | def __init__(self): 27 | self.MapName = '' 28 | self.Items = [] 29 | 30 | 31 | def MakeScenarioFlags(offset, bit): 32 | return (offset << 3) | (bit & 7) 33 | 34 | 35 | def getscenaname(file): 36 | file = os.path.basename(file) 37 | return file.split('.')[0] 38 | 39 | def getparam(line): 40 | line = line.replace(' ', '') 41 | index = line.find('(') 42 | return line[index + 1 : -1].split(',') 43 | 44 | def lookupactor(actor, func_index): 45 | for act in actor: 46 | TriggerX, TriggerZ, TriggerY, TriggerRange, ActorX, ActorZ, ActorY, Flags, TalkScenaIndex, TalkFunctionIndex, Unknown_22 = act 47 | TalkFunctionIndex = int(TalkFunctionIndex) 48 | TalkScenaIndex = int(TalkScenaIndex) 49 | 50 | if TalkScenaIndex != 0: 51 | raise Exception('what the fuck') 52 | 53 | if TalkFunctionIndex == func_index: 54 | return act 55 | 56 | raise Exception('can not find actor') 57 | 58 | 59 | def main(): 60 | scena = fileio.getDirectoryFiles(scena_path, '*.py') 61 | 62 | scena_info = {} 63 | 64 | global_flags_map = {} 65 | 66 | for file in scena: 67 | console.setTitle(file) 68 | lines = fileio.readLines(file) 69 | 70 | file = getscenaname(file) 71 | 72 | mapname = lines[7].split('# ')[1] 73 | if mapname == 'MapIndex': 74 | mapname = file 75 | 76 | info = ScenaInfo() 77 | scena_info[file] = info 78 | 79 | info.MapName = mapname 80 | 81 | actor = [] 82 | scenaflags = None 83 | func = [] 84 | 85 | current_func = '' 86 | current_item = '' 87 | 88 | for i in range(len(lines)): 89 | l = lines[i].strip() 90 | 91 | if l.startswith('DeclActor('): 92 | 93 | p = getparam(l) 94 | actor.append(p) 95 | 96 | elif l.startswith('"Function_'): 97 | 98 | f = l.split(',')[0][1:-1] 99 | func.append(f) 100 | 101 | elif l.startswith('def Function_'): 102 | 103 | current_func = l[l.find('Function_'):l.find('(): pass')] 104 | 105 | elif l.startswith('Jc((scpexpr(EXPR_TEST_SCENA_FLAGS, MakeScenarioFlags'): 106 | 107 | current_item = '' 108 | 109 | elif l.find('AddItemNumber(') != -1: 110 | 111 | prefix = 'AddItemNumber(' 112 | idx = l.find(prefix) 113 | item = l[idx + len(prefix):] 114 | item = item[:item.find(', ')] 115 | 116 | #if not eval('%s in ItemTrueNameMap' % item): 117 | # continue 118 | #current_item = eval('ItemTrueNameMap[%s]' % item) 119 | current_item = eval(item) 120 | 121 | elif l.startswith('SetScenarioFlags'): 122 | 123 | scenaflags = getparam(l) 124 | 125 | elif l.find('"宝箱里什么') != -1: 126 | 127 | if current_item == '': 128 | current_item = '耀晶片' 129 | 130 | TriggerX, TriggerZ, TriggerY, TriggerRange, ActorX, ActorZ, ActorY, Flags, TalkScenaIndex, TalkFunctionIndex, Unknown_22 = lookupactor(actor, func.index(current_func)) 131 | 132 | item = ItemInfo() 133 | item.Offset = int(scenaflags[0], 16) 134 | item.Bit = int(scenaflags[1], 10) 135 | item.Item = current_item 136 | item.Line = i + 1 137 | item.File = file 138 | 139 | item.TriggerX = int(TriggerX) 140 | item.TriggerZ = int(TriggerZ) 141 | item.TriggerY = int(TriggerY) 142 | item.TriggerRange = int(TriggerRange) 143 | item.ActorX = int(ActorX) 144 | item.ActorZ = int(ActorZ) 145 | item.ActorY = int(ActorY) 146 | item.TalkScenaIndex = int(TalkScenaIndex) 147 | item.TalkFunctionIndex = int(TalkFunctionIndex) 148 | 149 | 150 | if not MakeScenarioFlags(item.Offset, item.Bit) in global_flags_map: 151 | info.Items.append(item) 152 | global_flags_map[MakeScenarioFlags(item.Offset, item.Bit)] = True 153 | else: 154 | print('0x%X, %d, %s: %s' % (item.Offset, item.Bit, mapname, current_item)) 155 | 156 | current_item = '' 157 | scenaflags = None 158 | 159 | items = [] 160 | 161 | for file in sorted(scena_info): 162 | info = scena_info[file] 163 | for item in info.Items: 164 | items.append((info, item)) 165 | 166 | items = sorted(items, key = lambda item : MakeScenarioFlags(item[1].Offset, item[1].Bit)) 167 | 168 | lines = [] 169 | num = 0 170 | 171 | lines.append('[') 172 | 173 | lines.append(' {') 174 | lines.append(' "SavePath" : "J:\\\\Falcom\\\\ED_AO\\\\savedata"') 175 | lines.append(' },') 176 | lines.append('') 177 | 178 | for info, item in items: 179 | #lines.append(' "item_%X_%d" : {' % (item.Offset, item.Bit)) 180 | lines.append(' {') 181 | 182 | itemid = 'item_%X_%d' % (item.Offset, item.Bit) 183 | 184 | lines.append(' "ID" : "%s",' % itemid) 185 | lines.append(' "Map" : "%s",' % info.MapName) 186 | lines.append(' "Offset" : "0x%X",' % item.Offset) 187 | lines.append(' "Bit" : %s,' % item.Bit) 188 | lines.append(' "Item" : "%s",' % item.Item) 189 | lines.append(' "Line" : %s,' % item.Line) 190 | lines.append(' "File" : "%s",' % item.File) 191 | 192 | lines.append(' "TriggerX" : %s,' % item.TriggerX) 193 | lines.append(' "TriggerZ" : %s,' % item.TriggerZ) 194 | lines.append(' "TriggerY" : %s,' % item.TriggerY) 195 | lines.append(' "TriggerRange" : %s,' % item.TriggerRange) 196 | lines.append(' "ActorX" : %s,' % item.ActorX) 197 | lines.append(' "ActorZ" : %s,' % item.ActorZ) 198 | lines.append(' "ActorY" : %s,' % item.ActorY) 199 | lines.append(' "TalkScenaIndex" : %s,' % item.TalkScenaIndex) 200 | lines.append(' "TalkFunctionIndex" : %s,' % item.TalkFunctionIndex) 201 | 202 | lines.append(' "Description" : "%s",' % '') 203 | lines.append(' "Screenshot" : "Screenshot\\\\%s.png",' % itemid) 204 | 205 | 206 | lines[-1] = lines[-1][:-1] 207 | lines.append(' },') 208 | lines.append('') 209 | 210 | lines.pop(-1) 211 | lines[-1] = lines[-1][:-1] 212 | lines.append(']') 213 | lines.append('') 214 | 215 | #lines.insert(1, ' "NumberOfItems" : %d,\r\n' % len(items)) 216 | 217 | open('box.json', 'wb').write('\r\n'.join(lines).encode('U16')) 218 | 219 | Try(main) 220 | -------------------------------------------------------------------------------- /Decompiler/GameData/Gen_ItemNameMap.py: -------------------------------------------------------------------------------- 1 | from ml import * 2 | from Base.BaseType import * 3 | 4 | def getname(name): 5 | filter = \ 6 | [ 7 | (' ', ''), 8 | ('-', ''), 9 | ('_', ''), 10 | (' ', ''), 11 | ('·', ''), 12 | ('+', 'Plus'), 13 | ('%', ''), 14 | ('『', '_'), 15 | ('』', ''), 16 | ('「', '_'), 17 | ('」', ''), 18 | ('!', ''), 19 | 20 | ('①', '1'), 21 | ('②', '2'), 22 | ('③', '3'), 23 | ('④', '4'), 24 | ('⑤', '5'), 25 | ('⑥', '6'), 26 | ('⑦', '7'), 27 | ('⑧', '8'), 28 | ('⑨', '9'), 29 | ('⑩', '10'), 30 | ('⑾', '11'), 31 | ('⑿', '12'), 32 | ] 33 | for f in filter: 34 | name = name.replace(f[0], f[1]) 35 | 36 | return name 37 | 38 | def peek(file): 39 | fs = fileio.FileStream(file) 40 | 41 | fs.seek(fs.ReadUShort()) 42 | 43 | offsetlist = [] 44 | minoffset = 0xFFFFFFFF 45 | while True: 46 | if fs.tell() >= minoffset: 47 | break 48 | 49 | offset = fs.ReadUShort() 50 | minoffset = min(minoffset, offset) 51 | offsetlist.append(offset) 52 | 53 | offsetmap = {} 54 | itemidmap = {} 55 | itemtruename = {} 56 | 57 | fs.seek(offsetlist[0]) 58 | id = fs.ReadULong() - 1 59 | 60 | for offset in offsetlist: 61 | #if offset in offsetmap: continue 62 | #offsetmap[offset] = True 63 | 64 | id += 1 65 | 66 | fs.seek(offset) 67 | id = fs.ReadULong() 68 | 69 | #if id == 0xCE: bp() 70 | 71 | #if id in itemidmap: bp() 72 | 73 | nameoffset = fs.ReadUShort() 74 | fs.seek(nameoffset) 75 | truename = fs.ReadMultiByte() 76 | name = getname(truename) 77 | 78 | if name == '': 79 | continue 80 | 81 | itemidmap[id] = name 82 | itemtruename[id] = truename 83 | 84 | items = [] 85 | for id in sorted(itemidmap): 86 | if id == 9999: 87 | continue 88 | 89 | name = itemidmap[id] 90 | if name[:1].isdigit(): 91 | name = 'Item_' + name 92 | 93 | if name == '': 94 | name = 'Item_%X' % id 95 | 96 | truename = itemtruename[id] 97 | if truename == '': 98 | truename = name 99 | 100 | items.append([id, name, truename]) 101 | 102 | return items 103 | 104 | 105 | def main(): 106 | items = peek('D:\\Game\\Falcom\\ED_AO\\data\\text\\t_ittxt._dt') 107 | items += peek('D:\\Game\\Falcom\\ED_AO\\data\\text\\t_ittxt2._dt') 108 | 109 | items += [[0xCD, '物理反射', '物理反射'], [0xCE, '魔法反射', '魔法反射']] 110 | 111 | items = sorted(items) 112 | 113 | lines = ['#encoding=utf8'] 114 | 115 | lines.append('') 116 | lines.append('from ml import *') 117 | lines.append('') 118 | 119 | lines.append('ItemNameMap = {}') 120 | lines.append('ItemTrueNameMap = {}') 121 | lines.append('') 122 | 123 | ItemNameMap = {} 124 | for id, name, truename in items: 125 | if name not in ItemNameMap: 126 | ItemNameMap[name] = 0 127 | 128 | ItemNameMap[name] += 1 129 | 130 | for id, name, truename in items: 131 | namecount = ItemNameMap[name] 132 | if namecount != 1: 133 | if name == '': 134 | name 135 | name = name + '_%X' % id 136 | 137 | lines.append('ItemNameMap[0x%04X] = "%s"' % (id, name)) 138 | 139 | lines.append('') 140 | 141 | for id, name, truename in items: 142 | lines.append('ItemTrueNameMap[0x%04X] = "%s"' % (id, truename)) 143 | 144 | lines.append('') 145 | lines.append('for id, name in ItemNameMap.items(): exec("%s = 0x%04X" % (name, id))') 146 | lines.append('') 147 | lines.append('''for id, name in list(ItemTrueNameMap.items()): exec('ItemTrueNameMap["%s"] = %d' % (name, id))''') 148 | lines.append('') 149 | 150 | open('ItemNameMap.py', 'wb').write('\r\n'.join(lines).encode('UTF8')) 151 | 152 | Try(main) 153 | -------------------------------------------------------------------------------- /Decompiler/NameList2py.py: -------------------------------------------------------------------------------- 1 | from Base.EDAOBase import * 2 | 3 | LAST_CHAR_ID = 0x3E7 4 | NAME_LIST_ENTRY_SIZE = 0x14 5 | 6 | class NameListEntry: 7 | 8 | # size = 0x14 9 | def __init__(self, fs = None): 10 | if fs == None: 11 | return 12 | 13 | self.Id = fs.ReadUShort() 14 | 15 | if self.Id == LAST_CHAR_ID: 16 | return 17 | 18 | self.NameOffset = fs.ReadUShort() 19 | self.WalkChip = ChipFileIndex(fs.ReadULong()) 20 | self.RunChip = ChipFileIndex(fs.ReadULong()) 21 | self.BattleScript = BattleScriptFileIndex(fs.ReadULong()) 22 | self.Unknown_14 = fs.ReadULong() 23 | 24 | pos = fs.tell() 25 | fs.seek(self.NameOffset) 26 | self.Name = fs.ReadMultiByte() 27 | fs.seek(pos) 28 | 29 | def param(self): 30 | walk = self.WalkChip.Name() 31 | if not self.WalkChip.IsInvalid(): walk = '"%s"' % walk 32 | 33 | run = self.RunChip.Name() 34 | if not self.RunChip.IsInvalid(): run = '"%s"' % run 35 | 36 | sym = self.BattleScript.Name() 37 | if not self.BattleScript.IsInvalid(): sym = '"%s"' % sym 38 | 39 | return '0x%04X, "%s", %s, %s, %s, 0x%08X' % (self.Id, self.Name, walk, run, sym, self.Unknown_14) 40 | 41 | def binary(self): 42 | return struct.pack('= 0x32: 34 | raise Exception('menu item too long, must be less than 0x32 bytes: %s' % item) 35 | 36 | MenuCmd(1, layer, item) 37 | 38 | MenuCmd(0x2, layer, x, y, 0x1) 39 | MenuEnd(0x0) 40 | -------------------------------------------------------------------------------- /Decompiler/cleanup.bat: -------------------------------------------------------------------------------- 1 | @cd/d "%~dp0" 2 | @rd/s/q __pycache__ >NUL 2>NUL 3 | @for /F "delims=" %%i in ('dir/b/s "%~dp0\__pycache__"') do rd/s/q "%%i" >NUL 2>NUL 4 | -------------------------------------------------------------------------------- /Decompiler/declallas.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cd/d "%~dp0" 4 | 5 | del /q D:\Game\Falcom\ED_AO\data\battle\dat\as*.py 6 | 7 | BattleActionScript.py D:\Game\Falcom\ED_AO\data\battle\dat\ 8 | -------------------------------------------------------------------------------- /Decompiler/declallfcscn.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cd/d "%~dp0" 4 | 5 | set "input=D:\Game\Steam\steamapps\common\Trails in the Sky FC\ED6_DT01" 6 | ::set "input=D:\Game\Steam\steamapps\common\Trails in the Sky FC\backup\ED6_DT01" 7 | set "input=D:\Dev\SyncRepos\Steam-ED6-FC-CN\DAT\ED6_DT01" 8 | rem set input=J:\PSP\Eiyuu_Densetsu_Ao_no_Kiseki\USRDIR\data\scena 9 | 10 | del /q "%input%\*.py" 11 | 12 | ED6FCScenarioScript.py "%input%" 13 | -------------------------------------------------------------------------------- /Decompiler/declallms.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cd/d "%~dp0" 4 | 5 | del /q D:\Game\Falcom\ED_AO\data\battle\dat\ms*.py 6 | 7 | BattleMonsterStatus.py D:\Game\Falcom\ED_AO\data\battle\dat\ 8 | -------------------------------------------------------------------------------- /Decompiler/declallscn.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cd/d "%~dp0" 4 | 5 | set input=D:\Game\Falcom\ED_AO\data\scena 6 | rem set input=J:\PSP\Eiyuu_Densetsu_Ao_no_Kiseki\USRDIR\data\scena 7 | 8 | del /q %input%\*.py 9 | 10 | ScenarioScript.py %input%\ 11 | -------------------------------------------------------------------------------- /Decompiler/extractsame.py: -------------------------------------------------------------------------------- 1 | from ml import * 2 | 3 | def main(): 4 | en = json.load(open(r'D:\Desktop\Source\Falcom\Decompiler\fc_sn_text_en.json', 'r', encoding = 'utf-8-sig')) 5 | cn = json.load(open(r'D:\Desktop\Source\Falcom\Decompiler\fc_sn_text_cn.json', 'r', encoding = 'utf-8-sig')) 6 | opt = json.load(open(r'D:\Desktop\Source\Falcom\Decompiler\replace_option.json', 'r', encoding = 'utf-8-sig')) 7 | 8 | cn2 = {} 9 | 10 | for k, v in cn.items(): 11 | if len(v) == len(en[k]) or k in opt: 12 | cn2[k] = v 13 | else: 14 | print(k.ljust(10), len(v) - len(en[k])) 15 | 16 | open('fc_sn_text_final.json', 'wb').write(json.dumps(cn2, indent = 2, ensure_ascii = False).encode('utf-8-sig')) 17 | 18 | if __name__ == '__main__': 19 | Try(main) 20 | -------------------------------------------------------------------------------- /Decompiler/itp2itc.py: -------------------------------------------------------------------------------- 1 | from ml import * 2 | 3 | ScaleInfo = [ 4 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 5 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 6 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 7 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 8 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 9 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 10 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 11 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 12 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 13 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 14 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 15 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 16 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 17 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 18 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 19 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 20 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 21 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 22 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 23 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 24 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 25 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 26 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 27 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 28 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 29 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 30 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 31 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 32 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 33 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 34 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 35 | 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000 36 | ] 37 | 38 | class ItcEntry: 39 | def __init__(self, offset, size): 40 | self.offset = offset 41 | self.size = size 42 | 43 | ITC_ENTRY_COUNT = 160 44 | ITC_ENTRY_SIZE = 8 45 | SIZE_OF_MAGIC = 4 46 | SIZE_OF_SCALE_INFO = 512 * 4 47 | 48 | def main(): 49 | prefix = sys.argv[1].rsplit('_', 1)[0] 50 | 51 | print('combine %s_XXXXXX.itp into %s.itc ...' % (prefix, prefix), end = '') 52 | 53 | index = 0 54 | itc = fileio.FileStream(prefix + '.itc', 'wb') 55 | itc.Position = SIZE_OF_MAGIC + ITC_ENTRY_COUNT * ITC_ENTRY_SIZE + SIZE_OF_SCALE_INFO 56 | 57 | entries = [] 58 | offset = 0 59 | 60 | while True: 61 | name = '%s_%06d.itp' % (prefix, index) 62 | index += 1 63 | try: 64 | itp = fileio.FileStream(name, 'rb') 65 | except FileNotFoundError: 66 | break 67 | 68 | entry = ItcEntry(itc.Position, itp.Length) 69 | entries.append(entry) 70 | 71 | itc.Write(itp.Read()) 72 | itp.Close() 73 | 74 | itc.Position = 0 75 | itc.Write(b'V101') 76 | for entry in entries: 77 | itc.WriteULong(entry.offset) 78 | itc.WriteULong(entry.size) 79 | 80 | itc.Position = SIZE_OF_MAGIC + ITC_ENTRY_COUNT * ITC_ENTRY_SIZE 81 | 82 | for info in ScaleInfo: 83 | itc.WriteULong(info) 84 | 85 | if __name__ == '__main__': 86 | Try(main) 87 | -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/bface176.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/bface176.itp -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/bface176.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/bface176.psd -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/cface176.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/cface176.itp -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/cface176.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/cface176.psd -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/chrimg176.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/chrimg176.itp -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/chrimg176.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/chrimg176.psd -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/chrimg176_text.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/chrimg176_text.psd -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/ea_2.py: -------------------------------------------------------------------------------- 1 | from ActionHelper import * 2 | 3 | def ea_2(): 4 | 5 | eff_mg064_00 = 3 6 | eff_mg064_01 = 4 7 | eff_mg064_02 = 5 8 | eff_mg064_04 = 6 9 | eff_mg064_05 = 7 10 | eff_sc036000 = 8 11 | eff_ms00001 = 9 12 | eff_whirl = eff_sc036000 13 | 14 | AS_78(0x1) 15 | 16 | LoadEffect(eff_mg064_00, "battle\mg064_00.eff") 17 | LoadEffect(eff_mg064_01, "battle\mg064_01.eff") 18 | LoadEffect(eff_mg064_02, "battle\mg064_02.eff") 19 | LoadEffect(eff_mg064_04, "battle\mg064_04.eff") 20 | LoadEffect(eff_mg064_05, "battle\mg064_05.eff") 21 | #LoadEffect(eff_sc036000, "battle/sc036000.eff") 22 | LoadEffect(eff_ms00001, "battle/ms00001.eff") 23 | 24 | AS_78(0x0) 25 | 26 | ResetTarget() 27 | 28 | Call("init_env") 29 | 30 | ClearChipModeFlags(0x0, 0xFC, 0x1) 31 | 32 | AS_3E(0x1F4, 0x0) 33 | AS_5F(0xFC, 0x0) 34 | AS_8D(0xB, 0x0, 0x0, 0x0, 0x0) 35 | LockCamera(0xF3, 0, 0, 0, 0) 36 | SetCameraDegree(138, 39, 0, 0) 37 | SetCameraDistance(21000, 0) 38 | AS_AC(0x3E8, 0xFFFFFFFF) 39 | LockCamera(0xF3, 0, 1500, 0, 3500) 40 | SetCameraDistance(17500, 3500) 41 | SetCameraDegree(0, -5, 10, 3000) 42 | PlayEffect(0xFF, 0xFF, eff_sc036000, 0x1, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0x4) 43 | AS_A9(0xFF, 0x81, 0xFFFCDE69) 44 | Sleep(700) 45 | Yield() 46 | PlayEffect(0xFF, 0xF3, eff_mg064_04, 0x0, 0, 3000, 0, 0, 0, 0, 400, 400, 400, 0x3) 47 | SoundEx(359, 0x1) 48 | Sleep(800) 49 | Yield() 50 | 51 | CancelEffect(0xFF, 0x3) 52 | StopSound(359) 53 | Sleep(500) 54 | Yield() 55 | PlayEffect(0xFF, 0xF3, eff_ms00001, 0x0, 0, 4000, 10000, 0, 0, 0, 1800, 1800, 1800, 0xFF) 56 | AS_A9(0xFF, 0x81, 0xFFDD71F9) 57 | CancelEffect(0xFF, 0x4) 58 | Sleep(1500) 59 | Yield() 60 | SetBattleSpeed(0x352) 61 | PlayEffect(0xFF, 0xF3, eff_mg064_00, 0x0, 0, 4000, 9500, 0, 0, 0, 500, 500, 500, 0x2) 62 | SetCameraDistance(19000, 2200) 63 | SetBattleSpeed(0x28A) 64 | Sleep(2600) 65 | Yield() 66 | PlayEffect(0xFF, 0xF3, eff_mg064_01, 0x0, 0, 4000, 10000, 0, 0, 0, 400, 400, 400, 0xFF) 67 | Sleep(200) 68 | Yield() 69 | BlurSwitch(0x0, 0xBBFFFFFF, 0x0, 0x1, 0x1) 70 | ResetTarget() 71 | 72 | label("loc_xxxxxxxxxxxx_37D8") 73 | 74 | ForeachTarget("loc_xxxxxxxxxxxx_3802") 75 | 76 | def lambda_37DF(): 77 | ChrMove(0xFF, 0xF3, 0, 3500, 10000, 3000, 0x0) 78 | Return() 79 | 80 | QueueWorkItem(0xFE, 1, lambda_37DF) 81 | BeginChrThread(0xFE, 3, "loc_xxxxxxxxxxxx_393C", 0x0) 82 | Sleep(30) 83 | Yield() 84 | NextTarget() 85 | Jump("loc_xxxxxxxxxxxx_37D8") 86 | 87 | label("loc_xxxxxxxxxxxx_3802") 88 | 89 | Sleep(2300) 90 | Yield() 91 | PlayEffect(0xFF, 0xF3, eff_mg064_05, 0x0, 0, 3500, 9500, 0, 0, 0, 500, 500, 500, 0x2) 92 | Sleep(2000) 93 | Yield() 94 | AS_A8(0x0, 0x3) 95 | Sleep(400) 96 | Yield() 97 | AS_A8(0x0, 0x1) 98 | #PlayEffect(0xFF, 0xF3, eff_sc036000, 0x1, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 99 | AS_A9(0xFF, 0x81, 0xFFFCDE69) 100 | SoundEx(359, 0x1) 101 | AS_A6(0xFF, 0x2, 0x2EE, 0x640, 0x0) 102 | SoundEx(269, 0x0) 103 | AS_80(0x3E8) 104 | Sleep(500) 105 | Yield() 106 | StopSound(359) 107 | SetBattleSpeed(0x3E8) 108 | PlayEffect(0xFF, 0xF3, eff_ms00001, 0x0, 0, 4000, 10000, 0, 0, 0, 3000, 3000, 3000, 0xFF) 109 | SoundEx(566, 0x0) 110 | Sleep(100) 111 | Yield() 112 | PlayEffect(0xFF, 0xF3, eff_mg064_02, 0x0, 0, 3500, 9500, 65516, 0, 0, 750, 750, 750, 0x3) 113 | BlurSwitch(0x190, 0xBBFFFFFF, 0x0, 0x1, 0x1) 114 | SetCameraDistance(4000, 2000) 115 | AS_3E(0x3E8, 0x7D0) 116 | SetBattleSpeed(0x320) 117 | SoundEx(220, 0x0) 118 | Sleep(1000) 119 | Yield() 120 | CancelEffect(0xFF, 0x2) 121 | Sleep(1000) 122 | Yield() 123 | AS_80(0x3E8) 124 | AS_43(0x0, 0x1F4, 0xFFFFFFFF) 125 | Sleep(1000) 126 | Yield() 127 | SetBattleSpeed(0x3E8) 128 | AS_8D(0xA, 0x0, 0x0, 0x0, 0x0) 129 | AS_A8(0x0, 0x0) 130 | AS_A8(0x0, 0x1) 131 | AS_A8(0x0, 0x2) 132 | AS_A8(0x0, 0x3) 133 | AS_A8(0x0, 0x4) 134 | AS_A8(0x0, 0x5) 135 | AS_A8(0x0, 0x6) 136 | AS_A8(0x0, 0x7) 137 | Call("release_all_eff") 138 | AS_6E(0x40000) 139 | 140 | Call("reset_all_chr_and_others") 141 | 142 | #EndChrThread(0xFC, 1) 143 | Call("loc_xxxxxxxxxxxx_1CA") 144 | #Return() 145 | 146 | Jump('ea_2_end') 147 | 148 | 149 | ############################################################## 150 | 151 | 152 | label('recycle_whirl') 153 | 154 | SetChrSubChip(0xFF, 1) 155 | for i in range(2200, 0, -200): 156 | PlayEffect(0xFF, 0xFF, eff_whirl, 0x04, 0, -1300, 0, 180, 0, 0, i, i, i, eff_whirl) 157 | Sleep(100) 158 | Yield() 159 | 160 | CancelEffect(CraftTarget.Self, eff_whirl) 161 | Return() 162 | 163 | label("reset_all_chr_and_others") 164 | 165 | #CancelEffect(CraftTarget.Self, eff_whirl) 166 | #Yield() 167 | PlayEffect(0xFF, 0xFF, eff_whirl, 0x04, 0, -1300, 0, 180, 0, 0, 2500, 2500, 2500, eff_whirl) 168 | BeginChrThread(CraftTarget.Self, 1, 'recycle_whirl', 0) 169 | 170 | Fade(0x1, 500, 0x0) 171 | AS_7A(0x1) 172 | ShowChr(0xFF, 0) 173 | AS_5F(0xF7, 0x0) 174 | ResetBrightness(0) 175 | #SetBrightness(0x0, 0x1, 0) 176 | AS_31(0x17, 0x0) 177 | AS_31(0x3, 0x0) 178 | 179 | Fade(1, 500, 0) 180 | LockCamera(0xFC, 0, 750, 0, 500) 181 | SetCameraDistance(51000, 0) 182 | SetCameraDistance(50000, 500) 183 | Yield() 184 | 185 | Call("ea_2_do_damage") 186 | AS_8F(0x0) 187 | CallReturn() 188 | 189 | ############################################################## 190 | 191 | label("ea_2_do_damage") 192 | 193 | ResetTarget() 194 | 195 | vanish_all_target = GenerateUniqueLable() 196 | vanish_next_target = GenerateUniqueLable() 197 | 198 | Random_Execute(10, vanish_all_target) 199 | 200 | label("ea_2_damage_next_target") 201 | 202 | ForeachTarget("ea_2_do_damage_end") 203 | DamageAnime(0xFE, 0x0, 0x32) 204 | DamageCue(0xFE) 205 | Sleep(50) 206 | Yield() 207 | NextTarget() 208 | Jump("ea_2_damage_next_target") 209 | 210 | label("ea_2_do_damage_end") 211 | 212 | CallReturn() 213 | 214 | 215 | label(vanish_all_target) 216 | 217 | label(vanish_next_target) 218 | 219 | ForeachTarget("ea_2_do_damage_end") 220 | 221 | AS_8D(0x15, CraftTarget.TargetChr, CraftConditionFlags.OnehitKill, 0, 0) 222 | AS_8D(0x15, CraftTarget.TargetChr, CraftConditionFlags.Vanish, 0, 9999) 223 | 224 | Sleep(50) 225 | Yield() 226 | 227 | NextTarget() 228 | Jump(vanish_next_target) 229 | 230 | 231 | ############################################################## 232 | 233 | label("loc_xxxxxxxxxxxx_1CA") 234 | 235 | AS_6E(0x20000) 236 | AS_6E(0x40000) 237 | CallReturn() 238 | 239 | 240 | ############################################################## 241 | 242 | label("release_all_eff") 243 | 244 | FreeEffect(eff_mg064_00) 245 | FreeEffect(eff_mg064_01) 246 | FreeEffect(eff_mg064_02) 247 | FreeEffect(eff_mg064_04) 248 | FreeEffect(eff_mg064_05) 249 | #FreeEffect(eff_sc036000) 250 | FreeEffect(eff_ms00001) 251 | 252 | CallReturn() 253 | 254 | 255 | ############################################################## 256 | 257 | label("loc_xxxxxxxxxxxx_393C") 258 | 259 | AS_8D(0x7, 0xFF, 0x3B6, 0x3B6, 0x3B6) 260 | Sleep(150) 261 | Yield() 262 | AS_8D(0x7, 0xFF, 0x384, 0x384, 0x384) 263 | Sleep(150) 264 | Yield() 265 | AS_8D(0x7, 0xFF, 0x352, 0x352, 0x352) 266 | Sleep(150) 267 | Yield() 268 | AS_8D(0x7, 0xFF, 0x320, 0x320, 0x320) 269 | Sleep(150) 270 | Yield() 271 | AS_8D(0x7, 0xFF, 0x2EE, 0x2EE, 0x2EE) 272 | Sleep(150) 273 | Yield() 274 | AS_8D(0x7, 0xFF, 0x2BC, 0x2BC, 0x2BC) 275 | Sleep(150) 276 | Yield() 277 | AS_8D(0x7, 0xFF, 0x28A, 0x28A, 0x28A) 278 | Sleep(150) 279 | Yield() 280 | AS_8D(0x7, 0xFF, 0x258, 0x258, 0x258) 281 | Sleep(150) 282 | Yield() 283 | AS_8D(0x7, 0xFF, 0x226, 0x226, 0x226) 284 | Sleep(150) 285 | Yield() 286 | AS_8D(0x7, 0xFF, 0x1F4, 0x1F4, 0x1F4) 287 | Sleep(150) 288 | Yield() 289 | AS_8D(0x7, 0xFF, 0x1C2, 0x1C2, 0x1C2) 290 | Sleep(150) 291 | Yield() 292 | AS_8D(0x7, 0xFF, 0x190, 0x190, 0x190) 293 | Sleep(150) 294 | Yield() 295 | AS_8D(0x7, 0xFF, 0x15E, 0x15E, 0x15E) 296 | Sleep(150) 297 | Yield() 298 | AS_8D(0x7, 0xFF, 0x12C, 0x12C, 0x12C) 299 | Sleep(150) 300 | Yield() 301 | AS_8D(0x7, 0xFF, 0xFA, 0xFA, 0xFA) 302 | Sleep(150) 303 | Yield() 304 | AS_8D(0x7, 0xFF, 0xC8, 0xC8, 0xC8) 305 | Sleep(150) 306 | Yield() 307 | AS_8D(0x7, 0xFF, 0x96, 0x96, 0x96) 308 | Sleep(150) 309 | Yield() 310 | AS_8D(0x7, 0xFF, 0x64, 0x64, 0x64) 311 | Sleep(150) 312 | Yield() 313 | AS_8D(0x7, 0xFF, 0x32, 0x32, 0x32) 314 | Sleep(150) 315 | Yield() 316 | AS_8D(0x7, 0xFF, 0x0, 0x0, 0x0) 317 | Sleep(150) 318 | Yield() 319 | Return() 320 | 321 | 322 | ############################################################## 323 | 324 | label("init_env") 325 | 326 | AS_43(0x0, 0x1F4, 0xFF000000) 327 | Sleep(500) 328 | Yield() 329 | SetBrightness(0x0, 0x0, 0) 330 | AS_6D(0x20000) 331 | AS_6D(0x40000) 332 | AS_60(0xF7) 333 | Fade(0x0, 500, 0xFF000000) 334 | CallReturn() 335 | 336 | 337 | label('ea_2_end') 338 | 339 | return 340 | 341 | -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/fachr176._bn.py: -------------------------------------------------------------------------------- 1 | from FieldAttackChr import * 2 | 3 | def old(): 4 | CreateFieldAttack("fachr176._bn", "chr/ch04258.itc", "sysatk07") 5 | SetChrSubChip(0) 6 | Sleep(120) 7 | SetChrSubChip(1) 8 | Sleep(90) 9 | Voice(3867, 3866, 3876, 0) 10 | Sound(248) 11 | BlurSwitch(0x0, 10) 12 | FA_0B(500) 13 | PlayEffect(0x0, 1000, 0, 0, 0, 0, 0x0) 14 | SetChrSubChip(2) 15 | Sleep(120) 16 | SetChrSubChip(3) 17 | Sleep(120) 18 | SetChrSubChip(4) 19 | Sleep(120) 20 | SetChrSubChip(5) 21 | Sleep(120) 22 | SetChrSubChip(6) 23 | Sleep(250) 24 | Return() 25 | 26 | def main(): 27 | CreateFieldAttack("fachr176._bn", "chr/ch04257.itc", "sysatk77") 28 | SetChrSubChip(0) 29 | Voice(3876, 3866, 3867, 0) 30 | Sleep(100) 31 | PlayEffect(0x0, 1000, 0, 0, 0, 0, 0x0) 32 | Sleep(120) 33 | FA_0B(1000) 34 | # Sleep(700) 35 | Return() 36 | 37 | Try(main) 38 | -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/ms90010.py: -------------------------------------------------------------------------------- 1 | from BattleMonsterStatus import * 2 | 3 | def main(): 4 | Name = "阿瑞安赫德" 5 | Description = "结社『使徒』的第七柱,\\n使用超越人类认知的枪\\n技和S级的幸运,\\n可将任何敌人完全压制。" 6 | ASFile = "as90010.dat" 7 | Symbol = "sy04200.itp" 8 | 9 | Resistance = CraftConditionFlags.Poison | \ 10 | CraftConditionFlags.Frozen | \ 11 | CraftConditionFlags.Landification | \ 12 | CraftConditionFlags.Sleeping | \ 13 | CraftConditionFlags.BanArts | \ 14 | CraftConditionFlags.Darkness | \ 15 | CraftConditionFlags.BanCraft | \ 16 | CraftConditionFlags.Confusion | \ 17 | CraftConditionFlags.Stun | \ 18 | CraftConditionFlags.OnehitKill | \ 19 | CraftConditionFlags.Burning | \ 20 | CraftConditionFlags.Rage | \ 21 | CraftConditionFlags.Vanish | \ 22 | CraftConditionFlags.Reserve_2 | \ 23 | CraftConditionFlags.GreenPepper | \ 24 | CraftConditionFlags.Dead | \ 25 | CraftConditionFlags.Str | \ 26 | CraftConditionFlags.Def | \ 27 | CraftConditionFlags.Ats | \ 28 | CraftConditionFlags.Adf | \ 29 | CraftConditionFlags.Dex | \ 30 | CraftConditionFlags.Agl | \ 31 | CraftConditionFlags.Mov | \ 32 | CraftConditionFlags.Spd 33 | 34 | Level = 120 35 | MaximumHP = 59000 36 | InitialHP = 59000 37 | MaximumEP = 9000 38 | InitialEP = 9000 39 | MaximumCP = 200 40 | InitialCP = 0 41 | 42 | SPD = 120 43 | MoveSPD = 10 44 | MOV = 6 45 | STR = 3450 46 | DEF = 3114 47 | ATS = 2219 48 | ADF = 2391 49 | DEX = 150 50 | AGL = 32 51 | RNG = 2 52 | 53 | Unknown_2A = 0x0 54 | EXP = 1024 55 | Unknown_2E = 0x0 56 | Unknown_30 = 0x0 57 | AIType = 0xFF 58 | Unknown_33 = 0x3E8 59 | Unknown_35 = 0x9 60 | Unknown_36 = 0xA280 61 | EnemyFlags = 0x0000 62 | BattleFlags = 0x0804 63 | 64 | Unknown_3C = 0x1 65 | Unknown_3E = 0x0 66 | Sex = 9 67 | Unknown_41 = 0x1 68 | CharSize = 0x190 69 | DefaultEffectX = 0x0 70 | DefaultEffectZ = 0 71 | DefaultEffectY = 0x0 72 | Unknown_52 = 0x60 73 | Unknown_53 = 0x50 74 | Unknown_54 = 0xA0 75 | Unknown_55 = 0xB0 76 | #Resistance = 0xF0008FFF 77 | AttributeRate = [ 100, 100, 100, 100, 100, 100, 100 ] 78 | Sepith = [ 255, 255, 255, 255, 255, 255, 255 ] 79 | DropItem = [ 0x01FF, 0x0000 ] 80 | DropRate = [ 100, 0 ] 81 | Equipment = [ 0x0009, 0x0000, 0x0000, 0x0000, 0x0000 ] 82 | Orbment = [ 0x0000, 0x0000, 0x0000, 0x0000 ] 83 | 84 | RunawayType = 0 85 | RunawayRate = 0 86 | RunawayParam1 = 0 87 | Reserve1 = 0 88 | 89 | Craft_03E8 = CreateCraft( 90 | "", 91 | "", 92 | 0x05, 0x12, 0x15, 93 | CraftAttribute.NoAttribute, 94 | CraftRange.Target, 95 | CraftState.Physical, CraftState.QueryMonsterInfo, 96 | 0, 0, 97 | 0, 30, 98 | 0, 99 | 0, 100 | 60, 0, 101 | 0, 0, 102 | ) 103 | 104 | 神速 = CreateCraft( 105 | "神速", 106 | "", 107 | 0x05, 0x12, 0x1, 108 | CraftAttribute.NoAttribute, 109 | CraftRange.LineOnLocationIncludeSelf, 110 | CraftState.Physical, CraftState.InterruptAria, 111 | 1, 50, 112 | 0, 5, 113 | 0, 114 | 3, 115 | 30, 0, 116 | 0, 0, 117 | ) 118 | 119 | 朗基努斯枪 = CreateCraft( 120 | "朗基努斯枪", 121 | "据说当年第七柱用这招杀了一个人。", 122 | 0x05, 0x12, 0x1, 123 | CraftAttribute.NoAttribute, 124 | CraftRange.CircleOnLocation, 125 | CraftState.Physical, CraftState.NoneState, 126 | 50, 10, 127 | 0, 30, 128 | 0, 129 | 5, 130 | 100, 0, 131 | 0, 0, 132 | ) 133 | 134 | 天地乖离 = CreateCraft( 135 | "天地乖离", 136 | "用超高速旋转的枪头形成的空间断层将所有敌人送入异次元空间。", 137 | 0x05, 0x12, 0x1, 138 | CraftAttribute.NoAttribute, 139 | CraftRange.LineOnLocation, 140 | CraftState.Physical, CraftState.NoneState, 141 | 54, 100, 142 | 0, 70, 143 | 0, 144 | 17, 145 | 200, 0, 146 | 0, 0, 147 | ) 148 | 149 | 疾风轰雷闪 = CreateCraft( 150 | "疾风轰雷闪", 151 | "突贯攻击", 152 | 0x05, 0x12, 0x1, 153 | CraftAttribute.NoAttribute, 154 | CraftRange.LineOnLocationIncludeSelf, 155 | CraftState.Physical, CraftState.InterruptAria, 156 | 1, 50, 157 | 0, 30, 158 | 0, 159 | 3, 160 | 60, 0, 161 | 0, 0, 162 | ) 163 | 164 | 大地轰雷锤 = CreateCraft( 165 | "大地轰雷锤", 166 | "以自身为避雷针,落下轰击整个战场的巨雷。", 167 | 0x05, 0x12, 0x1, 168 | CraftAttribute.NoAttribute, 169 | CraftRange.FullMap, 170 | CraftState.Arts, CraftState.BanCraft, 171 | 1, 50, 172 | 0, 30, 173 | 0, 174 | 100, 175 | 100, 0, 176 | 100, 3, 177 | ) 178 | 179 | 横扫千军 = CreateCraft( 180 | "横扫千军", 181 | "用横扫攻击将前方的敌人击退。", 182 | 0x05, 0x12, 0x1, 183 | CraftAttribute.NoAttribute, 184 | CraftRange.CircleOnSelf, 185 | CraftState.Physical, CraftState.Stun, 186 | 1, 4, 187 | 0, 30, 188 | 0, 189 | 6, 190 | 100, 0, 191 | 100, 5, 192 | ) 193 | 194 | 圣技大十字 = CreateCraft( 195 | "圣技·大十字", 196 | "", 197 | 0x06, 0x12, 0x1, 198 | CraftAttribute.NoAttribute, 199 | CraftRange.FullMap, 200 | CraftState.Physical, CraftState.NoneState, 201 | 1, 50, 202 | 0, 30, 203 | 100, 204 | 100, 205 | 400, 0, 206 | 0, 0, 207 | ) 208 | 209 | 摘面具 = CreateCraft( 210 | "摘面具", 211 | "改", 212 | 0x05, 0x42, 0x1, 213 | CraftAttribute.NoAttribute, 214 | CraftRange.Target, 215 | CraftState.Physical, CraftState.NoneState, 216 | 1, 1, 217 | 0, 0, 218 | 0, 219 | 1, 220 | 0, 0, 221 | 0, 0, 222 | ) 223 | 224 | 暴雨疾风枪 = CreateCraft( 225 | "暴雨疾风枪", 226 | "以人类之身无法察觉的速度发出无数的枪把对手刺穿,一切防御\\n在这面前都显得苍白无力。此神技后来流传到某组织的No.3手上。", 227 | 0x05, 0x12, 0x1, 228 | CraftAttribute.NoAttribute, 229 | CraftRange.CircleOnLocationExclude, 230 | CraftState.Physical, CraftState.QueryMonsterInfo, 231 | 50, 10, 232 | 0, 40, 233 | 0, 234 | 4, 235 | 50, 0, 236 | 0, 0, 237 | ) 238 | 239 | 零时迷子 = CreateCraft( 240 | "零时迷子", 241 | "", 242 | 0x05, 0x82, 0x1, 243 | CraftAttribute.NoAttribute, 244 | CraftRange.FullMap, 245 | CraftState.NoneState, CraftState.NoneState, 246 | 1, 0, 247 | 0, 0, 248 | 0, 249 | 0, 250 | 0, 0, 251 | 0, 0, 252 | ) 253 | 254 | 幻银方舟炮 = CreateCraft( 255 | "幻银方舟炮", 256 | "攻击:全体\\n召唤巨大的银色方舟,全炮台开火,将大地上的一切歼灭。", 257 | 0x4A, 0x12, 0x21, 258 | CraftAttribute.Gen, 259 | CraftRange.CircleOnLocationExclude, 260 | CraftState.Arts, CraftState.NoneState, 261 | 1, 100, 262 | 0, 0, 263 | 0, 264 | 4, 265 | 380, 0, 266 | 0, 0, 267 | ) 268 | 269 | 270 | CraftList = CreateCraftList([ 271 | Craft_03E8, 272 | 朗基努斯枪, 273 | 天地乖离, 274 | 疾风轰雷闪, 275 | 大地轰雷锤, 276 | 横扫千军, 277 | 圣技大十字, 278 | 摘面具, 279 | 暴雨疾风枪, 280 | 零时迷子, 281 | 神速, 282 | #幻银方舟炮, 283 | ]) 284 | 285 | Attack = CreateAI(0x1, 0, 0x0, 0x1, 0x00, 0x05, Craft_03E8, [0, 0, 1, 0]) 286 | 287 | Craft_暴雨疾风枪 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x15, 暴雨疾风枪, [0, 0, 0, 0]) 288 | Craft_摘面具 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x13, 摘面具, [70, 255, 0, 0]) 289 | Craft_朗基努斯枪 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x17, 朗基努斯枪, [30, 1, 0, 0]) 290 | Craft_疾风轰雷闪 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x10, 疾风轰雷闪, [0, 0, 1, 0]) 291 | Craft_横扫千军 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x12, 横扫千军, [0, 0, 1, 0]) 292 | Craft_天地乖离 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x18, 天地乖离, [30, 1, 0, 0]) 293 | Craft_大地轰雷锤 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x11, 大地轰雷锤, [0, 0, 1, 0]) 294 | Craft_零时迷子 = CreateAI(0xB, 100, 0x12, 0x1, 0x00, 0x14, 零时迷子, [0, 0, 0, 0]) 295 | Craft_神速 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x19, 神速, [0, 0, 1, 0]) 296 | 297 | #Craft_幻银方舟炮 = CreateAI(0xB, 100, 0x12, 0x1, 6, 7, 幻银方舟炮, [0, 0, 0, 0]) 298 | 299 | SCraft_圣技大十字 = CreateAI(0xA, 100, 0x0, 0x1, 0x00, 0x1A, 圣技大十字, [100, 0, 0, 0]) 300 | 301 | 302 | ArtsAIList = [] 303 | CraftAIList = [Craft_暴雨疾风枪, Craft_摘面具, Craft_神速, Craft_零时迷子, Craft_朗基努斯枪, Craft_疾风轰雷闪, Craft_横扫千军, Craft_天地乖离, Craft_大地轰雷锤] 304 | SCraftAIList = [SCraft_圣技大十字] 305 | SupportCraftAIList = [] 306 | 307 | SaveToMS("ms90010.dat", locals()) 308 | 309 | Try(main) -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/ms90011.py: -------------------------------------------------------------------------------- 1 | from BattleMonsterStatus import * 2 | 3 | # 敌人 4 | 5 | def main(): 6 | Name = "阿瑞安赫德" 7 | Description = "结社『使徒』的第七柱,\\n使用超越人类认知的枪\\n技和S级的幸运,\\n可将任何敌人完全压制。" 8 | ASFile = "as90010.dat" 9 | Symbol = "sy04200.itp" 10 | 11 | Level = 999 12 | MaximumHP = 118000 13 | InitialHP = 118000 14 | MaximumEP = 0 15 | InitialEP = 0 16 | MaximumCP = 200 17 | InitialCP = 200 18 | 19 | SPD = 120 20 | MoveSPD = 10 21 | MOV = 6 22 | STR = 3450 23 | DEF = 3114 24 | ATS = 2219 25 | ADF = 9999 26 | DEX = 150 27 | AGL = 32 28 | RNG = 2 29 | 30 | Unknown_2A = 0x0 31 | EXP = 9999 32 | Unknown_2E = 0x0 33 | Unknown_30 = 0x0 34 | AIType = 0x0 35 | Unknown_33 = 0x3E8 36 | Unknown_35 = 0x9 37 | Unknown_36 = 0xA280 38 | EnemyFlags = 0x0000 39 | BattleFlags = 0x0A04 40 | 41 | Unknown_3C = 0x1 42 | Unknown_3E = 0x0 43 | Sex = 9 44 | Unknown_41 = 0x1 45 | CharSize = 0x190 46 | DefaultEffectX = 0x0 47 | DefaultEffectZ = 0 48 | DefaultEffectY = 0x0 49 | Unknown_52 = 0x60 50 | Unknown_53 = 0x50 51 | Unknown_54 = 0xA0 52 | Unknown_55 = 0xB0 53 | Resistance = 0xFFFFFFFF 54 | AttributeRate = [ 100, 100, 100, 100, 100, 100, 100 ] 55 | Sepith = [ 255, 255, 255, 255, 255, 255, 255 ] 56 | DropItem = [ 0x0000, 0x0000 ] 57 | DropRate = [ 100, 100 ] 58 | Equipment = [ 0x0009, 0x0000, 0x0000, 0x0000, 0x0000 ] 59 | Orbment = [ 0x0000, 0x0000, 0x0000, 0x0000 ] 60 | 61 | RunawayType = 0 62 | RunawayRate = 0 63 | RunawayParam1 = 0 64 | Reserve1 = 0 65 | 66 | Craft_03E8 = CreateCraft( 67 | "", 68 | "", 69 | 0x05, 0x12, 0x15, 70 | CraftAttribute.NoAttribute, 71 | CraftRange.Target, 72 | CraftState.Physical, CraftState.NoneState, 73 | 0, 0, 74 | 0, 30, 75 | 0, 76 | 0, 77 | 100, 0, 78 | 0, 0, 79 | ) 80 | 81 | 朗基努斯枪 = CreateCraft( 82 | "朗基努斯枪", 83 | "据说当年第七柱用这招杀了一个人。", 84 | 0x05, 0x12, 0x1, 85 | CraftAttribute.NoAttribute, 86 | CraftRange.FullMap, 87 | CraftState.Physical, CraftState.NoneState, 88 | 50, 50, 89 | 0, 30, 90 | 0, 91 | 5, 92 | 100, 0, 93 | 0, 0, 94 | ) 95 | 96 | 天地乖离 = CreateCraft( 97 | "天地乖离", 98 | "用超高速旋转的枪头形成的空间断层将所有敌人送入异次元空间。", 99 | 0x05, 0x12, 0x1, 100 | CraftAttribute.NoAttribute, 101 | CraftRange.LineOnLocation, 102 | CraftState.Physical, CraftState.NoneState, 103 | 54, 100, 104 | 0, 70, 105 | 0, 106 | 17, 107 | 200, 0, 108 | 0, 0, 109 | ) 110 | 111 | 疾风轰雷闪 = CreateCraft( 112 | "疾风轰雷闪", 113 | "突贯攻击", 114 | 0x05, 0x12, 0x1, 115 | CraftAttribute.NoAttribute, 116 | CraftRange.LineOnLocationIncludeSelf, 117 | CraftState.Physical, CraftState.NoneState, 118 | 1, 50, 119 | 0, 30, 120 | 0, 121 | 3, 122 | 60, 0, 123 | 0, 0, 124 | ) 125 | 126 | 大地轰雷锤 = CreateCraft( 127 | "大地轰雷锤", 128 | "以自身为避雷针,落下轰击整个战场的巨雷。", 129 | 0x05, 0x12, 0x1, 130 | CraftAttribute.NoAttribute, 131 | CraftRange.FullMap, 132 | CraftState.Arts, CraftState.BanCraft, 133 | 1, 50, 134 | 0, 30, 135 | 0, 136 | 100, 137 | 100, 0, 138 | 100, 3, 139 | ) 140 | 141 | 横扫千军 = CreateCraft( 142 | "横扫千军", 143 | "用横扫攻击将前方的敌人击退。", 144 | 0x05, 0x12, 0x1, 145 | CraftAttribute.NoAttribute, 146 | CraftRange.CircleOnSelf, 147 | CraftState.Physical, CraftState.Stun, 148 | 1, 4, 149 | 0, 30, 150 | 0, 151 | 6, 152 | 100, 0, 153 | 100, 5, 154 | ) 155 | 156 | 圣技大十字 = CreateCraft( 157 | "圣技·大十字", 158 | " ", 159 | 0x06, 0x12, 0x1, 160 | CraftAttribute.NoAttribute, 161 | CraftRange.FullMap, 162 | CraftState.Physical, CraftState.NoneState, 163 | 1, 50, 164 | 0, 30, 165 | 100, 166 | 100, 167 | 325, 0, 168 | 0, 0, 169 | ) 170 | 171 | 摘面具 = CreateCraft( 172 | "摘面具", 173 | "改", 174 | 0x05, 0x42, 0x1, 175 | CraftAttribute.NoAttribute, 176 | CraftRange.Target, 177 | CraftState.Physical, CraftState.NoneState, 178 | 1, 1, 179 | 0, 0, 180 | 0, 181 | 1, 182 | 0, 0, 183 | 0, 0, 184 | ) 185 | 186 | 暴雨疾风枪 = CreateCraft( 187 | "暴雨疾风枪", 188 | "以人类之身无法察觉的速度发出无数的枪把对手刺穿,一切防御\\n在这面前都显得苍白无力。此神技后来流传到某组织的No.3手上。", 189 | 0x05, 0x12, 0x1, 190 | CraftAttribute.NoAttribute, 191 | CraftRange.CircleOnLocationExclude, 192 | CraftState.Physical, CraftState.NoneState, 193 | 50, 10, 194 | 0, 40, 195 | 0, 196 | 4, 197 | 50, 0, 198 | 0, 0, 199 | ) 200 | 201 | 202 | CraftList = CreateCraftList([ 203 | Craft_03E8, 204 | 朗基努斯枪, 205 | 天地乖离, 206 | 疾风轰雷闪, 207 | 大地轰雷锤, 208 | 横扫千军, 209 | 圣技大十字, 210 | 摘面具, 211 | 暴雨疾风枪, 212 | ]) 213 | 214 | Attack = CreateAI(0x1, 0, 0x8, 0x1, 0x00, 0x05, Craft_03E8, [0, 0, 1, 0]) 215 | 216 | Craft_摘面具 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x1C, 摘面具, [50, 255, 0, 0]) 217 | Craft_天地乖离 = CreateAI(0x2, 10, 0x7, 0x1, 0x00, 0x18, 天地乖离, [30, 1, 1, 0]) 218 | Craft_暴雨疾风枪 = CreateAI(0x2, 10, 0x7, 0x1, 0x00, 0x15, 暴雨疾风枪, [0, 0, 1, 0]) 219 | Craft_疾风轰雷闪 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x10, 疾风轰雷闪, [0, 0, 1, 0]) 220 | Craft_横扫千军 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x12, 横扫千军, [0, 0, 1, 0]) 221 | Craft_大地轰雷锤 = CreateAI(0x2, 30, 0x7, 0x1, 0x00, 0x1D, 大地轰雷锤, [0, 0, 1, 0]) 222 | 223 | SCraft_圣技大十字 = CreateAI(0xA, 100, 0x0, 0x1, 0x00, 0x1A, 圣技大十字, [200, 0, 0, 0]) 224 | SCraft_圣技大十字_2 = CreateAI(0xA, 30, 0x0, 0x1, 0x00, 0x1A, 圣技大十字, [100, 0, 0, 0]) 225 | SCraft_朗基努斯枪 = CreateAI(0x2, 100, 0x7, 0x1, 0x00, 0x1B, 朗基努斯枪, [30, 1, 4, 0]) 226 | 227 | ArtsAIList = [] 228 | CraftAIList = [Craft_摘面具, Craft_天地乖离, Craft_暴雨疾风枪, Craft_疾风轰雷闪, Craft_横扫千军, Craft_大地轰雷锤] 229 | SCraftAIList = [SCraft_圣技大十字, SCraft_圣技大十字_2, SCraft_朗基努斯枪] 230 | SupportCraftAIList = [] 231 | 232 | SaveToMS("ms90011.dat", locals()) 233 | 234 | TryInvoke(main) -------------------------------------------------------------------------------- /Decompiler/p/Arianrhod/sysatk77.eff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Arianrhod/sysatk77.eff -------------------------------------------------------------------------------- /Decompiler/p/Campanella/bface177.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Campanella/bface177.itp -------------------------------------------------------------------------------- /Decompiler/p/Campanella/bface177.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Campanella/bface177.psd -------------------------------------------------------------------------------- /Decompiler/p/Campanella/ms90020.py: -------------------------------------------------------------------------------- 1 | from BattleMonsterStatus import * 2 | 3 | def main(): 4 | Name = "小丑肯帕雷拉" 5 | Description = "以小丑般形式展开行动\\n的执行者NO.0,  \\n操使奇妙的火焰幻术,\\n将敌人迫向绝望。" 6 | ASFile = "as90020.dat" 7 | Symbol = "sy03600.itp" 8 | 9 | Resistance = CraftConditionFlags.Poison | \ 10 | CraftConditionFlags.Frozen | \ 11 | CraftConditionFlags.Landification | \ 12 | CraftConditionFlags.Sleeping | \ 13 | CraftConditionFlags.BanArts | \ 14 | CraftConditionFlags.Darkness | \ 15 | CraftConditionFlags.BanCraft | \ 16 | CraftConditionFlags.Confusion | \ 17 | CraftConditionFlags.Stun | \ 18 | CraftConditionFlags.OnehitKill | \ 19 | CraftConditionFlags.Burning | \ 20 | CraftConditionFlags.Rage | \ 21 | CraftConditionFlags.Vanish | \ 22 | CraftConditionFlags.Reserve_2 | \ 23 | CraftConditionFlags.GreenPepper | \ 24 | CraftConditionFlags.Dead | \ 25 | CraftConditionFlags.Str | \ 26 | CraftConditionFlags.Def | \ 27 | CraftConditionFlags.Ats | \ 28 | CraftConditionFlags.Adf | \ 29 | CraftConditionFlags.Dex | \ 30 | CraftConditionFlags.Agl | \ 31 | CraftConditionFlags.Mov | \ 32 | CraftConditionFlags.Spd 33 | 34 | Level = 90 35 | MaximumHP = 37170 36 | InitialHP = 37170 37 | MaximumEP = 60000 38 | InitialEP = 60000 39 | MaximumCP = 200 40 | InitialCP = 180 41 | 42 | SPD = 120*1 43 | MoveSPD = 7 44 | MOV = 6 45 | STR = 1805 46 | DEF = 1727 47 | ATS = 1394 48 | ADF = 1286 49 | DEX = 105 50 | AGL = 16 51 | RNG = 50 52 | 53 | Unknown_2A = 0x0 54 | EXP = 512 55 | Unknown_2E = 0x0 56 | Unknown_30 = 0x0 57 | AIType = 0x0 58 | Unknown_33 = 0x3E8 59 | Unknown_35 = 0x9 60 | Unknown_36 = 0xA280 61 | EnemyFlags = 0x0000 62 | BattleFlags = 0x0804 63 | 64 | Unknown_3C = 0x1 65 | Unknown_3E = 0x0 66 | Sex = 9 67 | Unknown_41 = 0x0 68 | CharSize = 0x190 69 | DefaultEffectX = 0x0 70 | DefaultEffectZ = 800 71 | DefaultEffectY = 0x0 72 | Unknown_52 = 0x60 73 | Unknown_53 = 0x50 74 | Unknown_54 = 0xA0 75 | Unknown_55 = 0xB0 76 | AttributeRate = [ 100, 100, 0, 100, 100, 100, 100 ] 77 | Sepith = [ 50, 50, 50, 50, 50, 50, 50 ] 78 | DropItem = [ 0x0000, 0x0000 ] 79 | DropRate = [ 0, 0 ] 80 | Equipment = [ 练习用武器, 0x0000, 0x0000, 0x0000, 0x0000 ] 81 | Orbment = [ 0x0000, 0x0000, 0x0000, 0x0000 ] 82 | 83 | RunawayType = 0 84 | RunawayRate = 0 85 | RunawayParam1 = 0 86 | Reserve1 = 0 87 | 88 | Craft_03E8 = CreateCraft( 89 | "", 90 | "", 91 | 0x05, 0x12, 0x1, 92 | CraftAttribute.NoAttribute, 93 | CraftRange.TargetWithoutMove, 94 | CraftState.Physical, CraftState.NoneState, 95 | 1, 100, 96 | 0, 20, 97 | 0, 98 | 100, 99 | 100, 0, 100 | 0, 0, 101 | ) 102 | 103 | 相位重置 = CreateCraft( 104 | "相位重置", 105 | "", 106 | 0x05, 0x92, 0x1, 107 | CraftAttribute.NoAttribute, 108 | CraftRange.FullMap, 109 | CraftState.NoneState, CraftState.NoneState, 110 | 1, 50, 111 | 0, 10, 112 | 0, 113 | 100, 114 | 0, 0, 115 | 0, 0, 116 | ) 117 | 118 | 置换 = CreateCraft( 119 | "置换", 120 | "", 121 | 0x05, 0x42, 0x1, 122 | CraftAttribute.NoAttribute, 123 | CraftRange.CircleOnSelf, 124 | CraftState.NoneState, CraftState.NoneState, 125 | 1, 1, 126 | 0, 10, 127 | 0, 128 | 1, 129 | 0, 0, 130 | 0, 0, 131 | ) 132 | 133 | 空间转移 = CreateCraft( 134 | "空间转移", 135 | " ", 136 | 0x05, 0x12, 0x0, 137 | CraftAttribute.NoAttribute, 138 | CraftRange.SelectLocation, 139 | CraftState.NoneState, CraftState.NoneState, 140 | 0, 100, 141 | 0, 5, 142 | 0, 143 | 50, 144 | 0, 0, 145 | 0, 0, 146 | ) 147 | 148 | 伪盐之桩 = CreateCraft( 149 | "伪·盐之桩", 150 | "召唤曾使一个国家毁灭的盐之桩(只是幻术的伪造品),\\n使敌方全员化为盐之碎粒。", 151 | 0x06, 0x12, 0x1, 152 | CraftAttribute.NoAttribute, 153 | CraftRange.CircleOnLocation, 154 | CraftState.Physical, CraftState.NoneState, 155 | 1, 50, 156 | 0, 30, 157 | 100, 158 | 100, 159 | 175, 0, 160 | 0, 0, 161 | ) 162 | 163 | 死亡之指 = CreateCraft( 164 | "死亡之指", 165 | "", 166 | 0x05, 0x12, 0x1, 167 | CraftAttribute.NoAttribute, 168 | CraftRange.FullMap, 169 | CraftState.Physical, CraftState.NoneState, 170 | 1, 100, 171 | 0, 25, 172 | 0, 173 | 100, 174 | 150, 0, 175 | 0, 0, 176 | ) 177 | 178 | 时空追放 = CreateCraft( 179 | "时空追放", 180 | "", 181 | 0x05, 0x12, 0x1, 182 | CraftAttribute.NoAttribute, 183 | CraftRange.FullMap, 184 | CraftState.NoneState, CraftState.NoneState, 185 | 1, 100, 186 | 0, 50, 187 | 0, 188 | 100, 189 | 0, 0, 190 | 0, 0, 191 | ) 192 | 193 | 真实之镜 = CreateCraft( 194 | "照妖镜", 195 | "", 196 | 0x05, 0x92, 0x1, 197 | CraftAttribute.NoAttribute, 198 | CraftRange.FullMap, 199 | CraftState.NoneState, CraftState.NoneState, 200 | 1, 100, 201 | 0, 50, 202 | 0, 203 | 100, 204 | 0, 0, 205 | 0, 0, 206 | ) 207 | 208 | 玻璃渣 = CreateCraft( 209 | "玻璃渣", 210 | "", 211 | 0x05, 0x12, 0x1, 212 | CraftAttribute.NoAttribute, 213 | CraftRange.CircleOnLocation, 214 | CraftState.Physical, CraftState.NoneState, 215 | 1, 100, 216 | 0, 30, 217 | 0, 218 | 5, 219 | 60, 0, 220 | 0, 0, 221 | ) 222 | 223 | 224 | ################################################################################# 225 | # arts # 226 | ################################################################################# 227 | 228 | 龙皇炼狱火 = CreateCraft( 229 | "伪·龙皇炼狱火", 230 | "", 231 | 0x23, 0x12, 0x21, 232 | CraftAttribute.Hono, 233 | CraftRange.FullMap, 234 | CraftState.Arts, CraftState.Burning, 235 | 135, 100, 236 | 0, 20, 237 | 0, 238 | 100, 239 | 410, 0, 240 | 15, 3, 241 | ) 242 | 243 | 闪电之力 = CreateCraft( 244 | "伪·闪电之力", 245 | "", 246 | 0x05, 0x12, 0x21, 247 | CraftAttribute.Kaze, 248 | CraftRange.FullMap, 249 | CraftState.Arts, CraftState.BanCraft, 250 | 135, 100, 251 | 0, 15, 252 | 0, 253 | 100, 254 | 270, 0, 255 | 30, 3, 256 | ) 257 | 258 | 虚空幻域 = CreateCraft( 259 | "伪·虚空幻域", 260 | "", 261 | 0x79, 0xC2, 0x21, 262 | CraftAttribute.Gen, 263 | CraftRange.FullMap, 264 | CraftState.Stealth, CraftState.NoneState, 265 | 135, 100, 266 | 0, 25, 267 | 0, 268 | 100, 269 | 1, 9999, 270 | 0, 0, 271 | ) 272 | 273 | ################################################################################# 274 | # arts end # 275 | ################################################################################# 276 | 277 | CraftList = CreateCraftList([ 278 | Craft_03E8, 279 | 相位重置, 280 | 置换, 281 | 空间转移, 282 | 283 | 伪盐之桩, 284 | 死亡之指, 285 | 玻璃渣, 286 | 时空追放, 287 | 真实之镜, 288 | 289 | 龙皇炼狱火, 290 | 闪电之力, 291 | 虚空幻域, 292 | ]) 293 | 294 | Attack = CreateAI(0x1, 100, 0x8, 0x1, 0x00, 0x05, Craft_03E8, [0, 0, 0, 0]) 295 | 296 | Arts_龙皇炼狱火 = CreateAI(0x2, 30, 0x7, 0x1, 0x06, 0x07, 龙皇炼狱火, [0, 0, 1, 0]) 297 | Arts_闪电之力 = CreateAI(0x2, 30, 0x7, 0x1, 0x06, 0x18, 闪电之力, [0, 0, 1, 0]) 298 | Arts_虚空幻域 = CreateAI(0x2, 30, 0x7, 0x1, 0x06, 0x07, 虚空幻域, [0, 0, 1, 0]) 299 | 300 | Craft_置换 = CreateAI(0x8, 100, 0x0, 0x1, 0x00, 0x12, 置换, [100, 1, 0, 0]) 301 | Craft_相位重置 = CreateAI(0x2, 25, 0x0, 0x1, 0x00, 0x11, 相位重置, [0, 0, 0, 0]) 302 | Craft_空间转移 = CreateAI(0x6, 50, 0x17, 0x1, 0x00, 0x14, 空间转移, [3500, 2, 0, 2]) 303 | Craft_死亡之指 = CreateAI(0x6, 50, 0x17, 0x1, 0x00, 0x05, 死亡之指, [3500, 2, 0, 2]) 304 | Craft_玻璃渣 = CreateAI(0x6, 50, 0x17, 0x1, 0x00, 0x17, 玻璃渣, [3500, 2, 0, 2]) 305 | Craft_时空追放 = CreateAI(0x6, 50, 0x17, 0x1, 0x00, 0x19, 时空追放, [3500, 2, 0, 2]) 306 | Craft_真实之镜 = CreateAI(0x6, 50, 0x17, 0x1, 0x00, 0x10, 真实之镜, [3500, 2, 0, 2]) 307 | 308 | SCraft_伪盐之桩 = CreateAI(0xA, 100, 0x0, 0x1, 0x00, 0x1A, 伪盐之桩, [200, 0, 0, 0]) 309 | 310 | ArtsAIList = [Arts_虚空幻域, Arts_龙皇炼狱火, Arts_闪电之力] 311 | CraftAIList = [Craft_死亡之指, Craft_真实之镜, Craft_时空追放, Craft_玻璃渣, Craft_置换, Craft_相位重置, Craft_空间转移] 312 | SCraftAIList = [SCraft_伪盐之桩] 313 | SupportCraftAIList = [] 314 | 315 | SaveToMS("ms90020.dat", locals()) 316 | 317 | Try(main) 318 | -------------------------------------------------------------------------------- /Decompiler/p/Cassius/Cassius.py: -------------------------------------------------------------------------------- 1 | from ActionHelper import * 2 | from Voice import * 3 | from ChrFile import * -------------------------------------------------------------------------------- /Decompiler/p/Cassius/ChrFile.py: -------------------------------------------------------------------------------- 1 | CHR_Cassius_Walk = 'chr/ch93670.itc' 2 | CHR_Cassius_Defense = 'chr/ch93671.itc' 3 | CHR_Cassius_Dead = 'chr/ch93672.itc' 4 | CHR_Cassius_Stand = 'chr/ch94670.itc' 5 | CHR_Cassius_Move = 'chr/ch94671.itc' 6 | CHR_Cassius_Attack = 'chr/ch94672.itc' 7 | CHR_Cassius_Underattack = 'chr/ch94673.itc' 8 | CHR_Cassius_UseItem = CHR_Cassius_Underattack 9 | CHR_Cassius_Stun = 'chr/ch94674.itc' 10 | CHR_Cassius_Aria = 'chr/ch94675.itc' 11 | CHR_Cassius_BaiLieJi = 'chr/ch94678.itc' 12 | CHR_Cassius_Phenix = 'chr/ch94679.itc' 13 | -------------------------------------------------------------------------------- /Decompiler/p/Cassius/SysCraft.py: -------------------------------------------------------------------------------- 1 | from Cassius import * 2 | 3 | arts_aria_eff_id = 0 4 | 5 | def init(): 6 | #LoadEffect(0x80, "battle/mgaria0.eff") 7 | #LoadEffect(0x81, "battle/mgaria1.eff") 8 | 9 | LoadEffect(0x80, "event/ev10006.eff") 10 | LoadEffect(0x81, "event/ev10007.eff") 11 | 12 | LoadEffect(0x82, "battle/cr035000.eff") 13 | LoadEffect(0x83, "battle/cr035100.eff") 14 | 15 | #PlayEffect(0xFF, 0xFF, 0x37, 0x41, 0, 1100, 0, 0, 0, 0, 1000, 1000, 1000, 0xA) 16 | Jc(0x9, 0x1, 0x107, "loc_48A") 17 | AS_74(0x0, 0x100) 18 | Jump("loc_48E") 19 | 20 | label("loc_48A") 21 | 22 | AS_74(0x0, 0x20) 23 | 24 | label("loc_48E") 25 | 26 | AS_6E(0x400000) 27 | 28 | def stand(): 29 | label("SysCraft_Stand") 30 | 31 | SetChrChip(0xFF, 0x0) 32 | for i in range(8): 33 | SetChrSubChip(CraftTarget.Self, i) 34 | Sleep(130) 35 | Yield() 36 | 37 | Jump("SysCraft_Stand") 38 | 39 | def move(): 40 | label("SysCraft_Move") 41 | 42 | SetChrChip(0xFF, 0x1) 43 | for i in range(8): 44 | SetChrSubChip(CraftTarget.Self, i) 45 | Sleep(40) 46 | Yield() 47 | 48 | Jump("SysCraft_Move") 49 | 50 | def underAttack(): 51 | with ResourceLock: 52 | LoadEffect(1, "eff/trapdmg2.eff") 53 | 54 | Knockback(0) 55 | SetChrChip(CraftTarget.Self, 4) 56 | SetChrSubChip(CraftTarget.Self, 2) 57 | SoundEx(卡西乌斯_防御, 0) 58 | PlayEffect(0xFF, 0xFF, 1, 0, 0, 800, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 59 | Sleep(1000) 60 | Yield() 61 | 62 | FreeEffect(1) 63 | 64 | def stun(): 65 | SetChrChip(0xFF, 5) 66 | SetChrSubChip(0xFF, 0) 67 | Sleep(100) 68 | Yield() 69 | 70 | def dead(): 71 | Dead() 72 | 73 | Voice(0, 卡西乌斯_死亡1, 0, 0, 0, 0xFE) 74 | Sleep(100) 75 | Yield() 76 | SetChrChip(0xFF, 5) 77 | SetChrSubChip(0xFF, 0) 78 | Yield() 79 | 80 | Return() 81 | 82 | def artsAria(): 83 | TurnDirection(0xFF, 0xFB, 0x0, 500, 0x0) 84 | Jc(0x8, 0x1, 0x0, "arts_effect_end") 85 | Jc(0x2D, 0x1, 0x1, "other_voice") 86 | PlayEffect(0xFF, 0xFF, 0x80, 0x41, 0, 50, 0, 0, 0, 0, -1, -1, -1, arts_aria_eff_id) 87 | AS_A9(0xFF, 0x0, 0xFFFF0000) 88 | Jump("arts_effect_end") 89 | 90 | label("other_voice") 91 | 92 | PlayEffect(0xFF, 0xFF, 0x80, 0x41, 0, 50, 0, 0, 0, 0, -1, -1, -1, arts_aria_eff_id) 93 | Voice(0x0, 卡西乌斯_蓄力, 0, 0, 0, 0xFE) 94 | SoundEx(509, 0x0) 95 | 96 | label("arts_effect_end") 97 | 98 | SendMessage(0x1) 99 | Call("set_arts_chip") 100 | Return() 101 | 102 | label("set_arts_chip") 103 | 104 | SetChrChip(0xFF, 0x3) 105 | 106 | label("arts_chip_loop") 107 | 108 | for i in range(4): 109 | SetChrSubChip(0xFF, i) 110 | Sleep(130) 111 | Yield() 112 | 113 | Jump("arts_chip_loop") 114 | 115 | def artsCast(): 116 | Jc(0x2D, 0x3, 0x2, "arts_cast_skip_voice") 117 | #PlayEffect(0xFF, 0xF9, 0x81, 0x0, 0, 50, 0, 0, 0, 0, -1, -1, -1, 0) 118 | CancelEffect(0xFF, arts_aria_eff_id) 119 | SoundEx(510, 0x0) 120 | TurnDirection(0xFF, 0xFB, 0, 500, 0x0) 121 | Sleep(200) 122 | Yield() 123 | SetChrChip(0xFF, 3) 124 | SetChrSubChip(0xFF, 4) 125 | Sleep(300) 126 | Yield() 127 | Voice(0x0, 卡西乌斯_魔法施放, 0, 0, 0, 0xFE) 128 | SetChrSubChip(0xFF, 5) 129 | Sleep(0) 130 | Yield() 131 | 132 | label("arts_cast_skip_voice") 133 | 134 | ArtsUsing(0xFFFF) 135 | ArtsEnd() 136 | Return() 137 | 138 | def enterBattle(): 139 | BeginChrThread(0xFF, 1, "SysCraft_Stand", 0x0) 140 | Voice(0x0, 卡西乌斯_YAREYARE, 0, 0, 0, 0xFE) 141 | Yield() 142 | EndChrThread(0xFF, 1) 143 | Return() 144 | 145 | def battleWin(): 146 | pass 147 | 148 | def useItem(): 149 | SetChrChip(0xFF, 2) 150 | SetChrSubChip(0xFF, 1) 151 | Sleep(300) 152 | Yield() 153 | Voice(0x0, 卡西乌斯_YAREYARE, 0, 0, 0, 0xFE) 154 | SetChrSubChip(0xFF, 2) 155 | Sleep(300) 156 | Yield() 157 | PlayEffect(0xFF, 0xFF, 0x2A, 0x2, 0, 1000, 500, 0, 0, 0, 65535, 65535, 65535, 0xFF) 158 | Sleep(500) 159 | Yield() 160 | UseItemBegin() 161 | UseItemEnd() 162 | Return() 163 | 164 | def normalAttack(): 165 | AS_78(0x1) 166 | LoadChrChip(0x7, CHR_Cassius_Attack, 0xFF) 167 | LoadEffect(0, "battle/ms00001.eff") 168 | AS_78(0x0) 169 | 170 | ResetTarget() 171 | ResetLookingTargetData() 172 | LookingTargetAdd(0xFF, "", 0x0) 173 | LookingTargetAdd(0xFC, "", 0x0) 174 | LookingTarget(100, 20, 30) 175 | BeginChrThread(0xFF, 1, "SysCraft_Move", 0x0) 176 | AS_1E(0xFFFFFFFF) 177 | EndChrThread(0xFF, 1) 178 | TurnDirection(0xFF, 0xFE, 0, 0, 0x0) 179 | AS_89(0xFF) 180 | AS_6D(0x200000) 181 | SetChrChip(0xFF, 0x7) 182 | SetChrSubChip(0xFF, 0x0) 183 | Sleep(0x5A) 184 | Yield() 185 | 186 | # PlayEffect(0xFF, 0xFF, 0x82, 0x3, 0, 850, 0, 0, 0, 0, 900, 900, 900, -1) 187 | ShakeScreen(50, 50, 50, 500) 188 | Yield() 189 | 190 | SetChrSubChip(0xFF, 0x1) 191 | Sleep(100) 192 | Yield() 193 | 194 | AS_05(0xFF, 0x0, 0x0) 195 | Voice(0x0, 卡西乌斯_攻击1, 卡西乌斯_攻击2, 卡西乌斯_攻击3, 0, 0xFE) 196 | 197 | for i in range(2, 7): 198 | SetChrSubChip(CraftTarget.Self, i) 199 | Sleep(0x50) 200 | Yield() 201 | 202 | PlayEffect(0xFF, 0xFE, 0, 0x1, 0, 1000, 0, 0, 0, 0, 1000, 1000, 1000, -1) 203 | SoundEx(卡西乌斯_音效_普通攻击, 0) 204 | Knockback(1) 205 | ResetLookingTargetData() 206 | DamageAnime(0xFE, 0x1, 0x32) 207 | DamageCue(0xFE) 208 | ResetLookingTargetData() 209 | 210 | for i in range(7, 10): 211 | SetChrSubChip(CraftTarget.Self, i) 212 | Sleep(32) 213 | Yield() 214 | 215 | LookingTargetAdd(0xFF, "", 0x0) 216 | LookingTargetAdd(0xFC, "", 0x0) 217 | LookingTarget(100, 20, 30) 218 | AS_21(0x1, 0xFF, 150, 2000) 219 | Sleep(200) 220 | Yield() 221 | 222 | for i in range(10, 12): 223 | SetChrSubChip(CraftTarget.Self, i) 224 | Sleep(32) 225 | Yield() 226 | 227 | ChrMove(0xFF, 0xF0, 0, 0, 0, 100, 0x0) 228 | BeginChrThread(0xFF, 1, "SysCraft_Stand", 0x0) 229 | AS_8F(0x0) 230 | EndChrThread(0xFF, 1) 231 | AS_6E(0x200000) 232 | AS_6B() 233 | 234 | FreeEffect(0) 235 | 236 | Return() 237 | 238 | def counter(): 239 | attack_chip = 8 240 | critical_hit_eff = 1 241 | pre_critical_hit_eff = 2 242 | 243 | eff_list = [critical_hit_eff, pre_critical_hit_eff] 244 | 245 | with ResourceLock: 246 | LoadChrChip(attack_chip, CHR_Cassius_Attack, 0xFF) 247 | LoadEffect(critical_hit_eff, "battle/cr006402.eff") 248 | LoadEffect(pre_critical_hit_eff, "battle/cr006401.eff") 249 | 250 | ResetTarget() 251 | ResetLookingTargetData() 252 | LookingTargetAdd(0xFF, "", 0x0) 253 | LookingTargetAdd(0xFC, "", 0x0) 254 | LookingTarget(100, 20, 30) 255 | TurnDirection(0xFF, 0xFE, 0, 0, 0x0) 256 | AS_6D(0x200000) 257 | AS_89(0xFF) 258 | Yield() 259 | 260 | SetChrChip(CraftTarget.Self, attack_chip) 261 | SetChrSubChip(CraftTarget.Self, 0x0) 262 | Yield() 263 | 264 | PlayEffect(0xFF, 0xFF, pre_critical_hit_eff, 0x1, 0, 1000, 0, 0, 0, 0, 1000, 1000, 1000, 2) 265 | Sleep(200) 266 | Yield() 267 | 268 | SoundEx(183, 0) 269 | BeginChrThread(CraftTarget.Self, 1, "shake_self", 0x0) 270 | Sleep(0xA) 271 | Yield() 272 | Sleep(0x1F4) 273 | Yield() 274 | Voice(0, 卡西乌斯_百烈击2, 卡西乌斯_攻击5, 卡西乌斯_攻击7, 0, 0xFE) 275 | 276 | for i in range(1, 7): 277 | SetChrSubChip(CraftTarget.Self, i) 278 | Sleep(0x32) 279 | Yield() 280 | 281 | Knockback(8) 282 | DamageAnime(CraftTarget.TargetChr, 1, 0x32) 283 | DamageCue(0xFE) 284 | SetCondition(CraftTarget.TargetChr, CraftConditionFlags.Stun, 50, 1) 285 | SoundEx(卡西乌斯_音效_百烈击_结尾, 0) 286 | PlayEffect(0xFF, 0xFF, critical_hit_eff, 0x1, 0, 1000, 0, 0, 0, 0, 1000, 1000, 1000, 3) 287 | 288 | SetChrSubChip(CraftTarget.Self, 0x7) 289 | Sleep(0x32) 290 | Yield() 291 | 292 | SetChrSubChip(CraftTarget.Self, 0x8) 293 | Sleep(0x5DC) 294 | Yield() 295 | 296 | for i in range(9, 12): 297 | SetChrSubChip(CraftTarget.Self, i) 298 | Sleep(0x32) 299 | Yield() 300 | 301 | AS_14(0x2) 302 | 303 | for eff in eff_list: 304 | FreeEffect(eff) -------------------------------------------------------------------------------- /Decompiler/p/Cassius/Voice.py: -------------------------------------------------------------------------------- 1 | 卡西乌斯_攻击1 = 10000 2 | 卡西乌斯_攻击2 = 10001 3 | 卡西乌斯_攻击3 = 10002 4 | 卡西乌斯_攻击4 = 10003 5 | 卡西乌斯_攻击5 = 10008 6 | 卡西乌斯_攻击7 = 10011 7 | 卡西乌斯_攻击6 = 10005 8 | 9 | 卡西乌斯_蓄力 = 10006 10 | 卡西乌斯_魔法施放 = 10004 11 | 12 | 卡西乌斯_百烈击 = 10010 13 | 卡西乌斯_百烈击2 = 10014 14 | 卡西乌斯_音效_百烈击 = 10026 15 | 16 | 卡西乌斯_钢盔断_起跳 = 10007 17 | 18 | 卡西乌斯_YAREYARE = 10020 19 | 20 | 卡西乌斯_死亡1 = 10021 21 | 卡西乌斯_死亡2 = 10024 22 | 23 | 卡西乌斯_防御 = 10025 24 | 25 | 卡西乌斯_万象天引 = 10033 26 | 卡西乌斯_神罗天征 = 10034 27 | 卡西乌斯_神罗天征_ここより世界に痛みを = 10035 28 | 卡西乌斯_神罗天征_ここより = 10036 29 | 卡西乌斯_神罗天征_世界に痛みを = 10037 30 | 31 | 卡西乌斯_音效_普通攻击 = 10027 32 | 卡西乌斯_音效_百烈击_结尾 = 10028 33 | 34 | 卡西乌斯_音效_雷光击_旋转 = 10029 35 | 卡西乌斯_音效_雷光击_起跳 = 10030 36 | 卡西乌斯_音效_雷光击_移动 = 10031 37 | 卡西乌斯_音效_雷光击_击中 = 10032 38 | 卡西乌斯_音效_雷光击_现身 = 250 39 | 40 | 卡西乌斯_音效_钢盔断_起跳 = 844 41 | 42 | # ed7s0328.wav 43 | -------------------------------------------------------------------------------- /Decompiler/p/Cassius/as04670.py: -------------------------------------------------------------------------------- 1 | from Cassius import * 2 | import SysCraft 3 | 4 | def main(): 5 | CreateBattleAction("as04670.dat", ((128, 176), (128, 176), (128, 176), (128, 176), (128, 176), (128, 176), (128, 176), (128, 176))) 6 | 7 | AddPreloadChip(( 8 | CHR_Cassius_Stand, # 00 0 9 | CHR_Cassius_Move, # 01 1 10 | CHR_Cassius_Underattack, # 02 2 11 | CHR_Cassius_Aria, # 03 3 12 | CHR_Cassius_Defense, # 04 4 13 | CHR_Cassius_Dead, # 05 5 14 | )) 15 | 16 | CraftAction(( 17 | "SysCraft_Init", # 00 0 18 | "SysCraft_Stand", # 01 1 19 | "SysCraft_Move", # 02 2 20 | "SysCraft_UnderAttack", # 03 3 21 | "SysCraft_Dead", # 04 4 22 | "SysCraft_NormalAttack", # 05 5 23 | "SysCraft_ArtsAria", # 06 6 24 | "SysCraft_ArtsCast", # 07 7 25 | "SysCraft_Win", # 08 8 26 | "SysCraft_EnterBattle", # 09 9 27 | "SysCraft_UseItem", # 0A 10 28 | "SysCraft_Stun", # 0B 11 29 | "SysCraft_Unknown2", # 0C 12 30 | 'stub_craft', # 0D 13 31 | 'stub_craft', # 0E 14 32 | "SysCraft_Counter", # 0F 15 33 | "Craft_百烈击", # 10 16 34 | "Craft_钢盔回旋踢", # 11 17 35 | "Craft_钢盔断", # 12 18 36 | "Craft_神罗天征", # 13 19 37 | "Craft_精神分裂", # 14 20 38 | EMPTY_ACTION, # 15 21 39 | EMPTY_ACTION, # 16 22 40 | EMPTY_ACTION, # 17 23 41 | EMPTY_ACTION, # 18 24 42 | EMPTY_ACTION, # 19 25 43 | EMPTY_ACTION, # 1A 26 44 | EMPTY_ACTION, # 1B 27 45 | EMPTY_ACTION, # 1C 28 46 | EMPTY_ACTION, # 1D 29 47 | 48 | 'SysCraft_TeamRushInit', # 1E 30 49 | 'SysCraft_TeamRushAction', # 1F 31 50 | EMPTY_ACTION, # 20 32 51 | EMPTY_ACTION, # 21 33 52 | EMPTY_ACTION, # 22 34 53 | EMPTY_ACTION, # 23 35 54 | EMPTY_ACTION, # 24 36 55 | EMPTY_ACTION, # 25 37 56 | EMPTY_ACTION, # 26 38 57 | 58 | EMPTY_ACTION, # 27 39 59 | EMPTY_ACTION, # 28 40 60 | EMPTY_ACTION, # 29 41 61 | EMPTY_ACTION, # 2A 42 62 | EMPTY_ACTION, # 2B 43 63 | EMPTY_ACTION, # 2C 44 64 | EMPTY_ACTION, # 2D 45 65 | )) 66 | 67 | label('Craft_麒麟功') 68 | 69 | AS_8D(0x4B, 0xFF, 0x10000, 0xFFFFFFFF, 0x0) 70 | AS_8D(0x4B, 0xFF, 0x800000, 0xFFFFFFFF, 0x0) 71 | DamageCue(0xFE) 72 | AS_A1(0xFF, 0x10000, 0x83, "") 73 | Return() 74 | 75 | label('Craft_百烈击') 76 | import 百烈击 77 | 百烈击.main() 78 | Return() 79 | 80 | label('Craft_钢盔回旋踢') 81 | import 钢盔回旋踢 82 | 钢盔回旋踢.main() 83 | Return() 84 | 85 | label('Craft_钢盔断') 86 | import 钢盔断 87 | 钢盔断.main() 88 | Return() 89 | 90 | label('Craft_神罗天征') 91 | import 神罗天征 92 | 神罗天征.main() 93 | Return() 94 | 95 | label('Craft_精神分裂') 96 | LoadAvatar("ms90010") 97 | SendMessage(2) 98 | Yield() 99 | 100 | hasAvatar = GenerateUniqueLable() 101 | JumpToLabelIfHasTarget(hasAvatar) 102 | Return() 103 | 104 | label(hasAvatar) 105 | 106 | TurnDirection(0xFE, 0xFF, 0, 0, 0) 107 | ShowChr(0xFE, 0) 108 | Return() 109 | 110 | label('stub_craft') 111 | Return() 112 | 113 | label("SysCraft_ArtsAria") 114 | SysCraft.artsAria() 115 | Return() 116 | 117 | 118 | label("SysCraft_ArtsCast") 119 | 120 | SysCraft.artsCast() 121 | Return() 122 | 123 | 124 | label("SysCraft_Win") 125 | 126 | SysCraft.battleWin() 127 | Return() 128 | 129 | 130 | label("SysCraft_EnterBattle") 131 | 132 | SysCraft.enterBattle() 133 | Return() 134 | 135 | 136 | label("SysCraft_UseItem") 137 | 138 | SysCraft.useItem() 139 | Return() 140 | 141 | label("SysCraft_Init") 142 | SysCraft.init() 143 | Return() 144 | 145 | # SysCraft_Init end 146 | 147 | label('clear_all_debuff') 148 | 149 | not_clear = \ 150 | [ 151 | CraftConditionFlags.MaxGuard, 152 | CraftConditionFlags.HPRecovery, 153 | CraftConditionFlags.CPRecovery, 154 | CraftConditionFlags.Stealth, 155 | CraftConditionFlags.Dead, 156 | CraftConditionFlags.Vanish, 157 | ] 158 | 159 | flag = 1 160 | for i in range(32): 161 | if not flag in not_clear: 162 | AS_8D(0x4B, CraftTarget.Self, flag, -1, 0) 163 | flag <<= 1 164 | 165 | AS_8D(0x4B, CraftTarget.Self, CraftConditionFlags.Vanish, 0, 0) 166 | 167 | CallReturn() 168 | 169 | 170 | # label("SysCraft_Stand") 171 | SysCraft.stand() 172 | # SysCraft_Stand end 173 | 174 | 175 | # label("SysCraft_Move") 176 | SysCraft.move() 177 | # SysCraft_Move end 178 | 179 | 180 | label("SysCraft_UnderAttack") 181 | 182 | SysCraft.underAttack() 183 | Return() 184 | 185 | # SysCraft_UnderAttack end 186 | 187 | 188 | label("SysCraft_Dead") 189 | 190 | SysCraft.dead() 191 | Return() 192 | 193 | # SysCraft_Dead end 194 | 195 | 196 | label("SysCraft_NormalAttack") 197 | SysCraft.normalAttack() 198 | Return() 199 | 200 | # SysCraft_NormalAttack end 201 | 202 | label("SysCraft_Stun") 203 | SysCraft.stun() 204 | Return() 205 | 206 | # SysCraft_Stun end 207 | 208 | 209 | label("SysCraft_Unknown2") 210 | 211 | SetChrChip(0xFF, 0x0) 212 | SetChrSubChip(0xFF, 0x0) 213 | Sleep(100) 214 | Yield() 215 | Return() 216 | 217 | # SysCraft_Unknown2 end 218 | 219 | 220 | label("SysCraft_Counter") 221 | SysCraft.counter() 222 | Return() 223 | 224 | # SysCraft_Counter end 225 | 226 | 227 | label('SysCraft_TeamRushInit') 228 | Return() 229 | 230 | label('SysCraft_TeamRushAction') 231 | Return() 232 | 233 | SaveToFile() 234 | 235 | Try(main) 236 | -------------------------------------------------------------------------------- /Decompiler/p/Cassius/bgm/20. 儀礼.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/bgm/20. 儀礼.ogg -------------------------------------------------------------------------------- /Decompiler/p/Cassius/bgm/t_bgm._dt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/bgm/t_bgm._dt -------------------------------------------------------------------------------- /Decompiler/p/Cassius/bgm/time.txt: -------------------------------------------------------------------------------- 1 | 3263867 2 | 5116442 3 | 1852575 -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch93670.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch93670.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch93671.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch93671.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch93672.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch93672.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94670.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94670.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94671.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94671.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94672.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94672.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94673.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94673.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94674.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94674.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94675.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94675.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94678.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94678.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/chr/ch94679.itc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/chr/ch94679.itc -------------------------------------------------------------------------------- /Decompiler/p/Cassius/effect/battle/cr006401.eff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/effect/battle/cr006401.eff -------------------------------------------------------------------------------- /Decompiler/p/Cassius/effect/battle/cr006402.eff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/effect/battle/cr006402.eff -------------------------------------------------------------------------------- /Decompiler/p/Cassius/ms04670.py: -------------------------------------------------------------------------------- 1 | from BattleMonsterStatus import * 2 | 3 | def main(): 4 | Name = "钢盔肾斗士" 5 | Description = "结社钢盔肾女座下,\\n八十八个『肾斗士』第一位。" 6 | ASFile = "as04670.dat" 7 | Symbol = "sy04670.itp" 8 | 9 | Resistance = CraftConditionFlags.Poison | \ 10 | CraftConditionFlags.Frozen | \ 11 | CraftConditionFlags.Landification | \ 12 | CraftConditionFlags.Sleeping | \ 13 | CraftConditionFlags.BanArts | \ 14 | CraftConditionFlags.Darkness | \ 15 | CraftConditionFlags.BanCraft | \ 16 | CraftConditionFlags.Confusion | \ 17 | CraftConditionFlags.Stun | \ 18 | CraftConditionFlags.OnehitKill | \ 19 | CraftConditionFlags.Burning | \ 20 | CraftConditionFlags.Rage | \ 21 | CraftConditionFlags.Vanish | \ 22 | CraftConditionFlags.Reserve_2 | \ 23 | CraftConditionFlags.GreenPepper | \ 24 | CraftConditionFlags.Dead | \ 25 | CraftConditionFlags.Str | \ 26 | CraftConditionFlags.Def | \ 27 | CraftConditionFlags.Ats | \ 28 | CraftConditionFlags.Adf | \ 29 | CraftConditionFlags.Dex | \ 30 | CraftConditionFlags.Agl | \ 31 | CraftConditionFlags.Mov | \ 32 | CraftConditionFlags.Spd 33 | 34 | Level = 120 35 | MaximumHP = 59000 36 | InitialHP = 59000 37 | MaximumEP = 9000 38 | InitialEP = 9000 39 | MaximumCP = 200 40 | InitialCP = 0 41 | 42 | SPD = 120 43 | MoveSPD = 10 44 | MOV = 6 45 | STR = 3450 46 | DEF = 3114 47 | ATS = 2219 48 | ADF = 2391 49 | DEX = 150 50 | AGL = 32 51 | RNG = 1 52 | 53 | Unknown_2A = 0x0 54 | EXP = 1024 55 | Unknown_2E = 0x0 56 | Unknown_30 = 0x0 57 | AIType = 0xFF 58 | Unknown_33 = 0x3E8 59 | Unknown_35 = 0x9 60 | Unknown_36 = 0xA280 61 | EnemyFlags = 0x0000 62 | BattleFlags = 0x0804 63 | 64 | Unknown_3C = 0x1 65 | Unknown_3E = 0x0 66 | Sex = 9 67 | Unknown_41 = 0x1 68 | CharSize = 0x190 69 | DefaultEffectX = 0x0 70 | DefaultEffectZ = 0 71 | DefaultEffectY = 0x0 72 | Unknown_52 = 0x60 73 | Unknown_53 = 0x50 74 | Unknown_54 = 0xA0 75 | Unknown_55 = 0xB0 76 | #Resistance = 0xF0008FFF 77 | AttributeRate = [ 100, 100, 100, 100, 100, 100, 100 ] 78 | Sepith = [ 255, 255, 255, 255, 255, 255, 255 ] 79 | DropItem = [ 0x01FF, 0x0000 ] 80 | DropRate = [ 100, 0 ] 81 | Equipment = [ 0x0009, 0x0000, 0x0000, 0x0000, 0x0000 ] 82 | Orbment = [ 0x0000, 0x0000, 0x0000, 0x0000 ] 83 | 84 | RunawayType = 0 85 | RunawayRate = 0 86 | RunawayParam1 = 0 87 | Reserve1 = 0 88 | 89 | Craft_03E8 = CreateCraft( 90 | "", 91 | "", 92 | 0x05, 0x12, 0x15, 93 | CraftAttribute.NoAttribute, 94 | CraftRange.Target, 95 | CraftState.Physical, CraftState.QueryMonsterInfo, 96 | 0, 0, 97 | 0, 30, 98 | 0, 99 | 0, 100 | 60, 0, 101 | 0, 0, 102 | ) 103 | 104 | 百烈击 = CreateCraft( 105 | "百烈击", 106 | "百龙霸", 107 | 0x05, 0x12, 0, 108 | CraftAttribute.NoAttribute, 109 | CraftRange.Target, 110 | CraftState.Physical, CraftState.NoneState, 111 | 3, 1, 112 | 0, 35, 113 | 0, 114 | 2, 115 | 50, 0, 116 | 0, 0, 117 | ) 118 | 119 | 钢盔回旋踢 = CreateCraft( 120 | "钢盔回旋踢", 121 | "", 122 | 0x05, 0x12, 0x1, 123 | CraftAttribute.NoAttribute, 124 | CraftRange.CircleOnSelf, 125 | CraftState.Physical, CraftState.NoneState, 126 | 1, 1, 127 | 0, 40, 128 | 0, 129 | 10, 130 | 70, 0, 131 | 0, 0, 132 | ) 133 | 134 | 钢盔断 = CreateCraft( 135 | "钢盔断", 136 | "", 137 | 0x05, 0x12, 0x1, 138 | CraftAttribute.NoAttribute, 139 | CraftRange.LineOnLocation, 140 | CraftState.Physical, CraftState.ATDelay, 141 | 54, 100, 142 | 0, 40, 143 | 0, 144 | 5, 145 | 50, 0, 146 | 50, 0, 147 | ) 148 | 149 | 神罗天征 = CreateCraft( 150 | "神罗天征", 151 | "", 152 | 0x05, 0x12, 0x1, 153 | CraftAttribute.NoAttribute, 154 | CraftRange.FullMap, 155 | CraftState.Physical, CraftState.NoneState, 156 | 1, 100, 157 | 0, 100, 158 | 0, 159 | 0, 160 | 100, 0, 161 | 0, 0, 162 | ) 163 | 164 | # 精神分裂 = CreateCraft( 165 | # "精神分裂", 166 | # "", 167 | # 0x5, 0x12, 0x21, 168 | # CraftAttribute.NoAttribute, 169 | # CraftRange.SelectLocation, 170 | # CraftState.NoneState, CraftState.NoneState, 171 | # 0, 0, 172 | # 0, 0, 173 | # 0, 174 | # 1, 175 | # 0, 1, 176 | # 0xFF, 1, 177 | # ) 178 | 179 | 精神分裂 = CreateCraft( 180 | "精神分裂", 181 | "", 182 | 0x93, 0x12, 0x1, 183 | CraftAttribute.NoAttribute, 184 | CraftRange.SelectLocation, 185 | CraftState.NoneState, CraftState.NoneState, 186 | 0, 0, 187 | 0, 0, 188 | 0, 189 | 0, 190 | 0, 0, 191 | 0xFF, 1, 192 | ) 193 | 194 | 精神分裂2 = CreateCraft( 195 | "精神分裂2", 196 | " ", 197 | 0x91, 0x42, 0x1, 198 | CraftAttribute.NoAttribute, 199 | CraftRange.Target, 200 | CraftState.NoneState, CraftState.NoneState, 201 | 0, 0, 202 | 0, 0, 203 | 0, 204 | 0, 205 | 0, 0, 206 | 0, 0, 207 | ) 208 | 209 | CraftList = CreateCraftList([ 210 | Craft_03E8, 211 | 百烈击, 212 | 钢盔回旋踢, 213 | 钢盔断, 214 | 神罗天征, 215 | 精神分裂, 216 | 精神分裂2, 217 | ]) 218 | 219 | Attack = CreateAI(0x1, 0, 0x0, 0x1, 0x00, 0x05, Craft_03E8, [0, 0, 1, 0]) 220 | 221 | Craft_百烈击 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x10, 百烈击, [30, 1, 0, 0]) 222 | Craft_钢盔回旋踢 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x11, 钢盔回旋踢, [30, 1, 0, 0]) 223 | Craft_钢盔断 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x12, 钢盔断, [30, 1, 0, 0]) 224 | Craft_神罗天征 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x13, 神罗天征, [30, 1, 0, 0]) 225 | Craft_精神分裂 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x14, 精神分裂, [30, 1, 0, 0]) 226 | Craft_精神分裂2 = CreateAI(0x3, 100, 0x0, 0x1, 0x00, 0x14, 精神分裂2, [30, 1, 0, 0]) 227 | 228 | # SCraft_圣技大十字 = CreateAI(0xA, 100, 0x0, 0x1, 0x00, 0x1A, 圣技大十字, [100, 0, 0, 0]) 229 | 230 | 231 | ArtsAIList = [] 232 | CraftAIList = [Craft_精神分裂2, Craft_精神分裂, Craft_神罗天征, Craft_钢盔断, Craft_钢盔回旋踢, Craft_百烈击] 233 | SCraftAIList = [] 234 | SupportCraftAIList = [] 235 | 236 | SaveToMS("ms04670.dat", locals()) 237 | 238 | Try(main) -------------------------------------------------------------------------------- /Decompiler/p/Cassius/sy04670.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/sy04670.png -------------------------------------------------------------------------------- /Decompiler/p/Cassius/symbol/2015-04-08-082626.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/symbol/2015-04-08-082626.jpg -------------------------------------------------------------------------------- /Decompiler/p/Cassius/symbol/2015-04-08-095809.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/symbol/2015-04-08-095809.jpg -------------------------------------------------------------------------------- /Decompiler/p/Cassius/symbol/The-Legend-of-Heroes-Trails-in-the-Sky-Evolution_2015_03-04-15_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/symbol/The-Legend-of-Heroes-Trails-in-the-Sky-Evolution_2015_03-04-15_003.jpg -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10000.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10000.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10001.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10001.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10002.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10002.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10003.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10003.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10004.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10004.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10005.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10005.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10006.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10006.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10007.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10007.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10008.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10008.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10009.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10009.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10010.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10010.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10011.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10011.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10012.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10012.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10013.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10013.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10014.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10014.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10015.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10015.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10016.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10016.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10017.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10017.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10018.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10018.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10019.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10019.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10020.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10020.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10021.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10021.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10022.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10022.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10023.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10023.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10024.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10024.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10025.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10025.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10026.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10026.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10026_old.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10026_old.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10027.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10027.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10028.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10028.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10029.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10029.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10030.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10030.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10031.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10031.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10032.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10032.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10033.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10033.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10034.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10034.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10035.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10035.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10036.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10036.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ed7v10037.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ed7v10037.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/reduce_size.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd/d "%~dp0" 3 | 4 | rd/s/q small 5 | timeout /t 2 >NUL 2>NUL 6 | md small 7 | 8 | for %%i in (ed7*.wav) do ( 9 | "E:\Multimedia\VideoEncoding\ffmpeg_full.exe" -y -i "%%i" -ac 1 -ar 22000 "small\%%~nxi" >NUL 2>NUL 10 | ) 11 | 12 | del small\*_old.wav 13 | move /y small\*.wav D:\Game\Falcom\ED_AO\Ouroboros\se 14 | rd small -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ここより.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ここより.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/ここより世界に痛みを.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/ここより世界に痛みを.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/voice/世界に痛みを.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/Cassius/voice/世界に痛みを.wav -------------------------------------------------------------------------------- /Decompiler/p/Cassius/百烈击.py: -------------------------------------------------------------------------------- 1 | from Cassius import * 2 | 3 | def main(): 4 | chip = 7 5 | attackChip = 8 6 | hitEff = 0 7 | criticalHitEff = 1 8 | preCriticalHitEff = 2 9 | 10 | effList = [hitEff, criticalHitEff, preCriticalHitEff] 11 | 12 | with ResourceLock: 13 | LoadChrChip(chip, CHR_Cassius_BaiLieJi, 0xFF) 14 | LoadChrChip(attackChip, CHR_Cassius_Attack, 0xFF) 15 | LoadEffect(hitEff, "battle/ms00001.eff") 16 | LoadEffect(criticalHitEff, "battle/cr006402.eff") 17 | LoadEffect(preCriticalHitEff, "battle/cr006401.eff") 18 | 19 | ResetTarget() 20 | ResetLookingTargetData() 21 | LookingTargetAdd(0xFF, "", 0x0) 22 | LookingTargetAdd(0xFC, "", 0x0) 23 | LookingTarget(100, 20, 30) 24 | BeginChrThread(0xFF, 1, "SysCraft_Move", 0x0) 25 | AS_1E(0xFFFFFFFF) 26 | EndChrThread(0xFF, 1) 27 | TurnDirection(0xFF, 0xFE, 0, 0, 0x0) 28 | AS_6D(0x200000) 29 | AS_89(0xFF) 30 | 31 | SetChrChip(CraftTarget.Self, chip) 32 | Voice(0, 卡西乌斯_百烈击, 0, 0, 0, 0xFE) 33 | for t in range(12): 34 | for i in range(3): 35 | SetChrSubChip(CraftTarget.Self, i) 36 | Sleep(40) 37 | Yield() 38 | 39 | SoundEx(卡西乌斯_音效_百烈击, 0) 40 | 41 | if t % 2 == 0: 42 | DamageAnime(CraftTarget.TargetChr, 0, 0x32) 43 | DamageCue(CraftTarget.TargetChr) 44 | PlayEffect(0xFF, 0xFE, hitEff, 0x1, 0, 1000, 0, 0, 0, 0, 1000, 1000, 1000, -1) 45 | 46 | DamageAnime(CraftTarget.TargetChr, 0, 0x32) 47 | DamageCue(CraftTarget.TargetChr) 48 | SetChrChip(CraftTarget.Self, attackChip) 49 | SetChrSubChip(CraftTarget.Self, 0x0) 50 | Yield() 51 | 52 | PlayEffect(0xFF, 0xFF, preCriticalHitEff, 0x1, 0, 1000, 0, 0, 0, 0, 1000, 1000, 1000, 2) 53 | Sleep(200) 54 | Yield() 55 | 56 | SoundEx(183, 0) 57 | BeginChrThread(CraftTarget.Self, 1, "shake_self", 0x0) 58 | Sleep(0xA) 59 | Yield() 60 | Sleep(0x1F4) 61 | Yield() 62 | Voice(0, 卡西乌斯_百烈击2, 0, 0, 0, 0xFE) 63 | 64 | for i in range(1, 7): 65 | SetChrSubChip(CraftTarget.Self, i) 66 | Sleep(0x32) 67 | Yield() 68 | 69 | Knockback(8) 70 | DamageAnime(CraftTarget.TargetChr, 1, 0x32) 71 | DamageCue(0xFE) 72 | SetCondition(CraftTarget.TargetChr, CraftConditionFlags.Stun, 90, 1) 73 | SoundEx(卡西乌斯_音效_百烈击_结尾, 0) 74 | PlayEffect(0xFF, 0xFF, criticalHitEff, 0x1, 0, 1000, 0, 0, 0, 0, 1000, 1000, 1000, 3) 75 | 76 | SetChrSubChip(CraftTarget.Self, 0x7) 77 | Sleep(0x32) 78 | Yield() 79 | 80 | SetChrSubChip(CraftTarget.Self, 0x8) 81 | Sleep(0x5DC) 82 | Yield() 83 | 84 | for i in range(9, 12): 85 | SetChrSubChip(CraftTarget.Self, i) 86 | Sleep(0x32) 87 | Yield() 88 | 89 | AS_14(0x2) 90 | 91 | for eff in effList: 92 | FreeEffect(eff) 93 | 94 | Return() 95 | 96 | label('shake_self') 97 | 98 | for _ in range(4): 99 | ShakeChr(CraftTarget.Self, -50, 0x0, -50) 100 | Sleep(0x1E) 101 | Yield() 102 | ShakeChr(CraftTarget.Self, 0x0, 0x0, 0x0) 103 | Sleep(0x1E) 104 | Yield() 105 | 106 | Jump('shake_self') -------------------------------------------------------------------------------- /Decompiler/p/Cassius/神罗天征.py: -------------------------------------------------------------------------------- 1 | from Cassius import * 2 | 3 | def main(): 4 | Self = CraftTarget.Self 5 | TargetChr = CraftTarget.TargetChr 6 | TargetPos = CraftTarget.TargetPos 7 | 8 | attackChip = 7 9 | 10 | showEff = 0 11 | ShinraTenseiEff = 1 12 | ShinraTenseiEarthEff = 2 13 | 14 | effList = [ 15 | showEff, 16 | ShinraTenseiEff, 17 | ] 18 | 19 | ResetTarget() 20 | 21 | with ResourceLock: 22 | LoadEffect(showEff, "battle/cr007200.eff") 23 | LoadEffect(ShinraTenseiEff, "battle/cr94670a.eff") 24 | LoadEffect(ShinraTenseiEarthEff, "battle/cr94670b.eff") 25 | 26 | PlayBGM(0, 9999) 27 | 28 | ResetLookingTargetData() 29 | LookingTargetAdd(Self, "", 0x0) 30 | LookingTarget(2000, 38, 0) 31 | SetChrChip(0xFF, 5) 32 | SetChrSubChip(0xFF, 0) 33 | Sleep(800) 34 | Yield() 35 | 36 | # SoundEx(卡西乌斯_YAREYARE, 0) 37 | Sleep(500) 38 | Yield() 39 | 40 | HideChr(CraftTarget.Self, 300) 41 | SoundEx(卡西乌斯_音效_雷光击_现身, 0) 42 | PlayEffect(0xFF, 0xFF, showEff, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 43 | Sleep(300) 44 | Yield() 45 | ChrMove(Self, TargetPos, 0, 3000, 0, 0, 0) 46 | Sleep(500) 47 | Yield() 48 | 49 | def ariaThread(): 50 | label('神罗天征_ariaThread') 51 | for i in range(0, 4): 52 | SetChrSubChip(Self, i) 53 | Sleep(130) 54 | Yield() 55 | Jump('神罗天征_ariaThread') 56 | 57 | SetChrChip(Self, 3) 58 | QueueWorkItem(Self, 1, ariaThread) 59 | 60 | ShowChr(Self, 200) 61 | ChrMove(Self, TargetPos, 0, 4000, 0, 500, 0) 62 | Sleep(2000) 63 | Yield() 64 | PlayEffect(Self, Self, ShinraTenseiEff, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 65 | Sleep(300) 66 | Yield() 67 | 68 | SoundEx(687, 0x1) 69 | SoundEx(693, 0x1) 70 | Voice(0, 卡西乌斯_神罗天征_ここより, 0, 0, 0, 0xFE) 71 | Sleep(3100) 72 | Yield() 73 | 74 | Voice(0, 卡西乌斯_神罗天征_世界に痛みを, 0, 0, 0, 0xFE) 75 | Sleep(6200 - 3100) 76 | Yield() 77 | 78 | Voice(0, 卡西乌斯_神罗天征, 0, 0, 0, 0xFE) 79 | EndChrThread(Self, 1) 80 | SetChrChip(Self, 3) 81 | SetChrSubChip(Self, 4) 82 | Sleep(100) 83 | Yield() 84 | 85 | def damageThread(): 86 | Sleep(300) 87 | Yield() 88 | 89 | label('continue_attack') 90 | 91 | def damage(): 92 | Knockback(1) 93 | DamageAnime(CraftTarget.TargetChr, 1, 50) 94 | DamageCue(CraftTarget.TargetChr) 95 | Yield() 96 | 97 | ForeachTargetEx(damage) 98 | 99 | Sleep(50) 100 | Jump('continue_attack') 101 | 102 | QueueWorkItem(Self, 1, damageThread) 103 | SetChrSubChip(Self, 5) 104 | StopSound(693) 105 | StopSound(687) 106 | for i in range(10): 107 | PlayEffect(Self, TargetPos, ShinraTenseiEarthEff, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 108 | Sleep(200) 109 | Yield() 110 | SoundEx(248, 0x0) 111 | 112 | EndChrThread(Self, 1) 113 | Sleep(2000) 114 | Yield() 115 | 116 | SetChrSubChip(Self, 4) 117 | HideChr(Self, 200) 118 | Sleep(200) 119 | Yield() 120 | 121 | ChrMove(Self, 0xF0, 0, 1000, 0, 0, 0) 122 | SetChrChip(Self, 5) 123 | SetChrSubChip(Self, 0) 124 | Sleep(800) 125 | Yield() 126 | 127 | ShowChr(Self, 200) 128 | ChrMove(Self, 0xF0, 0, 0, 0, 500, 0) 129 | Sleep(1000) 130 | Yield() 131 | 132 | for eff in effList: 133 | FreeEffect(eff) 134 | 135 | return 136 | -------------------------------------------------------------------------------- /Decompiler/p/Cassius/钢盔回旋踢.py: -------------------------------------------------------------------------------- 1 | from Cassius import * 2 | 3 | def main(): 4 | attackChip = 7 5 | 6 | showupEff = 0 7 | turnAroundEff = 1 8 | kickEff = 2 9 | hitEff = 3 10 | 11 | effList = [ 12 | showupEff, 13 | turnAroundEff, 14 | kickEff, 15 | hitEff, 16 | ] 17 | 18 | with ResourceLock: 19 | LoadEffect(showupEff, "battle/cr007200.eff") 20 | LoadEffect(turnAroundEff, "battle/cr007100.eff") 21 | LoadEffect(kickEff, "battle/cr007400.eff") 22 | LoadEffect(hitEff, "battle/ms00000.eff") 23 | LoadChrChip(attackChip, CHR_Cassius_Attack, 0xFF) 24 | 25 | # ResetLookingTargetData() 26 | # LookingTargetAdd(0xFF, "", 0x0) 27 | # LookingTarget(2000, 1000, 1200) 28 | TurnDirection(0xFF, 0xFE, 0, 0, 0x0) 29 | AS_89(0xFF) 30 | AS_83(0) 31 | 32 | PlayEffect(0xFF, 0xFF, turnAroundEff, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 33 | SoundEx(卡西乌斯_音效_雷光击_旋转, 0) 34 | SoundEx(卡西乌斯_音效_雷光击_起跳, 0) 35 | SetChrChip(CraftTarget.Self, attackChip) 36 | 37 | for i in range(4): 38 | SetChrSubChip(CraftTarget.Self, i) 39 | Sleep(30) 40 | Yield() 41 | 42 | HideChr(CraftTarget.Self, 300) 43 | 44 | for i in range(6): 45 | AS_04(CraftTarget.Self, 1, -45) 46 | Sleep(20) 47 | Yield() 48 | 49 | AS_60(CraftTarget.Self) 50 | 51 | Voice(0, 卡西乌斯_攻击7, 0, 0, 0, 0xFE) 52 | LockCamera(0xF8, 0, 0, 0, 2000) 53 | Sleep(1000) 54 | Yield() 55 | 56 | SoundEx(卡西乌斯_音效_雷光击_移动, 0) 57 | # eff 4 58 | 59 | Knockback(2) 60 | ResetLookingTargetData() 61 | LookingTargetAdd(0xFC, "", 0x0) 62 | LookingTargetAdd(CraftTarget.Self, "", 0x0) 63 | LookingTarget(100, 20, 30) 64 | 65 | def damage(): 66 | PlayEffect(0xFF, 0xF9, kickEff, 0x400, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 67 | ChrMove(CraftTarget.Self, CraftTarget.TargetChr, 0, 0, 0, 50, 0) 68 | PlayEffect(0xFF, 0xF8, hitEff, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 69 | AS_8D(0x1F, CraftTarget.Self, 0xF0, 0x0, 0x0) 70 | SoundEx(卡西乌斯_音效_雷光击_击中, 0) 71 | DamageAnime(CraftTarget.TargetChr, 0, 50) 72 | DamageCue(CraftTarget.TargetChr) 73 | LockCamera(0xF8, 0, 0, 0, 100) 74 | Sleep(50) 75 | Yield() 76 | 77 | ForeachTargetEx(damage) 78 | 79 | # CancelEffect(CraftTarget.Self, 4) 80 | Sleep(500) 81 | Yield() 82 | 83 | ResetTarget() 84 | 85 | AS_5F(CraftTarget.Self, 0x0) 86 | HideChr(CraftTarget.Self, 0) 87 | ShowChr(CraftTarget.Self, 500) 88 | SetChrChip(CraftTarget.Self, attackChip) 89 | SetChrSubChip(CraftTarget.Self, 6) 90 | Sleep(0) 91 | Yield() 92 | 93 | SetChrChip(CraftTarget.Self, 3) 94 | SetChrSubChip(CraftTarget.Self, 0) 95 | AS_0A(CraftTarget.Self, 1, 0, 0) 96 | ChrSetPos(CraftTarget.Self, 0xF0, 0, 0, 0) 97 | Yield() 98 | 99 | PlayEffect(0xFF, 0xFF, showupEff, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 0xFF) 100 | SoundEx(卡西乌斯_音效_雷光击_现身, 0) 101 | 102 | TurnDirection(CraftTarget.Self, CraftTarget.TargetChr, 0, 0, 0x0) 103 | ShowChr(CraftTarget.Self, 100) 104 | Sleep(800) 105 | Yield() 106 | 107 | for eff in effList: 108 | FreeEffect(eff) 109 | -------------------------------------------------------------------------------- /Decompiler/p/Cassius/钢盔断.py: -------------------------------------------------------------------------------- 1 | from Cassius import * 2 | 3 | def main(): 4 | Self = CraftTarget.Self 5 | TargetChr = CraftTarget.TargetChr 6 | TargetPos = CraftTarget.TargetPos 7 | 8 | attackChip = 7 9 | 10 | hitEff = 0 11 | earthEff = 1 12 | 13 | effList = [ 14 | hitEff, 15 | earthEff, 16 | ] 17 | 18 | ResetTarget() 19 | 20 | with ResourceLock: 21 | LoadEffect(hitEff, "battle/ms00000.eff") 22 | LoadEffect(earthEff, "battle/cr432000.eff") 23 | LoadChrChip(attackChip, CHR_Cassius_Attack, 0xFF) 24 | 25 | ResetLookingTargetData() 26 | LookingTargetAdd(Self, "", 0x0) 27 | LookingTarget(500, 0x8, 0xF) 28 | Sleep(50) 29 | Yield() 30 | 31 | TurnDirection(Self, TargetPos, 0, 0, 0x0) 32 | SetChrChip(Self, attackChip) 33 | SetChrSubChip(Self, 5) 34 | Sleep(60) 35 | Yield() 36 | 37 | SetChrSubChip(Self, 8) 38 | Sleep(100) 39 | Yield() 40 | 41 | ShakeScreen(200, 200, 200, 500) 42 | # jump eff 43 | # jump eff 44 | 45 | Voice(0, 卡西乌斯_钢盔断_起跳, 0, 0, 0, 0xFE) 46 | SoundEx(卡西乌斯_音效_钢盔断_起跳, 0) 47 | ShowChrTrails(Self, 50, 200) 48 | 49 | def attackInTheSky(): 50 | 51 | # SetChrSubChip(Self, 6) 52 | # Sleep(60) 53 | # Yield() 54 | SetChrSubChip(Self, 7) 55 | Sleep(30) 56 | Yield() 57 | SetChrSubChip(Self, 8) 58 | Sleep(500) 59 | Yield() 60 | 61 | for i in range(9, 12): 62 | SetChrSubChip(Self, i) 63 | Sleep(50) 64 | Yield() 65 | 66 | Return() 67 | 68 | def jumpInTheSky(): 69 | SetChrSubChip(Self, 6) 70 | Sleep(598) 71 | Yield() 72 | SetChrSubChip(Self, 5) 73 | Sleep(100) 74 | Yield() 75 | SetChrSubChip(Self, 4) 76 | Sleep(100) 77 | Yield() 78 | SetChrSubChip(Self, 5) 79 | Sleep(100) 80 | Yield() 81 | Return() 82 | 83 | QueueWorkItem(Self, 1, jumpInTheSky) 84 | ChrJump(Self, Self, 0, 0, 0, 3000, 2000) 85 | WaitChrThread(Self, 1) 86 | 87 | QueueWorkItem(Self, 1, attackInTheSky) 88 | Sleep(10) 89 | Yield() 90 | 91 | PlayEffect(Self, Self, earthEff, 5, 0, 0, 0, 0, 0, 0, 800, 2000, 800, 0xFF) 92 | PlayEffect(Self, Self, earthEff, 5, 1000, 0, 0, 0, 0, 0, 800, 2000, 800, 0xFF) 93 | PlayEffect(Self, Self, earthEff, 5, -1000, 0, 0, 0, 0, 0, 800, 2000, 800, 0xFF) 94 | Sleep(10) 95 | Yield() 96 | 97 | SoundEx(256, 0) 98 | 99 | HideChrTrails(Self) 100 | ShakeScreen(200, 200, 200, 500) 101 | # CancelEffect(Self, jump eff 2) 102 | BlurSwitch(0, 0xBBFFFFFF, 0, 1, 3) 103 | 104 | def damage(): 105 | Sleep(100) 106 | Yield() 107 | 108 | SortTarget(0) 109 | 110 | def damageloop(): 111 | TurnDirection(TargetChr, Self, 0, 0, 0x0) 112 | 113 | def underattack(): 114 | EndChrThread(Self, 0) 115 | SetChrChip(0xFF, 0x2) 116 | SetChrSubChip(0xFF, 0x0) 117 | 118 | AS_89(Self) 119 | ChrJump(Self, Self, 0, 0, 0, 3000, 1000) 120 | # ChrMove(Self, 0xF0, 0, 0, 0, 0, 0) 121 | AS_9C(Self) 122 | Yield() 123 | Return() 124 | 125 | QueueWorkItem(TargetChr, 1, underattack) 126 | 127 | PlayEffect(TargetChr, TargetChr, hitEff, 3, 0, -500, 0, 0, 0, 0, 500, 500, 500, 0xFF) 128 | Yield() 129 | 130 | ForeachTargetEx(damageloop) 131 | 132 | WaitChrThread(0xFC, 1) 133 | WaitChrThread(0xFC, 2) 134 | 135 | def damageloop(): 136 | WaitChrThread(TargetChr, 1) 137 | DamageCue(TargetChr) 138 | Yield() 139 | 140 | ForeachTargetEx(damageloop) 141 | 142 | AS_8F(0) 143 | Return() 144 | 145 | ResetLookingTargetData() 146 | LookingTargetAdd(0xFC, "", 0) 147 | LookingTargetAdd(Self, "", 0) 148 | LookingTarget(500, 20, 20) 149 | CancelBlur(1500) 150 | 151 | # QueueWorkItem(Self, 2, damage) 152 | # Sleep(500) 153 | damage() 154 | Yield() 155 | 156 | WaitChrThread(Self, 1) 157 | WaitChrThread(Self, 2) 158 | SetChrChip(Self, 0) 159 | SetChrSubChip(Self, 0) 160 | Sleep(500) 161 | Yield() 162 | 163 | for eff in effList: 164 | FreeEffect(eff) 165 | -------------------------------------------------------------------------------- /Decompiler/p/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd/d "%~dp0" 3 | 4 | ::for /f %%i in ('dir/s/b sysatk*.py') do %%i 5 | ::for /f %%i in ('dir/s/b fachr*.py') do %%i 6 | ::for /f %%i in ('dir/s/b as*.py') do %%i 7 | ::for /f %%i in ('dir/s/b ms*.py') do %%i 8 | 9 | for /f %%i in ('dir/s/b Cassius\?s*.py') do %%i 10 | for /f %%i in ('dir/s/b Cassius\*.eff.py') do %%i 11 | ::for /f %%i in ('dir/s/b Arianrhod\?s*.py') do %%i 12 | 13 | move /y *._bn D:\Game\Falcom\ED_AO\Ouroboros\system 14 | move /y *._dt D:\Game\Falcom\ED_AO\Ouroboros\text 15 | move /y *.bin D:\Game\Falcom\ED_AO\Ouroboros\scena 16 | move /y *.dat D:\Game\Falcom\ED_AO\Ouroboros\battle\dat 17 | move /y sysatk*.eff D:\Game\Falcom\ED_AO\Ouroboros\effect\eff 18 | move /y *.eff D:\Game\Falcom\ED_AO\Ouroboros\effect\battle 19 | 20 | start D:\Game\Falcom\ED_AO\ED_AO_CRACK.exe 21 | 22 | -------------------------------------------------------------------------------- /Decompiler/p/buildall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd/d "%~dp0" 3 | 4 | for %%i in (scena\*.bin.py) do %%i 5 | 6 | t_name.py 7 | t_dbmon.py 8 | 9 | for /f %%i in ('dir/s/b sysatk*.py') do %%i 10 | for /f %%i in ('dir/s/b fachr*.py') do %%i 11 | for /f %%i in ('dir/s/b as*.py') do %%i 12 | for /f %%i in ('dir/s/b ms*.py') do %%i 13 | 14 | move /y *._bn D:\Game\Falcom\ED_AO\Ouroboros\system 15 | move /y *._dt D:\Game\Falcom\ED_AO\Ouroboros\text 16 | move /y *.bin D:\Game\Falcom\ED_AO\Ouroboros\scena 17 | move /y *.dat D:\Game\Falcom\ED_AO\Ouroboros\battle\dat 18 | move /y sysatk*.eff D:\Game\Falcom\ED_AO\Ouroboros\effect\eff 19 | 20 | rem start D:\Game\Falcom\ED_AO\ED_AO_CRACK.exe 21 | -------------------------------------------------------------------------------- /Decompiler/p/itp/YamaNeko.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/itp/YamaNeko.exe -------------------------------------------------------------------------------- /Decompiler/p/itp/battle.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/itp/battle.itp -------------------------------------------------------------------------------- /Decompiler/p/itp/bface9999.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/itp/bface9999.itp -------------------------------------------------------------------------------- /Decompiler/p/itp/chrimg9999.itp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/p/itp/chrimg9999.itp -------------------------------------------------------------------------------- /Decompiler/p/scena/Arianrhod_2nd_battle.py: -------------------------------------------------------------------------------- 1 | 2 | from ScenarioHelper import * 3 | 4 | def Arianrhod_LastBattle(caller_locals): 5 | 6 | EventBegin(0x0) 7 | FadeToDark(0, 0, -1) 8 | LoadChrToIndex("chr/ch00050.itc", 0x1E) 9 | LoadChrToIndex("chr/ch00056.itc", 0x1F) 10 | LoadChrToIndex("chr/ch00150.itc", 0x20) 11 | LoadChrToIndex("chr/ch00156.itc", 0x21) 12 | LoadChrToIndex("chr/ch00250.itc", 0x22) 13 | LoadChrToIndex("chr/ch00256.itc", 0x23) 14 | LoadChrToIndex("chr/ch00350.itc", 0x24) 15 | LoadChrToIndex("chr/ch00356.itc", 0x25) 16 | 17 | Jc((scpexpr(EXPR_EXEC_OP, "OP_FB(0xF4, 0x8)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "not_load_noel_chip") 18 | LoadChrToIndex("chr/ch02950.itc", 0x26) 19 | LoadChrToIndex("chr/ch0295F.itc", 0x27) 20 | 21 | label("not_load_noel_chip") 22 | 23 | Jc((scpexpr(EXPR_EXEC_OP, "OP_FB(0xF4, 0x4)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "not_load_lazy_chip") 24 | LoadChrToIndex("chr/ch03150.itc", 0x26) 25 | LoadChrToIndex("chr/ch0315F.itc", 0x27) 26 | 27 | label("not_load_lazy_chip") 28 | 29 | Jc((scpexpr(EXPR_EXEC_OP, "OP_FB(0xF4, 0x5)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "not_load_rixia_chip") 30 | LoadChrToIndex("chr/ch03250.itc", 0x26) 31 | LoadChrToIndex("chr/ch0325A.itc", 0x27) 32 | 33 | label("not_load_rixia_chip") 34 | 35 | Jc((scpexpr(EXPR_EXEC_OP, "OP_FB(0xF5, 0x8)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "not_load_noel_chip_2") 36 | LoadChrToIndex("chr/ch02950.itc", 0x28) 37 | LoadChrToIndex("chr/ch0295F.itc", 0x29) 38 | 39 | label("not_load_noel_chip_2") 40 | 41 | Jc((scpexpr(EXPR_EXEC_OP, "OP_FB(0xF5, 0x4)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "not_load_lazy_chip_2") 42 | LoadChrToIndex("chr/ch03150.itc", 0x28) 43 | LoadChrToIndex("chr/ch0315F.itc", 0x29) 44 | 45 | label("not_load_lazy_chip_2") 46 | 47 | Jc((scpexpr(EXPR_EXEC_OP, "OP_FB(0xF5, 0x5)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "not_load_rixia_chip_2") 48 | LoadChrToIndex("chr/ch03250.itc", 0x28) 49 | LoadChrToIndex("chr/ch0325A.itc", 0x29) 50 | 51 | label("not_load_rixia_chip_2") 52 | 53 | LoadChrToIndex("chr/ch04250.itc", 0x2B) 54 | LoadChrToIndex("chr/ch04253.itc", 0x2E) 55 | LoadChrToIndex("chr/ch04254.itc", 0x2F) 56 | LoadChrToIndex("chr/ch00001.itc", 0x30) 57 | LoadChrToIndex("chr/ch00301.itc", 0x31) 58 | LoadChrToIndex("chr/ch02901.itc", 0x32) 59 | LoadChrToIndex("chr/ch03201.itc", 0x33) 60 | LoadEffect(0x0, "event/ev10006.eff") 61 | LoadEffect(0x1, "event/ev10007.eff") 62 | LoadEffect(0x2, "map/mpbell.eff") 63 | SoundLoad(832) 64 | SoundLoad(825) 65 | SoundLoad(132) 66 | CreatePortrait(0, 234, 0, 490, 256, 0, 0, 256, 256, 0, 0, 256, 256, 0xFFFFFF, 0x0, "bu13700.itp") 67 | SoundLoad(3906) 68 | SoundLoad(3907) 69 | SoundLoad(3908) 70 | OP_A3(0x4, 0x80) 71 | OP_A5(0x4, 0x8000) 72 | OP_A3(0x5, 0x80) 73 | OP_A5(0x5, 0x8000) 74 | SetChrPos(0x101, -14110, 0, 580, 90) 75 | SetChrPos(0x102, -14470, 0, -650, 90) 76 | SetChrPos(0x103, -14880, 0, 1630, 90) 77 | SetChrPos(0x104, -14680, 0, -2040, 90) 78 | SetChrPos(0xF4, -16079, 0, 1140, 90) 79 | SetChrPos(0xF5, -15780, 0, -1400, 90) 80 | 81 | 82 | #Jc((scpexpr(EXPR_PUSH_VALUE_INDEX, 0x3), scpexpr(EXPR_PUSH_LONG, 0x0), scpexpr(EXPR_EQU), scpexpr(EXPR_END)), "loc_1F92") 83 | 84 | SetChrChipByIndex(0x101, 0x1E) 85 | SetChrSubChip(0x101, 0x0) 86 | SetChrChipByIndex(0x102, 0x20) 87 | SetChrSubChip(0x102, 0x0) 88 | SetChrChipByIndex(0x103, 0x22) 89 | SetChrSubChip(0x103, 0x0) 90 | SetChrChipByIndex(0x104, 0x24) 91 | SetChrSubChip(0x104, 0x0) 92 | SetChrChipByIndex(0xF4, 0x26) 93 | SetChrSubChip(0xF4, 0x0) 94 | SetChrChipByIndex(0xF5, 0x28) 95 | SetChrSubChip(0xF5, 0x0) 96 | SetChrChipByIndex(0x8, 0x2B) 97 | SetChrSubChip(0x8, 0x0) 98 | 99 | 100 | OP_A3(0x8, 0x80) 101 | OP_A2(0x8, 0x8000) 102 | SetChrPos(0x8, -5900, 1140, 0, 270) 103 | OP_52(0x8, 0x2D, (scpexpr(EXPR_PUSH_LONG, 0x3E8), scpexpr(EXPR_STUB), scpexpr(EXPR_END))) 104 | OP_52(0x8, 0x2E, (scpexpr(EXPR_PUSH_LONG, 0x3E8), scpexpr(EXPR_STUB), scpexpr(EXPR_END))) 105 | OP_52(0x8, 0x2F, (scpexpr(EXPR_PUSH_LONG, 0x3E8), scpexpr(EXPR_STUB), scpexpr(EXPR_END))) 106 | OP_68(-5900, 2140, 0, 0) 107 | OP_68(-12700, 2420, 0, 5000) 108 | OP_6D(0x5A, 0x9, 0x0, 0x0) 109 | OP_6E(0x226, 0x0) 110 | OP_6C(0x3F15, 0x0) 111 | OP_6C(0x46E6, 0x1388) 112 | BeginChrThread(0xD, 1, 0, 11) 113 | PlayBGM("ed7584.ogg", 0) 114 | 115 | Jc((scpexpr(EXPR_PUSH_VALUE_INDEX, 0x3), scpexpr(EXPR_PUSH_LONG, 0x0), scpexpr(EXPR_EQU), scpexpr(EXPR_END)), "xxx_first_battle_lose") 116 | 117 | # win 118 | 119 | OP_2C(0xB0, 0x5) 120 | OP_29(0xB0, 0x1, 0x7) 121 | FadeToBright(1000, 0) 122 | OP_0D() 123 | OP_6F(0x79) 124 | 125 | ChrTalk( 126 | 0x8, 127 | "#13703F#40W………………………………\x02", 128 | ) 129 | 130 | CloseMessageWindow() 131 | 132 | ChrTalk( 133 | 0x101, 134 | ( 135 | "#00007F#40W#6P#N呼……呼……\x01", 136 | "怎……怎么样……!\x02", 137 | ) 138 | ) 139 | 140 | CloseMessageWindow() 141 | OP_57(0x0) 142 | OP_5A() 143 | 144 | ChrTalk( 145 | 0x104, 146 | ( 147 | "#00307F#40W#12P#N这、这就是\x01", 148 | "我们的全部实力……!\x02", 149 | ) 150 | ) 151 | 152 | CloseMessageWindow() 153 | OP_57(0x0) 154 | OP_5A() 155 | 156 | ChrTalk( 157 | 0x8, 158 | ( 159 | "#13704F#30W……真令人吃惊。\x02\x03", 160 | "#13702F#30W虽然你们有六个人,\x01\x02", 161 | "#13702F但能跟我战斗到这个地步,\x01\x02", 162 | "已经很了不起了。\x02\x03", 163 | "#13700F那么,我就稍微认真一点好了……\x02", 164 | ) 165 | ) 166 | 167 | CloseMessageWindow() 168 | OP_57(0x0) 169 | OP_5A() 170 | 171 | 172 | ChrTalk( 173 | 0x101, 174 | "#00010F#6P#N……什么!?\x02", 175 | ) 176 | 177 | CloseMessageWindow() 178 | OP_57(0x0) 179 | OP_5A() 180 | 181 | 182 | Jc((scpexpr(EXPR_EXEC_OP, "GetPartyIndex(0x4)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "team_has_not_lazy") 183 | 184 | ChrTalk( 185 | 0x105, 186 | "#10410F#6P#N#40W还要打吗……!?\x02", 187 | ) 188 | 189 | CloseMessageWindow() 190 | OP_57(0x0) 191 | OP_5A() 192 | Jump("check_lazy_end") 193 | 194 | 195 | label("team_has_not_lazy") 196 | 197 | ChrTalk( 198 | 0x106, 199 | "#10707F#6P#N#40W她还想打吗……!?\x02", 200 | ) 201 | 202 | CloseMessageWindow() 203 | OP_57(0x0) 204 | OP_5A() 205 | 206 | label("check_lazy_end") 207 | 208 | Jc((scpexpr(EXPR_EXEC_OP, "GetPartyIndex(0x8)"), scpexpr(EXPR_PUSH_LONG, 0x1), scpexpr(EXPR_NEG), scpexpr(EXPR_GTR), scpexpr(EXPR_END)), "team_has_not_noel") 209 | 210 | ChrTalk( 211 | 0x109, 212 | ( 213 | "#10107F#6P#N#40W但、但是……\x01", 214 | "我已经……!\x02", 215 | ) 216 | ) 217 | 218 | CloseMessageWindow() 219 | OP_57(0x0) 220 | OP_5A() 221 | Jump("check_noel_end") 222 | 223 | label("team_has_not_noel") 224 | 225 | ChrTalk( 226 | 0x106, 227 | ( 228 | "#10707F#6P#N#40W但是……\x01", 229 | "我已经……!\x02", 230 | ) 231 | ) 232 | 233 | 234 | CloseMessageWindow() 235 | OP_57(0x0) 236 | OP_5A() 237 | 238 | label("check_noel_end") 239 | 240 | 241 | #FadeToDark(0, -1, 0) 242 | #FadeToDark(650, 16777215, -1) 243 | OP_0D() 244 | EndChrThread(0x101, 0x1) 245 | EndChrThread(0x102, 0x1) 246 | EndChrThread(0x103, 0x1) 247 | EndChrThread(0x104, 0x1) 248 | EndChrThread(0xF4, 0x1) 249 | EndChrThread(0xF5, 0x1) 250 | EndChrThread(0x8, 0x2) 251 | EndChrThread(0x8, 0x0) 252 | 253 | OP_C5(0x2B, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) 254 | ShowSaveMenu() 255 | 256 | Battle("BattleInfo_Last", 0x0, 0x0, 0x100, 0x40, 0xFF) 257 | FadeToDark(0, 0, -1) 258 | 259 | IfScenaFlagOff(SCENA_FLAGS_OFFSET_1, SCENA_FLAGS_BIT_ARIANRHOD, 'arianrhod_already_beat') 260 | 261 | IfLastBattleLostGoto('last_battle_lost') 262 | SetScenarioFlags(SCENA_FLAGS_OFFSET_1, SCENA_FLAGS_BIT_ARIANRHOD) 263 | 264 | AnonymousTalk( 265 | 999, 266 | ( 267 | scpstr(7, 5), 268 | "现在可以使用真正的第七柱了。\x07\x00\x02", 269 | ) 270 | ) 271 | 272 | CloseMessageWindow() 273 | OP_5A() 274 | 275 | label('arianrhod_already_beat') 276 | label('last_battle_lost') 277 | 278 | OP_CC(0x1, 0xFF, 0x0) 279 | Call(0, GetFuntionId('Function_12_1D3D')) 280 | 281 | Return() 282 | 283 | 284 | ########################################################## 285 | 286 | label("xxx_first_battle_lose") 287 | Jump('first_battle_lose') 288 | 289 | 290 | -------------------------------------------------------------------------------- /Decompiler/p/t_name.py: -------------------------------------------------------------------------------- 1 | from NameList2py import * 2 | 3 | AddChar(0x0000, "罗伊德", "chr/ch00000.itc", "chr/ch00001.itc", "ms00000.dat", 0x00000000) 4 | AddChar(0x0001, "艾莉", "chr/ch00100.itc", "chr/ch00101.itc", "ms00100.dat", 0x00000000) 5 | AddChar(0x0002, "缇欧", "chr/ch00200.itc", "chr/ch00201.itc", "ms00200.dat", 0x00000000) 6 | AddChar(0x0003, "兰迪", "chr/ch00300.itc", "chr/ch00301.itc", "ms00300.dat", 0x00000000) 7 | AddChar(0x0004, "瓦吉", "chr/ch03000.itc", "chr/ch03001.itc", "ms00400.dat", 0x00000000) 8 | AddChar(0x0005, "银", "chr/ch00500.itc", "chr/ch00501.itc", "ms00500.dat", 0x00000000) 9 | AddChar(0x0006, "神狼蔡特", "chr/ch02710.itc", "chr/ch02751.itc", "ms02700.dat", 0x00000000) 10 | AddChar(0x0007, "亚里欧斯", "chr/ch02400.itc", "chr/ch02401.itc", "ms02400.dat", 0x00000000) 11 | AddChar(0x0008, "诺艾尔上士", "chr/ch02900.itc", "chr/ch02901.itc", "ms00800.dat", 0x00000000) 12 | AddChar(0x0009, "达德利搜查官", "chr/ch00900.itc", "chr/ch00901.itc", "ms00900.dat", 0x00000000) 13 | AddChar(0x000A, "加尔西亚", "chr/ch04100.itc", "chr/ch04101.itc", "ms04100.dat", 0x00000000) 14 | AddChar(0x000B, " ", "chr/ch02400.itc", "chr/ch02400.itc", 0, 0x00000000) 15 | AddChar(0x000C, " ", 0, 0, 0, 0x00000000) 16 | AddChar(0x000D, " ", 0, 0, 0, 0x00000000) 17 | AddChar(0x000E, " ", 0, 0, 0, 0x00000000) 18 | AddChar(0x000F, "※魔兽", "monster/ch60250.itc", "monster/ch60250.itc", "ms60000.dat", 0x00000000) 19 | 20 | AddChar(0x001F, "瓦吉", "chr/ch03100.itc", "chr/ch03101.itc", "ms03100.dat", 0x00000000) 21 | AddChar(0x0020, "莉夏", "chr/ch03200.itc", "chr/ch03201.itc", "ms03200.dat", 0x00000000) 22 | AddChar(0x0033, "伊莉娅", "chr/ch05100.itc", "chr/ch05100.itc", 0, 0x00000000) 23 | AddChar(0x0034, "莉夏", "chr/ch05200.itc", "chr/ch05200.itc", 0, 0x00000000) 24 | AddChar(0x0035, "塞茜尔", "chr/ch05300.itc", "chr/ch05300.itc", 0, 0x00000000) 25 | AddChar(0x003D, "约纳", "chr/ch06100.itc", "chr/ch06100.itc", "ms06100.dat", 0x00000000) 26 | AddChar(0x004B, "塞茜尔", "chr/ch07500.itc", "chr/ch07500.itc", 0, 0x00000000) 27 | AddChar(0x0052, "琪雅", "chr/ch08200.itc", "chr/ch08201.itc", "ms08200.dat", 0x00000000) 28 | AddChar(0x0053, "琪雅", "apl/ch51100.itc", "apl/ch51100.itc", "ms08200.dat", 0x00000000) 29 | AddChar(0x0055, "芙兰", "chr/ch08500.itc", "chr/ch08500.itc", 0, 0x00000000) 30 | AddChar(0x0060, "罗伊德", "chr/ch15000.itc", "chr/ch15000.itc", "ms00000.dat", 0x00000000) 31 | AddChar(0x0061, "兰迪", "chr/ch15300.itc", "chr/ch15300.itc", "ms00300.dat", 0x00000000) 32 | AddChar(0x0062, "瓦吉", "chr/ch15400.itc", "chr/ch15400.itc", "ms00400.dat", 0x00000000) 33 | AddChar(0x0065, "修利", "chr/ch10100.itc", "chr/ch10100.itc", 0, 0x00000000) 34 | AddChar(0x0076, "阿尔伯特大公", "chr/ch11800.itc", "chr/ch11800.itc", "ms11800.dat", 0x00000000) 35 | AddChar(0x008C, "莉丝修女", "chr/ch14000.itc", "chr/ch14000.itc", "ms14000.dat", 0x00000000) 36 | AddChar(0x00A0, "雷蒙德", "chr/ch30200.itc", "chr/ch30200.itc", "ms30200.dat", 0x00000000) 37 | AddChar(0x00A1, "秦", "chr/ch45000.itc", "chr/ch45000.itc", 0, 0x00000000) 38 | AddChar(0x00A2, "谢莉", "chr/ch03400.itc", "chr/ch03400.itc", 0, 0x00000000) 39 | AddChar(0x00A4, "琪雅", "apl/ch51100.itc", "apl/ch51100.itc", 0, 0x00000000) 40 | 41 | 42 | AddChar(0x0350, "罗伊德", "chr/ch00000.itc", "chr/ch00001.itc", 0, 0x00000000) 43 | AddChar(0x0351, "艾莉", "chr/ch00100.itc", "chr/ch00101.itc", 0, 0x00000000) 44 | AddChar(0x0352, "缇欧", "chr/ch00200.itc", "chr/ch00201.itc", 0, 0x00000000) 45 | AddChar(0x0353, "兰迪", "chr/ch00300.itc", "chr/ch00301.itc", 0, 0x00000000) 46 | AddChar(0x0354, "瓦吉", "chr/ch03000.itc", "chr/ch03001.itc", 0, 0x00000000) 47 | AddChar(0x0355, "银", "chr/ch00500.itc", "chr/ch00501.itc", 0, 0x00000000) 48 | AddChar(0x0356, "神狼蔡特", "chr/ch02710.itc", "chr/ch02751.itc", 0, 0x00000000) 49 | AddChar(0x0357, "亚里欧斯", "chr/ch02400.itc", "chr/ch02401.itc", 0, 0x00000000) 50 | AddChar(0x0358, "诺艾尔上士", "chr/ch02900.itc", "chr/ch02901.itc", 0, 0x00000000) 51 | AddChar(0x0359, "达德利搜查官", "chr/ch00900.itc", "chr/ch00901.itc", 0, 0x00000000) 52 | AddChar(0x035A, "加尔西亚", "chr/ch04100.itc", "chr/ch04101.itc", 0, 0x00000000) 53 | 54 | AddChar(0x035B, "瓦吉", "chr/ch03100.itc", "chr/ch03101.itc", 0, 0x00000000) 55 | AddChar(0x035C, "莉夏", "chr/ch03200.itc", "chr/ch03201.itc", 0, 0x00000000) 56 | 57 | 58 | AddChar(0x00B0, "阿瑞安赫德", "chr/ch04200.itc", "chr/ch04200.itc", "ms90010.dat", 0x00000000) 59 | AddChar(0x00B1, "小丑肯帕雷拉", "chr/ch03650.itc", "chr/ch03650.itc", "ms90020.dat", 0x00000000) 60 | AddChar(0x00F0, "钢盔肾斗士", "chr/ch93670.itc", "chr/ch93670.itc", "ms04670.dat", 0x00000000) 61 | 62 | AddChar(0x00C0, "血腥谢莉", "chr/ch03400.itc", "chr/ch03400.itc", "ms03401.dat", 0x00000000) 63 | AddChar(0x00C1, "战鬼西格蒙德", "chr/ch03300.itc", "chr/ch03300.itc", "ms03301.dat", 0x00000000) 64 | AddChar(0x00C2, "玛丽亚贝尔", "chr/ch03700.itc", "chr/ch03700.itc", "ms03700.dat", 0x00000000) 65 | AddChar(0x00C3, "亚里欧斯长官", "chr/ch03800.itc", "chr/ch03800.itc", "ms03800.dat", 0x00000000) 66 | AddChar(0x00C4, "风之剑圣亚里欧斯", "chr/ch02400.itc", "chr/ch02401.itc", "ms02401.dat", 0x00000000) 67 | AddChar(0x00C5, "『神速』杜巴莉", "chr/ch43100.itc", "chr/ch43100.itc", "ms43100.dat", 0x00000000) 68 | AddChar(0x00C6, "『刚毅』艾奈丝", "chr/ch43200.itc", "chr/ch43200.itc", "ms43200.dat", 0x00000000) 69 | AddChar(0x00C7, "『魔弓』恩奈雅", "chr/ch43300.itc", "chr/ch43300.itc", "ms43300.dat", 0x00000000) 70 | AddChar(0x00C8, "游击士艾欧莉娅", "chr/ch32100.itc", "chr/ch32100.itc", "ms32101.dat", 0x00000000) 71 | AddChar(0x00C9, "游击士林", "chr/ch32000.itc", "chr/ch32000.itc", "ms32001.dat", 0x00000000) 72 | 73 | AddChar(0x00D0, "碧之虚神", "chr/ch11600.itc", "chr/ch11600.itc", "ms89100.dat", 0x00000000) 74 | AddChar(0x00D1, "神机TYPE-α", "chr/ch05620.itc", "chr/ch05620.itc", "ms88500.dat", 0x00000000) 75 | 76 | AddChar(0x00EF, "阿瑞安赫德", "chr/ch04200.itc", "chr/ch04200.itc", "ms04200.dat", 0x00000000) 77 | 78 | SaveTo("t_name._dt") 79 | -------------------------------------------------------------------------------- /Decompiler/png32toitx.py: -------------------------------------------------------------------------------- 1 | from ml import * 2 | from itp2itc import * 3 | import subprocess 4 | 5 | ITPCNV_PATH = os.path.join(os.path.dirname(__file__), r'tools\itpcnv.exe') 6 | PNGQUANT_PATH = os.path.join(os.path.dirname(__file__), r'tools\pngquant.exe') 7 | NCONVERT_PATH = os.path.join(os.path.dirname(__file__), r'tools\nconvert.exe') 8 | 9 | PNG_TO_ITP = 0 10 | PNG_TO_ITC = 1 11 | 12 | def detectInputType(name): 13 | parts = name.rsplit('_', 1) 14 | if len(parts) == 1: 15 | return PNG_TO_ITP, None 16 | 17 | prefix, seq = parts 18 | seq = os.path.splitext(seq)[0] 19 | if not seq.isdigit(): 20 | return PNG_TO_ITP, None 21 | 22 | return PNG_TO_ITC, (prefix, seq) 23 | 24 | def replaceExt(input, ext): 25 | return os.path.splitext(input)[0] + ext 26 | 27 | def call(*args): 28 | p = subprocess.Popen(args, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE) 29 | p.wait() 30 | return p 31 | 32 | def png2itp(input, output): 33 | png8 = input + '.8bit.png' 34 | tmppng8 = png8 + '.tmp' 35 | 36 | for f in [png8, tmppng8]: 37 | try: 38 | os.remove(f) 39 | except FileNotFoundError: 40 | pass 41 | 42 | p = call(PNGQUANT_PATH, '--force', '256', input, '--output', tmppng8) 43 | if p.returncode != 0: 44 | print(p.stderr.read().decode('mbcs').strip()) 45 | raise Exception('convert %s to png8 failed' % input) 46 | 47 | p = call(NCONVERT_PATH, '-quiet', '-o', png8, tmppng8) 48 | os.remove(tmppng8) 49 | if p.returncode != 0: 50 | print(p.stderr.read()) 51 | raise Exception('nconvert %s failed' % input) 52 | 53 | for mode in ['-v6', '-v4', '-v2', '-v0']: 54 | p = call(ITPCNV_PATH, mode, png8, output) 55 | if p.returncode == 0 and os.path.exists(output): 56 | break 57 | 58 | print(p.stdout.read().decode('mbcs')) 59 | p.returncode = -1 60 | 61 | os.remove(png8) 62 | if p.returncode != 0: 63 | raise Exception('convert %s to itp failed with ret code = %X' % (input, p.returncode)) 64 | 65 | def png2itc(prefix, namelen, output): 66 | format = '%0{len}d'.format(len = namelen) 67 | print('%s_%s.itp => %s ...' % (prefix, format, output)) 68 | 69 | index = 0 70 | itc = fileio.FileStream(output, 'wb') 71 | itc.Position = SIZE_OF_MAGIC + ITC_ENTRY_COUNT * ITC_ENTRY_SIZE + SIZE_OF_SCALE_INFO 72 | 73 | entries = [] 74 | offset = 0 75 | 76 | while True: 77 | name = (format % index) + '.png' 78 | name = prefix + '_' + name 79 | if not os.path.exists(name): 80 | break 81 | 82 | print('\r%s' % name, end = '') 83 | 84 | tmpitp = name + '.tmp.itp' 85 | index += 1 86 | 87 | png2itp(name, tmpitp) 88 | itp = fileio.FileStream(tmpitp, 'rb') 89 | 90 | entry = ItcEntry(itc.Position, itp.Length) 91 | entries.append(entry) 92 | 93 | itc.Write(itp.Read()) 94 | itp.Close() 95 | 96 | os.remove(tmpitp) 97 | 98 | itc.Position = 0 99 | itc.Write(b'V101') 100 | for entry in entries: 101 | itc.WriteULong(entry.offset) 102 | itc.WriteULong(entry.size) 103 | 104 | itc.Position = SIZE_OF_MAGIC + ITC_ENTRY_COUNT * ITC_ENTRY_SIZE 105 | 106 | for info in ScaleInfo: 107 | itc.WriteULong(info) 108 | 109 | print() 110 | 111 | def handleFile(name): 112 | type, extra = detectInputType(name) 113 | 114 | if type == PNG_TO_ITP: 115 | output = replaceExt(name, '.itp') 116 | print('%s -> %s ...' % (name, output)) 117 | png2itp(name, output) 118 | 119 | elif type == PNG_TO_ITC: 120 | prefix, seq = extra 121 | png2itc(prefix, len(seq), prefix + '.itc') 122 | 123 | def main(): 124 | for name in sys.argv[1:]: 125 | handleFile(os.path.abspath(name)) 126 | 127 | console.pause('done') 128 | 129 | if __name__ == '__main__': 130 | Try(main) 131 | -------------------------------------------------------------------------------- /Decompiler/tools/itpcnv.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/tools/itpcnv.exe -------------------------------------------------------------------------------- /Decompiler/tools/nconvert.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/tools/nconvert.exe -------------------------------------------------------------------------------- /Decompiler/tools/pngquant.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ouroboros/EDDecompiler/7908b58e60cc64f852be6f366f232e87520758cb/Decompiler/tools/pngquant.exe -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 有人帮我写了 81 页文档,感动中国 2 | 3 | https://www.reddit.com/r/Falcom/comments/k6im8f/modding_trails_in_the_sky_for_junior_bracers_a/ 4 | 5 | https://docs.google.com/document/d/1Nflb-dBPLLl0yWwk3MJTo0UxNyRPZDgy5zPanSrtotM/edit 6 | 7 | 停止更新,闪轨3、4见下列链接: 8 | 9 | [闪之轨迹3](https://github.com/Ouroboros/Falcom/tree/master/Decompiler2/Falcom/ED83) 10 | 11 | [闪之轨迹4](https://github.com/Ouroboros/Falcom/tree/master/Decompiler2/Falcom/ED84) --------------------------------------------------------------------------------