How do i get help cleaning up my code? PSX Saga frontier

Started by Zanerus, September 03, 2019, 04:42:14 AM

Previous topic - Next topic

Zanerus

So while being very glitchy I have Cobble together a routine that allows me to replace NPC dialogue with the ability to add a party member. However this code is very messy and I'm not sure how to streamline it so that I'm not having to delete multiple NPCs per one box of text.

Aside for myself there doesn't seem to be any active Saga Frontier hackers so I'm still trying to figure out how to find help

FAST6191

While another Saga Frontier hacker of your chosen region and patch level that knows assembly would be ideal then that does not happen for most people, unless you are doing the usual pokemon, mario, sonic... games.

We can however still see the code and suggest optimisations, spot things that might lead to unexpected results if you used an opcode in an odd way, if you frame your work and what you know of the game's engine as far as this is concerned then someone can probably help with some more specifics.

Zanerus

I should mention in advance that my code is basically cropped and modified version of an encounter found in game. Dialog is coded a bit weird as instead of ASCII it uses a two byte system.

https://pastebin.com/Y415akjt

This link is a translated page by my girlfriend for the game's text code. The next link is JP Wiki page that explains the ASM commands for dialog

https://w.atwiki.jp/sagafrontier/pages/28.html

Rouge Collision box in Luminous
16FB651B: Rouge collision offset
00 08 1A 28 30 00 43 54 06 08 00 05 40 30 00 08 24 30 F0 F0 18 06 4D 0D 82 68 81 66 82 8D 81 40 82 71 82 8F 82 95 82 87 82 85 81 40 82 86 82 92 82 8F 82 8D 81 40 82 94 82 88 82 85 81 40 82 6C 82 81 82 87 82 89 82 83 81 40 82 6A 82 89 82 8E 82 87 82 84 82 8F 82 8D 81 44 46 82 68 81 66 82 8D 81 40 82 94 82 92 82 81 82 96 82 85 82 8C 82 89 82 8E 82 87 81 40 82 94 82 88 82 92 82 8F 82 95 82 87 82 88 81 40 82 94 82 88 82 85 81 40 82 92 82 85 82 87 82 89 82 8F 82 8E 82 93 46 82 93 82 94 82 95 82 84 82 99 82 89 82 8E 82 87 81 40 82 96 82 81 82 92 82 89 82 8F 82 95 82 93 81 40 82 8D 82 81 82 87 82 89 82 83 81 44 43 08 26 30 F0 F0 18 06 08 27 30 F0 F0 18 06 48 46 82 60 82 92 82 85 81 40 82 99 82 8F 82 95 81 40 82 81 82 8C 82 93 82 8F 81 40 82 93 82 85 82 81 82 92 82 83 82 88 82 89 82 8E 82 87 81 40 82 86 82 8F 82 92 81 40 46 82 94 82 88 82 85 81 40 82 87 82 89 82 86 82 94 81 48 43 4D 01 49 02 16 10 40 81 45 82 78 82 85 82 93 46 41 00 81 45 82 6D 82 8F 41 00 42 FF 00 54 0C 01 D2 05 4D 02 48 82 73 82 88 82 81 82 94 81 66 82 93 81 40 82 94 82 8F 82 8F 81 40 82 82 82 81 82 84 81 44 43 04 18 06 00 4D 01 48 82 73 82 88 82 85 82 8E 81 43 81 40 82 8C 82 85 82 94 81 40 82 8D 82 85 81 40 82 8A 82 8F 82 89 82 8E 81 40 82 99 82 8F 82 95 81 44 44 02 64 01 08 1A 28 30 F1 43 54 61 FE 52 10 59 FF 56 62 66 08 FE


My Custom ally join code rough draft
KEY
Shall I Summon a new Warrior for you? ()
Choice Yes/No {}
No Line []
Yes Line ``
Character Join /\
Where the Yes No Window go <>
(82 72 82 88 82 81 82 8C 82 8C 81 40 82 68 81 40 82 93 82 95 82 8D 82 8D 82 8F 82 8E 81 40 82 81 81 40 82 8E 82 85 82 97 81 40 82 97 82 81 82 92 82 92 82 89 82 8F 82 92 81 40 82 86 82 8F 82 92 81 40 82 99 82 8F 82 95 81 48) {43 4D 01 49 02 16 10 40 81 45 82 78 82 85 82 93 46 41 00 81 45 82 6D 82 8F 41 00}< 42 FF 00 54 0C 01 D2 05 >4D 02 48 [82 73 82 88 82 81 82 94 81 66 82 93 81 40 82 94 82 8F 82 8F 81 40 82 82 82 81 82 84 81 44 00] 43 04 18 06 00 4D 01 48 ~82 73 82 88 82 85 82 8E 81 43 81 40 82 8C 82 85 82 94 81 40 82 8D 82 85 81 40 82 8A 82 8F 82 89 82 8E 81 40 82 99 82 8F 82 95 81 44 00` 00 /44 00 02 64 01 08 1A 28 30\ F1 43 54 61 FE 52 10 59 FF 56 62 66 08 FE

Currently the Yes box is bugged, I'm not sure how to fix it, my goal was a code that I could slot into easily to have NPCS give some party members that the game originally dummies out and add a early game Mystic and MEc to every story so that every story can use all four races. While each Race has a unique story to them, the two stories most users agree are the most complete have limited access to Mystics and Mecs

Slightly modifed version that works in magic kingdom
A4CDC4E: Woman sitting on the foutain in the center of the magic kingdom
82 72 82 88 82 81 82 8C 82 8C 81 40 82 68 81 40 82 93 82 95 82 8D 82 8D 82 8F 82 8E 81 40 82 81 81 40 82 8E 82 85 82 97 81 40 82 97 82 81 82 92 82 92 82 89 82 8F 82 92 81 40 82 86 82 8F 82 92 81 40 82 99 82 8F 82 95 81 48 43 4D 01 49 02 16 10 40 81 45 82 78 82 85 82 93 46 41 00 81 45 82 6D 82 8F 41 00 42 FF 00 54 0C 01 0C 02 4D 02 48 82 73 82 88 82 81 82 94 81 66 82 93 81 40 82 94 82 8F 82 8F 81 40 82 82 82 81 82 84 81 44 00 43 04 18 06 00 4D 01 48 82 82 73 82 88 82 85 82 8E 81 43 81 40 82 8C 82 85 82 94 81 40 82 8D 82 85 81 40 82 8A 82 8F 82 89 82 8E 81 40 82 99 82 8F 82 95 81 00 44 00 00 44 00 02 64 01 21 1A 28 30 F1 43 54 64 01 21 1A 28 30 F1 44 00 08 FE 00