The Fantasist in me has re-awakened!

Started by Fantasist, April 11, 2008, 11:27:35 am

Previous topic - Next topic

Fantasist

April 11, 2008, 11:27:35 am Last Edit: April 11, 2008, 11:39:29 am by Fantasist
Yes indeed! If anyone has seen the episode in DBZ where Piccolo fuses with Nail, I feel the same way as he feels then. It's been 3 years since I've experienced this... state of mind! And it's not just a whim, I've been like this for a week, and it's getting stronger! My imagination is flying in all directions very efficiently again! This is when I'll nurture the Fantasist, and well, I'm closer to starting my game sooner than I expected, for once the story is ready, nothing can stop me from going full speed ahead in June (my holidays). Now, I have my final exams in May, and I'm really pre-occupied, studies being the least of the bulk.

The gist, I'll not be much active here, I'll just pop in and out, and lurk maybe, but not active. If anyone needs my help or need to contact me, PM me, checking PMs is quicker than searching topics.
Adios friends, I'll be back in a month, the Fantasist has taken over my mind and he'd rather stay alone than hang out here!

EDIT: DO NOT e-mail me, I barely check my mails. PMing me is the best way to contact me.

And while I'm at it, are there any games which can inspire some imagination? I need games which are not too 'dark-themed', but with an air of mystery and depth. And definitely not horror XD
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Vell


Fallen Angel X

Well congratz on your inner fantasist coming out

As long as pop in every now and then that's good :D

Fantasist

@FAX: Like this? pop

@Ulta: Go ahead then, suggest some :D

PS: And yeah, I've requested Bliz to de-mod me o.o
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Sally

awwww dont leave me!

and congrats on finding ur inner fantasist!

Fantasist

Yeah, I really feel ethereal right now! And here's an other *pop* for those who care (don't forget the credits mind you ;p):

#==============================================================================
# Auto Battle Addon for DBS
# by Fantasist
# Version: Alpha 2 (0.2 or something)
#
# Rough sketch of features:
#  - Automatic battle actions (think CP!)
#  - Wierd-looking selection window for action choosing (attack, defend, repeat)
#  - Config addon for default status screen (think CP again!)
#  - Memorize option in the status config saves the last action with the savefile, and is
#    globally remembered
#
# Useless facts (alpha version exclusive!):
#  - This is not really 100% optimized, only about 80% is what I think.
#  - The code for the 'wierd selection window' is more than the actual code for the auto battle
#    mechanism.
#  - I made this script in a state of mind where my efficiency is less than 50%. I deprived myself
#    of sleep for about 18 hours and still ploughed on, just because looking at the code game me
#    interesting ideas for stories.
#  - Finally, this is my 5th significant script I did myself, and am proud of (compared to
#  - mighty Blizzard's many!)
#==============================================================================

#==============================================================================
# ** Game_Battler
#==============================================================================

class Game_Battler
 
  attr_accessor :prior_action
  attr_accessor :default_action
  attr_accessor :memorize_action
 
  alias fant_auto_battle_game_battler_init initialize
  def initialize
    fant_auto_battle_game_battler_init
    @prior_action = Game_BattleAction.new
    @default_action = Game_BattleAction.new
    @default_action.kind, @default_action.basic = 0, 1
    @memorize_action = false
  end
 
  def current_action=(action)
    if action.is_a?(Game_BattleAction)
      @current_action = action
    end
  end
 
end

#==============================================================================
# ** Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias fant_auto_battle_scene_battle_main main
  def main
    $game_party.actors.each {|actor| actor.prior_action = actor.default_action.clone}
    fant_auto_battle_scene_battle_main
  end
 
  alias fant_auto_battle_scene_battle_start_phase1 start_phase1
  def start_phase1
    fant_auto_battle_scene_battle_start_phase1
  end
 
  alias fant_auto_battle_scene_battle_upd_phase2 update_phase2
  def update_phase2
    if  Input.trigger?(Input::C) && @party_command_window.index == 2 # auto battle
      case @party_command_window.scroll_window.index
      when 0
        $game_party.actors.each {|actor| actor.current_action = actor.prior_action.clone}
      when 1
        $game_party.actors.each {|actor| actor.current_action.kind = actor.current_action.basic = 0}
      when 2
        $game_party.actors.each {|actor| actor.current_action.kind, actor.current_action.basic = 0, 1}
      end
      start_phase4
    end
    fant_auto_battle_scene_battle_upd_phase2
  end
 
  alias fant_auto_battle_scene_battle_start_phase4 start_phase4
  def start_phase4
    fant_auto_battle_scene_battle_start_phase4
    $game_party.actors.each {|actor|
      actor.prior_action = actor.current_action.clone
      actor.default_action = actor.current_action.clone if actor.memorize_action}
  end
 
end

#==============================================================================
# ** Window_PartyCommand
#==============================================================================

class Window_PartyCommand < Window_Selectable
 
  attr_reader :scroll_window
 
  def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 160
    @commands = ['Fight', 'Escape', 'Auto']
    @item_max = 3
    @column_max = 3
    draw_item(0, normal_color)
    draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
    draw_item(2, normal_color)
    self.active = self.visible = false
    self.index = 0
   
    @scroll_window = Window_AutoBattle.new(110, ['Repeat', 'Attack', 'Defend'])
    @scroll_window.visible, @scroll_window.active = false, false
    @scroll_window.x, @scroll_window.y = 467, self.y
    @scroll_window.index, @scroll_window.opacity = 0, 160
  end
 
  def y=(val)
    super(val)
    @scroll_window.y = y - @scroll_window.index * 32 if @scroll_window
  end
 
  def update
    super
    if Input.repeat?(Input::RIGHT) || Input.repeat?(Input::LEFT)
      @scroll_window.active = @scroll_window.visible = (@index == 2 && self.active)
      draw_item(2, @index == 2 ? Color.new(0, 0, 0, 0) : normal_color)
    end
    @scroll_window.update if @scroll_window && @scroll_window.active
  end
 
  def visible=(val)
    super(val)
    @scroll_window.visible = false if !val && @scroll_window
    @scroll_window.visible = true if val && @scroll_window && @index == 2
  end
 
  def active=(val)
    super(val)
    @scroll_window.active = false if !val && @scroll_window
    @scroll_window.active = true if val && @scroll_window && @index == 2
  end
 
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(index * 608 / @column_max, 0, 608 / @column_max, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    unless @index == 2 && @scroll_window.visible
      self.contents.draw_text(rect, @commands[index], 1)
    end
  end
 
  def update_cursor_rect
    self.cursor_rect.set(index * 608 / @column_max, 0, 608 / @column_max, 32)
  end
 
  def dispose
    super
    @scroll_window.dispose if @scroll_window
  end
 
end

#==============================================================================
# ** Window_AutoBattle
#==============================================================================

class Window_AutoBattle < Window_Command
 
  attr_reader :commands
 
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index], 1)
  end
 
  def update
    if self.active && @item_max > 0 && @index >= 0
      if Input.repeat?(Input::DOWN)
        return if @index == @item_max - 1
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + 1) % @item_max
        self.y -= 32
      end
      if Input.repeat?(Input::UP)
        return if @index == 0
        $game_system.se_play($data_system.cursor_se)
        @index = (@index - 1 + @item_max) % @item_max
        self.y += 32
      end
    end
    update_help if self.active && @help_window != nil
  end
 
  def update_cursor_rect
  end
 
end

#==============================================================================
# ** Window_Status
#==============================================================================

class Window_Status < Window_Selectable
 
  X, Y, W = 320, 128, 184
 
  def initialize(actor)
    super(0, 0, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
    @cmds = ['Attack', 'Defend', 'Memorize']
    if @actor.default_action.kind == 0 && @actor.default_action.basic == 0
      self.index = 0
    elsif @actor.default_action.kind == 0 && @actor.default_action.basic == 1
      self.index = 1
    end
    self.index = 2 if @actor.memorize_action
    self.contents.draw_text(X, Y, W, 32, 'Default Battle Action: ')
    self.contents.draw_text(X+W, Y, 96, 32, @cmds[@index], 1)
  end
 
  def update_cursor_rect
    self.cursor_rect.set(X+W, Y, 96, 32)
  end
 
  def update
    super
    update_cursor_rect
    return if @index < 0
    if Input.repeat?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index + 1) % @cmds.size
      self.contents.fill_rect(X+W, Y, 96, 32, Color.new(0, 0, 0, 0))
      self.contents.draw_text(X+W, Y, 96, 32, @cmds[@index], 1)
      case @index
      when 0
        @actor.default_action.kind = @actor.default_action.basic = 0
      when 1
        @actor.default_action.kind, @actor.default_action.basic = 0, 1
      when 2
        @actor.memorize_action = true
      end
    end
    if Input.repeat?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @index = (@index - 1) % @cmds.size
      self.contents.fill_rect(X+W, Y, 96, 32, Color.new(0, 0, 0, 0))
      self.contents.draw_text(X+W, Y, 96, 32, @cmds[@index], 1)
      case @index
      when 0
        @actor.default_action.kind = @actor.default_action.basic = 0
      when 1
        @actor.default_action.kind, @actor.default_action.basic = 0, 1
      when 2
        @actor.memorize_action = true
      end
    end
    if self.active and @help_window != nil
      update_help
    end
  end
 
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 1)
    draw_actor_parameter(@actor, 96, 256, 2)
    draw_actor_parameter(@actor, 96, 304, 3)
    draw_actor_parameter(@actor, 96, 336, 4)
    draw_actor_parameter(@actor, 96, 368, 5)
    draw_actor_parameter(@actor, 96, 400, 6)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 48, 80, 32, "EXP")
    self.contents.draw_text(320, 80, 80, 32, "NEXT")
    self.contents.font.color = normal_color
    self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
    self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  end
  def dummy
    self.contents.font.color = system_color
    self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
    self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
    self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
    self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
    self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
  end
 
end

#==============================================================================
# ** Scene_Status
#==============================================================================

class Scene_Status
 
  alias fant_auto_battle_scene_status_upd update
  def update
    @status_window.update
    fant_auto_battle_scene_status_upd
  end
 
end
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Nortos

gj on that Sandgolem has an autobattle script too i optimized it for my game though

ur code looks a lot smaller than his though so yeah nice job on that

Juan

Congrats Fantasist on finding your inner Fantasist. Hopefully you will drop back here every now and then. Nice job on the script as well.
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Fantasist

Thanks Nortos and Juan :) But as I said:
Quote# Useless facts (alpha version exclusive!):
#  - This is not really 100% optimized, only about 80% is what I think.
#  - The code for the 'wierd selection window' is more than the actual code for the auto battle
#    mechanism.


This script means more than just an auto-battle script to me. By the time I completed that script, I had a better understanding of the DBS than before. This will be the last script i'll do for a while though ^_^'
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Sally

i dont understand what the script dose, and whats DBS?

Vell

Fantasist, if you wish for help on a story line or something, you can go put a request in at the Service.

Fantasist

@Susys:
QuoteAuto Battle Addon for DBS

DBS - Default Battle System

Though, it's not really auto-battle, it just repeats the previous actions, like the 'Repeat' option in Chaos Project Battle System.

@Ulta: I've not forgotten about the service, I've been thinking of Mount Mirage just the other day. I'll ask when I need help :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews