The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Inferno on October 09, 2007, 02:34:14 AM

Title: [RESOLVED] Is this commen event right?
Post by: Inferno on October 09, 2007, 02:34:14 AM
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi43.photobucket.com%2Falbums%2Fe361%2FFire_Man92%2Fhelp-1.jpg&hash=0ff77f29f82e15cff3dbdb45b563e63cc2ee72b8)
is this right for a summon
Title: Re: Is this commen event right?
Post by: djkdjl on October 09, 2007, 02:50:29 AM
1) If your summon does not level up,,then it's right.

2) You need another common event that will replace the summoner with the summoned entity after the battle is over (or if the summoned entity dies)
Title: Re: Is this commen event right?
Post by: Inferno on October 09, 2007, 03:01:15 AM
actully i do want it to
Title: Re: Is this commen event right?
Post by: Arkbennett on October 09, 2007, 03:10:34 AM
Quote from: djkdjl on October 09, 2007, 02:50:29 AM
1) If your summon does not level up,,then it's right.

2) You need another common event that will replace the summoner with the summoned entity after the battle is over (or if the summoned entity dies)

Tried making that system.
It's more complicated than it sound when you get right down to it.
Due to the systems limitations.
And I even caused a glitch, that was the first time I caused a glitch in RMXP with my mad eventing skillz.

Btw, this is common events, shouldn't it go under events and not scripts?
Or did I not look carefully.
Title: Re: Is this commen event right?
Post by: modern algebra on October 09, 2007, 03:40:35 AM
It should be under events, yes. Unless you are looking for a script?

If you want to stick with events, and you want the summon to level, the easiest way to do it is make the monster's level a multiple of the caster's and use variables to calculate it inside the event you posted. I've never been impressed by an evented summon myself, but that's just because I don't really like the 'logic' of switching party members out. It's never made sense to me why you and your summon can't fight together, or at least that you can't get hit while you are summoning. That, however, is just a problem I have with the idea. The event is easy, more or less, but it has the unfortunate aspect that it involves event code in every troop. It's copy paste though, so it is just something I dislike in general, rather then a problem with the event itself. If you want a clue, it will involve checking summon's health and doing the switch if the summon dies. You should also make another common event which switches the hero back in and call it in two ways: through an ability the summon has to unsummon itself, and at the end of each battle.
Title: Re: Is this commen event right?
Post by: Arkbennett on October 09, 2007, 03:47:15 AM
Replacing main character with a summon is difficult because it means you screw up the hero formation (Assuming you have more than one main hero).
I agree with modern algebra, your not going to be impressed with a summon system in Xp via events.

Best bet is a script.
Title: Re: Is this commen event right?
Post by: djkdjl on October 09, 2007, 03:54:18 AM
Do parallel processes under common event run even during a battle?

If yes,,then it's easy to do a full summonning system with events,,if not,,then it's gonna be harder,,but still doable.

1) If you want your summons to level up,,then "Change Party Member: add[DeathReaper], Initialize" should become: "Change Party Member: add[DeathReaper]"....
followed by RECOVER ALL: [DeathReaper]

*Note* By initialzing a party member,,you reduce his/her level to the initial value (most like level 1). 
Title: Re: Is this commen event right?
Post by: modern algebra on October 09, 2007, 03:57:12 AM
No, Parallel Process Common Events do not run in battle.

For retaining party order, you can keep track of party members using variables, like so:

or it to work properly it needs to 'know' the ID of the member being added. Therefore, we can do it by setting a variable to the ID, then calling our slightly modified event. They would now look like this:

Adding:

@>Conditional Branch: Variable [2: 1st Party Member] == 0
    @>Control Variable [2: 1st Party Member] = Variable [5: Member Selected]
@>Else
  @>Conditional Branch: Variable [3: 2nd Party Member] == 0
     @> Control Variable [3: 2nd Party Member] =  = Variable [5: Member Selected]
  @>Else
      @>Conditional Branch: Variable [4: 3rd Party Member] == 0
          @> Control Variable [4: 3rd Party Member] =  = Variable [5: Member Selected]
      @>Branch END
 @> Branch END
@>Branch END


Removing:


@>Conditional Branch: Variable [2: 1st Party Member] == Variable [5: Member Selected]
   @>Control Variable [2: 1st Party Member] = Variable [3: 2nd Party Member]
   @>Control Variable [3: 2nd Party Member] = Variable [4: 3rd Party Member]
@>Else
  @>Conditional Branch: Variable [3: 2nd Party Member] == Variable [5: Member Selected]
      @>Control Variable [3: 2nd Party Member] = Variable [4: 3rd Party Member]
  @>Branch END
@>Branch END
@>Control Variable [4: 3rd Party Member] = 0


Then, whenever you added or removed a member, all you'd need to do is this:

@>Change Party Member: Add or Remove actor
@>Control Variables: [0005: Member Selected] = <ID of Actor being added or removed>
@>Call Common Event (Add or Remove)


That would be a good way of keeping track of party order, and with that you could retain party order by shifting all party members out then adding them back in in order (you would need to write the event to do that, but it is not difficult).
Title: Re: Is this commen event right?
Post by: Inferno on October 09, 2007, 08:07:12 PM
thanks just one more wuestion
on the last part how do you get the id of the charcter(i know what a charcter is)
Title: Re: Is this commen event right?
Post by: modern algebra on October 09, 2007, 08:09:36 PM
The ID is the number of the hero in the database. So when you open up the Actorss tab of the database, you see a list like this:

001: Aluxes
002: Basil
003: Cyrus
...
007: Gloria
008: Hilda

So the ID of Aluxes is 1, the ID of Basil is 2, the ID of Cyrus is 3, the ID of Gloria is 7, the ID of Hilda is 8.
Title: Re: Is this commen event right?
Post by: Kokowam on October 09, 2007, 08:14:40 PM
Or, couldn't you just find out a tiny piece of script that you can send a variable named maybe "PartyTEMP" and set it to the party that you have so you can just call that back?
Title: Re: Is this commen event right?
Post by: Inferno on October 09, 2007, 08:22:02 PM
uh i dont know.if there isn one i dont people going through trouble just for me
Title: Re: Is this commen event right?
Post by: modern algebra on October 09, 2007, 08:25:23 PM
@Inferno what? Also, you can ignore what I am about to say as it has no relevance to the eventing solution I have partially provided.

@Moo: Essentially, the event does that, however arrays do not exist so it just uses 4 variables. If you were to do it with the script, you should do something the same. You would save the ids over the actual array. In other words, don't do this:

party_temp = $game_party.actors.dup

but do this:

party_temp = []
for actor in $game_party.actors
   party_temp.push (actor.id)
end


Be cautious though. You obviously would not want that scriptlet running at any time you have a summon active, as that would permanently store a summon in your party. And the reason you don't do the first option is that it stores too much useless information. To restore the party, you would just need to remove everyone from the party, then add them all back in that order.
Title: Re: Is this commen event right?
Post by: Inferno on October 09, 2007, 08:32:49 PM
i dont get it...if its too much trouble i could  just do it basic like just make the summons characters.i thought it be cooler and the gameplay would be better with this
Title: Re: Is this commen event right?
Post by: Kokowam on October 09, 2007, 08:38:54 PM
Quote from: modern algebra on October 09, 2007, 08:25:23 PM
party_temp = []
for actor in $game_party.actors
    party_temp.push (actor.id)
end


Be cautious though. You obviously would not want that scriptlet running at any time you have a summon active, as that would permanently store a summon in your party.
Why not just activate it when the skill is being activated (actually, the common event) before the summon is released? XD
Title: Re: Is this commen event right?
Post by: Inferno on October 09, 2007, 08:49:15 PM
so...how i do this the script
Title: Re: Is this commen event right?
Post by: modern algebra on October 09, 2007, 09:37:00 PM
Quote from: mastermoo420 on October 09, 2007, 08:38:54 PM
Quote from: modern algebra on October 09, 2007, 08:25:23 PM
party_temp = []
for actor in $game_party.actors
    party_temp.push (actor.id)
end


Be cautious though. You obviously would not want that scriptlet running at any time you have a summon active, as that would permanently store a summon in your party.
Why not just activate it when the skill is being activated (actually, the common event) before the summon is released? XD

Because if there are two members who have a summon ability, then when the second member uses the summon ability it will record the first summon as a regular party member.

@Inferno:  The scriptlet is unusable. At this point, it does nothing whatsoever, I was just demonstrating to moo an acceptable way of recording party order prior to a summon ability. Keep trying with the event, or else I believe SephirothSpawn wrote a Summoning script. It could probably be found on either creationasylum or hbgames.org
Title: Re: Is this commen event right?
Post by: Kokowam on October 09, 2007, 10:00:47 PM
But the summoning script needs SDK so I never used that. XD Also, would it work if by summoning you removed all but the summon?
Title: Re: Is this commen event right?
Post by: modern algebra on October 09, 2007, 10:21:58 PM
err... yes, as long as the summon can't summon another monster. And if there are no other actors that can summon one that does not remove the entire party.
Title: Re: Is this commen event right?
Post by: Inferno on October 10, 2007, 07:43:10 PM
Quote from: modern algebra on October 09, 2007, 09:37:00 PM
Quote from: mastermoo420 on October 09, 2007, 08:38:54 PM
Quote from: modern algebra on October 09, 2007, 08:25:23 PM
party_temp = []
for actor in $game_party.actors
    party_temp.push (actor.id)
end


Be cautious though. You obviously would not want that scriptlet running at any time you have a summon active, as that would permanently store a summon in your party.
Why not just activate it when the skill is being activated (actually, the common event) before the summon is released? XD

Because if there are two members who have a summon ability, then when the second member uses the summon ability it will record the first summon as a regular party member.

@Inferno:  The scriptlet is unusable. At this point, it does nothing whatsoever, I was just demonstrating to moo an acceptable way of recording party order prior to a summon ability. Keep trying with the event, or else I believe SephirothSpawn wrote a Summoning script. It could probably be found on either creationasylum or hbgames.org

please that would be really helpful
Title: Re: Is this commen event right?
Post by: modern algebra on October 10, 2007, 08:01:16 PM
I don't have the script. I was suggesting that you look for it on CA or .org.
Title: Re: Is this commen event right?
Post by: Inferno on October 11, 2007, 01:51:31 AM
i found the script.its pretty easy to use to