[Metroidvainia 4.5.9] Sprite pause and NPCs, Auto text and more.

IMBrendan

Member
**THIS POST WILL BE UPDATED WITH THE NEWEST WORKING SOLUTIONS - PLEASE USE SCRIPTS AND CODE FOUND HERE FOR MOST STABLE VERSION**

I am creating this post for me and Kanbei85 to discuss our common issues with this module. I don't have any details on Kanbei85's project - I hope he will post some of his known issues to this point. This post will be replaced when a mutual solution is found.

GOALS FOR THIS POST:
* To have integrate sprite pause from the cutscene tutorial by Bucket Mouse
* To integrate userScreenBytes from chronicleroflegends
* To integrate player1_object switching from dale_coop
* To create a stable set of scripts that can;
- Call a specific text group by number (userScreenByte02)
- Call a specific text entry by number (userScreenByte01)
- Call a specific text entry based on above conditions as an NPC
- Call a specific text entry based on first two conditions as a Text Tile
- Call different text entries for NPCs than Text Tiles
- Conditionally call either screenText (as set on Screen info) or USB text (possibly with screen triggers)
- Add conditional calls for player1_object subtype

KNOWN ISSUES:
* There is an issue with the day night cycle (likely caused by the palette switching routine) that causes textboxes to fail in a predictable way.
* Instant tiles and NPC text call for text using SOME by not all of the same code - but are intertwined in an obscure way.

**THIS POST WILL BE UPDATED WITH THE NEWEST WORKING SOLUTIONS - PLEASE USE SCRIPTS AND CODE FOUND HERE FOR MOST STABLE VERSION**
 

IMBrendan

Member
So - at least in my case - development of the player1_object switching is the most important part of my game. Without it - it simply isn't the project I am hoping to create. With that in mind - I created some rough code that functions as a check for the player's object type then executes a function based on that type.

Code:
LDX player1_object
LDA Object_type,x
CMP #15            ; Object_type #00 = Werewolf
                   ; Object_type #15 = Human
  BEQ +Human ; is Human
  JMP +Werewolf
  +Human
 
  ;ENTER CONDITIONAL CODE FOR HUMANHERE!
 
 
  JMP +commonTasks

  +Werewolf

  ;ENTER CONDITIONAL CODE FOR WEREWOLF HERE!

  JMP +commonTasks
+commonTasks

It's simple - it's functional - but I am not sure if it's the most effective code, suggestions welcome.
 

Bucket Mouse

Active member
You can call specific text entries by using TEXT_FREE, and through that, you can create things like conditional text dialogue, or use more than four text entries on one screen. I have done both. I should probably write a tutorial, huh?

Done and done:
 
Top Bottom