The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 1 Guest(s)
Patch: Selectable Script

#1
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
Path:   Selectable Script 1.0
Target: Final fantasy 3, Version 1.0, English
Download

I want to share a patch i make. Perhaps, It can be helpful for a hacker.

Description:

In the original game, the enemy actions are determined by a script. In special cases, the enemy script is ignored and a random action is selected for the monster from its control list of commands. Common examples are the muddle status and Colosseum fights.

The patch changes the selection between the monster script and the control list. When the 'special event' flag is set in the monster database, the monster will use its script. Otherwise, it will use its control list instead.

The advantage of this patch is to reduce the script size. Common enemies, without the need of advanced scripts, can be set to use its control list. Because of it, the enemy script can be fully emptied. The free bytes can be used by another monsters scripts.

Unlike the original game, the monsters in the Colosseum battles can also use its monster script. It allows for better customization of the monsters behavior in duels.

With this patch, the 'special event' flag must be revised for all monsters in the database. The original setting may not be correct for this new approach. In special, pseudo enemies which actually triggers a cinematic event or special code must always have the 'special event' flag set.

As a note, the berserk and muddle status will always force the monster to ignore its script, independently of the 'special event' flag. Also, monsters actually have two imbued scripts. One for its turn and another for a counter. The counter script will always be executed, independently of the 'special event' flag.

Code:
header
hirom

;----------------------------------------------------------------------------------------
;--     addresses
;----------------------------------------------------------------------------------------
org     $C20134
        case_control:
org     $C20139
        case_script:

;----------------------------------------------------------------------------------------
;--     select monster action
;----------------------------------------------------------------------------------------
org     $C20123

;--     check special event flag
        LDA $3C80,X                     ;special flags
        BIT #$40                        ;special event flag
        BEQ case_control                ;to use action from control list
        
;--     check berserk/muddle status
        LDA $3EE5,X                     ;status
        BIT #$30                        ;berserk, muddle
        BEQ case_script                 ;to use action from monster script
        BRA case_control                ;to use action from control list
        NOP

warnpc  $C20134
  Find
Quote  
[-] The following 2 users say Thank You to HatZen08 for this post:
  • Gi Nattak (01-11-2016), SSJ Rick (04-10-2022)



Messages In This Thread
Patch: Selectable Script - by HatZen08 - 01-11-2016, 05:31 AM
RE: Patch: Selectable Script - by SenioritaAeslnd - 01-11-2016, 05:52 AM
RE: Patch: Selectable Script - by Gi Nattak - 01-11-2016, 05:58 AM
RE: Patch: Selectable Script - by SenioritaAeslnd - 01-11-2016, 07:34 AM
RE: Patch: Selectable Script - by HatZen08 - 01-11-2016, 08:25 AM
RE: Patch: Selectable Script - by Catone - 01-11-2016, 08:49 AM
RE: Patch: Selectable Script - by HatZen08 - 01-11-2016, 09:15 AM
RE: Patch: Selectable Script - by Tenkarider - 01-11-2016, 04:24 PM
RE: Patch: Selectable Script - by madsiur - 01-12-2016, 01:26 AM
RE: Patch: Selectable Script - by HatZen08 - 01-12-2016, 05:05 AM
RE: Patch: Selectable Script - by Dev J - 04-28-2017, 11:28 PM
RE: Patch: Selectable Script - by HatZen08 - 04-30-2017, 09:37 AM
RE: Patch: Selectable Script - by Dev J - 09-25-2019, 01:06 PM
RE: Patch: Selectable Script - by C-Dude - 09-25-2019, 04:54 PM
RE: Patch: Selectable Script - by Dev J - 09-26-2019, 11:45 AM
RE: Patch: Selectable Script - by doofenH - 04-05-2022, 04:35 AM
RE: Patch: Selectable Script - by madsiur - 04-05-2022, 08:21 AM
RE: Patch: Selectable Script - by doofenH - 04-05-2022, 09:48 AM
RE: Patch: Selectable Script - by madsiur - 04-05-2022, 03:47 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite