Changeable title screen

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Gaplan
Red Slime
Posts: 52
Joined: Wed Jan 10, 2018 12:56 pm

Changeable title screen

Post by Gaplan »

I had an idea to make a title screen that changes as you progress through the story of a game (like in "Spec Ops: The Line" for example). I tried to do this via tags and variables, but the are turning on only when i load the saved game :zombie: . So is there a way to make tags load as you launching the game? :???:
sorry for bad english :v:
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

This is a bit tricky, but possible.

So first you should disable the default title screen and load screen.

That means that as soon as your game starts up, it will immediately start a new game and run your "on new game" script.

That new game script can display the title screen, and then show a menu that can either really start a new game, or open the "load game" screen.

As for detecting what has happened in your save slots, you can do this with the "import globals" command. It can fetch a single global variable from a save slot, and you can check that variable to see what events have happened in the save.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Have a look at the How do I add screens before my title game screen? and
How do I make an animated title screen? articles. You can adapt what you'll learn by reading them. Probably a bit of redundancy between them...

In addition to import globals you will also need "export globals".
Last edited by TMC on Tue May 22, 2018 9:04 am, edited 1 time in total.
User avatar
Gaplan
Red Slime
Posts: 52
Joined: Wed Jan 10, 2018 12:56 pm

Post by Gaplan »

Thanks, i'll try it :) . But I have a fev more questions.
1. How can i download the Plotscripting Dictionary website to my hard drive, so i could use it offline?
2. Is this possible to turn off the walking battle sprites in load game menu? Or even better, to make the walking walkabout sprites or at least hero portraits.
Last edited by Gaplan on Tue May 22, 2018 10:07 am, edited 1 time in total.
sorry for bad english :v:
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

The Plotscripting Dictionary *is* already on your harddisk! Check the docs folder in the OHRRPGCE folder.

You can actually replace the hero graphics in the load/save menu. A few games have done that. It can be accomplished by temporarily changing the hero graphics to something else before calling the "save menu" command, and then changing it back immediately after "save menu" and also in the on-load script.
You will need to make a copy of the portrait or walkabout spriteset you want to use as a hero battle spriteset. Then use the "set hero picture" command. Something like:

Code: Select all

plotscript, save, begin
  variable(slot)
  slot := find hero(hero:bob)
  if &#40;slot >= 0 && slot <= 3&#41; then &#40;set hero picture&#40;slot, 42, inside battle&#41;&#41;  # Change to crrect hero battle spriteset number
  slot &#58;= find hero&#40;hero&#58;misa&#41;
  if &#40;slot >= 0 && slot <= 3&#41; then &#40;set hero picture&#40;slot, 43, inside battle&#41;&#41;  # Ditto
  # ETC
  save menu
  # Restore originals
  if &#40;hero by slot&#40;0&#41; <> -1&#41; then &#40;reset hero picture&#40;0, inside battle&#41;&#41;
  if &#40;hero by slot&#40;1&#41; <> -1&#41; then &#40;reset hero picture&#40;1, inside battle&#41;&#41;
  if &#40;hero by slot&#40;2&#41; <> -1&#41; then &#40;reset hero picture&#40;2, inside battle&#41;&#41;
  if &#40;hero by slot&#40;3&#41; <> -1&#41; then &#40;reset hero picture&#40;3, inside battle&#41;&#41;
end
You need to always call this script instead of using the builtin Save option in a menu.

On-load script is quite simple:

Code: Select all

plotscript, onload, begin
  # Restore originals
  if &#40;hero by slot&#40;0&#41; <> -1&#41; then &#40;reset hero picture&#40;0, inside battle&#41;&#41;
  if &#40;hero by slot&#40;1&#41; <> -1&#41; then &#40;reset hero picture&#40;1, inside battle&#41;&#41;
  if &#40;hero by slot&#40;2&#41; <> -1&#41; then &#40;reset hero picture&#40;2, inside battle&#41;&#41;
  if &#40;hero by slot&#40;3&#41; <> -1&#41; then &#40;reset hero picture&#40;3, inside battle&#41;&#41;
end

Oh, and here's another useful script for you to look at for your titlescreen: https://www.slimesalad.com/forum/viewto ... 713#127713
Last edited by TMC on Tue May 22, 2018 11:40 am, edited 1 time in total.
User avatar
Gaplan
Red Slime
Posts: 52
Joined: Wed Jan 10, 2018 12:56 pm

Post by Gaplan »

Okay, but agian:
1. How do I make the characters apear on the screen as slices?
2. How do I make the script that checks tags on all of the save slots and always chooses the biggest number? :???:
sorry for bad english :v:
Post Reply