WHAT USEFUL APPLICATIONS CAN VARIOUS SCRIPT CALLS BE UTILIZED FOR?

Posts

Pages: 1
So I have this interesting collection of script calls.

It seems like a useful find, but I'm not sure how they can be effectively utilized for me during the creation process of my game. Let's talk about ways that this knowledge can be useful, because I'm dumb!
unity
You're magical to me.
12540
I have also seen this collection and am dumbfounded as to what it can do for a while now, so I'll def be keeping a close eye on this thread XD
That's been an important reference for me while working with scripts. The first useful application that comes to mind is setting variables to floats. (numbers with decimal points)

Something like
$game_variables[1] = 0.5

Isn't possible with eventing (to my knowledge).

Fine tuning event locations using floats is also useful.

$game_map.events[17].moveto(11, 4.8) #sets the flower pot on the table
unity
You're magical to me.
12540
YOU CAN MOVE EVENTS TO PLACES THAT AREN'T EXACTLY ON ONE TILE!?
Ratty524
The 524 is for 524 Stone Crabs
12986
author=unity
YOU CAN MOVE EVENTS TO PLACES THAT AREN'T EXACTLY ON ONE TILE!?

I hope this is true.

As for now the only reason I use script calls outside of stuff detailed in custom scripts is to control self-switches from outside of the events themselves.
Yeah try it out. I use a parallel process that erases itself after it makes the move. There's probably other ways to do that too, but that's what I use.
This sounds like great stuff, but I'm lost. Anyone care to translate for the scripting laymen?
I started writing a comprehisive explaination of how classes and methods work, but if I lost you at that script call, it would only confuse you more. I'll try to make it easier to understand.

Using this $game_map.events[17].moveto(11, 4.8) script call moves event 17 to the 11th tile from the left (counting the first tile as 0), and 4.8 tiles down. So instead of the event being stuck on the grid, it can be shifted slightly. I use this for "fine tuning" events like pots, onto tables.


Ratty524
The 524 is for 524 Stone Crabs
12986
author=Infinite
I started writing a comprehisive explaination of how classes and methods work, but if I lost you at that script call, it would only confuse you more. I'll try to make it easier to understand.

Using this $game_map.events[17].moveto(11, 4.8) script call moves event 17 to the 11th tile from the left (counting the first tile as 0), and 4.8 tiles down. So instead of the event being stuck on the grid, it can be shifted slightly. I use this for "fine tuning" events like pots, onto tables.




Oh my god. This is amazing. I seriously want to try this out for something.
@Infinite> Won't that cause any collision issues? Like, isn't that pot technically occupying two tiles at the same time?
Another note about fussing with $game_variables: you can set the value of a variable to an array of numbers, and this is something you can do through a script call or just from the event command.



in script call form that would look like
$game_variables[55] = [2,5,8,9,11]

In this case the variable is later used in a conditional branch that checks if an event is part of a list of Valid event id numbers. (this is part of a lil system to present key items to different events on a map)
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
Script calls are mostly useful for doing things that you defined in custom scripts. Unless you're using RPG Maker XP, there aren't really that many things you can do with them that don't already have event commands.

There's actually already a stickied thread for almost this exact topic, just slightly more general. Anything people are thinking of posting here should probably be posted in that thread instead.

author=karins_soulkeeper
@Infinite> Won't that cause any collision issues? Like, isn't that pot technically occupying two tiles at the same time?
The event actually goes out of phase, so anything on the normal grid can pass through it. However, if you have one event at coordinates (11, 3.8) and another event at coordinates (11, 4.8) they will not be able to move into each-other. RPG Maker collision only checks if there's something exactly 1 tile away from you.
unity
You're magical to me.
12540
author=LockeZ
There's actually already a stickied thread for almost this exact topic,just slightly more general. Anything people are thinking of posting here should probably be posted in that thread instead.


I really need to re-read that thread like every half a year, as I had forgotten some of this stuff, and it's really great stuff, too :DDDD
Craze
why would i heal when i could equip a morningstar
15170
Like LockeZ said, this isn't very useful unless you've actually hacked Data_Interpreter. While it's kinda nice to see the basic logic at play, because Data_Interpreter is a fucking mess, you can just use event commands for most of it.

(For reference, I've rebuilt parts of Data_Interpreter to build a day/night system where self-switches would reset after x in-game days, and in Super Battle Kiddo Experience in order to show balloon pop-ups on Myra since she was a permanent follower.)

A few potential uses:

-Making items in a shop cost a variable amount of cash. You can set the price variable for each item based on whatever you want, so you could have a potion cost 40 + $game_actors.level * 5 to make potions at that shop cost 5 gold per level on actor 1. Of course, you could add $game_variables too to add any variable to the cost!

-For a customization system, you could quickly reassign the graphics for any party member without a ton of clunky eventing and conditional branches using

hero = $game_actors[ID]
hero.set_graphic("characterset_filename", character_index, "Faceset_filename", faceset_index)
$game_player.refresh

Based on your system,
hero = $game_actors[$game_variables[x]]

would let you change the graphics of the actor id in variable x. I'm sure you can imagine the possibilites.

-terrain tags and region ids (under "Check Location" on Nessy's list) can be used to do puzzles and other such events. For example,

htt = $game_player.terrain_tag
ett == $game_map.events[17].terrain_tag
$game_switches[21] = (htt == ett) ? true : false
end

Putting this script call in a parallel process or a "check for solution!" button will set switch 21 to true if the player and event 17 are on the same terrain tag, or to false if they're on different terrain tags. You can use .region_id as well.
author=LockeZ
There's actually already a stickied thread for almost this exact topic, just slightly more general. Anything people are thinking of posting here should probably be posted in that thread instead.


I disagree; while that thread is awesome, it's also very generalized and applies to all of the makers. This topic is for a specific functionality for a specific maker.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I'm not saying everything in that thread should be posted in this thread instead. I'm saying everything in this thread should be posted in that thread instead.

I guess it doesn't matter much. Apparently starting a new topic has motivated people to share some stuff, which is good. Just wish they'd post it in the place where people six months from now will still be able to find it.

My best trick is the ability to modify self-switches of other events, and I described that in the other thread already.

Here's another one, designed for RPG Maker XP:
$game_map.change_tileset(6)
$scene.spriteset.tilemap.map_data = $game_map.data
$scene.spriteset.tilemap.priorities = $game_map.priorities

This will change the tileset of the current map (to tileset 6) instantly with no fading and no lag. In other versions of RPG Maker there's an event command for this, but in RMXP there's not (a recurring problem with RPG Maker XP and the reason a lot of people don't like it). The second and third lines also change the passability and priority of the tiles to those of the new tileset, something I'm not sure if VX Ace's tileset-changing event command actually does?
Pages: 1