Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> In-game troop builder + practice battle
Tsukihime
post Apr 12 2012, 03:58 PM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




I'm working on a script that allows you to select a bunch of enemies from the database and start a battle with it.

I've adapted the item menu to display a selectable list of enemies (just loop through $data_enemies) and returns the selected enemy object, but now am stuck with actually creating the troop.

I would like to re-use as much of the existing code as possible, so it looks like I will need to pass a troop_id to BattleManager.setup.
However, this means I need to actually create the troop.

How can I do this?

EDIT: I guess I'll just call it an "arena" script since that's kind of what it's like.

ok, I have just found the help document (lol...) and see the classes defined in the RPG module.

And have gotten a very basic implementation of it working (to some extent).

Currently I just take the selected enemy and create a troop out of it, appending it to the end of $data_troops, and then returning the troop id
I then immediately set up a battle with that troop id and switch to scene_battle.

Now, it assumes the troop is the last element of the array so I just pop off the last element to make it look like it was never there.

Some things I have in mind but am not too sure how best to implement them

-unlock monsters by encountering them (flag on enemy class? custom array of sorts?)
-arena-specific battle system. Just copy the BattleManager over and call it ArenaManager, and then update definitions as needed? Seems like duplicate code, and assumes many things about the user's project
-using note tags to filter by level of difficulty?
-saving custom troops? This will need another menu for troops...
-monster info display? Maybe make a window that updates to whatever the current item is.

I'll be using this mainly to figure out how to script in RMVXA

This post has been edited by Tsukihime: Apr 12 2012, 09:36 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Tsukihime
post Apr 12 2012, 09:34 PM
Post #2


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




Ok, I have looked around some more and have added the following:

-cursor_move event processing
-info window
-battler image



Can someone look at the scripts and comment on what can be improved, any questionable code, etc?

For example, the window with the battler image is my "info window". Should it instead just be the help window since the default engine provides definitions for a help window and it seems pretty standard.

In particular, is there a better way to add event handles for up/down/left/right? For example maybe someone decided to override the default controls completely and I might want to know what they're using for ":UP".

Currently I just extend process_handle, but it fails when I try to add pageup and pagedown cause its parent simply deactivates the window (I tried overriding process_handle completely, but it didn't work either).

http://www.mediafire.com/?naj390qp82yrhi4

Also, how can I automatically resize an image?

This post has been edited by Tsukihime: Apr 12 2012, 09:40 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
Tsukihime
post Apr 13 2012, 09:14 AM
Post #3


Level 25
Group Icon

Group: Revolutionary
Posts: 565
Type: None
RM Skill: Undisclosed
Rev Points: 25




Just saw mog hunter's "monster book" script and realized that I could use updates to track where the cursor is rather than explicitly hardcoding handlers.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 17th June 2013 - 08:55 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker