The game of today is Dragon Quest IV, here is a description from Fandom:
"Dragon Quest IV had a unique way of advancing the story. It was split into five chapters. The first four chapters were told from the perspective of the hero's future companions. The fifth chapter was the hero's quest. During that quest, you would meet with and join with the companions whose stories were told in earlier chapters. Then, with a full cast of companions the group would begin their journey to save the world. Remakes add a sixth chapter, available after completing the storyline.
The storyline of Dragon Quest IV does not relate to the storyline of Dragon Quest I, II, and III.
Dragon Quest IV introduced several new features over the first three titles. The new chapter-based story telling system was one of them. Also the inclusion of the, now common, casino. In addition, there were party member artificial intelligence options, which allows the player to give strategies to his party while still directly controlling the hero character. Finally, the wagon which allowed extra characters to wait and be exchanged during battle if needed."