Welcome to the Shining Force Central Forums!
SFC Forums Index Shining Forums Shining Force II
Register for your free forum account now or Login to remove this advert.

The SF2 Disassembly Super Thread

One thread to link them all.

Discussion about this classic Genesis/Mega Drive game.

The SF2 Disassembly Super Thread

Postby Wiz » Wed Aug 02 2017 11:12pm

This is the entry-point thread to link all SF2 Disassembly-related discussions.

For a brief summary, the disassembly is a more complex and powerful approach for modifying Shining Force II, and eventually create whole new Shining Force adventures based on its engine.
Details :
WARNING: SPOILER!

Disassembly quick start guide :
WARNING: SPOILER!


Main threads :

- [GitHub] ShiningForceCentral/SF2RE
WARNING: SPOILER!

- [GitHub] ShiningForceCentral/SF2DISASM
WARNING: SPOILER!

- SF2 Disassembly Tool Suite
WARNING: SPOILER!

Tool suite screenshots :
WARNING: SPOILER!


HOWTOs :
[SF2DISASM][HOWTO] Scrolling text introduction
[SF2DISASM][HOWTO] Music resuming
[SF2DISASM][HOWTO] Battle search fix
DiegoMM's "Is it feasible?" thread

Other disassembly-related threads :

- Cutscenes Documentation
Cutscene macros for easier creations.

- Ronnen's disassembly hacks :
Ronnen wanted SF1-style level-up, so he forked SF2DISASM and did a patch for that :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=27885
When ronnen wanted to change monster spells, he did this :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=28068
Then he wanted to make attack power have influence on magic, so he did this :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=28098
Ronnen is working to change the world.
Be like ronnen.
(loosely based on the Elon Musk meme, please don't take this seriously :D)

- Lyanel's Lataura hack :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=41765
This is an examplary way of packaging ips patches along with disassembly assets !
Thanks to anybody willing to share their work like this !

- Music resuming patch :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=42200

- Siel's various stats engine patches :
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=42340
https://forums.shiningforcecentral.com/viewtopic.php?f=5&t=43516
[Gameplay Mod] SF2 Counteraction v0.2 (demo)

- Xenometal's SF2DISASM workshop

That'll do for the moment, please MXC, you can unpin the SF2RE and SF2DISASM threads and sticky this one instead. :)
Edit : thanks Stor !
Last edited by Wiz on Sun Oct 07 2018 11:12am, edited 21 times in total.
Wiz

User avatar
Shining Member
Shining Member
 
Posts: 147
Joined: Sun Mar 18 2007 2:43pm
Location: Blois, France

Re: The SF2 Disassembly Super Thread

Postby Stordarth » Thu Aug 03 2017 2:33pm

Relevant topics stickied/unstickied.

Code: Select all
Dice Codes
Attack/Marked Target: /roll 8d100
Damage Variance: /roll d26 [Dani, Don], /roll d24 [Assassins with Katana], /roll d21 [MXC, TUM with Blade]
Magic: /roll d26
Status Effects: /roll d100
Level-Ups (No MP): /roll 4d11
Level-Ups (Has MP): /roll 5d11

---
SFCW-A: Durandar
Sunken Castle: Fintan Kahn

Code: Select all
Dice Codes
Attack/Marked Target: /roll 8d100
Damage Variance: /roll d26 [Dani, Don], /roll d24 [Assassins with Katana], /roll d21 [MXC, TUM with Blade]
Magic: /roll d26
Status Effects: /roll d100
Level-Ups (No MP): /roll 4d11
Level-Ups (Has MP): /roll 5d11

---
SFCW-A: Durandar
Sunken Castle: Fintan Kahn
Stordarth

User avatar
The L-Block Anomaly
Administrator
 
Posts: 16325
Joined: Thu Sep 16 2004 3:30pm
Location: The Midlands, Staffordshire, England

Re: The SF2 Disassembly Super Thread

Postby jordanelias » Wed Aug 16 2017 10:37am

This is phenomenal, and learning enough Motorola 68000 to dabble is certainly more approachable than diving in through hex editing.

I'm interested in code\gameflow\battle\aiengine.asm and code\gameflow\battle\battlefieldengine.asm. This article (http://ladyabaxa.livejournal.com/65619.html) elaborates on what we've all noticed in the game: the AI makes some silly decisions to heal or not heal, and the AI is incapable of using Attack or Boost.

Some members have started doing interesting work to tackle things like SF1-style EXP gains...but making the AI smarter with healing and support spells would be amazing.
jordanelias

Newbie
Newbie
 
Posts: 9
Joined: Mon Aug 14 2017 10:04pm

Re: The SF2 Disassembly Super Thread

Postby jordanelias » Wed Aug 16 2017 10:57am

In fact, I think the following in battlefieldengine.asm covers the healing selection process:
Code: Select all
; =============== S U B R O U T I N E =======================================

; In: D0 = heal target char idx
;     D4 = heal spell idx

sub_CD68:
      movem.l d0-d1/d3-a6,-(sp)
      clr.w   d5
      move.b  d4,d5
      lsr.w   #6,d5
      andi.w  #3,d5
      move.w  d1,d3
      jsr     GetCurrentHP
      move.w  d1,d2
      jsr     GetMaxHP
      sub.w   d2,d1           ; d1 = max HP - current HP
      moveq   #$FFFFFFFF,d2
      cmpi.w  #ENEMYAI_THRESHOLD_HEAL1,d1
      bls.w   loc_CDDC
      moveq   #0,d2
      cmpi.w  #ENEMYAI_THRESHOLD_HEAL2,d1
      bls.w   loc_CDB8
      cmpi.w  #2,d5
      bcs.w   loc_CDB8
      moveq   #2,d2
      cmpi.w  #ENEMYAI_THRESHOLD_HEAL3,d1
      bls.w   loc_CDB8
      cmpi.w  #3,d5
loc_CDB2:
      bcs.w   loc_CDB8
      moveq   #3,d2
loc_CDB8:
      move.w  d3,d0
      jsr     GetCurrentMP
      move.w  d1,d3
loc_CDC2:
      moveq   #0,d1
      add.w   d2,d1
      lsl.w   #5,d1
      add.w   d4,d1
      jsr     GetSpellDefAddress
      cmp.b   SPELLDEF_OFFSET_MPCOST(a0),d3
                  ; check if spell cost is more than current MP
      bcc.w   loc_CDDC
      dbf     d2,loc_CDC2
loc_CDDC:
      cmpi.b  #1,d2
      bne.s   loc_CDE4
      moveq   #0,d2
loc_CDE4:
      movem.l (sp)+,d0-d1/d3-a6
      rts

   ; End of function sub_CD68
jordanelias

Newbie
Newbie
 
Posts: 9
Joined: Mon Aug 14 2017 10:04pm


Return to Shining Force II

Who is online

Users viewing this topic: No registered users and 1 guest