The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Game Development Your number one stop for anything related to creating games (except ROM hacks). You can even make your own!


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #1576    
Old April 1st, 2010, 07:18 AM
Mrchewy's Avatar
Mrchewy
nom nom nom
 
Join Date: Jul 2007
Location: Brisbane, Australia
Gender:
Nature: Lax

Advertise here
Colbex, I was considering doing something similar for quite some time. In the end, I decided it was just easier to add the shadows manually to the charsets themselves (this can be done in minutes if you use a Photoshop Batch). It's not perfect, and you'll have to sort out a solution for when the player jumps a ledge, but its by far the easiest method.
  #1577    
Old April 1st, 2010, 08:08 AM
●•ΛΣЯӨЩ•●'s Avatar
●•ΛΣЯӨЩ•●
Community Supporter
 
Join Date: Nov 2008
Location: Kanto
Gender: Male
Nature: Bold
Well, I seem to have a rather disturbing problem...The Day and Night system of the Starter kit does not work with the maps i make but it works on the test map present in the starter kit...Is there any kinda switch to trigger this or something?
__________________
  #1578    
Old April 1st, 2010, 11:10 AM
IDKGUY's Avatar
IDKGUY
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Nature: Naughty
Quote:
Originally Posted by ●•ΛΣЯӨЩ•● View Post
Well, I seem to have a rather disturbing problem...The Day and Night system of the Starter kit does not work with the maps i make but it works on the test map present in the starter kit...Is there any kinda switch to trigger this or something?
Ok, go to the editor, then go to Metadata, select your map and turn the outdoor setting true
  #1579    
Old April 1st, 2010, 01:39 PM
thepsynergist's Avatar
thepsynergist
A Gym Leader, Kyushu Region
 
Join Date: Mar 2009
Location: California, USA
Age: 24
Gender: Male
Nature: Adamant
Send a message via Yahoo to thepsynergist Send a message via Skype™ to thepsynergist
That achievement system could be real handy in my game. I hope you post the script here.
__________________



My Youtube Channel: http://www.youtube.com/thepsynergist
  #1580    
Old April 1st, 2010, 03:10 PM
Cilerba
the hearts of lonely people
Community Supporter
 
Join Date: Feb 2010
Location: Massachusetts
Age: 17
Gender: Male
Nature: Quiet
Quote:
Originally Posted by thepsynergist View Post
That achievement system could be real handy in my game. I hope you post the script here.
Are you looking for an achievement system? Because I have one.
__________________
A MODEST PROPOSAL
http://www.pokecommunity.com/showthread.php?p=7766537
  #1581    
Old April 1st, 2010, 05:44 PM
IDKGUY's Avatar
IDKGUY
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Nature: Naughty
Quote:
Originally Posted by Cilerba View Post
Are you looking for an achievement system? Because I have one.
We are looking for that script compatible with Poccil's Starter kit , and I also provided one that could only be used on normal RPG games, but couldnt be used on Poccil's kit. BTW I found out how to use the light effects:D
Spoiler:

#===============================================================================
# Achievements Script
#===============================================================================
# Created By: Game_guy
# Date: April 19th, 2009
#===============================================================================
=begin
This is an achievements script. This is pretty much a system like off the
Xbox360. This is really easy to use its pretty much a simple plug and play!
You don't need to set anything up in the script at all!

Q: If I dont need to setup achievemnts in the script, where do I set them up?
A: Simple! Its all in teh database. With this script the achievements are
items. You make an Item in the database with an Achievement Name and
Description.

Q: That sounds easy! But how do I turn on/give achievemnts?
A: Easy! use this in a script call and enter this in
$achieve.gain_item(item_id)

Q: So how do I view achievements?
A: $scene = Scene_Achievements.new

Q: How do we setup the achievements score?
A: Set the price in the item. That is the score.
=end
module GameGuy
Print = true # Message box comes up and says the achievement you unlocked
ScoreName = "GamerScore: " # The word you want the score to be called.
ScoreVariable = 1 # The variable that the score stays in.
ItemStorageUsed = false # set it true if you use my item storage script
end
class Window_Score < Window_Base

def initialize
super(0, 0, 320, 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, GameGuy:coreName.to_s)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_variables[GameGuy:coreVariable].to_s)
end
end

class Achievements
def initialize
@items = {}
@weapons = {}
@armors = {}
end

def item_number(item_id)
return @items.include?(item_id) ? @items[item_id] : 0
end

def weapon_number(weapon_id)
return @weapons.include?(weapon_id) ? @weapons[weapon_id] : 0
end

def armor_number(armor_id)
return @armors.include?(armor_id) ? @armors[armor_id] : 0
end

def gain_item(item_id)
if item_id > 0
@items[item_id] = [[item_number(item_id) + 1, 0].max, 99].min
print $data_items[item_id].name + " Unlocked" if GameGuy:rint == true
$game_variables[GameGuy:coreVariable] += $data_items[item_id].price
end
end

def gain_weapon(weapon_id)
if weapon_id > 0
@weapons[weapon_id] = [[weapon_number(weapon_id) + 1, 0].max, 99].min
end
end

def gain_armor(armor_id)
if armor_id > 0
@armors[armor_id] = [[armor_number(armor_id) + 1, 0].max, 99].min
end
end

def lose_item(item_id, n)
gain_item(item_id, -n)
end

def lose_weapon(weapon_id, n)
gain_weapon(weapon_id, -n)
end

def lose_armor(armor_id, n)
gain_armor(armor_id, -n)
end

def item_can_use?(item_id)
# If item quantity is 0
if item_number(item_id) == 0
# Unusable
return false
end
# Get usable time
occasion = $data_items[item_id].occasion
# If in battle
if $game_temp.in_battle
# If useable time is 0 (normal) or 1 (only battle) it's usable
return (occasion == 0 or occasion == 1)
end
# If useable time is 0 (normal) or 2 (only menu) it's usable
return (occasion == 0 or occasion == 2)
end
end

class Scene_Title
alias re_new_game command_new_game
def command_new_game
$achieve = Achievements.new
re_new_game
end
end


class Window_Achievements < Window_Selectable

def initialize
super(0, 64, 320, 416)
@column_max = 1
refresh
self.index = 0
# If in battle, move window to center of screen
# and make it semi-transparent
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end

def item
return @data[self.index]
end

def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# Add item
for i in 1...$data_items.size
if $achieve.item_number(i) > 0
@data.push($data_items[i])
end
end
# Also add weapons and items if outside of battle
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $achieve.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $achieve.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end

def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $achieve.item_number(item.id)
when RPG::Weapon
number = $achieve.weapon_number(item.id)
when RPG::Armor
number = $achieve.armor_number(item.id)
end
if item.is_a?(RPG::Item)
self.contents.font.color = normal_color
end
x = 4 + index % @column_max * (288 + 32)
y = index / @column_max * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
end

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
class Scene_Achievements
def main
@help_window = Window_Help.new
@achieve_window = Window_Achievements.new
@achieve_window.help_window = @help_window
@score_window = Window_Score.new
@score_window.x = 320
@score_window.y = 384
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
@achieve_window.dispose
@score_window.dispose
end
def update
@help_window.update
@achieve_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(0)
return
end
end
end

class Scene_Save < Scene_File
def write_save_data(file)
# Make character data for drawing save file
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
characters.push([actor.character_name, actor.character_hue])
end
# Write character data for drawing save file
Marshal.dump(characters, file)
# Wrire frame count for measuring play time
Marshal.dump(Graphics.frame_count, file)
# Increase save count by 1
$game_system.save_count += 1
# Save magic number
# (A random value will be written each time saving with editor)
$game_system.magic_number = $data_system.magic_number
# Write each type of game object
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)
Marshal.dump($achievements, file)
Marshal.dump($game_chest, file) if GameGuy::ItemStorageUsed
end
end
class Scene_Load < Scene_File
def read_save_data(file)
# Read character data for drawing save file
characters = Marshal.load(file)
# Read frame count for measuring play time
Graphics.frame_count = Marshal.load(file)
# Read each type of game object
$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)
$achievements = Marshal.load(file)
$game_chest = Marshal.load(file) if GameGuy::ItemStorageUsed
# If magic number is different from when saving
# (if editing was added with editor)
if $game_system.magic_number != $data_system.magic_number
# Load map
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
# Refresh party members
$game_party.refresh
end
end


  #1582    
Old April 1st, 2010, 07:31 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Quote:
Originally Posted by IDKGUY View Post
We are looking for that script compatible with Poccil's Starter kit , and I also provided one that could only be used on normal RPG games, but couldnt be used on Poccil's kit. BTW I found out how to use the light effects:D
It depends entirely on what you want your achievement system to do. You can either go down the route your script suggests (giving bonus items, presumably after a difficult side quest), go for the typical system used by the consoles (i.e. get an achievement notification but nothing else out of it, e.g. catch 10 Pokémon, beat Elite Four, capture legendary X, etc.), or do something else entirely.

The first option (bonus items) is easy. Create an array (say, $Trainer.achievements) of length X, and set all entries to false at the beginning of the game. This array corresponds to a list of bonus items (e.g. Master Ball, Amulet Coin, etc.). When you gain a particular item, set that item's entry to true. You can then create a new screen somewhere (PokéGear?) that displays a list of all possible bonus items, using that array as a reference for what has already been done.

For the console-like achievements system, do the same thing. The difference is you'll need to put lots of checks in lots of places to decide whether you've done something, rather than just have the Master Ball-giving event also change the array element. For example, make a check at the end of each battle that will set the "100 Pokémon seen"/"Caught Mewtwo" achievement to true if you have done. Put a line of code in the Rock Smash script to add 1 to a game variable, and then set the "50 smashed rocks" achievement to true if so. That kind of thing.

As I said, it depends entirely on what you want your achievements to be. As I've pointed out, though, there's no real need to have a huge section of code for this, when a single array would do just as well (plus a few lines dotted around elsewhere in the scripts, if you want).

You could even make a thread asking for suggestions for achievements. That'd be fun.
__________________
  #1583    
Old April 1st, 2010, 08:00 PM
IDKGUY's Avatar
IDKGUY
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Nature: Naughty
Maruno, to be sincere, i have no idea of how to do that :\. I want it to be just like the console like system, as you said, but I have no idea of how to do it. I just thought it would be a good idea to have achievements in our games, but now it seems a little bit complicated.
  #1584    
Old April 1st, 2010, 10:05 PM
thepsynergist's Avatar
thepsynergist
A Gym Leader, Kyushu Region
 
Join Date: Mar 2009
Location: California, USA
Age: 24
Gender: Male
Nature: Adamant
Send a message via Yahoo to thepsynergist Send a message via Skype™ to thepsynergist
I don't see how you can't just try to convert the one you have into the Pokemon Essentials SDK.
__________________



My Youtube Channel: http://www.youtube.com/thepsynergist
  #1585    
Old April 2nd, 2010, 04:30 AM
Cilerba
the hearts of lonely people
Community Supporter
 
Join Date: Feb 2010
Location: Massachusetts
Age: 17
Gender: Male
Nature: Quiet
What's wrong with that script, (it's the same one I have by the way), is the "class Window_Score < Window_Base" For some reason, that causes errors when trying to be used in Essentials.
__________________
A MODEST PROPOSAL
http://www.pokecommunity.com/showthread.php?p=7766537
  #1586    
Old April 2nd, 2010, 04:41 AM
venom12's Avatar
venom12
Pokemon Crystal Rain Relased
 
Join Date: Sep 2006
Age: 23
Gender: Male
Nature: Adamant
Send a message via Windows Live Messenger to venom12
Change Window_Base to SpriteWindow_Base.
__________________



Closed Thread
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:04 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.