Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

XAS Action Rpg System (Secret Of Mana Styled)

Star

Sponsor

Birdie":17wsh6fa said:
StarGGundam2 I love your ally system but I can't get it to work in my game could you explain it or tell me what I mighrt be doing wrong?
Ahh.. Finally. Some well deserved praise. I'm going to explain it the best way I can. And in the end. If it still doesn't work, just send me your game through PM and I'll show or explain to you what went wrong

1. First of all. You need to create your Allies. How many Do you want fighting at once. Etc. Then you make those allies under character in the data base. You can even dress up what skills they get and what class they are. But what's most important is that you write down what their HP, MP, STR, DEX AGI, and INT is for each LVL

2. Go to System. ADD in four elements and call them Ally, Friend Heal, Friends, and Enemy Ally

3. Now go to Skills. For every Ally. Make their attacks have the Element of Ally.
For all your skills make your attacks have the Element of Ally and OVD.
For all Enemy attacks make them have the element of Friends and Enemy Ally
Be wary of ATK F and STR F. IF these are at 100. Those attack powers will be multiplied 10 fold. It's best to keep these relatively low like 0 or 10. You can probably give your ally the same skills but higher ATK F and STF when you give them better weapons. You'll do that through Conditional branches to tell what weapon your ally is wearing, thus telling him what skills to use.

4. Now we go create our enemies. For each new level you want for your ally. You must create a new enemy and call it "Ally Name" Level 1 - 99 Etc. And you increase their stats based on what you wrote down in number 1.

Now we are finished with the Data base.

5. Now we go and add all the events under TOOL and make the attacks look like What we want them too. Make Sure that very few are on Autorun or Parallel Process, cause the more you have like that, the more your game will be slow as hell xD. Of course this only applies to enemy and ally attacks. Your character can have all the Autorun and Parallel Process attacks he wants.

Now we go to the Script part.

6. Don't forget to add a little Script explaining the skill number and what image to use and attack range etc.

7. Under XAS Skill make what attacks look like. Etc. And look for Enemy ALLY. Put down your allies attacks there. Now be warned, If you want Enemies to attack your allies. You need to put their attacks down here, and you need to make duplicates of their attacks. Making one of them attack your ally and one of them attack your character.

8. Also. If you're doing a random battle like how my Demo has been made. If you have the same enemy on the same map. You need to make a duplicate of it, So it has a different number. Thus If you have enemy ID 104 Blue Blob. And you want four of them to appear. You need to make 105, 106 and 107 Blue blobs along with 104. And each of them needs a different Defeat Switch that activates when they die.

Now we got the simple crap out of the way.

Lets go to our map. When you run into an enemy. You memorize that enemies coordinates by using a variable that measures it. And you have an auto run at the beginning that utilizes a variable to tell you what map you are on.

You also must put a conditional branch that asks what level your ally is or if he/she's knocked out, So you can control what enemy ID pops up when you start the battle

Place your Ally on the map and make a set of 3 Event Pages x a new switch per level. So if you have 10 levels for your ally you should have 30 event pages. + 1 more if you want a page for when he/she's KO'd

The 1st page is just the appearance page
The 2nd page is the enemy ID variable page to tell what level he is
The 3rd page is if he gets HIT. You put down the 003 Hit Variable and the number of the enemy attack on the map so he/she shows themselves getting hit instead of rampaging through attacks. This is a parallel Process that needs a switch

Make sure on all pages he/she is set to THROUGH

Now You create your enemies and how many you want. You make them just the same how you make Enemies on XAS. Except you can put extra pages that have 003 HIT Variables that show your allies attack. So they can target your allies instead of you when they get hit by an ally. This must be a parallel process that activates a switch.

Your first Event up at the top left corner should be your Event that activates in an Autorun when all enemies are dead.. Using giant conditional branches. Then you can make what your allies do. Like. One of my characters jumps up and down and the other just sits there. And my player waves his arms. Then you put victory music. And transfer back to the map at those variables I said before and the MAP ID variable. Of course with a self switch so your game doesn't freeze.

Now your Second upper left hand corner event should be a parallel process telling what your First Ally does. You make a bunch of conditional branches asking whether if his death switches are activated. So you don't have a dead ally attacking.

And then below that you make a Conditional branch for each enemy Asking if they are dead. If they are dead. Then use "ELSE" to ask if there are any others dead. You make a variable that gives the current enemies position. And Variables that give your allies position

Thus Fayt's X should = your Allies Event ID map X and Fayt's Y should = Your Allies Event ID Map y

So if your first enemy's event ID is 004. You make the First variable Blue Guy's X = event 004's map x and Blue Guy's Y = event 004 map y.

When that enemy is dead. You change the two variables to be equal too the new enemy target.

Now if Blue Guy's X is greater than Fayt's X. You should have your ally move right. If it's not. He should move left.
If Blue Guy's Y is greater than Fayt's Y. You should have your ally move Down, If it's not. He should move up.

If they are Equal at X and Y. Then you should have your Ally attack. Using rand_shoot (x,x,x,x,x) Put all attacks you want them to use in there.

Then you can also put at the bottom a conditional branch that asks if your enemy gets attacked by an Ally. You then put that allies switch in there if it's on. Then use the same method as above. Except change it aroudn so that it asks if Fayt's X is greater than Blue Guy's X and so forth and move accordingly. When they are equal at X and Y. You make an attack that damages using ENEMY ALLY attack. A duplicate attack that damages your allies. You then turn the switch off.

Then you do the same thing for every enemy on that same page for when each one is defeated.

You then make a second page on that same event that askes if your ally gets attacked. With a switch that says hit. Then you make a Custom Movement that Turns off the switch after 35 frames or so.

You make the same thing for each ally.

Then you make a death event. That records the defeat switch for your allies if they get killed. THen you KO your ally under your menu with an autorun and a self switch.

All of this is really complicated at first. But once you get the hang of it. You can pretty much do anything you like. You can even put in conditional branches to ask what weapon your ally is wearing and change his attacks accordingly.

==============================================
Currently:
I am working on making my demo larger and making it even better than before. I will also see if it works on 3.4. It's going to take a little time but I'm working as fast as I can. I can only assume I'll be close to another demo in about two weeks.
 
Two questions involving this screenshot.

DOAD3.png

1) See the stray numbers and words like Stock, MP, LV, EXP etc? Is it possible to get rid of these?

There are no levels, items, or money and the player is only going to have one spell. I don't want the spell cost and stuff to be visible. I managed to cut most of the stuff away by erasing the HUD graphics but this is all that's left.

2) Is it possible to extend the dimensions of the hero's face in the HUD? It's clearly cut off at the top.

Otherwise, that's it. I just need to figure out how to change the default charged skill on 3.4's Light Sword and then I'll be set.
 

Star

Sponsor

I am not a scripter. Never wish to be. The first one I have no clue on how to accomplish it. The second one you might be able to achieve if you play around with the numbers under XAS Hud. I would sit and try to toggle with it to figure it out but it's damn late and I'm tired.

However. I do know how to change default charged skills and that's here

ChargeID.png

Goodluck
 
@Skie Fortress

> Under MOG - XAS HUD

Lines 96 - 98

self.contents.draw_text(x + 55, y + 1, 84, 32, "Exp",0)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 54, y, 84, 32, "Exp",0)

Delete "Exp" in both.

Lines 121 - 123

self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = Color.new(50,255,250,255)
self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv")

Delete "Lv" in both.

> Under XAS - SYSTEM

Line 5172

self.contents.draw_hemming_text(x - 3, y + 40, 60, 32, "Stock", 1)

Delete "Stock".

You need to go into the Database and to System, and delete "MP" under SP.

That'll get rid of all the words.
 
Thanks, I managed to change the charged skill and get rid of the words. Is it possible to get rid of the numbers floating around now?

DOAD5.png

Also, since there's only one spell, I want to set it manually since there's no menu. I saw a method a couple pages back for it.

Ok I got it

$game_system.xas_skill_id = ID
$game_system.xas_skill_index = 1
$game_temp.skill_refresh = true

This manually sets a skill

This doesn't work. I keep getting this error:
DOAD6.png


My code which was used in a script event command:
Code:
$game_system.xas_skill_id = 28

$game_system.xas_skill_index = 1

$game_temp.skill_refresh = true

Sorry for being a nuisance. I'll be out of the way soon enough. -_-
 

Star

Sponsor

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================

class Scene_Menu
# --------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
@changer = 0
@where = 0
@checker = 0
end
# --------------------------------
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "Leader"
s8 = "End game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s8])
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_party.actors. size == 1
@command_window.disable_item(5)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 300
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@gold_window.dispose
@status_window.dispose
end
# --------------------------------
def update
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
# --------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
if $game_party.actors.size == 1 and @command_window.index ==5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5
$game_system.se_play($data_system.decision_se)
@checker = 0
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 8
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
return
end
end
# --------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if @status_window.index < $game_party.actors.size
check_actor = $game_party.actors[@status_window.index]
else
size = $game_party.actors.size
check_actor = $game_party.reserve_actors[@status_window.index - size]
end
if check_actor.restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
when 5
$game_system.se_play($data_system.decision_se)
if @checker == 0
@changer = $game_party.actors[@status_window.index]
@where = @status_window.index
@checker = 1
else
$game_system.xas_skill_id = 27
$game_temp.skill_refresh = true
$game_party.actors[@where] = $game_party.actors[@status_window.index]
$game_party.actors[@status_window.index] = @changer
@checker = 0
@status_window.refresh
$game_player.refresh
end
end
return
end
end
end
I put mine here at the bottom of Scene Menu. It will make that skill appear when you open and close the menu. I don't think you need the index part, I also don't know if you could put it anywhere else to make it appear automatically.

As for the floating numbers..

You're lucky. I figured it out

Go to XAS System Script. Search for these lines

5982 draw_xas_skill(0,0)
5983 draw_xas_skill_icon(0, 0)
6167 draw_xas_item(0,0)
6168 draw_xas_item_icon(0, 0)
6458 draw_gold(0,0)

Erase them all

Then go to XAS HUD

160 draw_actor_levelmap(actor, 80, 10)

Erase that.

and you should be good
 
Hey, do you mind if I keep the tutorial in my game? I will be changing it a bit of course, I just will keep the maps and most of the events. :) Also, I was wondering, is this project pretty compatible? I would like to add in my own custom menu system, but I don't know if it would work?

~Thanks, Nick
 

Star

Sponsor

koolkats109":1325nn8g said:
Hey, do you mind if I keep the tutorial in my game? I will be changing it a bit of course, I just will keep the maps and most of the events. :) Also, I was wondering, is this project pretty compatible? I would like to add in my own custom menu system, but I don't know if it would work?

~Thanks, Nick
Who's Tutorial are you talking about? The XAS Tutorial? The actual creator of the XAS system doesn't even speak english and he/she isn't in this thread, I don't even know where to begin to help you with that.

As for custom menus, If you're using the MOG menu Script pack, It works beautifully with this system if you place it below on the Add On's Part
 
@Koolkats109

I don't really see a problem with you keeping the tutorial in your game since its well known enough to be recognised as Xiderowg's XAS System and you'll be crediting him anyway.

That's just my opinion though, I wouldn't want to step on anybody's toes.

I think that is a great way to get familiar with the system for anyone out there thinking of using it, just have a play around with the demo, change a few things, create your own monsters, treasure, chests and see how it works out.
 
Ok thanks! :D I was wondering could anyone please help me to get my old menu system I customised for my old game to work on this one. Thanks! :D

#==============================================================================
#CMS V1.2 By The_Darklord
#Version History:
# V1.2 Changed window Steps with a location window
# V1.1 Removed the dependabiltiy on the "None" windowskin, and removed a lot of useless code
# V1 Added bug fixes and made it easy to use your own icons, also added a Save and Load confirmation
# V.9 Original Test
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
def initialize (menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
def main
#==============================================================================
#Put in your icons here!, Icons must be found in the icon folder!
$stepsicon = "020-Accessory05" #icon in the steps window
$goldicon = "GoldCMS" #icon in the gold window
$itemicon = "Items" #icon in the item choice
$skillicon = "044-Skill01" #icon in the skill choice
$equipicon = "Equip" #icon in the equip choice
$statusicon = "WolfClaws" #icon in the status choice
$questicon = "QuestLog" #icon in the save choice
$saveicon = "SaveGame" #icon in the load choice
$exiticon = "EndGame" #icon in the exit choice
$timeicon = "Hourglass" #icon in the exit choice
#make shure the names of the icons are in quotations!
#==============================================================================
s1 = " " + $data_system.words.item
s2 = " " + $data_system.words.skill
s3 = " " + $data_system.words.equip
s4 = " " + "Status"
s5 = " " + "Quest Log"
s6 = " " + "Save"
s7 = " " + "Exit"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.x = 0
@command_window.y = 0
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(5)
end
@playtime_window = Window_PlayTime1.new
@playtime_window.x = 0
@playtime_window.y = 320
@steps_window = Window_Steps1.new
@steps_window.x = 0
@steps_window.y = 255
@gold_window = Window_Gold1.new
@gold_window.x = 0
@gold_window.y = 416
@status_window = Window_MenuStatus1.new
@status_window.x = 160
@status_window.y = 0
@icon_item = Sprite.new
@icon_item.bitmap = RPG::Cache.icon($itemicon)
@icon_item.x = 18
@icon_item.y = 20
@icon_item.z = 255
@icon_skill = Sprite.new
@icon_skill.bitmap = RPG::Cache.icon($skillicon)
@icon_skill.x = 19
@icon_skill.y = 52
@icon_skill.z = 255
@icon_equip = Sprite.new
@icon_equip.bitmap = RPG::Cache.icon($equipicon)
@icon_equip.x = 18
@icon_equip.y = 84
@icon_equip.z = 255
@icon_status = Sprite.new
@icon_status.bitmap = RPG::Cache.icon($statusicon)
@icon_status.x = 18
@icon_status.y = 116
@icon_status.z = 255
@icon_save = Sprite.new
@icon_save.bitmap = RPG::Cache.icon($saveicon)
@icon_save.x = 18
@icon_save.y = 148
@icon_save.z = 255
@icon_load = Sprite.new
@icon_load.bitmap = RPG::Cache.icon($loadicon)
@icon_load.x = 18
@icon_load.y = 180
@icon_load.z = 255
@icon_exit = Sprite.new
@icon_exit.bitmap = RPG::Cache.icon($exiticon)
@icon_exit.x = 19
@icon_exit.y = 212
@icon_exit.z = 255
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@gold_window.dispose
@status_window.dispose
@steps_window.dispose
@icon_item.dispose
@icon_skill.dispose
@icon_equip.dispose
@icon_status.dispose
@icon_save.dispose
@icon_load.dispose
@icon_exit.dispose
end
#--------------------------------------------------------------------------
def update
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
@steps_window.update
@icon_item.update
@icon_skill.update
@icon_equip.update
@icon_status.update
@icon_save.update
@icon_load.update
@icon_exit.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
$scene = Scene_Status.new
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_Quests.new
when 5
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_MenuSave.new
when 6
$game_system.se_play($data_system.decision_se)
$scene = Scene_MenuEnd.new
end
return
end
end
#--------------------------------------------------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
#==============================================================================
#Menu Status Window
#==============================================================================

class Window_MenuStatus1 < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==============================================================================
# Play Time Window
#==============================================================================

class Window_PlayTime1< Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
#Gold Window
#==============================================================================

class Window_Gold1 < Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
def refresh
rect = Rect.new(x, y, self.width - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon($goldicon)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
end
#==============================================================================
#Scene Menu_Load
#==============================================================================

class Scene_MenuLoad < Scene_File
#--------------------------------------------------------------------------
def initialize
$game_temp = Game_Temp.new
$game_temp.last_file_index = 0
latest_time = Time.at(0)
for i in 0..3
filename = make_filename(i)
if FileTest.exist?(filename)
file = File.open(filename, "r")
if file.mtime > latest_time
latest_time = file.mtime
$game_temp.last_file_index = i
end
file.close
end
end
super("Load from which file?")
end
#--------------------------------------------------------------------------
def on_decision(filename)
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
file = File.open(filename, "rb")
read_save_data(file)
file.close
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
$game_map.update
$scene = Scene_Menu.new(5)
print "Game File Loaded!"
end
#--------------------------------------------------------------------------
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(5)
end
#--------------------------------------------------------------------------
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
if $game_system.magic_number != $data_system.magic_number
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
end
end
#==============================================================================
#Steps Window
#==============================================================================
$data_mapinfos = load_data('Data/MapInfos.rxdata')
class Window_Steps1 < Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 66) #96
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
def refresh
rect = Rect.new(x, y, self.width - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon($stepsicon)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
contents.clear
contents.font.color = normal_color
name = $data_mapinfos[$game_map.map_id].name
contents.draw_text(0, 0, 128, 32, name)
end
end
#==============================================================================
# Menu End
#==============================================================================

class Scene_MenuEnd
#--------------------------------------------------------------------------
def main
s1 = "Return to Title"
s2 = "Exit to Windows"
s3 = "Cancel"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
#--------------------------------------------------------------------------
def update
@command_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(6)
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 0
command_to_title
when 1
command_shutdown
when 2
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
def command_to_title
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
end
#--------------------------------------------------------------------------
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
#--------------------------------------------------------------------------
def command_cancel
$game_system.se_play($data_system.decision_se)
$scene = Scene_Menu.new(6)
end
end
#==============================================================================
#Menu Save
#==============================================================================

class Scene_MenuSave < Scene_File
#--------------------------------------------------------------------------
def initialize
super("Save to which file?")
end
#--------------------------------------------------------------------------
def on_decision(filename)
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
if $game_temp.save_calling
$game_temp.save_calling = false
$scene = Scene_Map.new
return
end
$scene = Scene_Menu.new(4)
print "Game Succesfully Saved!"
end
#--------------------------------------------------------------------------
def on_cancel
$game_system.se_play($data_system.cancel_se)
if $game_temp.save_calling
$game_temp.save_calling = false
$scene = Scene_Map.new
return
end
$scene = Scene_Menu.new(4)
end
#--------------------------------------------------------------------------
def write_save_data(file)
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors
characters.push([actor.character_name, actor.character_hue])
end
Marshal.dump(characters, file)
Marshal.dump(Graphics.frame_count, file)
$game_system.save_count += 1
$game_system.magic_number = $data_system.magic_number
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
end
end

I get the Error: Script 'Menu' line 88: Type Error Occured.
cannot convert nill into string.
 

Star

Sponsor

koolkats109":l0vhz6l5 said:
Ok thanks! :D I was wondering could anyone please help me to get my old menu system I customised for my old game to work on this one. Thanks! :D

I get the Error: Script 'Menu' line 88: Type Error Occured.
cannot convert nill into string.

I just took out all the load stuff. Looks like you'll have to go back to the main menu if you want to load a game using this. Everything works now except for the quest thing. There must be some sort of trick to using that? Like a script that runs on the map telling you what quest you have. I dunno.

This really isn't the best Menu out there. I don't know why you want to keep it, but it's your game.

#==============================================================================
#CMS V1.2 By The_Darklord
#Version History:
# V1.2 Changed window Steps with a location window
# V1.1 Removed the dependabiltiy on the "None" windowskin, and removed a lot of useless code
# V1 Added bug fixes and made it easy to use your own icons, also added a Save and Load confirmation
# V.9 Original Test
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
def initialize (menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
def main
#==============================================================================
#Put in your icons here!, Icons must be found in the icon folder!
$stepsicon = "020-Accessory05" #icon in the steps window
$goldicon = "GoldCMS" #icon in the gold window
$itemicon = "Items" #icon in the item choice
$skillicon = "044-Skill01" #icon in the skill choice
$equipicon = "Equip" #icon in the equip choice
$statusicon = "WolfClaws" #icon in the status choice
$questicon = "QuestLog" #icon in the save choice
$saveicon = "SaveGame" #icon in the load choice
$exiticon = "EndGame" #icon in the exit choice
$timeicon = "Hourglass" #icon in the exit choice
#make shure the names of the icons are in quotations!
#==============================================================================
s1 = " " + $data_system.words.item
s2 = " " + $data_system.words.skill
s3 = " " + $data_system.words.equip
s4 = " " + "Status"
s5 = " " + "Quest Log"
s6 = " " + "Save"
s7 = " " + "Exit"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
@command_window.x = 0
@command_window.y = 0
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(5)
end
@playtime_window = Window_PlayTime1.new
@playtime_window.x = 0
@playtime_window.y = 320
@steps_window = Window_Steps1.new
@steps_window.x = 0
@steps_window.y = 255
@gold_window = Window_Gold1.new
@gold_window.x = 0
@gold_window.y = 416
@status_window = Window_MenuStatus1.new
@status_window.x = 160
@status_window.y = 0
@icon_item = Sprite.new
@icon_item.bitmap = RPG::Cache.icon($itemicon)
@icon_item.x = 18
@icon_item.y = 20
@icon_item.z = 255
@icon_skill = Sprite.new
@icon_skill.bitmap = RPG::Cache.icon($skillicon)
@icon_skill.x = 19
@icon_skill.y = 52
@icon_skill.z = 255
@icon_equip = Sprite.new
@icon_equip.bitmap = RPG::Cache.icon($equipicon)
@icon_equip.x = 18
@icon_equip.y = 84
@icon_equip.z = 255
@icon_status = Sprite.new
@icon_status.bitmap = RPG::Cache.icon($statusicon)
@icon_status.x = 18
@icon_status.y = 116
@icon_status.z = 255
@icon_save = Sprite.new
@icon_save.bitmap = RPG::Cache.icon($saveicon)
@icon_save.x = 18
@icon_save.y = 148
@icon_save.z = 255
@icon_exit = Sprite.new
@icon_exit.bitmap = RPG::Cache.icon($exiticon)
@icon_exit.x = 19
@icon_exit.y = 212
@icon_exit.z = 255
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@gold_window.dispose
@status_window.dispose
@steps_window.dispose
@icon_item.dispose
@icon_skill.dispose
@icon_equip.dispose
@icon_status.dispose
@icon_save.dispose
@icon_exit.dispose
end
#--------------------------------------------------------------------------
def update
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
@steps_window.update
@icon_item.update
@icon_skill.update
@icon_equip.update
@icon_status.update
@icon_save.update
@icon_exit.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 5
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
$scene = Scene_Status.new
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_Quests.new
when 5
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_MenuSave.new
when 6
$game_system.se_play($data_system.decision_se)
$scene = Scene_MenuEnd.new
end
return
end
end
#--------------------------------------------------------------------------
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
#==============================================================================
#Menu Status Window
#==============================================================================

class Window_MenuStatus1 < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 116
actor = $game_party.actors
draw_actor_graphic(actor, x - 40, y + 80)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==============================================================================
# Play Time Window
#==============================================================================

class Window_PlayTime1< Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
#Gold Window
#==============================================================================

class Window_Gold1 < Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
def refresh
rect = Rect.new(x, y, self.width - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon($goldicon)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
end
#==============================================================================
#Scene Menu_Load
#==============================================================================

class Scene_MenuLoad < Scene_File
#--------------------------------------------------------------------------
def initialize
$game_temp = Game_Temp.new
$game_temp.last_file_index = 0
latest_time = Time.at(0)
for i in 0..3
filename = make_filename(i)
if FileTest.exist?(filename)
file = File.open(filename, "r")
if file.mtime > latest_time
latest_time = file.mtime
$game_temp.last_file_index = i
end
file.close
end
end
super("Load from which file?")
end
#--------------------------------------------------------------------------
def on_decision(filename)
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
file = File.open(filename, "rb")
read_save_data(file)
file.close
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
$game_map.update
$scene = Scene_Menu.new(5)
print "Game File Loaded!"
end
#--------------------------------------------------------------------------
def on_cancel
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(5)
end
#--------------------------------------------------------------------------
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
if $game_system.magic_number != $data_system.magic_number
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
end
end
#==============================================================================
#Steps Window
#==============================================================================
$data_mapinfos = load_data('Data/MapInfos.rxdata')
class Window_Steps1 < Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 66) #96
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
def refresh
rect = Rect.new(x, y, self.width - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon($stepsicon)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
contents.clear
contents.font.color = normal_color
name = $data_mapinfos[$game_map.map_id].name
contents.draw_text(0, 0, 128, 32, name)
end
end
#==============================================================================
# Menu End
#==============================================================================

class Scene_MenuEnd
#--------------------------------------------------------------------------
def main
s1 = "Return to Title"
s2 = "Exit to Windows"
s3 = "Cancel"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
#--------------------------------------------------------------------------
def update
@command_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(6)
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 0
command_to_title
when 1
command_shutdown
when 2
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
def command_to_title
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
end
#--------------------------------------------------------------------------
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
#--------------------------------------------------------------------------
def command_cancel
$game_system.se_play($data_system.decision_se)
$scene = Scene_Menu.new(6)
end
end
#==============================================================================
#Menu Save
#==============================================================================

class Scene_MenuSave < Scene_File
#--------------------------------------------------------------------------
def initialize
super("Save to which file?")
end
#--------------------------------------------------------------------------
def on_decision(filename)
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
if $game_temp.save_calling
$game_temp.save_calling = false
$scene = Scene_Map.new
return
end
$scene = Scene_Menu.new(4)
print "Game Succesfully Saved!"
end
#--------------------------------------------------------------------------
def on_cancel
$game_system.se_play($data_system.cancel_se)
if $game_temp.save_calling
$game_temp.save_calling = false
$scene = Scene_Map.new
return
end
$scene = Scene_Menu.new(4)
end
#--------------------------------------------------------------------------
def write_save_data(file)
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors
characters.push([actor.character_name, actor.character_hue])
end
Marshal.dump(characters, file)
Marshal.dump(Graphics.frame_count, file)
$game_system.save_count += 1
$game_system.magic_number = $data_system.magic_number
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
end
end
 
Hm, it loaded. but still didn't work properly. I guess I'll just have to find a better CMS. Could you lik me to this better one please? :D I'd appreciate it :).
 

Star

Sponsor

koolkats109":3h02ilam said:
Hm, it loaded. but still didn't work properly. I guess I'll just have to find a better CMS. Could you lik me to this better one please? :D I'd appreciate it :).
No problem :lol:

viewtopic.php?f=11&t=18933

Although, I can't remember if there was any tweaking necessary to make these work. But I do know that it must be places below XAS for it to work properly
 
Thanks, but I don't think that's the style of menu I am looking for. :blank: I was hoping you were talking about a nice 1 Person CMS. :blush: Oh well, I guess I shall just go search for one. I'll be sure to come back here if I need more help :D! Thanks Again.
 
Does anyone know if you can have collision animations with a certain animation or attack? If I fire a bullet and if it hits an "X" tile or an NPC/AI/ALLY it'd change animations into a collision animation.

Any tips could help^^

Edit: Oh, since fireing bullets is one thing but what about shooting an infinate amount of them or depending on SP/MP.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top