Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - KK20

2921
Sea of Code / Re: Help me out in C :)
November 20, 2012, 04:47:16 pm
QuoteI need to write a c program that takes an input from a file (input.dat) calculates sum and average of rows and columns and displays it on screen and in an output file (result.out).

Well that's misleading ._.
2922
Sea of Code / Re: Help me out in C :)
November 20, 2012, 04:33:21 pm
input needs to be loaded from a file.
2923
Sea of Code / Re: Help me out in C :)
November 20, 2012, 04:22:39 pm
Hell, RPG Maker 2003 taught me more programming than my intro course.
2924
Sea of Code / Re: Help me out in C :)
November 20, 2012, 04:17:05 pm
KK20.
Digging up more information since 1996.

I knew it. Dynamic memory wasn't needed.
2925
Sea of Code / Re: Help me out in C :)
November 20, 2012, 04:11:39 pm
So wouldn't that be something along the lines of
float data_table[9][3];


edit  :ninja:
2926
Sea of Code / Re: Help me out in C :)
November 20, 2012, 04:02:38 pm
I don't know C syntax, but I do know in C++ you don't even need to know what a pointer is to work with arrays.
2927
Sea of Code / Re: Help me out in C :)
November 20, 2012, 03:57:01 pm
Does the assignment assume a certain number of rows and columns? Or can they be any size?

And if they just went over arrays, I'm guessing they don't know pointers.
2928
General Discussion / Re: Screenshot Thread
November 20, 2012, 01:41:49 pm
Fog of War. Still needs to be tweaked a bit, but I like how it turned out.
Spoiler: ShowHide
2929
Yes, I know about the script and I've read through it already. It's how you want the script to work with your blue mage system. You didn't thoroughly explain conditions or go into much detail as to how it all works. I get the gist that using a specific skill and killing an enemy allows you to learn a skill or gain a stat increase. You're going to need to give me a full step-by-step example of how it all works.

Please do not fall for the "Lots of scripts = better game" mentality. It's also best to insert all the scripts you want to use together as to avoid incompatibility later on.
2930
Script Requests / Re: [RMXP] Subclass for the actors
November 19, 2012, 03:21:05 pm
How's this? Replace the Easy LvlUp script with this.
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Easy LvlUp Notifier by Blizzard
# Version: 2.11b
# Type: Battle Report Display
# Date: 27.8.2006
# Date v1.2b: 3.11.2006
# Date v1.3b: 11.3.2007
# Date v1.4b: 22.8.2007
# Date v2.0: 25.9.2007
# Date v2.1: 4.12.2009
# Date v2.1b: 15.3.2010
# Date v2.11b: 19.3.2010
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   98% compatible with SDK v1.x. 80% compatible with SDK 2.x. WILL corrupt old
#   savegames. May cause slight problems with following systems and would need
#   therefore slight recalibration:
#   - exotic CBS-es
#   - exotic skill systems
#   - exotic stat systems (additional stats like Wisdom, Luck etc.)
#
#
# Features:
#
#   - shows increased stats and learned skills at level up
#   - animated
#   - shows EXP gain for each actor (!) only after gaining EXP after a battle
#   - more simple and less laggy than other Level Up Notifiers
#   - you can set up any sound to be played when a higher level is reached or a
#     new skill is learned (LVLUP_SE and LEARN_SE further below)
#
# new in v1.2b:
#   - better window movement
#   - higher compatibility
#   - fixed a few "eventual" bugs
#
# new in v1.3b:
#   - fully compatible with Tons of Add-ons
#
# new in v1.4b:
#   - improved coding
#   - rewritten conditions using classic syntax to avoid RGSS conditioning bug
#
# new in v2.0:
#   - completely overworked and improved
#   - now MUCH more simple than other Level Up Notifiers
#   - halved the number of lines of code
#   - much more compatible: can show increase of any stats after the battle in
#     combination with any script, just put this script below those attribute
#     modifying scripts
#
# new in v2.1:
#   - improved coding
#   - increased compatibility with CBS-es
#
# new in v2.1b:
#   - fixed "stack level too deep" problem
#
# new in v2.11b:
#   - fixed crash during escape
#
#
# Instructions:
#
# - Explanation:
#
#   This script will notify you when any character is leveled up after a
#   battle. It will show any stats that were increased and any skills that were
#   learned. The windows are animated, the code is less complex than any other
#   so far and it is most efficient as well as highly optimized and detailed
#   worked out.
#
# - Configuration:
#   
#   There are a few options you can set up below.
#   
#   LVLUP_SE            - sound effect played when a new level was reached
#   LEARN_SE            - sound effect played when a new skill was learned,
#                         keep in mind that the script takes into account that
#                         skills can only be learned after a level up
#   WINDOW_BACK_OPACITY - set this value to the window's back opacity (0-255)
#   NO_EXP_DISPLAY      - set this value to true if you want to disable the EXP
#                         gaining display in the level up windows
#   OLD_EXP_DISPLAY     - set this value to true if you want to display the EXP
#                         in the normal result window again
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#          RPG::AudioFile.new('FILENAME', VOLUME, PITCH)
LVLUP_SE = RPG::AudioFile.new('087-Action02', 80, 100)
LEARN_SE = RPG::AudioFile.new('106-Heal02', 80, 100)
WINDOW_BACK_OPACITY = 160
NO_EXP_DISPLAY = false
OLD_EXP_DISPLAY = false

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

$easy_lvlup_notifier = 2.11

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
 
  def all_exp
    return @exp
  end
 
  def all_exp=(exp)
    @exp = exp
  end

end

#==============================================================================
# Window_BattleResult
#==============================================================================

class Window_BattleResult < Window_Base
 
  alias easy_lvlup_notfier_refresh refresh
  def refresh
    if $tons_version != nil && $tons_version >= 4.02 &&
        $game_system.WINDOW_BATTLERESULT || OLD_EXP_DISPLAY
      easy_lvlup_notfier_refresh
    else
      self.contents.clear
      x = 4
      self.contents.font.color = system_color
      cx = contents.text_size('Gained').width
      self.contents.draw_text(x, 0, cx+4, 32, 'Gained')
      x += cx + 4
      self.contents.font.color = normal_color
      cx = contents.text_size(@gold.to_s).width
      self.contents.draw_text(x, 0, cx+4, 32, @gold.to_s)
      x += cx + 4
      self.contents.font.color = system_color
      self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
      (0...@treasures.size).each {|i| draw_item_name(@treasures[i], 4, (i+1)*32)}
    end
  end
 
end

#==============================================================================
# Window_LevelUp
#==============================================================================

class Window_LevelUp < Window_Base
 
  attr_reader :limit
 
  def initialize(a, d)
    if $tons_version != nil && $tons_version >= 4.98 &&
        $game_system.CENTER_BATTLER
      x = case $game_party.actors.size
      when 1 then 240
      when 2 then a.index * 320 + 80
      when 3 then a.index * 160 + 80
      when 4 then a.index * 160
      end
    else
      x = a.index * 160
    end
    text = []
    text.push(['Level:', d[0], a.level]) if d[0] != a.level
    text.push([$data_system.words.hp[0, 3], d[1], a.maxhp]) if d[1] != a.maxhp
    text.push([$data_system.words.sp[0, 3], d[2], a.maxsp]) if d[2] != a.maxsp
    text.push([$data_system.words.str[0, 3], d[3], a.str]) if d[3] != a.str
    text.push([$data_system.words.dex[0, 3], d[4], a.dex]) if d[4] != a.dex
    text.push([$data_system.words.agi[0, 3], d[5], a.agi]) if d[5] != a.agi
    text.push([$data_system.words.int[0, 3], d[6], a.int]) if d[6] != a.int
    h = text.size * 24 + (NO_EXP_DISPLAY ? 32 : 56)
    @limit, y = 320 - h, 480 - h + (h/64+1)*64
    super(x, y, 160, h)
    self.z, self.back_opacity = 100, WINDOW_BACK_OPACITY
    self.contents = Bitmap.new(self.width - 32, self.height - 32)
    if $fontface != nil
      self.contents.font.name = $fontface
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
    end
    self.contents.font.size, self.contents.font.bold = 20, true
    unless NO_EXP_DISPLAY
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 0, 128, 24, "#{a.exp - d[7]} EXP", 1)
    end
    text.each_index {|i|
        index = NO_EXP_DISPLAY ? i : i + 1
        self.contents.font.color = system_color
        self.contents.draw_text(0, index*24, 128, 24, text[i][0])
        self.contents.draw_text(80, index*24, 32, 24, 'ยป')
        self.contents.font.color = normal_color
        self.contents.draw_text(0, index*24, 76, 24, text[i][1].to_s, 2)
        if text[i][1] > text[i][2]
          self.contents.font.color = Color.new(255, 64, 0)
        else
          self.contents.font.color = Color.new(0, 255, 64)
        end
        self.contents.draw_text(0, index*24, 128, 24, text[i][2].to_s, 2)}
  end
 
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias main_lvlup_later main
  def main
    @lvlup_data = {}
    @moving_windows, @pending_windows = [], []
    (1...$data_actors.size).each {|i|
        actor = $game_actors[i]
        @lvlup_data[actor] = [actor.level, actor.maxhp, actor.maxsp, actor.str,
            actor.dex, actor.agi, actor.int, actor.exp, actor.skills.clone, actor.side_class.level]}
    main_lvlup_later
    (@moving_windows + @pending_windows).each {|win| win.dispose if win != nil}
  end
 
  alias start_phase5_lvlup_later start_phase5
  def start_phase5
    start_phase5_lvlup_later
    @skill_texts = []
    $game_party.actors.each {|actor|
        actor.remove_states_battle
        if @lvlup_data[actor][9] != actor.side_class.level
          @skill_texts.push("#{actor.name} raised #{$data_classes[actor.side_class.id].name} to Level #{actor.side_class.level}")
          new_skills = actor.skills - @lvlup_data[actor][8]
          if new_skills.size > 0
            new_skills.each {|id|
                @skill_texts.push("#{actor.name} learned #{$data_skills[id].name}!")}
          end
        end
        if @lvlup_data[actor][0, 7] != [actor.level, actor.maxhp, actor.maxsp,
            actor.str, actor.dex, actor.agi, actor.int]
          @pending_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
          @skill_texts.push('')
          new_skills = actor.skills - @lvlup_data[actor][8]
          if new_skills.size > 0
            new_skills.each {|id|
                @skill_texts.push("#{actor.name} learned #{$data_skills[id].name}!")}
          end
        elsif @lvlup_data[actor][7] != actor.exp && !NO_EXP_DISPLAY
          @moving_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
        end}
  end
 
  alias update_phase5_lvlup_later update_phase5
  def update_phase5
    update_phase5_lvlup_later
    if @phase5_wait_count <= 0 && !Input.trigger?(Input::C)
      @moving_windows.each {|win|
          win.y -= [((win.y - win.limit) / 2.0).ceil, 64].min if win.y > win.limit}
    end
  end
 
  alias battle_end_lvlup_later battle_end
  def battle_end(result)
    if @result_window == nil
      battle_end_lvlup_later(result)
      return
    end
    @result_window.visible = false
    if @skill_texts.size > 0
      text = @skill_texts.shift
      if text == ''
        $game_system.se_play(LVLUP_SE)
        @moving_windows.push(@pending_windows.shift)
        @help_window.visible = false
      else
        $game_system.se_play(LEARN_SE)
        @help_window.set_text(text, 1)
      end
    else
      battle_end_lvlup_later(result)
    end
  end
 
end
2931
Script Troubleshooting / Re: blizz-abs damage terrain
November 19, 2012, 02:18:28 pm
Good luck. Working with two, powerful scripts in two different projects is a challenge, especially on your own.
2932
QuoteAbsorb = {81 => 10, 82 => 25, 83 => 40, 84 => 60, 85 => 100}

That's how you're supposed to configure it, not by creating extra variables 'absorb_ten', etc. That's the only thing you touch in the script. Leave all the other things below it alone.

As for absorbing SP, that would be in Osmosis and Damage MP, configured much the same way.

No one can help you with your blue mage script if we don't even know how your skill leveling works.
2933
Script Troubleshooting / Re: blizz-abs damage terrain
November 19, 2012, 01:52:13 pm
First you ask for TBS, now you want to work with BABS?  :O.o:

Best way to do this would be Common Event, check actors' x/y coordinate, and check if over a specific terrain tag. If so, apply damage. Add a Wait in there to put some delay in between the damage.
2934
Script Troubleshooting / Re: tactical battle system help
November 19, 2012, 01:48:57 pm
GubiD is infamous for his TBS. Granted it's a little tricky to set up, but it's pretty awesome in design.

And nonsense, you can configure your actors/weapons/other things with any system--just need to know how to modify the configurations.
2935
Unique Blue Mage System: Erm...still not 100% sure as to how it should be done. For one, you didn't really explain "eating" skills.

Crafting: http://forum.chaos-project.com/index.php/topic,6171.0.html

Elementals: So...another battle command? These elementals don't have stats, do they?
2936
ARC Welder / Re: ATTN: F0
November 18, 2012, 08:51:10 pm
^
Spoiler: ShowHide
2937
It's nice to see a bunch of new members coming along. Enjoy your stay here~

And from the looks of it, I'm probably going to be the one doing some of those script requests of yours. You should make a new topic in the Projects board. This place is more of a "Hi my name is ___ and I am working on ___. blah blah personal information blah".  :roll:
2938
Thanks for the input.  :) I briefly talked about this with him again, but the UCLA/USC game along with a party is taking him away from me. Tomorrow we'll go into greater detail.

The reason he wants this is because of the company's transition to working with Windows rather than Macs. The program used to create these prints were from the Mac, and we have no way of getting the prints on Windows. Not to mention it would make organization easier/finding the exact print faster. This program he wants is entirely for his own personal/company's use, not for customers.

He explained what he meant by drawing on the prints. If you look at the image I provided, the gray shape near "Beveling Details" can sometimes change, but I figure you can save the various shapes and call upon the one you want. Overall, if I just have the templates of each type of pipe, I can create any size and any schedule of that type (because having a file for every type of size, shape, and schedule is ridiculous when the only difference is usually the numbers).

We both never heard of CAD software, so we're not sure if that's what we want yet. I'll be sure to explain in greater detail once we go over this again.
2939
My dad works at/runs a pipe-fitting company. It manufactures and ships its products to clients. But we don't care about that right now...this is the programming board after all.

Anyways, here's one example of one of the types of pipes he sells.
Spoiler: ShowHide
Note that this is only a shape. We can have pipes that fit nicely in the palm of your hand to straining your back to lift one up.

My dad wanted me to create some kind of program that allows him to input numbers at specific areas on the prints (you can see that with all the arrows pointing everywhere). Also, I need to be able to write text vertically (aka rotate it 90 degrees; you can see the rectangles on the right where I'd write it at). Essentially the program can do this:

>> What shape do you want?
>> What size?
>> What material? (upon selection, fills in the data areas with the default numbers)
>> Allows editting the numbers (and possibly drawing on the print, depends if this is easy)
>> Print
>> Ask to save the design

Visual Basic sounds like the best solution so far (mainly because of all that UI you can get). But I'm not sure if this is the right thing to do nor do I know how I'm going to implement this yet. I'm still trying to understand what he means by editting the print, but it sounds like he wants to be able to draw lines or something on it. Looking for any suggestions or ideas. Thanks.
2940
Hmmm...I'm not sure if this would be good enough to throw into the script database. I could make it a tutorial/guide since it is more eventing and manipulating the BlizzABS configuration.

I'll look into it ;)