Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Achievements, Add/manage/display achievements (like WoW/xBox) or use as questtracker
SojaBird
post Jul 10 2009, 06:45 AM
Post #1


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Achievements


Version 4.0 BETA
Author SojaBird
Release Date
v1.0 (full release) > 10-07-'09
v1.1 (small bugfix) > 11-07-'09
v1.2 (smaller bugfix) > 11-07-'09
v1.3 (more fixed, more options) > 13-07-'09
v2.0 (point-system and fixes) > 18-07-'09
v2.1 (lvl/exp fix) > 05-08-'09
v2.2 (sound, info and a fix) > 21-08-'09
v3.0 ... where did it go?
v4.0 BETA (requested new features (BETA!!)) > 30-05-'10
v4.0.b BETA (pre-vacation release) > last build: 21-06-'10, released: 06-08-'10
+additional help-file released (due request at leak-page) > 29-12-'10
v4.0.c BETA > 25-02-'11


Features
v1.0 (full release)
  • Create your own achievements wich contains title, description and icon;
  • Manage them;
  • Add as many as you want or remove them as you like;
  • Add conditions so they'll be completed by itself;
  • Add rewards so that the player gains what ever you like automaticly with completion;
  • Show a popup window when a achievement is completed;
  • A window, accessable from the menu, to show the achievements in a scrollable list;
  • Automaticly scrolling achievementwindow with a variable speed;
  • And much, much more!..
  • Compatible with 'New Menu Items'.
v1.1 (small bugfix)
  • Fixed some minor bugs such as correct displaying and hiding the completed-alert windows;
  • Fixed a couple of conditions;
  • Added a new option for opening the scene from the map or other places: Achief.call(*return_menu) *means optional, default = false).
v1.2 (smaller bugfix)
  • Final (I hope) and working fix for the completed-alert windows.
v1.3 (more fixed, more options)
  • Fixed the level- and exp-rewards for the whole party;
  • Added the option to use the prototype reward-alert;
  • Different display ways (normal, up or down);
  • More alert-options such as opacity and position (left, centered or right);
  • Fast-display option in the menu (displays howmany achievements there are in total and how much are finished).
v2.0 (point-system and fixes)
  • Use the point-system and attach points to achievmenets as extra reward when completed;
  • Use collected points in the all new achievementshop to buy new, or reveal hidden achievements;
  • Display amount of points in messages with your own set -tag;
  • Use conditions, as well as points in conditinal branches (now with little more documentary);
  • Get rid of some nasty bugs such as the start-up-bug and reward-bugs;
  • A new display for rewards, wich looks much neater (not completely done though).
v2.1 (lvl/exp fix)
  • Fixed the level and exp conditions so that it'll keep working when the actor it's about is removed from the party;
  • A little change in the reward-coding.
v2.2 (sound, info and a fix)
  • Option for find- and complete-sounds as adittion to the alertwindows;
  • Status about current achievements and completion added in thepoint-display bar (whith point-system only);
  • Small shop-fix (reset helpwindow after Unhide).
v4.0 BETA (requested new features (BETA!!))
  • NMI bug
  • Menu_Enabled option
  • Shop message BG remove
  • Multiple classes
  • Call script message BG remove
  • Sort achievements
  • Check monster kills /battles achievement
  • Buy items/weapons/armor with points
v4.0.b BETA (pre-vacation release)
  • A lot of new, undocumented features
  • Such as a new menu-layout option and more!!
  • Tracking achievements it's progress, with a bar
  • New catagories!!
  • The ablility to have achievements based on enemies killed/fought
v4.0.c BETA
  • Added the option to track the player-step count and use it as condition (use steps as compair-tag)



Script
Attached File  Achievements.txt ( 77.98K ) Number of downloads: 690



Customization
After importing the script, you can customize the value's in the module.
After that it's all up to you to make your own achievements.
If options you want to add, are missing, just contact me via the topic or pm.

Additional info
Additional info can be found in this little helpfile (uncompleted though).
Put it in a new empty slot in the script-editor for propper reading!!


Compatibility
VX only.

The script rewrites the following defenitions
  • create_command_window (Scene_Menu) (when no use of 'New Menu Items')
  • update_command_selection (Scene_Menu) (when no use of 'New Menu Items')
  • return_scene (Scene_File) (when no use of 'New Menu Items')
  • return_scene (Scene_End) (when no use of 'New Menu Items')


DEMO
Version 4.0.b BETA

(Version 4.0.c BETA)


Installation
Put the script above main.
Customise the script to your needs.
Credit me pls.

TIP!
You could use 'New Menu Items' to make the script more compatible with other scripts.


FAQ
Comming if needed.


Terms and Conditions
Credit me with site, and the script is free for use in NONCOMERCIAL projects.
If anyone want some changes, please pm me or post it here, I'll track the topic.

This post has been edited by SojaBird: Oct 13 2011, 10:20 AM
Attached File(s)
Attached File  _HowToUse__Achievements.txt ( 19.75K ) Number of downloads: 373
 


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
22 Pages V   1 2 3 > »   
Start new topic
Replies (1 - 19)
Lockheart
post Jul 10 2009, 06:55 AM
Post #2


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




What a shame, I downloaded the demo, started up, excited as could be to finally see this script done and ready to go, only to have it crash with a syntax error right after the intro to the script. I've looked through, tried 5 times and nothing can be fixed on my part, hopefully you can figure out whats wrong and fix it?

Good luck and congrads on an amazing script.
Go to the top of the page
 
+Quote Post
   
SojaBird
post Jul 10 2009, 07:20 AM
Post #3


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Mmm omg well that's a enourmous fault of mine...I didn't check the demo after I put in the intro tongue.gif

Hehe sorry for that.
I'll upload a new one wink.gif

EDIT: It's done wink.gif
And I won't count it as a new version tongue.gif


Greatzz,
SojaBird.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
Lockheart
post Jul 10 2009, 08:16 AM
Post #4


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




Wonderful, it works now and is finally playable, Amazing script, love it! Reminds me very much of Xbox 360's style of Achievements.

Two things though, one your final achievement doesn't appear to unlock when all other achievements have been met(perhaps I'm missing something?) this isn't a big deal.

and the other is, how would one go about calling the scene? I'm using a custom menu system so it won't appear as normal, plus I want to call it from a different menu I have set up.

Edit: Figured out the last one myself, a quick look at line 725 gives the code right there. Thanks anyways, great script!

This post has been edited by Lockheart: Jul 10 2009, 09:30 AM
Go to the top of the page
 
+Quote Post
   
drebenk
post Jul 10 2009, 08:22 AM
Post #5


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@pim321 awesome script mate. I like it very much. BTW I want to call the achievements scene too since I use Syvkal's ring menu. So can you modify the script to be compatible with this script? There are a lot of people that use this ring menu so it would be great to have your script compatible with it.

Also can you tell me how to resize the windows of your script? I found just three values which resized some of the windows but not all. I need to resize the windows in your script because I use screen resolution changer script.

And Lockheart is right the final achievement doesn't mark as complete after you finish the rest achievements.


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
Lockheart
post Jul 10 2009, 10:10 AM
Post #6


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




I'm lost and confused. I keep getting an error at line 95 which is an 'end' its a syntax error, now the demo works, the demo's script works but my achievements seems to make things die.

CODE
    Start_Achievements =
     #[Title, Description, Icon, Hidden, Hide_Icon, Completed]
      ["Dryads of Evil", "You defeated the Posioned Dryad, congrads.", 2356],
      ["Your first Jobs!", "Unlocked your first level jobs. The following are now available, Squire, Knight, Mage, Priest, Fighter and Thief.", 2356],
      ["First of Many", "Found an old book, its a series isn't it?", 2356, true, false],
      ["Sequels", "Two of a kind, better get hunting", 2356, true, false],
      ["Trilogiy", "Quite the collector aren't you? Three old books.", 2356, true, false],
      ["The Mighty 4", "Masterful collector you are. You found them all. Congraulations", 2356, true, false],
      ["Liberated a town", "Liberated the city. No longer under the control of the evil Guards!", 2356],
      ["Learning Skills", "You can only go up from here! Time to learn some new stuff. Unlocked the learn skills menu.", 2356],
    
    Start_Conditions =
     #[Name, Condition]
      ["Your first Jobs!", "switch(102), true"],
      ["First of Many", "item(38), == 1"],
    
    Start_Rewards =
     #[Name, Reward]
      ["Your first Jobs!", ""],
      ["First of Many", ""],
    
end


Anyone got any bright ideas as to whats wrong? I've tried many different things, taking out some things and adding things(i.e. empty rewards)

Edit: Fixed the problem, too many Commas in place.

This post has been edited by Lockheart: Jul 10 2009, 12:54 PM
Go to the top of the page
 
+Quote Post
   
BrussGreen
post Jul 10 2009, 12:16 PM
Post #7


Level 1
Group Icon

Group: Member
Posts: 13
Type: None
RM Skill: Intermediate




Well, this is not what I really wanted...

This is way greater. I'll try to understand the script to customize my game, your demo is just exciting.

I have just a question : how many achievements did you put in your demo ? I have completed 10, and the "Complete all" isn't unlocked. Is that a bug, or a very hidden achievement ?

Thank you again for this script.
Go to the top of the page
 
+Quote Post
   
SojaBird
post Jul 10 2009, 03:29 PM
Post #8


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Hey all smile.gif

Nice that you like my script.
The final achievement is one that I didn't tried out since so many people sent me a PM to post the script tongue.gif haha, I'll have a quick look at that now.

For the call scene, just do a simple script line
CODE
Achief.call
That'll do the trick.

So for the resize of the windows, there are 2 different windows in the script, the one for the menu and scene (wich is Window_Achievements).
The other one is used multiple times to show off the completed achievements (wich is called Window_Achievements_Display).
So you can edit those if you like.

For the error you got, indeed, make sure you don't put a comma at the end.
Also, you don't need to set those value's, but you could.
So what it actualy does, is automaticly put the Achievements in the list instead of a paralel proces call script from an event.
This will just do it at the start of the game smile.gif

I'll keep you up to date.

EDIT: For the demo...I spelled Dwarf wrong (it now sais Drawf).
So in the condition of the final achievement it is spelled correct...though the original wasn't spelled right tongue.gif
I'm gonna put that new one up with a small update smile.gif


Greatzz,
SojaBird.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
Lockheart
post Jul 10 2009, 06:09 PM
Post #9


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




Found bug in the script, seems it doesn't like this sort of line

"lvl(1)>= 10" or anything like it, 20, 25, 60 etc, etc. It gives an augumental or something error, 1 for 2 or something like that.

Just pointing it out.
Go to the top of the page
 
+Quote Post
   
Shanghai
post Jul 10 2009, 09:28 PM
Post #10


Level 31
Group Icon

Group: Revolutionary
Posts: 747
Type: Developer
RM Skill: Skilled




This feels more like a quest log than an achievements list. Oh well, good work.

This post has been edited by Shanghai: Jul 10 2009, 09:28 PM


__________________________
Go to the top of the page
 
+Quote Post
   
drebenk
post Jul 11 2009, 02:02 AM
Post #11


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@pim321 where do I need to put this line:

$scene = Scene_Achievements.new

So that the script is shown as an option in the ring menu?


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
SojaBird
post Jul 11 2009, 02:21 AM
Post #12


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Hey,

I've updated the script.
I've also put the new correct workng demo up with some new helpfull information.
Check the project file and play the demo biggrin.gif

For you drebenk,
I've added a option to easy open the scene.
This, because else the alert-windows wouldn't close.
So if you want to call te scene, do this:
CODE
Achief.call           # return to the map     ---same as Achief.call(false)---
Achief.call(true) # return to the memu

Hope you're gonna enjoy.


Greatzz,
SojaBird.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
Lockheart
post Jul 11 2009, 03:36 AM
Post #13


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




Great update, however the level part of the script still seems broken. With the updated script I put in my achievements for reaching a certain level with the main character and got an error on line 855 which is "return act.level"

Heres the part of the script that line 855 is on, since my line 855 will be different from yours.

CODE
  def self.lvl(actor, value = nil, gain = false)
    if actor == -1 and gain
      $game_party.members.each do |act|
        act.change_level(act.level + value, false)
      end
      return
    end
    act = $game_party.members[actor]
    return act.change_level(act.level + value, false) if gain
    return act.level
  end
Go to the top of the page
 
+Quote Post
   
drebenk
post Jul 11 2009, 04:22 AM
Post #14


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@pim321 well I asked you where to put the lines. In which script? So here is what I did so far:

1. Deleted my old achievements script.

2. Copy - pasted your script under the ring menu script.

3. Added this line to the ring menu script:

["Achievements", Cache::picture('Icon_Achievements'), "$scene = Scene_Achievements.new"],

4. Deleted everything between lines 653 and 734 in your script. These lines were creating the normal menu with the achievements option in it.

5. In my Scene_Menu system script I have these lines:

s6 = "Achievements"

And further down I have:

when 5 # Achievements
$scene = Scene_Achievements.new

So what happens when I start the game is this:

I start the game. I'm on the map and I press "Esc". The ring menu shows. I scroll to the achievements icon and select it. The achievements scene opens. Then I press "Esc" to close it. But instead of staying on the achievements icon the selected icon is the one I have for my 4th menu option - this is my quest log icon. So I want when I go to the achievements screen and press "Esc" to go back to the ring menu and the achievements icon to be selected.

How can I do this?


Edit:

I've managed to resize the windows which display the achievements, thanks for pointing out which lines they were.


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
SojaBird
post Jul 11 2009, 04:41 AM
Post #15


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




@Lockheart
I'll look in to it another time smile.gif
Thanks for reporting, in this way I'm able to make the script work perfect.
I'll keep you up to date when I've discovered the error.

@drebenk
First of all, to open the scene
CODE
#use:
Achief.call(true)
#intead of
$scene = Scene_Achievements.new
For the returning to the menu...go find the definition of the 'return scene' in the class Scene_Achievements.
There you'll find the part what to tell the script when the scene is closed (I'm not femiliar with the ring system so I don't know what to put there).


Hope that helps you out.
Greatzz,
SojaBird.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
drebenk
post Jul 11 2009, 05:19 AM
Post #16


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@pim321 well if I put "Achief.open" in these lines:

In the ring menu script:

["Achievements", Cache::picture('Icon_Achievements'), "Achief.open"],

And in the Scene_Menu script:

when 5 # Achievements
Achief.open

Then when I select the achievements icon in the ring menu I get an error. So the ring menu script works just fine when you use "$scene = Scene_Achievements.new". What I need is a definition which will say to the Achievements script to close and to remain on the achievements icon in the ring menu.

For example Omega's achievement script had these lines for telling the script what to do when it gets closed:

if Input.trigger?(Input::cool.gif
@command_window.dispose
@info_window.dispose
@info_window_2.dispose
$scene = Scene_Menu.new(6)
end

The line "$scene = Scene_Menu.new(6)" tells the script that after its closed it needs to go on the 6th item in the menu. So in the ring menu after I close the script the achievements icon stays selected. Also Omegas script was opening with the "$scene = Omegas_Achievements_Scene.new" line. Meaning it had no problems when trying to make an option to open the achievements window in the ring menu. That's why I've deleted the lines for the menu near the end of your script and put the line ["Achievements", Cache::picture('Icon_Achievements'), "$scene = Scene_Achievements.new"] in my ring menu script because it worked the problem is that when I go out from your script the selected icon in the ring menu is not the achievements one but the quest log one - not the 6th icon but the 5th one.


I have another problem with the script. I want to put all of my achievements in the script so that when the player start the game all of the entries to be in the menu but to be hidden. So in the part which say:

#-----------#
# Start-up: #
#-----------#
Start_Achievements =
#[Title, Description, Icon, Hidden, Hide_Icon, Completed]

I make a new line like this:

["Test2", "You earned 100 gold", 33, true, true]

Then in this part:

Start_Conditions =
#[Name, Condition]

I make a new line like this:

["test2", "gold >= 100"]

And finally in this part:

Start_Rewards =
#[Name, Reward]

I put this line:

["test2", "item(1)"]


So I open the achievements script and I see that my Test 2 achievement has hidden icon and hidden description. Then I go and take 100 gold but the achievement is not done. No window telling me that the achievement is done opens no reward is given to me. What I'm doing wrong? BTW I tried with setting a switch on and variable >= x but it doesn't did anything when I met the conditions. So can you help with this one as well?


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
SojaBird
post Jul 11 2009, 06:00 AM
Post #17


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Hey,

Oke at first.
Did you found the return scene?
If so...what do you have there now... (also, perhaps you could link me to the ring-menu)

For the second one. Make sure the names are the same...wich aren't in your case.
Changes your first "Test2" to "test2" or your other 2 "test2" to "Test2".

Hope that'll do the trick.


Greatzz,
SojaBird.


PS. I'm still working on an update.
Though for the level thing, make sure you use the correct code.
Example...
CODE
Achief.new("Nr.4", "Get Ralph up to level 4", 142)
Achief.condition("Nr.4", "lvl(0) >= 4")

This is a new one wich will also be in the new demo.

The update now is going about the opening and closing of the alert-windows. I'm still not satisfied.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
drebenk
post Jul 11 2009, 06:40 AM
Post #18


Level 20
Group Icon

Group: Revolutionary
Posts: 405
Type: Event Designer
RM Skill: Skilled




@pim321 for the ring menu problem:

I had this in the class Scene_Achievements part of your script:

CODE
def return_scene
Sound.play_cancel
if @return_map
$game_temp.next_scene = nil
$scene = Scene_Map.new
else
begin
super(SojaBird_Achievements::Menu_Title)
rescue
$scene = Scene_Menu.new(4)
end
end
end


So on this line:

$scene = Scene_Menu.new(4)

The value is 4 and that's why when I was closing the scene it was making the 4th option from the ring menu selected. I've changed the number to 5 and now when I close the achievements screen the achievements icon is selected - the 5th icon.

Also since I told you that I've deleted the part of your script from line 653 to 734. I also put the line "$scene = Scene_Achievements.new" to my ring menu script and to my Scene_Menu script.

So here is what happens now when I start my game and go to the ring menu:

I select the 5ft icon (achievements one) and I press Enter. This takes me into the achievements screen. Then I press Esc and I'm back to the ring menu and the achievements icon is selected.

Overall this problem is solved!!!


As for the setting the achievements form the script I've changed the names for the conditions and reward to be like the one in the Start_Achievements section and now it works like a charm.

So all problems are solved. ^^

Thanks for the help mate. I'll be waiting for the updated version of the script. ^^


__________________________
Nobody dies a virgin. Sooner or later life f***s everybody.
Go to the top of the page
 
+Quote Post
   
BrussGreen
post Jul 11 2009, 06:52 AM
Post #19


Level 1
Group Icon

Group: Member
Posts: 13
Type: None
RM Skill: Intermediate




Hey Pim321,

If i understood your comments, we can use find_completed in a conditional branch to test the number of completed achivements ? How can I use it ?

Thank you

EDIT : I added a sound effect for when an achievement is completed. Adding this features in your script could be something cool smile.gif

This post has been edited by BrussGreen: Jul 11 2009, 06:54 AM
Go to the top of the page
 
+Quote Post
   
Lockheart
post Jul 11 2009, 06:52 AM
Post #20


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




QUOTE (pim321 @ Jul 11 2009, 10:00 AM) *
PS. I'm still working on an update.
Though for the level thing, make sure you use the correct code.
Example...
CODE
Achief.new("Nr.4", "Get Ralph up to level 4", 142)
Achief.condition("Nr.4", "lvl(0) >= 4")

This is a new one wich will also be in the new demo.

The update now is going about the opening and closing of the alert-windows. I'm still not satisfied.


For the level required Achievements I'm having them from the starting of the game so they are done through the script itself(like all my other Achievements)

CODE
    
      #["Only the begining", "lvl(1)>= 10"]
      #["Powerful", "lvl(1)>= 35"]
      #["Elite", "lvl(1)>= 50"]
      #["God-like", "lvl(1)>= 99"]

They are commented out currently since the system doesn't like them, so I'm just waiting for an update. Good luck!

Edit: Problem fixed, not sure what I did, or did wrong but it works now.. strange, anyways can't wait for the next update!
Go to the top of the page
 
+Quote Post
   

22 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 06:56 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker