Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
pokket

Moving Sprite location on battle scene?

Question

Hey, this might be a bit of a dumb question but hopefully someone will help me. So I'm using Minkoff's Animated Battle System and I really dig it, but I was wondering what I would need to do to move the sprites on the battle scene. What I mean by this is that currently the enemies are towards the bottom center of the battle screen and I would like to move them to the left like in screenshots I have seen as well as the demo by Minkoff.

 

Now I'm sure this is possible, as I've seen it, but I was wondering exactly where the code is in the scripts so I can go in and mess around with it a bit myself. I have a pretty good understanding of the Ruby language by now (for a noob anyway) and I have configured Minkoff's script to work, but I didn't happen to see any mention of this in the configuration scripts or the nice guide that was put together for it. So I assume it's in one of the other scripts (Battle, Sprites, or Miscellaneous) but I was hoping someone could point out that line(s) of code so I just don't go in changing stuff around that I shouldn't be touching right now.

 

After this I plan on putting in a 3 man system and maybe a party system and I think I'm done with the battle coding and I can get back to work on the rest of the game so any help appreciated. Till then I'll see if I can figure this out myself by looking at the demo scripts and comparing. I like figuring these things out on my own preferably, but figured I should ask about this one.

 

Thanks :)

Edited by pokket

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Hey, this might be a bit of a dumb question but hopefully someone will help me. So I'm using Minkoff's Animated Battle System and I really dig it, but I was wondering what I would need to do to move the sprites on the battle scene. What I mean by this is that currently the enemies are towards the bottom center of the battle screen and I would like to move them to the left like in screenshots I have seen as well as the demo by Minkoff.

 

Now I'm sure this is possible, as I've seen it, but I was wondering exactly where the code is in the scripts so I can go in and mess around with it a bit myself. I have a pretty good understanding of the Ruby language by now (for a noob anyway) and I have configured Minkoff's script to work, but I didn't happen to see any mention of this in the configuration scripts or the nice guide that was put together for it. So I assume it's in one of the other scripts (Battle, Sprites, or Miscellaneous) but I was hoping someone could point out that line(s) of code so I just don't go in changing stuff around that I shouldn't be touching right now.

 

After this I plan on putting in a 3 man system and maybe a party system and I think I'm done with the battle coding and I can get back to work on the rest of the game so any help appreciated. Till then I'll see if I can figure this out myself by looking at the demo scripts and comparing. I like figuring these things out on my own preferably, but figured I should ask about this one.

 

Thanks :)

You can change the position of battlers or whatever by opening up the database, going under troops and moving the actual picture to where you want it.

Share this post


Link to post
Share on other sites
  • 0

He/she's actually referring to the battlers for the game characters/actors

EDIT: I don't know why I assume everyone's a "he" i guess it's just faster to type :o lol

 

To modify the position, open up your Game_Actor script, find the def screen_x and def screen_y (if using default script anyways)

 

  
 #--------------------------------------------------------------------------
 # * Get Battle Screen X-Coordinate
 #--------------------------------------------------------------------------
 def screen_x
   # Return after calculating x-coordinate by order of members in party
   if self.index != nil
     return self.index * 160 + 80
   else
     return 0
   end
 end
 #--------------------------------------------------------------------------
 # * Get Battle Screen Y-Coordinate
 #--------------------------------------------------------------------------
 def screen_y
   return 464
 end

 

think (x, y) as a point on a graph. as you can see, by default the x is calculated by finding which number the member is in the party, multiply it by 160 add 80

y by default is always 464.

 

To change the position change what number is returned

return #

 

hope that was clear enough, just ask if you need any clarification or if you need help positioning them :)

Share this post


Link to post
Share on other sites
  • 0

Ah, thanks so much for the help. I'll get to work on this as soon as I can. Right now I need some sleep. Been staying up too late. Again, thanks. I'll let you know if I have any more questions.

Share this post


Link to post
Share on other sites
  • 0

Ah, thanks so much for the help. I'll get to work on this as soon as I can. Right now I need some sleep. Been staying up too late. Again, thanks. I'll let you know if I have any more questions.

 

No problem, no problem at all :) and I have the same problem with staying up too late so i know what you mean.

 

And ask away if you need.

Share this post


Link to post
Share on other sites
  • 0

No problem, no problem at all :) and I have the same problem with staying up too late so i know what you mean.

 

And ask away if you need.

 

Awesome, and I'll guess I shall ask now since I can't sleep and just sitting here smoking a cigarette and listening to some salsa music.

 

So, my question is what exactly do I need to change? By changing the return number is changing the position, do you mean which number the actor is in the party? Or do you mean the actual location on the map.

 

And I'm not sure now that I'm reading your reply if you completely understand what I'm asking. But I think I get the point. See, I think the actors are fine as is currently, what I want to change is the enemies. Does the code in the Game_Actor script also handle this or would it be in the Game_Enemy script in this code here -

 

#--------------------------------------------------------------------------
 # * Get Battle Screen X-Coordinate
 #--------------------------------------------------------------------------
 def screen_x
   return $data_troops[@troop_id].members[@member_index].x
 end
 #--------------------------------------------------------------------------
 # * Get Battle Screen Y-Coordinate
 #--------------------------------------------------------------------------
 def screen_y
   return $data_troops[@troop_id].members[@member_index].y
 end
 #--------------------------------------------------------------------------
 # * Get Battle Screen Z-Coordinate
 #--------------------------------------------------------------------------
 def screen_z
   return screen_y
 end

 

And speaking of which, I assume the Z-Coordinate would change the size, correct?

Share this post


Link to post
Share on other sites
  • 0

You can change the position of battlers or whatever by opening up the database, going under troops and moving the actual picture to where you want it.

 

Oh man, I didn't even see your post. I feel like such a jerk. This is exactly what I was asking. For some reason I figured it was a script issue and not a database one. So let's mark this as solved, shall we?

 

Realizing how simple this was I feel like an idiot now. I'm terrible at this, really. Thanks though. I appreciate it.

Share this post


Link to post
Share on other sites
  • 0

Wait oh, LOL you were asking about the enemies XD now i feel silly

 

and don't feel like an idiot; it's all about learning :)

 

and for future reference, in case you wanted to know; the z value is depth (kinda like in a 3d area) so the higher the value the closer to the screen it will be and the lower the further away. ex. sprite 1 has z value of 100, sprite 2 has z value of 200. If they have the same x, y coordinates; sprite 2 will appear to overlap sprite 1

Share this post


Link to post
Share on other sites
  • 0

Wait oh, LOL you were asking about the enemies XD now i feel silly

 

and don't feel like an idiot; it's all about learning :)

 

and for future reference, in case you wanted to know; the z value is depth (kinda like in a 3d area) so the higher the value the closer to the screen it will be and the lower the further away. ex. sprite 1 has z value of 100, sprite 2 has z value of 200. If they have the same x, y coordinates; sprite 2 will appear to overlap sprite 1

 

yeah, that's what I meant by size. guess that was hard to understand. but this information is helpful after all, after implementing a 3 man cbs system it seems that the characters aren't were I would like them to be in relative to the battle graphic. so I shall work on that as well. this battle system stuff is complicated, but I'm enjoying it.

 

also, I've gotten to lazy to properly capitalize now.

 

And spell, apparently.

Edited by pokket

Share this post


Link to post
Share on other sites
  • 0

Well as long as you are enjoying it, that's all that matters! I have noticed that a lot of battle system scripts written make setting up a little too complicated for those who are just learning the scripting portion of Rpg maker xp...which kinda defeats the purpose XD

 

this is why I vow to one day (when I have less workload on my hands) to write a battle system that is easy to set up, and highly compatible :)

 

I'd also like to re-iterate: if you are having difficulty getting the positioning correct I can help.

 

and finally, do you have any previous scripting/programming knowledge? (not specifically Ruby)

Share this post


Link to post
Share on other sites
  • 0

Well as long as you are enjoying it, that's all that matters! I have noticed that a lot of battle system scripts written make setting up a little too complicated for those who are just learning the scripting portion of Rpg maker xp...which kinda defeats the purpose XD

 

this is why I vow to one day (when I have less workload on my hands) to write a battle system that is easy to set up, and highly compatible :)

 

I'd also like to re-iterate: if you are having difficulty getting the positioning correct I can help.

 

and finally, do you have any previous scripting/programming knowledge? (not specifically Ruby)

 

um, does visual basic count? I took a class for that in high school and hated it. But the teacher was an accounting teacher and obviously didn't know what she was doing.

 

But, on that note, programming is easy in my opinion. It's basically knowing what means what and setting up your own values. Which I've actually already done in ruby so far in some cases, simple stuff though like creating different font classes. Still trying to figure out if I can use a font that isn't on a base pc and include it in the game's resources for when people downloaded it and writing a get type command to let the system know where the font is, which I think I'm close to cracking that case actually, I just need to understand the structure of the command. Basically to me it's just remember certain classes and knowing enough to create your own to some degree. Easy peasy in my opinion. But when I don't know what I'm looking for exactly that's when I have to ask.

 

I'm one of those types of guys who has to know what something does and why it does it. I guess that can make me a bother at some points, but I'm picking it up fast. Hopefully I'll be able to expand on this battle system a bit in a new topic I just posted after brainstorming here. I have a lot of work ahead of me but fortunately I'm a workaholic by nature. And I'm at my most happy state when I'm creating, so win win!

 

EDIT

In fact, I think I have a work around the sprite problem. I like their size currently and I certainly don't want to clutter up the screen. So if I'm thinking correctly I can just export the battle scene images, open them up in paint, cut off the top section, move the image up, then fill the bottom in with black as that's where the menu will be anyways. All I need is the window height I believe which the script should tell me. If not, then just a more tedious checking process. I move fast in thought, so hopefully I'm not spamming here.

Edited by pokket

Share this post


Link to post
Share on other sites
  • 0

Aha! Bare witness to my fruits! I'm proud of myself :)

 

25unyo1.png

 

I do have a question for you and this is a little off topic, but I'd really hate to start a new topic all together for it and clutter up the forums. But, that blank bar is the limit break bar I'm using and I was wondering if I could put text above it like with 'SP' and 'HP'. For instance, I would want it to say 'Limit' above it. not exactly sure how to go about that. Would I need to enter the draw text function in the system so it would be recognizable?

Share this post


Link to post
Share on other sites
  • 0

Awesome, it sounds like you will soon become a good scripter. You definitely have the right attitude :)

And any programming knowledge helps, like you said the syntax and usage is easy to pick up (especially if you have programmed before) it's the flow and logic that is harder to grasp, but is generally the same/similar across all languages (there are some differences depending on the paradigm, etc.) As for the font portion, the easiest way to do that would be to just include the font you are using in the game download. I have never looked into it myself, but there is a script floating around that installs missing fonts when the game is first opened. I will link you to it once I find it, which you can use or learn from (or both). I don't think you'd be able to just use a font directly from a different folder as it needs to be installed on the system in order to be displayed correctly (but there definitely is a way to install it through scripts)

 

http://www.ruby-doc.org/core-1.8.6/index.html <-- use this api for rmxp ruby...rmxp uses version 1.8.1, but i don't think those APIs are available any more, ruby is currently in 1.9.2 (which is faster and has some differences than the 1.8.x versions)

 

@ your last post: Looks nice :) so far. For the "limit" text, I can't tell you exactly where to put the Draw_text command, but you are on the right track. Whatever sprite you are drawing the bar too would be the best place to draw the text as well...just look through the script and find where the HP/SP text is drawn and do the same for limit. also, you will be able to find the window height, etc. within that window class.

 

I guess we kinda went off topic, but at the same time we were on topic (and it was partially my fault anyways). The only thing I can say is that it may have been a better idea to have edited your other post instead of double posting (at least you added to the topic though)

 

Also: Game Making Support is usually the best forum for little issues (or large of course) so don't be afraid to make a new topic, you never know when people may have a similar question, but if it's in a topic titled something else, they may be less likely to find it. After all, it's best when people can learn from other people's issues as well (imo)

 

If you ever want to discuss programming/scripting let me know, I am addicted/border line obsessed with it and always enjoy a good programming discussion :D

Share this post


Link to post
Share on other sites
  • 0

Ah, of course. If you can't tell I don't really post to forums much. I suppose these would be general rules that would one pick up as they go. My experience with forums is only a philosophy forum so the rulesets are, as I am witnessing, a bit different. And of course your everyday image boards. But yes, I've enjoyed our chat. Thanks for all the help. I'll keep everything in mind.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...