DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
Hi there,

Ideally, I need a script that scans all the actors in the database and adds them to a shop window with category tabs, and displays their portrait on the side. You can set the category (shop tab) and price for each actor using note tags on actor database page. When you buy the actor, it just adds them to the party and takes the money.

Im making a fan game with over 1500 actors (actors already done). I was originally going to use items that run common events to add party members, but MV limits me only to 1000 common events and I need a common event for each item. I heard you can edit the common events in MZ or manually, but I cant afford MZ, dont want glitches in my project, and am also on time constraints.

Anyone have any solutions or would be willing to create this script for me? Even something that modifies the rpg mv editor to go over 1000 common events would work too, although I would perfer a system that would save more time as well. But please suggest anything you can either way.

If you would be willing to code it too, let me know.

Thanks in advance!
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,213
Reaction score
3,472
First Language
Dutch
Primarily Uses
RMMV
I dont know if items can allow scriptcalls, otherwise, you could
make a plugin with all the effects and use a simple scriptcall
to call it out.

you can edit the amount of common event, but it can reset back to 1000.
so it would be harder to make that happen as it can have side-effects
if you go over the limit.

there is a plugin that could be used to call out the function and place
it in the notetag to run or upon use.

which I didn't test that. but you could look into this [plugin]?
but I dont know if you have JS knowledge, as it might be required,
or at least the basics.

otherwise, there might be another way for it.
 

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
I dont know if items can allow scriptcalls, otherwise, you could
make a plugin with all the effects and use a simple scriptcall
to call it out.

you can edit the amount of common event, but it can reset back to 1000.
so it would be harder to make that happen as it can have side-effects
if you go over the limit.

there is a plugin that could be used to call out the function and place
it in the notetag to run or upon use.

which I didn't test that. but you could look into this [plugin]?
but I dont know if you have JS knowledge, as it might be required,
or at least the basics.

otherwise, there might be another way for it.

On the scriptcalls, I dont need to use items at all anyway. Only reason I was using items as a potential method at all is because they can call common events, which I dont have enough common event slots to fill anyways. So I would rather look at a direct method that uses no items at all.

If you can script, ideally I need:

Two potential options:

Option 1:
-Script grabs specific actors and/or actor ranges from database, ranges/actors specified with a command of some sort. Price for each actor can also be defined somehow like note tags.
-Shop displays actor portraits when a list entry is highlighted during selection hovering. So "Shaniqua" shows the portrait associated with her actor ID in the database.
-I will make "shop categories" myself using the standard choices menu. When a different choice is selected it will open a shop instance showing the specified actors and actor ranges, where they can be bought.

Option 2 - Preferred:
-Script automatically grabs all actors in game database and adds them to a "shop" or "menu that looks like a shop". They are sorted into category sections in the shop menu. You see the actors displayed in a list format like you would with any other shop item, after selecting your category of choice.
-Shop displays actor portraits when a list entry is highlighted during selection hovering. So "Shaniqua" shows the portrait associated with her actor ID in the database.
-Shop categories are defined in plugin parameters, with 8 possible category sections.
-Actors are assigned a shop category to display in using a note tag, plug in parameter, or some other method.
 
Last edited:

Bex

Regular
Regular
Joined
Aug 2, 2013
Messages
1,996
Reaction score
794
First Language
German
Primarily Uses
RMMZ
Yanfly Self Variables Plugin also got Actor Self Variables if i remember correctly.
Thatway you maybe dont need any common events for each actor to store Data.
 

ShadowDragon

Realist
Regular
Joined
Oct 8, 2018
Messages
8,213
Reaction score
3,472
First Language
Dutch
Primarily Uses
RMMV
@Bex I dont think that would work as it goes into status scene.

However, I might know another way that might be simplify it.
while in shop, it take the categories or "all", if somehow you
can or someone can make a cateegory "Actor" and can only open
that category, it targets the $dataActors instead of $dataItems.

dont know how it is exactly structed, but I think that would be
the best way I could think off.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,607
Reaction score
11,090
First Language
English
Primarily Uses
RMMV
A much simpler approach to what you describe is a request for a plugin that will eval code in an item's notetag when you purchase it.

No common events, no scanning the database, just make items representing the actors and have a notetag on each that when you purchase it you add the actor to your party and remove the item.
 

eomereolsson

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
First Language
German
Primarily Uses
RMMV
A much simpler approach to what you describe is a request for a plugin that will eval code in an item's notetag when you purchase it.
Well lucky for @DevTP92 I recently wrote such a plugin to implement some Slay-the-Spire-like relics that do stuff on pickup.
JavaScript:
var Eomereolsson = Eomereolsson || {};
Eomereolsson.ItemPickupEval = Eomereolsson.ItemPickupEval || {};

Eomereolsson.ItemPickupEval.Game_Party_gainItem =
  Game_Party.prototype.gainItem;
Game_Party.prototype.gainItem = function(item, amount, includeEquip) {
    Eomereolsson.ItemPickupEval.Game_Party_gainItem.call(
      this, item, amount, includeEquip);
    if(amount > 0)
        if(item.meta.EOM_ItemPickupEval)
            eval(item.meta.EOM_ItemPickupEval);
};

Just use the following notetag in your item:
Code:
<EOM_ItemPickupEval: //your javascript code here>
 
Last edited:

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
Well lucky for @DevTP92 I recently wrote such a plugin to implement some Slay-the-Spire-like relics that do stuff on pickup.
JavaScript:
var Eomereolsson = Eomereolsson || {};
Eomereolsson.ItemPickupEval = Eomereolsson.ItemPickupEval || {};

Eomereolsson.ItemPickupEval.Game_Party_gainItem =
  Game_Party.prototype.gainItem;
Game_Party.prototype.gainItem = function(item, amount, includeEquip) {
    Eomereolsson.ItemPickupEval.Game_Party_gainItem.call(
      this, item, amount, includeEquip);
    if(amount > 0)
        if(item.meta.EOM_ItemPickupEval)
            eval(item.meta.EOM_ItemPickupEval);
};

Just use the following notetag in your item:
Code:
<EOM_ItemPickupEval: //your javascript code here>


So, I add the note tag to an item, and using the note tag this plugin will give me an actor instead of the "item"? What do I put in the "your javascript code here" field to make this work?

Also thank you to everyone else for the replies.
 

eomereolsson

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
First Language
German
Primarily Uses
RMMV
No, this plugin will simply execute any javascript code you put into the "your javascript code here" field when the party gains that item. You will need to use @ATT_Turan 's advice and put some javascript code there that
a) removes this item from the party's inventory
b) adds the corresponding actor to the party

You can refer to the following spreadsheet to see which javascript calls replicate which event commands:
 

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
I appreciate the script I will try my best to see what I can do with it. Ill let you know if I encounter any errors.
 

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
Question, if I run two script calls do i use the note tag twice? I have to run two script calls to make this method work right? So:

<EOM_ItemPickupEval: //code1>
<EOM_ItemPickupEval: //code2>

Or do i just use a comma or something?
 
Last edited:

eomereolsson

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
First Language
German
Primarily Uses
RMMV
No, using the same notetag twice will result in the first notetag being overwritten by the second. You can simply put one scriptcall behind the other.
Code:
<EOM_ItemPickupEval: someFunction(); someOtherFunction;>

For better readability you can also add newlines like this:
Code:
<EOM_ItemPickupEval:
someFunction();
someOtherFunction;>
 

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
Okay great thank you. Another question, is there a plugin available that can execute script calls from item note tags when an item is used, instead of picked up?
 

eomereolsson

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
First Language
German
Primarily Uses
RMMV
There is no need for a plugin in this case, as using an item can simply call a common event. You can put whatever script or event commands there.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,607
Reaction score
11,090
First Language
English
Primarily Uses
RMMV
I was in the middle of typing the same thing as eomere :wink:

Yanfly's Skill Core's Skill Phases notetags work on Items as well as Skills, but I don't know whether any of them are executed outside of combat, when using the item from the menu.
 

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
There is no need for a plugin in this case, as using an item can simply call a common event. You can put whatever script or event commands there.
What if I didnt want to use a common event? That script would have a ton of usefulness with MVs extremely limited 1000 common events. Why they even limited it so much ill never understand. Its just kbs of data that sits there until its actually executed. Doesnt hurt the game. MZ is same slightly upgraded same-as-mv engine has 2000 i heard.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,607
Reaction score
11,090
First Language
English
Primarily Uses
RMMV
What if I didnt want to use a common event? That script would have a ton of usefulness with MVs extremely limited 1000 common events.
Then...you can code it, commission it, whatever :stickytongue:

What exactly do you see yourself needing to do with it? Obviously no plugin author received many requests for this, or saw an immediate use for it, or there would already be a plugin for it (I saw nothing with a quick Google).

If you're still talking about your actor shop and requiring the player to do an extra step of buying the item and then activating it to get their new actor (why?), well...that's a super niche use, and I've never seen anything comparable.

What else would give it "a ton of usefulness"? Convince me there's a reason that other people would use it, maybe I'll whip it up.

If it's for your actor shop as described above, you don't need a plugin that evaluates code. You just need to get the ID of the item being used, as described in this thread that I Googled, and then you can use regular conditionals.
 

DevTP92

Villager
Member
Joined
Dec 24, 2021
Messages
23
Reaction score
9
First Language
English
Primarily Uses
RMMV
I wouldn't commission that plug in because its not immediately useful to me, and it may or may not be in the future.

Your right, maybe most rpg mv games dont exceed 1000 common events. Still, it was such an easy feature for them to implement that for a company offering a "game engine" it should at least be able to do more then 1000 common events.

If i was paying for a plugin, which i can, the commission would be for a fancy actor shop that shows an actor portrait like i described above.

I am currently trying to make an open source fan game creation engine, so i may need to commission something fancier in the future.

If your interested in being commissioned in the future, let me know. :)
 

Bex

Regular
Regular
Joined
Aug 2, 2013
Messages
1,996
Reaction score
794
First Language
German
Primarily Uses
RMMZ
You do not need a new Common Event for each Item.
The Code would need to be structured in a way that 1 Common event is enough for all
1500 Items.
Each of the 1500 would call the same common Event but depending on the last used item id
it would add a different Actor.
In the linked Thread are 2 Ways explained on how to get the Id of the Item which called the common Event.
Battle Formula described by @Andar
or Scriptlines: $gameParty.lastItem()
or was it: $gameParty.lastItem().id


This is no complete Solution but maybe it helps somehow.

The MV Scriptcall list is also useful:
 

Arthran

Regular
Regular
Joined
Jun 25, 2021
Messages
1,232
Reaction score
1,904
First Language
English
Primarily Uses
RMMZ
MZ is same slightly upgraded same-as-mv engine has 2000 i heard.
Actually, I'm pretty sure that MZ lets you have up to 9999 common events these days. Also, MZ's upgrades over MV are actually more substantial than people tend to give it credit for. Regardless, the good news (as other people have already pointed out) is that you really only need to use one common event for this.

The bad news is that using 1500 items for this is still going to be quite a blow to your database, considering that there is also a maximum number of items that you can have in there. I *think* that the maximum number of items for MV is 2000. Do you anticipate that being a problem?
 

Latest Threads

Latest Posts

Latest Profile Posts

Playing arounnd with NUUN's Battle Result as a VS Victory Aftermath alternative. Loving it so far despite the learning curve (there are a LOT of parameters)

1701665328725.png

Just have to figure out how to addin sub class progress.
Partitito's story is supposed to be about defeating poverty while thinking he is a capitalist with socialist ideas. But it's really about stories of redemption and perseverance.
Who would have thought an idea like "I wanna put the character bio in the equip screen" would turn into a bunch of work and fun collaboration @Puppet Knight . Now my Equip/Character screen is the way I want it.
Screenshot 2023-12-03 194313.png
Just one more week of grinding through semester finals and I'll be able to actually work on some games and stuff. Hopefully I'll be able to work on my game document to actually have my ideas somewhere outside of my cranium of madness.
With Day 4 of my advent calendar posted, it's time for y'all to choose what Day 5 will be!

We've seen Strength with our adventurers, so which DnD stat would you like to see in the next NPC: Charisma, Constitution, or Wisdom?

Forum statistics

Threads
136,729
Messages
1,269,250
Members
180,446
Latest member
lathifkediri
Top