Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Eli Find Id By Name (Old Database Organizer)
- Original author: Eliaquim
- Original date: June 21, 2020
- Source thread: https://forums.rpgmakerweb.com/threads/eli-find-id-by-name-old-database-organizer.123123/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)
Summary
{ "lightbox_close": "Close", "lightbox_next": "Next", "lightbox_previous": "Previous",
Archived First Post
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)
• 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
DOWNLOAD
Eli_FindIdByName.js
Eli_FindIdByName.js
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!
- 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!
Features Mentioned
- 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.
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
Terms of Use https://www.hakuenstudio.com/rpg-maker/terms-of-use DOWNLOAD Eli_FindIdByName.js
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...