Reorder (and Refactor) everything

Would you like this feature?

  • Yes

    Votes: 31 79.5%
  • No

    Votes: 2 5.1%
  • Yes but not important

    Votes: 6 15.4%

  • Total voters
    39

Matombo

Veteran
Veteran
Joined
Jun 4, 2014
Messages
377
Reaction score
105
First Language
German
Primarily Uses
Description of the Feature:
  • Reorder Database entries
  • Reorder Variables and switches

Why is this feature good?
This feature is great because of the following:
  • Enables refactoring
  • Saves time and makes the database more accessible when the projects gets bigger
  • you don't need to leaves switches and variables empty anymore in case you later need to add additional and don't want them at a completely different place

Possible issues with this feature?
Issues that might arise from this feature:
  • When a variable or a switch changes position every event and script that uses this variable has to be refactored in the current implementation
  • same goes for database entries that are used in events ant scripts
 

Antera

Villager
Member
Joined
Jan 15, 2017
Messages
38
Reaction score
5
First Language
EN & FR
Primarily Uses
Yes, yes, yes !

Having hundreds of variables is needed to make a proper game
We cannot manage hundreds of variables with Rpg Maker MV because it's just a basic list without reordering, you need to check trough 500 variables every minutes
So we cannot make proper games with RPG Maker MV :-(
 

Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
467
Reaction score
225
First Language
Portuguese
Primarily Uses
RMMV
This doesn't seem like too much work. Devs must only leave the switchs and variables as is, but create a "switch" and "variable" for the creator-user (will use this term to differentiate from the kadokawa developers).

Lets see if I can explain myself better, taking for example the variable 1:
var1 attributes:
- var1_name: The name the creator-user defines, like "secret passage" or "end of prologue"
- var1_number: The number for which the creator-user will refer to in the editor

var1 keep being var1 for the sake of inner workings of events and switches, but the creator-user when dealing with it from the maker see the number he defined as. Much like an alias or dictionary, if my little knowledge of code is still worth a damn.

Great suggestion.
 

Fornoreason1000

Black Sheep
Veteran
Joined
Mar 1, 2014
Messages
206
Reaction score
95
First Language
English
Primarily Uses
RMMV
I think this issue is pretty good , i think a work around for some of the issues is to uses a Key system for example a variable

{ Index: 0; ID : "S0m3Cr8zyN8me", Name: "Game Progress", Value: 80. }

Index is just the order in the stack, basically will only be used for editor purposes. ID is changes from a Integer to a String with a Unique value. this value is how you will reference your variable and will never change similar like a .NET Dictionary. Reordering will not affect the ID. name and Value is self explanatory.
implemented such a system would something like

1. create new variable
2. Enter ID, warn user that it cannot be changed, only deleted.
3. Enter other information.

A name / ID search would also be really cool.
 

ashikai

Veteran
Veteran
Joined
Jun 2, 2015
Messages
456
Reaction score
343
First Language
English
Primarily Uses
N/A
Um yes. Yes please. I very much want this.
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
872
Reaction score
559
First Language
English
Primarily Uses
RMMV
This would be immensely helpful. It feels like a lot of the restrictions (can't reorder, have to manually expand database lists) are leftovers from a stricter programming language. Javascript doesn't care about how big your array is or what order things are in, only that there's a unique ID to find in a hash.

For the sake of the sanity of anyone using plugins that take IDs, I'd like if they just separated list position from the ID- so, when you first create a new skill, say it gets "ID 1". Even if you add some more skills and end up moving the first skill down to the 15th position, it's still "ID 1", but now also "position 15."

Similar to how Events work on a map, but make it easier to see the ID.
 

BubbleMatrix82

Norm Rejecting Black Sheep
Veteran
Joined
Feb 10, 2017
Messages
163
Reaction score
69
First Language
English
Primarily Uses
RMMV
This suggestion is a little high on the technical side and it's hard for me to wrap my mind around the issue since I haven't made a big project in years. What seems to be the issue and how does this fix it?
 

Fornoreason1000

Black Sheep
Veteran
Joined
Mar 1, 2014
Messages
206
Reaction score
95
First Language
English
Primarily Uses
RMMV
This suggestion is a little high on the technical side and it's hard for me to wrap my mind around the issue since I haven't made a big project in years. What seems to be the issue and how does this fix it?
basically it aims to make database Objs, variables and switch reorder so that they can be put in a logical order after they are created. for example you have 3 spells with 3 power variants that take up IDs 10-19. (fire, Fire II, Fire III, Ice, Ice II, Ice III, Thunder, Thunder II, Thunder III) . you want to add a fourth variant, now this list becomes (fire, Fire II, Fire III, Ice, Ice II, Ice III, Thunder, Thunder II, Thunder III , Fire IV, Ice IV, Thunder IV).

As the database continues to grow in this way it becomes more difficult to find things. especially when you start adding different types of skills then go on to ad a 5th variant for each for those new spells. see Fire I, II, III are next to each other, Fire IV is 6 spots away from III, and V could be 30 from IV!. considering you can have 1999 Skills (not that anyone actually does)in RPGmaker, looking through all that to find a Fire IX is very time consuming.

A common workaround as the OP said was to leave section of the database intentionally blank. some go as far to set all skills between e.g 200-300 are Magic skills to make them easier to find.

The OPs suggestion fixes this problem and eliminates the need for such workarounds by allowing the user to manipulate where in the database these objects are displayed.
The need for "refactoring" is caused by the moving of ID's cuasing a discrepancy between IDs . As I and others have suggested this can be avoided entirely by setting an arbitrary value to dictate the position in where the objects are displayed but not the item indexes them selves.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,036
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
I like the sound of this one.

It would need to go through the rest of the database as well as all maps and events, and make changes when things are reordered - entirely possible, but a huge pain in the butt. I started looking at this as an extension to my Cross Reference script in Ace. The most difficult thing I could think of at the time would be the Control Variables and Control Switches commands that let you change a range of variables/switches rather than just one (could end up needing to split a single command into three).

The BIG issue would be when there are script calls or plugins that refer to database items or switches/variables by id. There's no way the engine could know what changes are necessary there, so at best, it would work partially, and if you use script calls and plugins extensively, there'd be an extra manual step to find and fix any of those.
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
@Shaz @Fornoreason1000 mentioned a good solution. You wouldn't change the index of the items. Instead introduce a new property that defines the placement of that item in the list. So even if you sorted some items around, their index value never changed, so you wouldn't need to go through all the files and change them as well. The only issue is that if they keep the number next to the item based on the order and not id, then it can get confusing when there's plugins asking for an item id, unless they add something in the page that shows the id of it. And if they do have the id next to the item name, then that might look displeasing to a few people.
Mv already does something similar with the map list. Each map item has an order property and that's used for the ordering of the list instead of the index value.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,002
First Language
Tagalog
Primarily Uses
RMVXA
Basically, we need them to change the current integer ID based system into a string Key based one. That way it doesn't matter where the object is since we get data from Key's instead of location ID.
 

TheTitan99

Veteran
Veteran
Joined
Nov 2, 2015
Messages
187
Reaction score
85
First Language
English
Primarily Uses
RMMV
So the Database would be changed like how Maps are moved? It's created with an ID attached to it, then you can move it wherever, and it'll keep the same ID? 'Cause that sounds great.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,002
First Language
Tagalog
Primarily Uses
RMVXA
Yeah, on the most basic of this suggestion it's basically just like the map system where the position in the list doesn't change the underlying ID of the map.

But imho, I still prefer if they just allow us to use string Keys rather than the integer Id system that is being used now. It opens up a lot of possibilities or eases up things a bit. But Im not sure of it's impact to enumerability of those data since JS doesn't have hashes so those will probably be saved as object properties instead and I'm not sure how enumerable are those.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,240
Reaction score
7,619
First Language
German
Primarily Uses
RMMV
But imho, I still prefer if they just allow us to use string Keys rather than the integer Id system that is being used now.
For some operations, the ID needs to be a number and changing this will not only make those parts difficult but also create a lot of incompatibilites with other parts and plugins.
Which is why I made another suggestion topic to add a string for sorting and filtering while keeping the IDs as numbers for internal use.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,002
First Language
Tagalog
Primarily Uses
RMVXA
Okay, I see. Thanks for clarifying that :)
 

ashikai

Veteran
Veteran
Joined
Jun 2, 2015
Messages
456
Reaction score
343
First Language
English
Primarily Uses
N/A
You can always work with a dual ID system; like a Key ID and then a Reference ID; The Key ID never changing, but the reference ID changing. Use the reference ID to reorder items in a list, but the Key ID to call/execute the item from the array.

It's really like adding a new ORDERBY method (like ASC or DESC). So if I had skills in the DB, and I wanted to move skill ID 100 to slot 3, then the reference ID of that skill would change to 3 but the key id stays at 100. This kinda keeps it as a cosmetic thing without interfering with how the engine works.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,240
Reaction score
7,619
First Language
German
Primarily Uses
RMMV
@ashikai that is basically the other suggestion I mentioned above - adding a sortstring to all database lists.
 

ashikai

Veteran
Veteran
Joined
Jun 2, 2015
Messages
456
Reaction score
343
First Language
English
Primarily Uses
N/A
@Andar Sorry, I guess I didn't read it closely. ^^a
 

Fornoreason1000

Black Sheep
Veteran
Joined
Mar 1, 2014
Messages
206
Reaction score
95
First Language
English
Primarily Uses
RMMV
For some operations, the ID needs to be a number and changing this will not only make those parts difficult but also create a lot of incompatibilities with other parts and plugins.
Which is why I made another suggestion topic to add a string for sorting and filtering while keeping the IDs as numbers for internal use.
Ok , to be honest , i think I created a lot ambiguity with my suggestion (first post), not sure if this is what you are referring to but i thought i might clear it up.. when i referred to ID i meant it as additive way of identification (probs call it Editor ID), not its array index( also known as the vanilla ID). the Index will basically always exists anyway, since the database deals with arrays of objects and its index is the easiest method in my opinion you can use to fetch objects in a individually.


Code:
{"id":1,
"animationId":41,
"consumable":true,
"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},
"description":"",
"effects":[{"code":11,"dataId":0,"value1":0,"value2":500}],
"hitType":0,
"iconIndex":176,
"itypeId":1,
"name":"Potion",
"note":"",
"occasion":0,
"price":50,
"repeats":1
,"scope":7,
"speed":0,
"successRate":100,
"tpGain":0},

// becomes

{"editorID": "Item_potion001",
"id":1,
"animationId":41,
"consumable":true,
"damage":  {"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},
"description":"",
"effects":[{"code":11,"dataId":0,"value1":0,"value2":500}],
"hitType":0,
"iconIndex":176,
"itypeId":1,
"name":"Potion",
"note":"",
"occasion":0,
"price":50,
"repeats":1,
"scope":7,
"speed":0,
"successRate":100,
"tpGain":0},
my suggestion doesn't change the way objects are accessed , it does however open possibilities for them to be accessed differently. In that spolier you can see the structures of the Item JSON object. Andar is right to find changing IDs would corrupt the reference we can see in the effects name "dataID".
 
Last edited:

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

Latest Threads

Latest Profile Posts

Tomorrow is Thanksgiving, and I'm so excited! I've been exploring MZ a little, and I just downloaded Effekseer to make new animations. I have experience in 3D animation software, so I'll be pretty good at the whole "particle" thing. My first game on MZ will be Fantasy Force--starring a griffin, a dragon, and a pegasus fighting against the Dragon of Darkness.
currently listening to Driftwood Gaming streaming some MZ dev time and it's delightful! had no idea they were this entertaining, love it
In quarantine, will be tested soon. This year is really something... special.
I was at another orientation yesterday and I realized I'll be working with an old friend! We met at the local water park a few years back and it was so nice to see her again! We had a chat, and next week when I officially start, I'll see if maybe we can trade our Zoom IDs so we can talk!
I made some sideview closets for MV!
You can find them in my MV resource thread.

Forum statistics

Threads
105,514
Messages
1,014,343
Members
137,198
Latest member
mmc1980
Top