Advertiser Content

Eventing Question Pkmn level conditions?

Started by Inception92 March 14th, 2019 12:39 AM
  • 373 views
  • 5 replies
Male
Seen March 23rd, 2019
Posted March 16th, 2019
4 posts
4.2 Years
I had an event idea in mind, but I'm not 100% sure how to make it happen.

An overview of the event is your character enters a forest and finds a pokemon standing out in the open (lets say a bulbasaur as an example). Your player can interact with it and have it join your party. At the end of the forest though, just before you leave, you're stopped by another trainer, them explaining that one of their pokemon got away from them, and asks if you've seen it. I plan on having some form of karma system in it, one of the options would be to straight up lie and say you haven't seen it, keeping the bulbasaur. The obvious good choice would be to tell its trainer that you found it and give it back to its owner. But I had something I'm hoping is possible to do, which is have a conditional branch where if its level is at a certain point (lets say it was level 10 when you received it, but you get it to level 12 or above by the time you run into its owner), that would lead to a different outcome in which the bulbasaur starts walking towards its owner but then turns back towards you, from a story perspective it'd be a case of the bulbasaur developing a stronger interest in your player over its trainer, its trainer realizes that, and thinking out of their pokemons best interest, chooses to let you the player keep it.

tldr, is it possible to have a condition based on the level of a pokemon?
Seen April 14th, 2019
Posted April 1st, 2019
45 posts
3.7 Years
Yep, definitely. It’ll take a few extra basic scripts that Essentials does not provide out of the box, but it gives you all the tools to do so. I haven’t seen any premade public scripts for this either

Actually, in order to just give the Pokémon back period, the majority of the extra work would be necessary anyways

Basically, you need to be able to identify exactly what slot of your party the Pokémon is in. Essentials already has ways to easily accessing a pokemon’s Level, happiness, or other variables. It does not, however, have a built in way to identify an exact Pokémon (you need to know which slot in the party the Pokémon is in so you can tell the game where to look for stuff like level info)

Typically, the interactions that deal with Pokémon require you to pick a Pokémon yourself (imagine leaving the Pokémon at a daycare)

However, you want to identify a very specific Pokémon, not choose it. So you need to put some scripts in that can help the game identify it

So, here’s my suggestion (see the Essentials wiki on Party and Editing a Pokemon for the shortcut scripts that let you do anything I’m referring to here)

First of all, it seems like basing this on happiness would achieve what you want more thematically. Happiness is a tracked stat.

So when you first get the Pokémon, they will be added to your party. You can reference the last Pokémon of your party and access it’s information there and then. It will be in the last slot, since you’ll need room in your party to acquire it

Here, you want to do two things. First, take an unused variable (like the ones you’d use in eventing... these can be referenced to in a script) and set it equal to the Pokemon’s Personal ID. This is a unique number, and will let you identify if that exact Pokémon is in your party later. Second, set the Pokemon’s Happiness (or level) to a specific value. Basically you want to make sure it starts at the right starting point

When you get to the choice of giving it back, you can use this information.

A short script should let you check each Pokémon in your party for if they match the stored variable Personal ID. If any do, you can set another variable to that Pokemon’s Party slot number.

With that number, you can then do quite a few things

You can check if the Pokémon is even in your party with a conditional branch. If not, you probably don’t want to proceed with the event

You can also properly delete the correct Pokémon from the party if the Pokémon leaves.

You can also pull that pokemon’s Happiness/level and check if it’s passed whatever threshold you set (you can use Conditional branch script section to use a comparative statement.... like greater than or equal to (or <= between values.... this returns a true or false value the conditional branch can act on)

Feel free to ask if you have questions, of course. But this is simple enough that it’s a great excuse to learn some basics of how scripting works and how manipulating Pokémon and such work. Figuring this out would enable you to do more of this, or more ambitious things later
Male
Seen March 23rd, 2019
Posted March 16th, 2019
4 posts
4.2 Years
It's times like this that I really wish I knew how to make scripts.

Late response, been busy with work and other stuff.

I am reasonably experienced with doing things in rpg maker, and I've even tried my hand at making a pkmn some years back, but making scripts is something I've never picked up. I'll probably just have to think of some other kind of event.
Male
Seen March 23rd, 2019
Posted March 16th, 2019
4 posts
4.2 Years
Like I said, this is a simple enough one that it’s a great excuse to get a grasp on some of the basics of scripting

If you’re response to that is just to give up, then there’s not much else I can say
I don't want to give up on the project, but when it comes to making a script I'd have idea where to even begin. It isn't that I wouldn't want to, but I literally have no idea where or how I could figure out how to do scripting in this. I've changed things in scripts before, but never wrote any.
Seen April 14th, 2019
Posted April 1st, 2019
45 posts
3.7 Years
I don't want to give up on the project, but when it comes to making a script I'd have idea where to even begin. It isn't that I wouldn't want to, but I literally have no idea where or how I could figure out how to do scripting in this. I've changed things in scripts before, but never wrote any.
I literally gave you a step by step guide to what you'd need to do and what logic should work.

Like I said, if you get stuck, feel free to ask and others will likely give an answer like myself. But unless you try to work it out logically yourself, you'll never actually understand why things work.
Advertiser Content