RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Need some help involving events, switches, and variables. (Sorta Resolved ^^;)

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 85
Ok so I've read up on some variable and event guides and such, and I decided that I wanted to kind of do a monster-hunting system in a lot of RPGs, ie you use variables to add 'points' for certain monsters defeated, and once you reach a certain variable, you can trade those 'points' in for items.

Right now I'm experimenting using an NPC girl (Ayumi) and she wants 5 wight souls, 3 lizardman souls, or 1 undead knight soul, each of these involves a separate prize, so you can turn in 5, 3, or 1 in any order, yada yada.

I'm pretty sure I can handle that, though if you got any tips on making that easier I'd appreciate it

My trouble is adding the variables-- I get the concept of using battle-events to do it, but I'm running into a problem.

I'm setting the trigger to be Monster HP = 0, add 1 variable to "xxx monster type", now I realize I'm going to have to do that for every pallet of monsters, and I'm willing to go through that.

The problem is, when testing it-- let's say there are 1 undead knight, and 2 wights in the battle.  Once the undead knight is killed, it adds 1 to the undead knight hunted variable.  But... every subsequent turn after that, it adds another to the undead knight variable since his HP is still 0! >< I understand the flaw, but how do I fix it?  What do I do so that when an undead knight is killed, it adds 1 to the tally, and then stops adding, and lets it be? 

I also thought about using the concept of talking to the monster-hunter chick just automatically adds 1 to the variable when you encounter the monster, but... the flaw with that is, once you enter the battle and encounter it, you could escape or flee and still get the 'soul' of the monster.  I don't want that.  Any help or tips, even if they're completely different than the method I'm using, would be appreciated!  Thanks!


.... Edit: Lol, ok I resolved my own issue, and decided instead to turn this into a tutorial of sorts for what I just found out.  Now it's not extensively tested, but tested over the course of 3 different monsters and so far no glitches.  This is what I came up with:

A variant of a monster-hunteresque system.
Need to know the basics of variables, great tutorial on this site if you scroll down a bit further.

Ok, First make sure you set up all your variables involving the NPCs-- in the case of the tutorial I'm mentioning, it would be the one involving the dog wanting you to bring 3 cats.  Instead, set up NPCs that want you to bring them souls, or cards, or 'essences' or whatever you want to call them.

Now, the main point of this lil bit is to give you the lowdown on how to make the monsters give you these things without it confuzzling everything.

Go into the monster group system and look at your battle events.

(Note: you're going to have to do this for every monster group you have in the game, so if you got a better way lemme know, but as it stands yeh ^^;)

Now then, if you want them to be able to collect a soul/card for EVERY monster they kill, you can do each individual monster this way--
Start with the trigger.

The trigger should be "Monster [1:xxx]" HP is between 1% and 10%---
In this case we'll use lizardman
So the trigger should look like:
"Monster [1:Lizardman]'s HP between [1-10]"
Note:  You can change this to between 1 and 5, or 1 and 3, it depends on how hard you want to make collecting souls.  It represents that you have to 'weaken' the monster, not kill it--and you should make sure your NPCs explain this concept.  The harder you want it to be to collect souls, cards, etc, the lower the second number should be. (For nearly impossible, put it to between 1% and 1%, haha-- just make sure there are pallets of monsters that have increased strength, or you'll make it literally impossible for higher level characters to collect lower level monster souls).

Go into your variable operations,
and do ...
Variable 0001 - Lizardman'ssouls (or whatever you want to name it)
Operation would be : "Add"
and operand would be "+1"
so it should look like:

Variable Oper: [0001:Lizardman'ssouls] + , 1



Next, you can have a message come up saying something like.
"You've collected a Lizardman's soul!  That brings your total
lizardman soul's to \v[0001]!"

After that, make a switch operation-- call it "Lizardmandead" or whatever you want
set it to "Toggle On/Off"

Now make a new page.

On the second page, set the trigger to "Lizardmandead" being ON

For the first event, go to the "Change Monster HP" and have it subtract 100% of the Monster [1:Lizardman's] HP.
This will automatically kill the lizardman's remaining HP, make sure you switch on the "Reduction can kill monster" box.

After that, below that line, make another switch operation-- same switch as before "Lizardmandead" -- and hit the toggle on/off operation.
This will basically loop it so that the lizardman doesn't die every battle you encounter him in-- each encounter will toggle that switch on, then off, almost simultaneously before the battle ends.  And there you have it!  You can now operate your variables within those parameters!
« Last Edit: April 25, 2008, 10:07:30 PM by Amel »

********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
[Resolved], is it?
Be kind, everyone you meet is fighting a hard battle.