Author Topic: hardest scripits to explain  (Read 1641 times)

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
hardest scripits to explain
« on: March 07, 2011, 04:48:54 AM »
ok first script is General HP,EXP, AND SP
what do I mean? all party members allways but allways will have the same exp and the same lvl.
whether they go off or back in the team, and the HP and SP is a one bar shared by all party members, which means that if one dies, all party memebrs die. besically in a hud what it shows you is the Stats of you! the controller! a party member gets demaged, besically all party members do as they share the same HP bar, i think this kinda explains it, i dont want the possibility of 1 member dies and 2 other still alive, they all should have the same HP!

Member 1 HP:200
Member 2 HP:200
Member 3 HP:200
General HP:200
Member 1 Gtes demaged by 20 dmg

Member 1 HP:180
Member 2 HP:180
Member 3 HP:180
General HP:180

hope you get my point, if not ill explain more.

Puzzle skill for Blizz Abs
events that can be only activated when a skill is used on them!
events that you put in their name "\Puz[frames]" if it has that, it can only be activated when a specific skill is used on the event, (like an enemy)
The frames is the frames is being loaded as the character uses the skill on the event EXAMPLE

a bar loading as he uses the skill, other characters can still be in combat, as he is "unlocking" the door.
when the target screen appears, with that certain skill, you can only target the "\Puz" events.
this is like for special seals that a skill named "seal breaker" is being used on.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: hardest scripits to explain
« Reply #1 on: March 07, 2011, 05:05:56 AM »
Make sure I got this right. You want the party to die if one member has HP of 0, even if the others are at full?
All you would need there is a call a common event for the KO state to kill the rest of the party, or end the game, whatever you need to do.

If you want everyones HP to stay the same, so that they damage/heal evenly, just change everyones HP to reflect the average. This can be accomplished with a slight mod to the hp=(hp) method in Game_Battler.

Code: [Select]
class Game_Battler

  alias average_hp hp=
  def hp=(hp)
    average_hp(hp)
    if self.is_a?(Game_Battler)
      unless self.dead?
        avg = 0
        $game_party.actors.each {|actor| avg += actor.hp }
        avg /= $game_party.actors.size
        $game_party.actors.each {|actor| actor.hp = avg }
      else
        # WHATEVER YOU WANT TO HAPPEN WHEN SOMEONE DIES GOES HERE
      end
    end
  end
end

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #2 on: March 07, 2011, 05:15:15 AM »
Make sure I got this right. You want the party to die if one member has HP of 0, even if the others are at full?
All you would need there is a call a common event for the KO state to kill the rest of the party, or end the game, whatever you need to do.

If you want everyones HP to stay the same, so that they damage/heal evenly, just change everyones HP to reflect the average. This can be accomplished with a slight mod to the hp=(hp) method in Game_Battler.

Code: [Select]
class Game_Battler

  alias average_hp hp=
  def hp=(hp)
    average_hp(hp)
    if self.is_a?(Game_Battler)
      unless self.dead?
        avg = 0
        $game_party.actors.each {|actor| avg += actor.hp }
        avg /= $game_party.actors.size
        $game_party.actors.each {|actor| actor.hp = avg }
      else
        # WHATEVER YOU WANT TO HAPPEN WHEN SOMEONE DIES GOES HERE
      end
    end
  end
end

no its not what I want, S: it was an example.
if 1 party member is demages, all are, they all share the same hp. instead of haveing each their own hp. the whole party has a party hp. so if one is demaged, the demage goes to the party's hp.
but not just HP,.. but SP, lvl and exp too

Offline WhiteRose

  • Trying to code in Ruby
  • Moderator
  • Lexima Warrior
  • ***
  • Posts: 2339
  • LV: 127
  • Gender: Female
  • <3
    • View Profile
Re: hardest scripits to explain
« Reply #3 on: March 07, 2011, 05:17:57 AM »
@F0: I don't that's quite was he was trying to say. Basically, as far as I understand it, he's thinking of the party as a single entity, sharing HP, XP and level.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #4 on: March 07, 2011, 05:19:49 AM »
@F0: I don't that's quite was he was trying to say. Basically, as far as I understand it, he's thinking of the party as a single entity, sharing HP, XP and level.
exactly

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: hardest scripits to explain
« Reply #5 on: March 07, 2011, 05:23:41 AM »
Hold on a sec.

EDIT: You want stats such as strength, evasion, inteligence, etc. the same too?
« Last Edit: March 07, 2011, 05:24:56 AM by ForeverZer0 »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: hardest scripits to explain
« Reply #6 on: March 07, 2011, 05:29:33 AM »
As for events activated by skills, if you make it an enemy that can't do anything, you can put Trigger:Skill in a comment to make the event execute when the skill is sued. Check the manual for more details.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #7 on: March 07, 2011, 05:33:57 AM »
Hold on a sec.

EDIT: You want stats such as strength, evasion, inteligence, etc. the same too?

No!
if a character with better defence gets hit, then the party suffers a lower demage, thats the beuty of it o:
they only share exp, lvls, hp and sp. one used so much skills he ran out of sp, technically the whole part ran out of sp then.

As for events activated by skills, if you make it an enemy that can't do anything, you can put Trigger:Skill in a comment to make the event execute when the skill is sued. Check the manual for more details.
I actually tried that, but you missed the loading part of the request...
« Last Edit: March 07, 2011, 05:36:56 AM by Shalaren »

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: hardest scripits to explain
« Reply #8 on: March 07, 2011, 05:57:39 AM »
I just thought of something (after I was about done writing a you a quick script edit).
Can't you just create a dummy actor in the database, and always just use its stats for everybody?

I can still give you the script edits I wrote, but they basically accomplish the same end.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #9 on: March 07, 2011, 06:00:00 AM »
I just thought of something (after I was about done writing a you a quick script edit).
Can't you just create a dummy actor in the database, and always just use its stats for everybody?

I can still give you the script edits I wrote, but they basically accomplish the same end.

no because it kinda messes everything up, ill remind you im using blizz-abs and it shows on the main character, and on his features, (and some more scripits I made) doing that is just a big mess that wont work for me S:

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: hardest scripits to explain
« Reply #10 on: March 07, 2011, 06:09:54 AM »
Okay, one last question.

What I have now will make it so you have basically all the same stats, but for $game_player: hp, mp, maxhp, maxsp, exp, level, etc, etc.

They will return the total of all party members, but maintains each actor's actual stats under the scenes, which means you that you will have to for example alter your health bar to reference the $game_player method.
I probably could actually just create a global pool of the stats, that won;t require manual edits, but I can almost guaranteed that you are going to run into bugs down the road if not right away.

Here's what I got:
(click to show/hide)

Just follow the little instruction at the top. You will need to edit parts in your scripts to reference the following:

  • $game_party.exp
  • $game_party.exp=
  • $game_party.level
  • $game_party.exp_s
  • $game_party.next_exp_s
  • $game_party.next_rest_exp_s
  • $game_party..level
  • $game_party.hp
  • $game_party.sp
  • $game_party.maxhp
  • $game_party.maxsp
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #11 on: March 07, 2011, 06:16:23 AM »
Okay, one last question.

What I have now will make it so you have basically all the same stats, but for $game_player: hp, mp, maxhp, maxsp, exp, level, etc, etc.

They will return the total of all party members, but maintains each actor's actual stats under the scenes, which means you that you will have to for example alter your health bar to reference the $game_player method.
I probably could actually just create a global pool of the stats, that won;t require manual edits, but I can almost guaranteed that you are going to run into bugs down the road if not right away.

Here's what I got:
(click to show/hide)

Just follow the little instruction at the top. You will need to edit parts in your scripts to reference the following:

  • $game_party.exp
  • $game_party.exp=
  • $game_party.level
  • $game_party.exp_s
  • $game_party.next_exp_s
  • $game_party.next_rest_exp_s
  • $game_party..level
  • $game_party.hp
  • $game_party.sp
  • $game_party.maxhp
  • $game_party.maxsp
im not sure I understand your question, but Ill just provide you with a small explenation o-o
lets say i have three characters and 1 enemy, so in battle it shows, me 100% hp, enemy 100%
in other words me includes all party members as 1, but just 3 members.
now lets say I have a mage, warrior, and archer, if the archer gets hit, he'll recieve lets say 200 demage,
besically its as all party recieved 200 demage since they share the hp. but if the warrior was hit, because his stats of defence are higher, hell only recieve 100 demgae, which all party recieve as then again, they share the HP.
besically they only shar HP, SP, LVL, and EXP, but no the other stats.. as for the other stats, they all have their own...
now, if you add a member ot the party, hell automatically have the same exp, and lvl as other party members..
and i want to remind you, hp changes as they lvl, so I guess the basic would be character ID 1. as that would be the hp ill be setting the party to share. (thats just a suggestion)
« Last Edit: March 07, 2011, 06:17:58 AM by Shalaren »

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: hardest scripits to explain
« Reply #12 on: March 07, 2011, 06:24:00 AM »
That scriptlet I gave you will do that. You need to just reference the hp/maxhp, sp/maxsp, etc. youself in the your script.
If player one gets hit, he actually takes damage, based off his own stats, but the damage is also taken from the party's total health.

If a player dies, $game_party.dead? will return true. All the calls you will need are there, but I can't implement them into your custom game, obviously. If you have it a HUD or something that you want to show the party health, you will need to make the alterations to check the $game_party.hp instead of the individual character's hp, and so on and so forth.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #13 on: March 07, 2011, 11:32:13 PM »
no it doesnt do what I excpected S:, ok heres a way.
all party members are based on the main character, the one your playing with, the one the hud shows, which is ID:1
when other party member kills, only ID:1 gets the exp, but when he lvls, all party memebrs lvl S:. thats what im trying to do,
that his Hp, Sp, lvl, and EXP belong to the whole party, not just some dummy character that wont even show int he hud. S:
man its really hard to explain. everything is based on character #1, if he dies. all party dies, but if he doesnt they cant die, since they all share the same hp as him. if they get demaged, he gets demaged not them. because they share the hp woth him. if he lvls, all party lvls, because they share the same exp. its like your playing only with 1 character, only that he has 3 parts to him. 3 parts that go around in caterpiller.
well thanks anyway for trying.

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: hardest scripits to explain
« Reply #14 on: March 07, 2011, 11:49:20 PM »
I understand exactly what you need, and what I provided are the methods to do it with. You will need to apply them yourself, though, like I said. There is no way any small scriplet that maintains any type of compatibility will do it without you having to make a couple of edits.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Shalaren

  • Ethereal Devastator
  • ****
  • Posts: 442
  • LV: 46
  • Gender: Male
  • Also known as DexKyle
    • View Profile
Re: hardest scripits to explain
« Reply #15 on: March 08, 2011, 02:44:13 AM »
I Appreciate you're help, but im no scripter S:, I can spend all day on it and not figure it out, im no good with coding.
I tried playing around with it and trying to make it so when 1 gets demaged besically they all will. as if you change the party leader, they all will have the same amout of hp, etc. but for all I tried, the one get's demaged, is the only one with less hp.
Thanks though.