Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

Recommended Posts

Hi

Long time no request.Anyway I need some help with scripts.I'm trying to combine two scripts and I found a problem.The only solution I found is to write a short script that only updates actor sprite during the battle (and I can't do it since I'm not a scripter) .The default "Spriteset_Battle" updates both enemy and actor sprites,You know.It makes that problem.

.

.

.

Damn it! My requests are always so vague.Please tell me if you need more info

Thank you :)

Share this post


Link to post
Share on other sites

So...for some reason the sprites are updating in battle, but not on the map? That's what it sounds like and it's going to be very difficult to help you without the actual scripts to see what needs to be done.

Share this post


Link to post
Share on other sites

No.You got me wrong.Sprite update doesn't have any problem.It's just a small glitch that comes when I try to switch between scripts.I'm 90% sure that you don't need to see scripts...Sorry,The problem itself is so hard to explain for me.So I just tell the solution : I need a script that only updates actor sprites ( NOT enemy sprites) during the battle.

Thank you for your answer :heart:

EDIT Hey hey look I found something :

http://www.gdunlimited.net/forums/topic/10121-change-party-in-battle/

I'm using ENU SBS and Blizzard's party switcher either and I know how to switch party without wasting a turn! (Tell me if you still want to know it)

But my problem is a bit complex :

Let's imagine we have killed an enemy.Then We'll change actor B with actor A,Then press Esc so we'll get back to battle.This is what happens:

http://www.gdunlimited.net/media/uploads/manager/untitled-1-23287.png

Edited by zahraa

Share this post


Link to post
Share on other sites

What?

 

First of all the battle system. How is it. Is it a turn based battlesystem (like final fantasy). Because I see it as a simple problem.

 

Could you prove us some screenshots of the problem and the scirpt?

Share this post


Link to post
Share on other sites

What?

:oops: Sorry

 

 

First of all the battle system. How is it. Is it a turn based battlesystem (like final fantasy). Because I see it as a simple problem.

 

Could you prove us some screenshots of the problem and the scirpt?

 

You haven't read my last post,Have you?

The battle system is ENU SBS.it's like RMXP default battle system appears in a side view form.Here is a link :

http://save-point.org/thread-590.html

and the screenshot is here :

Let's imagine we have killed an enemy.Then We'll change actor B with actor A,Then press Esc so we'll get back to battle.This is what happens:

http://www.gdunlimited.net/media/uploads/manager/untitled-1-23287.png

In fact I'm trying to switch party during battle  but As you can read above,I have that problem.

Edited by zahraa

Share this post


Link to post
Share on other sites

So...Let me get this straight.

 

Enemy sprites are updating and Actor sprites are updating.

You don't want enemies to update.

You also want the same kind of in-battle part switching system that I want and have a way of doing that, but have a problem with it.

 

There is an option in the battle system you are using to disable enemy sprite movement, so I don't the see the problem.

 

If you are trying to get party members to switch with a reserve character and it's effecting the enemies, then I can see how the seemingly two completely unrelated problems are actually one problem.

 

Here are some things we need in order to know exactly what your problem is. It would be best if they were provided in a neat and organized list.

- The name of the battle system (Already done. It's the rmxp version of tankentai, right?)

- If you are using tankentai, which add-ons are you using.

- What scripts are you using that were not made by you, did not come with the battle system or rmxp, and have and can be easily downloaded. (example: Blizzard's Easy Party Switcher)

- Step by step "instructions" on how to get your game to reveal this bug. (example: go into battle, open party switcher, switch active member with reserve member, exit)

- What exactly happens after the above has been done.

- What should happen instead.

- Any additional information that may help (example: coding errors you found, scripts you or a friend made that would effect the battle system or party switcher, etc.)

 

 

If you're easily offended or something, do not read what's in this spoiler. I mean well and any rudeness that you may find I am very sorry for. :oops:

 

 

Another problem seems to be that your English has gotten worse. It wasn't actually that bad before, but it seems like you don't normally speak English and are out of practice. If English isn't your first language I completely understand and can't be mad anyone with poor English who normally speaks another language because English is a terrible language and difficult to learn.

Don't take this the wrong way, I just kind of have a need to find the cause of obvious problems and it would be so great if it was easier to communicate with both you and Black Mage.

 

Also, please take the following as me teaching you something:

Periods, when used to separate sentences, need a space after them.

Commas almost always need a space after them. They don't when used in math or coding usually, but it looks nice.

 

 

Share this post


Link to post
Share on other sites

@Zahraa

I did read your previous post but i'm not in into RPG Maker XP's battlesystems that much as there's only one I use.

So pardon me :P

However you seem to not express your problem correctly. Bob in the previous post seem not to quite understand you and neither do i.

 

@Bob

I do understand that her english isn't her first language but we have to do our best to understand her needs.

English is my first language then comes Spanish and Italian and I fail writing correctly in these three languages.

 

Back on topic.

 

@Zahraa What is your native language? Anyway could you please express your problem with more words and patiently? We two are having a hard time understanding your problem.

Share this post


Link to post
Share on other sites

So...Let me get this straight.

 

Enemy sprites are updating and Actor sprites are updating.

You don't want enemies to update.

You also want the same kind of in-battle part switching system that I want and have a way of doing that, but have a problem with it.

 

There is an option in the battle system you are using to disable enemy sprite movement, so I don't the see the problem.

 

If you are trying to get party members to switch with a reserve character and it's effecting the enemies, then I can see how the seemingly two completely unrelated problems are actually one problem.

 

Here are some things we need in order to know exactly what your problem is. It would be best if they were provided in a neat and organized list.

- The name of the battle system (Already done. It's the rmxp version of tankentai, right?)

- If you are using tankentai, which add-ons are you using.

- What scripts are you using that were not made by you, did not come with the battle system or rmxp, and have and can be easily downloaded. (example: Blizzard's Easy Party Switcher)

- Step by step "instructions" on how to get your game to reveal this bug. (example: go into battle, open party switcher, switch active member with reserve member, exit)

- What exactly happens after the above has been done.

- What should happen instead.

- Any additional information that may help (example: coding errors you found, scripts you or a friend made that would effect the battle system or party switcher, etc.)

 

Anyway could you please express your problem with more words and patiently? We two are having a hard time understanding your problem.

 

Ok, Since my explanations were so Incomprehensible please forget them all!

I decided to make a small demo. You can find all of relevant scripts there, Here is a download link :

http://www.freeuploadsite.com/do.php?id=39277

Now to see the problem:

1) Play the game

2) Talk with the ghost on map and you'll enter a battle

3) Kill only one of enemies

4) Open party switcher (You don't have to change a member) then close it

5) The problem is obvious now.

I hope it helps you guys to understand my problem.

I'm so sorry if it is so annoying for you to read and understand my posts. I do my best to get rid of those grammar mistakes

 

If you're easily offended or something, do not read what's in this spoiler. I mean well and any rudeness that you may find I am very sorry for. :oops:

 

 

Another problem seems to be that your English has gotten worse. It wasn't actually that bad before, but it seems like you don't normally speak English and are out of practice. If English isn't your first language I completely understand and can't be mad anyone with poor English who normally speaks another language because English is a terrible language and difficult to learn.

Don't take this the wrong way, I just kind of have a need to find the cause of obvious problems and it would be so great if it was easier to communicate with both you and Black Mage.

 

Also, please take the following as me teaching you something:

Periods, when used to separate sentences, need a space after them.

Commas almost always need a space after them. They don't when used in math or coding usually, but it looks nice.

 

 

 

 

Oh, Well I knew it, it's the truth and truth hurts. That's all I can say. Don't worry, I didn't get it wrong, I know that's kind of you to tell me my flaws so you don't need to be sorry for anything :)

Anyway thank you guys for understanding me and my problems. It really makes me happy when someone wants to help me though he even doesn't understand my words. It means a lot for me :heart: And a very special thanks for teaching me new things.

 

Share this post


Link to post
Share on other sites

Well now I know exactly what the problem is...well...I know what's happening, and I think I know why...sort of. When exiting the party switcher, the game think that it needs to show all actors (both party members and enemies) that are or were in the current battle.

As for where the problem is...I don't know. And unfortunately even if I did, I wouldn't know how to make the battle update correctly. Sorry :(

Share this post


Link to post
Share on other sites

It's just a graphic of that dead enemy so you might be able to solve it if you can add a code to "Spriteset_Battle" (which is in "Sideview battle 2") to stop it from updating enemies when they're dead.............idk :dizzy:

Share this post


Link to post
Share on other sites

Hm...that I might be able to do...

 

Enemies are still not selectable after death, even after using the party switcher and it's still possible to win when dead enemies are visible.

So all that needs to be done is to make sure that enemies stay invisible after death no matter what.

 

I think I found the code on line 4000 of Sideview battle 2

 

    for enemy in $game_troop.enemies
      @enemy_sprites.push(Sprite_Battler.new(@viewport2, enemy))
    end

 

Do you know where the code for making an enemy disappear when they die is? I might be able to figure it out from looking at that and I can't seem to find it :(

Share this post


Link to post
Share on other sites

Do you know where the code for making an enemy disappear when they die is? I might be able to figure it out from looking at that and I can't seem to find it :(

I'm not really sure but it might work (or maybe something similar) :

sprite.visible = true/false

Also i have another idea, We can set dead battler's hue/opacity to 0 to make it disappeared.

Share this post


Link to post
Share on other sites

That's only half the problem actually. I don't know how to check if the enemy is dead or not since I don't think checking for it's HP will work.

Share this post


Link to post
Share on other sites

I was trying to find a way to solve it. I asked myself : What if I stop party switcher from updating sprites? So I removed line 1034, 1041,1042 and last problem solved. But as you can guess there is a new problem. To see it :

1) Remove mentioned lines

@spriteset.dispose
@spriteset = Spriteset_Battle.new
 15.times {@spriteset.update}

2) Playtest the demo

3) Talk with ghost and go into battle

4) Open party switcher and switch one of active members with a reserve member

5) Attack an enemy. You'll see that the new active member's weapon graphic is disappeared (Sorry if it's confusing :( )

I don't know...I preferred to share this new problem with you because I guess its solution is easier that previous one.

I'm really stuck at it...I need help :ehh: I'm going crazy X_X

Share this post


Link to post
Share on other sites

That's only half the problem actually. I don't know how to check if the enemy is dead or not since I don't think checking for it's HP will work.

 

battler.movable?

 

  #--------------------------------------------------------------------------

  # * Decide if Action is Possible

  #--------------------------------------------------------------------------

  def movable?

    return (not @hidden and restriction < 4)

  end

 

 

 

Its best to check for both battler.dead? and other conditions.

 

if not battler.dead? and battler.movable?

 

Quick recap.  Shouldnt be too difficult to merge these scripts.  And I'll explain briefly in scripting terms.  Both actors and enemies have a parent Battler class.  This is where their HP and other common traits are defined.  Game_Actor and Game_Enemy both inherit HP and more from their parent class, but these two classes being different, allows for other checks to be done.

 

if @battler.is_a?(Game_Enemy)

  # Do this

elsif @battler.is_a?(Game_Actor)

  # Do that

end

 

Now both Enemies and Actors are Battlers.  So if you put in:

 

if @battler.is_a?(Game_Battler)

  # Do something

end

 

Both being Battlers will cause @battler.is_a?(Game_Battler) to always eval to true because it is the Parent class.

 

You can update ONLY if one of your battlers is an Actor but not an Enemy, however, it will prevent Enemies from disappearing.

 

The method youre looking for to "kill" Battlers is called "collapse".  Its a method inherited from RPG::Sprite so you dont see the definition for it in the scripts, although it can be redefined.  Look in the help file for "collapse" and you'll see the parent code to change its behavior.

Edited by Heretic86

Share this post


Link to post
Share on other sites

Thank you for your answer.I really appreciate it but I don't know anything about scripts so it's hard for me to merge scripts and get what I want...Could you help please me more bro? I have two choices:

1) Try to disappear enemies when they die

2) Stop updating sprites and try solve weapon graphic problem (More explanation for this problem is in my last post)

 

That's only half the problem actually. I don't know how to check if the enemy is dead or not since I don't think checking for it's HP will work.

go to line 1400 and change it to

for enemy in $game_troop.enemies
 @enemy_sprites.push(Sprite_Battler.new(@viewport2, enemy))
    if enemy.hp = 0
  # Do something to disappear an enemy       
   end
end
  

It might work...

Edited by zahraa

Share this post


Link to post
Share on other sites

Uh hey guys I figured it out! Thank you Heretic86 for your hint. The solution was very easy ( Only three lines of codes!).

Please lock this topic :dance:

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...