How do I get more control over the display of map names?

From OHRRPGCE-Wiki
Jump to navigation Jump to search

If you want a quick and easy way to make the name of a map display, read: How do I display map names?

If you want more control over the style and presentation of the map name, you can use these instructions.


Using a invisible step on npc and plotscripting[edit]

Let's take the example above of TownXXX and it's INN. You would like to make display it as the player enters... How to do ?

Well first go under custom.Exe and edit the text boxes. Pick up a free one (Here in the example, we chose text box 39). Edit the appearance of text box 39.

I recommend to change its appearance to 20 shrink (or a bit above) and position it to 43 (on the back). Make also disappear the background.

That's the way the map name is displayed by default by game.exe when the bitset have been activated so I think it would be a good idea to keep it if have also use the map function so that you make sure map names are dislayed the exact same way! (It is this kind of little things that make fake plotscripting really efficient!)

Then edit your hss file and include the following script

plotscript, display inn name, begin
  suspend box advance
  show text box (39)
  wait (9)
  advance text box
  resume box advance
end #end of the script

Save your hss file and compile it.

Go back under custom.exe and edit the town map. (By TownXXX map,I mean we have to see the buildings. Be careful, not to mistake it with TownXXX indoors map because we won't use it here.)

Pick up a free npc and edit it. Change its activation to step and make sure he stays invisible. Then place it on the map exactly on the Inn's door.

Why do we have to place it here? Well because the name of the place to appear AFTER we enter the inn.

That's the only way to do! If we have used a free npcs with the script and placed it on TownXXX in doors map the name of the place would have been displayed when we leave the INN which is not what we want!

We could also have placed just after the door but the player would have to press one of the arrow keys to step on on the NPC before he finally sees the name of the place. It is still not what we want: the name of a place is displayed as a map is launched in the OHRRPGCE!

The main inconvenient of this method is that it uses an NPC only to display the name of a map! Therefor, you may prefer to use the method described in the next section

The autorun script, detection of the hero's location and 2 tags[edit]

This method is useful when you have a big town and when you want the name several shops to be displayed. The shops graphics are all stored in the same maptileset and it was linked to a single map.

Let's take again the example of TownXXX. We want the names of several places to be displayed : the bank, the town hall and Kenta's house (kenta is new friend met while a quest)

One all the graphics and all the doors have been placed, go under custom.exe and edit the tags. Pick up 2 free tags.

Name the first one enter indoors and the other one enter town map. (Feel free to choose other names if you are afraid to forgot what the tags are for!


We'll need doors location so pick up a piece of paper and write them as in example

One TownXXX map, the bank entrance door is located (X 13, 15) the town hall entrance door is at (X 15,Y 17) and Kenta's house entrance is at (X21, Y22)

On the indoor map, the bank exit/entrance door is located (X 6, 19) the town hall exit/entrance door is at (X 25,Y 37) and Kenta's house exit/entrance is at (X13, Y25) (Why exit/entrance? Because you use the same door to enter and leave the house)

Edit the text boxes and pick up four free text boxes. In the first one write TownXXX's bank, in the second on Town hall, in the third one Kenta's house. The last one will be TownXXX It will be text 23, 24 and 25, and 26.

Here again, I recommend to change its appearance to 20 shrink (or a bit above) and position it to 43 (on the back). Don't also forget to make disappear the backdrop. That's the way the map name is displayed by default by game.exe when the bitset have been activated so I think it would be a good idea to keep it especially if you already use (or intend to) the name display function of the map!


Now edit your hss file and include the following scripts adapting tag's names, x,y locations and the number of the text boxes

#-----------------------------------------------------------
# autorun script for map 14 TownXXX
plotscript, autorun14, begin

  if (check tag (tag : enter indoors)== off)then, begin 

    if (hero X (me)==13, and, hero Y (me)==15) then, begin # heroe(s) go(es) out the bank     
      set tag (tag : enter map, off)		
      set tag (tag : enter indoors, on)	
      suspend box advance
      show text box (26) # TownXXX
      wait (9)
      advance text box
      resume box advance
    end, else, begin
      set tag (tag : enter new map, off)	
    end #end for the hero X, hero Y

    if (hero X (me)==15, and, hero Y (me)==17) then, begin #heroe(s) go(es) out of the Townhall      
      set tag (tag : enter map, off)		
      set tag (tag : enter indoors, on)	
      suspend box advance
      show text box (26) # TownXXX
      wait (9)
      advance text box
      resume box advance
    end, else, begin
      set tag (tag : enter indoors, off)	
    end #end for the hero X, hero Y

    if (hero X (me)==21, and, hero Y (me)==22) then, begin #hero enters the Townhall      
      set tag (tag : enter map, off)		
      set tag (tag : enter indoors, on)	
      suspend box advance
      show text box (26) # TownXXX
      wait (9)
      advance text box
      resume box advance
    end, else, begin
      set tag (tag : enter indoors, off)	
    end #end for the hero X, hero Y

  end #end for the tag enter new map

end #end for the plotscript
#-------------------------------------------------------
# autorun script for map 16 TownXXX indoors (inn, kenta's house...)

plotscript, autorun16, begin

  if (hero X (me)==6, and, hero Y (me)==19) then, begin  # heroe(s) enter(s) the bank
    suspend box advance
    show text box (23)
    wait (9)
    advance text box
    resume box advance
    set tag (tag : enter map, on)	
    set tag (tag : enter indoors, off)			        
  end, else, begin   	#
    set tag (tag : enter map, off)	
    set tag (tag : enter indoors, on)			
  end 

  if (hero X (me)==25, and, hero Y (me)==37) then, begin  # heroe(s) enter(s) the townhall 
    suspend box advance
    show text box (24)
    wait (9)
    advance text box
    resume box advance
    set tag (tag : enter map, on)	
    set tag (tag : enter indoors, off)			        
  end, else, begin   	#
    set tag (tag : enter map, off)	
    set tag (tag : enter indoors, on)			
  end 

  if (hero X (me)==13, and, hero Y (me)==25) then, begin # heroe(s) enter(s) the Kenta's house
    suspend box advance
    show text box (25)
    wait (9)
    advance text box
    resume box advance
    set tag (tag : enter map, on)	
    set tag (tag : enter indoors, off)			        
  end, else, begin   	#
    set tag (tag : enter map, off)	
    set tag (tag : enter indoors, on)			
  end 

end #end of the plotscript
#---------------------------------------------------

Some things to remember[edit]

  • Remember that the tags have to be intertwined so that they can still detect each other and launch the system, therefor, if you have made for graphical purpose, several indoors maps (to expand maptiles limitation) you need to copy the other

indoors autorun script so that the tags keep on detecting each other and make pop up the text boxes when you need.

  • The system takes time to be implemented and requires x,y detection which is fastidious to key in therefor, I strongly recommend you to add the map names display system when you have drawn the definitive graphics and when you are sure that

the building location won't change!