Eli Find Id By Name (Old Database Organizer)

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,560
Reaction score
904
First Language
Portuguese - Br
Primarily Uses
RMMV

Author: Eliaquim

Introduction

• Sometimes is hard to keep an organized database. Because we can make a list of all kinds of swords and after that a list of shields. But during the development, maybe we can add a new kind of sword. So we have to add it to the bottom of the list, or push all shields to the bottom and clear some
space for the new sword. Or, you can do what most people do, leaving a free space in the list and put separators:

----Swords-----
Middle Sword
Long Sword
empty
empty
----Shields----
Wooden Shield
...

• This plugin, provide a method for you to build your game that you don't have to worry about these anymore!
• You can set your database and organize it anytime you want, without worry about the list order that affects in-game references!

Features

• Assigning values by name: Adds a method of assigning, returning, and checking values of various data/objects of the Rpg maker MV through their names and not just by ID.
• Currently supported: Actors, switches, variables, classes, items, weapons, armors, skills, enemies, troops, equipment types, states, common events, armor types, weapon types, skill types, maps, and events.
NOTE: For now, access to events id by their names, are only supported in the current map.
• You can better organize your database using these methods since you can rearrange them in the list without worrying about their id. It means this is not affecting your game at all since you will don't need to change the in-game references.

How to use

• In the plugin parameters you can choose to use the automatic mode or manual mode.
• In the automatic mode, you can use the default script calls from MV to search by data through its name. However, it aliases the default functions of MV and maybe can get you some plugins incompatibilities, if they, perhaps, overwrite some of these functions.
Currently, you can use the name search in these functions:
$gameTemp.reserveCommonEvent('commonEventName')
$gameSwitches.value('switchName')
$gameSwitches.setValue('switchName', value)
$gameVariables.value('variableName')
$gameVariables.setValue('variableName', value)
$gameSelfSwitches.value(['mapName', 'eventName', SelfSw])
$gameSelfSwitches.setValue(['mapName', 'eventName', SelfSw], value)
$gameActors.actor('actorName').hasWeapon('weaponName')
$gameActors.actor('actorName').hasArmor('armorName')
$gameActors.actor('actorName').changeEquip(slotId, 'weapon/armor name')
$gameActors.actor('actorName').forceChangeEquip(slotId, 'weapon/armor name')
$gameActors.actor('actorName').changeEquipById(equipTypeId, 'weapon/armor name')
$gameActors.actor('actorName').isEquipped('weapon/armor name')
$gameActors.actor('actorName').discardEquip('weapon/armor name')
$gameActors.actor('actorName').isClass('className')
$gameActors.actor('actorName').learnSkill('skillName')
$gameActors.actor('actorName').forgetSkill('skillName')
$gameActors.actor('actorName').isLearnedSkill('skillName')
$gameActors.actor('actorName').hasSkill('skillName')
$gameActors.actor('actorName').changeClass('className', keepExp)
$gameParty.addActor('actorName')
$gameParty.removeActor('actorName')
$gameParty.numItems('item/weapon/armor name')
$gameParty.hasMaxItems('item/weapon/armor name')
$gameParty.hasItem('item/weapon/armor name', includeEquip)
$gameParty.isAnyMemberEquipped('weapon/armor name')
$gameParty.gainItem('item/weapon/armor name', amount, includeEquip)
$gameParty.discardMembersEquip('weapon/armor name', amount)
$gameParty.consumeitem('itemName')
$gameParty.canUse('itemName')
$gameParty.setMenuActor('actorName')
$gameParty.swapOrder('actorName', 'actorName')
* They are not case sensitive.
* You still will be able to use the function normally, like:
$gameParty.isAnyMemberEquipped($dataWeapons[1])

• In the manual mode, it will not aliase, change or overwrite any function of the default code, so It will be more compatible with other plugins too!
• But instead of simply replacing the argument of the script calls by a name, you have to call another function: findId('name', 'dataType')
Ex: $gameTemp.reserveCommonEvent(getId('commonEventName', 'commonEvents'))
$gameParty.addActor(getId('actorName', 'actors'))

• 'dataType' - You can replace this by the data you want to search.
Use the following strings to represent each data:
actors
classes
skills
items
weapons
armors
enemies
troops
states
commonEvents
variables
switches
equipTypes
armorTypes
weaponTypes
skillTypes
elements
maps
events
* They are not case sensitive.
* Event if you set to the automatic mode, you still can use the manual function getId('name', 'dataType');

Plugin commands:
(Still working on it)



Terms of Use


https://www.hakuenstudio.com/rpg-maker/terms-of-use





Update Log
• Version 1.2 - 08/22/2020
- Code restructuring.
• Version 1.1 - 07/30/2020
- Code clean up.
- Performance improvement.
- Fixed a bug in the function 'set menu actor'.
- Changed plugin name.
- Change the function "findId" to "getId"
• Version 1.0 - 06/21/2020
- Released!
 
Last edited:

Edsephiroth

Edsephiroth
Member
Joined
Feb 10, 2014
Messages
19
Reaction score
4
First Language
Portuguese
Primarily Uses
N/A
It will save a lot of time.
Thank you!
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,560
Reaction score
904
First Language
Portuguese - Br
Primarily Uses
RMMV
• Version 1.1 - 07/30/2020
- Code clean up.
- Performance improvement.
- Fixed a bug in the function 'set menu actor'.
- Changed plugin name.
- Change the function "findId" to "getId"
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,560
Reaction score
904
First Language
Portuguese - Br
Primarily Uses
RMMV
• Version 1.2 - 08/22/2020
- Code restructuring.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Made a video showcasing a plugin (by Lanza) that adds 5 more weather effects to our MV games. :LZYsmile: Namely:
Ash-dust,
bloodrain,
Cherry Blossom Petals,
Hail,
and bubbles.

I just like this website:
lol
I streamed Moonfall on 9/25/20
and have started a page to showcase my vids/stream :kaoluv:

Please subscribe and follow, it's free, it's quick and one sub means so much to me, it would really make my day~ :wub

Forum statistics

Threads
103,237
Messages
998,267
Members
134,725
Latest member
Lunarian_Gunner
Top