More flexible Get Location Info

Would you like this feature?

  • Yes

    Votes: 26 100.0%
  • No

    Votes: 0 0.0%
  • Yes but not important

    Votes: 0 0.0%

  • Total voters
    26

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I don't recall seeing this one (or suggesting it) - hope I'm not doubling up

Description of the Feature:
  • Get Location Info will allow you to select Player or EV### from dropdown list, in addition to the existing Direct Designation and Designate with Variables options. This is similar to Control Variables > Game Data > Character where you can select the player, 'this event' or a specific event.

Code for Implementation:
Code:
// Get Location Info
Game_Interpreter.prototype.command285 = function() {
    var x, y, value;
    switch (this._params[2]) {
    case 0: // Direct designation
        x = this._params[3];
        y = this._params[4];
        break;
    case 1: // Designation with variables
        x = $gameVariables.value(this._params[3]);
        y = $gameVariables.value(this._params[4]);
        break;
    case 2: // Designate with character
        var character = this.character(param1);
        if (!character) {
            $gameVariables.setValue(this._params[0], 0); // default value if character not found
            return true;
        }
        x = character.x;
        y = character.y;
        break;
    }
    switch (this._params[1]) {
    case 0:     // Terrain Tag
        value = $gameMap.terrainTag(x, y);
        break;
    case 1:     // Event ID
        value = $gameMap.eventIdXy(x, y);
        break;
    case 2:     // Tile ID (Layer 1)
    case 3:     // Tile ID (Layer 2)
    case 4:     // Tile ID (Layer 3)
    case 5:     // Tile ID (Layer 4)
        value = $gameMap.tileId(x, y, this._params[1] - 2);
        break;
    default:    // Region ID
        value = $gameMap.regionId(x, y);
        break;
    }
    $gameVariables.setValue(this._params[0], value);
    return true;
};
Mockups:


Why is this feature good?
This feature is great because of the following:
  • No need to use additional Control Variables commands to get the location of player or event
  • Easier to use
 

DarkEspeon

Veteran
Veteran
Joined
Apr 9, 2017
Messages
86
Reaction score
15
First Language
Russian
Primarily Uses
RMMV
Really hope this gets added, because without this feature I'm already having big problems implementing basic field skills and puzzles.
 

Philosophus Vagus

The drunken bird dog of rpg maker
Veteran
Joined
May 22, 2017
Messages
291
Reaction score
4,442
First Language
English
Primarily Uses
RMMV
It's a great idea, and also the first successful snippet of code I've ever written did exactly this. It's not like it's hard to link to variables with the player's x and y location or anything, it's just really tedious after a while, especially when you have different events that need to know that information on a semi-consistent basis and also clutters said events a lot more than they have to be.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Awesome! Thank you :)
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,695
Reaction score
1,113
First Language
Portuguese - Br
Primarily Uses
RMMZ
Implemented in code in my spare time, I will try to get this approved to be added but no promises!

Thanks for the suggestion,
- Liquidize
Thank you too! It would be amazing!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,584
Latest member
Faustus2501
Top