TIPS AND TRICKS
#1
TIPS AND TRICKS

This thread is dedicated to our community members, with the hopes that they wish to share their knowledge.  This is not for rants, nor solicitations.  But instead, a topic where they share things that they uncovered about their chosen game engine, methods garnered for game development, or techniques they developed to bypass their system's built-in limitations.

I am leaving the first page open, perhaps as a 'contents' page, and giving an invitation to those who wish to submit.

Amazed no one ever thought of this thread until now
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#2
FONT:  Setting the Default Font



The easiest method of changing the font of your entire game is adding the line:
Code:
Font.default_name = "Arial"

Drop that in the main method, or just have it as a script of its own.



Explanation and options time now...


Since its inception, you were stuck with the default font with your RPGMaker system. This is true for all language formats, whether the original Japanese version or the legally procurable Western/English version.  Japanese users were always finding MS Mincho on their screens while Western users would find Tahoma as their typically visible font.


Back in the early days before an English version was available, users discovered that the saw now text in their games and demos. They discovered that the font was set to a Japanese font not installed. So clever coders developed techniques like creating a $default_font value and edited all the windows and code to use the font they defined with that variable. Or they would use a patch made by a scripter named Minkoff.  Both techniques worked, though relied upon the most work to set the game's font.


Changing the font of your game to another merely requires one simple command:


Code:
Font.default_name = "Arial"


The font class itself is a fun class, and has five properties you can actually change:  default_name, default_size, default_bold, default_italic and default_color. But first about default_font.


The Font.default_name value lets you set the default font of all of your game's text, with the exception of RPGMaker XP's battle system's damage* pops, contained in the Sprite 'damage' method.  The above example makes your game run with the Arial font.  But you are not limited to just one font with this command, but a list as you can see below:


Code:
Font.default_name = ["Radagast","Courier New","Tahoma","Arial"]


This simple line allows you to set four different fonts to your game. If the person playing your game doesn't have the first font in the list, it will then try to render the text with the second font, then the third, and so on.  And I have seen a few demos where ten different fonts were specified.  You may be supplying your own custom font. But if the font didn't properly install, you have the ability to set alternatives.


Of course, this won't change any font of a custom script that has its own 'pre-defined' font.


I hope that this will alleviate anyone's issues with changing the font of their game to something custom, and issues that may arise if the intended player cannot see any text.






Of the other defaults, they only allow for one entry each.

Code:
Font.default_size = 24



You may likely not change the size of the font, but the setting of '24' is the normal default setting.

Code:
Font.default_bold = false
Font.default_italic = false



The boldface and italicized settings of your font are false by default.  But you can change them to true.  But they will typically be true throughout your game.

Code:
Font.default_color = Color.new(255,255,255,255)



Now this is entertaining.  You won't notice this because all of the Window class codes actively set the color of the font used, whether they call it 'system_color', 'normal_color' or 'knockout_color'.  But this would change the color of your font otherwise.


Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#3
Bypassing the limitation of 999 maps:

If you are reaching the maplimit in RPG Maker XP you can follow these steps to have more than 999 maps in your game.

Step 1: Create a copy of your project with the exact same data as a mapcreation project.

Step 2: Delete the old 999 maps from the copied project and open it.

Step 3: Use this project to create your new maps. If you are done, rename the new maps from

"Map001.rxdata, Map002.rxdata, Map003.rxdata"
to
"Map1000.rxdata,  Map1001.rxdata, Map1002.rxdata"

and so on.

Step 4: Move the renamed maps from the copied project into the main project. It should look like this then:

[Image: pnffujo.png]

Step 5: Use variables to transfer to all maps with an ID higher than 999

[Image: 5qFGwXw.png]

That's it!

(Remember that you can't access any map higher than 999 from the editor so you have to edit them in your project copy and repeat the steps 3 and 4)
Reply }
#4
Are you running out of Maps? Do you have a ton of maps and you're getting close to the 999 map limit?

Why have a whole bunch of tiny 15x20 maps for each individual house? Use one map to hold a whole bunch at a time!

Make a 500x500 map, and make a house. Then make another in the map. Then another. Just make sure you have a 20 tile difference between each map so you cannot go to the edge of one map to see another.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#5
So what if you wanted to make your own, one time each run, Popup box? Well you can actually do that. Though it will pause the game each time one comes in.

That's where this code comes in.

Code:
print("TEXT GOES HERE")

Depending on where it's put, whether it's in a script, or script called in an event, the box will pop up, but only once.

[Image: attachment.php?aid=1477]
[Image: attachment.php?aid=1478]

When starting to make a game, this code is used, by the Main Script, when an error comes into play, whether it's a conflict, or an error, between 1-infinity scripts, or a missing resource, before closing the game on you. And now you have to power to annoy anyone playing your game, if you so desire. Now if you excuse me, I gotta delete the event and script I added in there for this example in my project.


Attached Files
.png   EXAMPLE1.PNG (Size: 7.58 KB / Downloads: 39)
.png   EXAMPLE2.PNG (Size: 51.03 KB / Downloads: 39)
Reply }
#6
You forgot to tell them that print doesn't really need the parentheses to work normally.

print "My test!"

In VX ACE it'd be...

msgbox "My test!"

...because it's got a console that catches the print-ed strings by default.

Anyway it's only useful for debugging scripts.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#7
(08-08-2020, 09:46 AM)kyonides Wrote: You forgot to tell them that print doesn't really need the parentheses to work normally.

print "My test!"

In VX ACE it'd be...

msgbox "My test!"

...because it's got a console that catches the print-ed strings by default.

Anyway it's only useful for debugging scripts.

Funny enough, I never knew I didn't need the parentheses. Huh. That's good to know though.
Reply }
#8
Don't be boring. Don't go stock with your filenames....

How many times have you packed up your game for distribution with the Game.Exe, Game.egsaad and the like? WHY? Shouldn't the files reflect the name of your game???

When you have a completed game with a compressed RGSAAD file with all your resources (so your player doesn't need the RTP), don't let keep the stock filenames. Change them to match your game. I mean, if you made a religious comedy about a Nun called "Sacred Screwups", change the name of your Game.Exe to Sacred_S.Exe!!!

But you do need to be consistent. When you change the name of your Game.Exe, you will also need to change the name of the Game.rgsaad file and Game.Ini file to match. So with my example, you would also have a Sacred_S.ini file and Sacred_S.rgsaad file.

Of special note, SOME scripts that access the Win32API like a (Resolution or Mouse script) may request the name of your Game.Ini or Game.Exe, and would need to be changed to match. But that's just a scripter's headache. Tongue sticking out

Don't forget to edit your Game.Ini to remove the 'Standard' entry from the RTP list if you ARE distributing a game that doesn't need the RTP. And pack it with the RGSS****.dll at the least

*The discussion assumes RPGMaker XP usage, but can be applied to other RPGMaker engines
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }




Users browsing this thread: 2 Guest(s)