Help - Search - Members - Calendar
Full Version: Achievements
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9
Mischa_Silden
Hi there!
I'm new to rpg maker vx and scripting overall.
I tried your awesome script and it was easy to begin with but i have a little problem.
Here, let me demonstrate:
(check the attachment)

It rewards me the points but at the same time it doesn't.
I just used a simple event script that goes like this: (i think i've missed something really important biggrin.gif)

CODE
@>Script: Achief.new("LOL!", "Mene alas portaita!", 155)
@>Script: Achief.completed("LOL!")
@>Script: Achief.points("LOL!", 10)


Could someone please instruct me how to overcome this obstacle :/
Thank you very much!
SojaBird
Hey there!

Great you gonna use the script and also think that it's awsome.
I'm also glad to know it was easy for you.
Now for the problem you got...
The point's display in the scene just shows you how many points the achievement is worth.
Though rewarding the player those points happens when the achievement is completed.
Now it seems that you made the achievement complete before you set the points, wich meens the point's aren't given since it isn't defined at that specific point in time.
So what you should change is; switch your 2nd and 3th line .
This'll solve the problem.
Though it's also a learning moment for me, cause it does shows me a little improvement that can be done (cause making a new achievement wich would allready be completed, can't also reward money or items etc).

So thanks the for the feedback and info.
Let's hope it makes it a bit more clear for you now smile.gif


Greatzz,
SojaBird.
Mischa_Silden
Thank you very much SojaBird!
You sir deserve a medal biggrin.gif
SojaBird
Haha well thanks tongue.gif

Oke so for the update, I didn't realy got far today.
So still a lot of work to do.
I did made this new vid.
Check it out while you wait: Jet Flyer


Greatzz,
SojaBird.
Whip Jr
hows it comming? im looking forward to it =] cant wait...... got n e more funny school projects?lol...n wat u think of BioShock's ending...lol thx 4 all the hardwork...
SojaBird
Hey,

Well it's not comming that quick really.
I'm realy stressed and very buzy with school.
No new projects yet biggrin.gif haha

Bioshock 1 ending... I found that, well it was pretty nice at first.
Though after I played BS2 I was stunned about that one.
Loved BS2 so much biggrin.gif to bad about the sucky MP though.
DLC... I think that fails to release it now already.

What do you think about it? About the DLC?


Greatzz,
SojaBird.
Anon4907
Hey your script is amazing =] I'm using it right now with no problems, but I'm also no script writer.... I dont want to alter anything that could make my brain explode lol

I would like to inquire but a few things that peeked my interest while coming up with some achievements ["medals" in my game] to have in my game:

I noted that the text scrolls from bottom to top. i looked at the script in more detail and saw:
# normal/up/down

Im assuming that controls how the alert box scrolls... I liked the "down" effect when it scrolls from the top of the screen. However, i would like for the alerts to "hang/pop-up" from the top/bottom of the screen rather than continue scrolling. Is there a way I can safely alter this?

~Anon4907
SojaBird
Hey hey smile.gif

Great you have it working prefectly biggrin.gif
What you want edit is the Alert_Display and set it to "normal".
In this way they'll pop up at the top (where is space) and go away after the set Time_Span_Text in seconds.


Enjoy and greatzz,
SojaBird.
Anon4907
It worked to perfection!!

Thanks a bunch!
Whip Jr
hey hows it going? i haven't heard much about the DLC, I liked the game and i can't wait for Tuesday!!! Final Fantasy XIII comes out and i wont be going anywhere...lol... hope you can get the update out soon...thx....o.0 n r u getting FFXIII???
SojaBird
Hey,

I'm pretty stressed and buzy at the moment with school projects and video and website building.
Perhaps I get some little time free soon, though I'm not sure if I am going to "spent" it on scripting again (sorry for that).
I got a bunch of games I haven't played yet after buying so I might do that more quickly.

Is is the DLC of Bioshock2 what you're talking about?
I only know it's going to be some extra things on the multiplayer.
I haven't played a lot of Bioshock2 multiplayer yet, perhaps in some time.
Though I don't think I'll be getting the DLC when it's released.

So I also hope I can update this soon.
I realy like the script myself as well!

I'm not realy in to Final Fantasy, haven't played a single one yet actualy.
So nop I won't get FFXIII smile.gif


Anyway, I find it pretty awsome that people are interested in other people's intersts (most about games, but that's also why we're here after all biggrin.gif).
I don't mind talking about that wink.gif

Anyway, keep a sharp eye (as usual) on the topic.
I'll post when I've got some news for you (all) smile.gif



Greatzz,
SojaBird.
Whip Jr
coo...FFXIII is a great game with awesome graphics and a well told story in my opinion, it came out on march 9th and i have close to 100 hours if not more in total playing time, not including the times where i have fallen asleep late at night...lol

well let us know...im still looking forward to the update.. o.0.. (>")>_thx_<("<)
SojaBird
Hello!!!

Whoohoo, hell yea.
I just finished printing and burning all my stuff for school.
Tomorrow I'll have to get there 1 more time to hand it all over, then I'll have some more time again biggrin.gif

So expect something perhaps soon.
Also, my final piece of video I made for school is posted on my YouTube channel, check it out if you want [link].


Greatzz,
SojaBird.
Emp-groove
@SojaBird
I am somewhat annoyed about when you make a script you put a link that says 'Download Script', and because my hardrive has enough junk on it, I would be happier if you put the script in your post as text, not a download link.
Just a suggestion,
thank you in advance,
-Emp-groove

PS: I don't mean to be rude, i'm just frustrated.
SojaBird
Hey Emp-groove,

I get your frustration though sight an behold!!
Try the download link biggrin.gif
When you click the link you'll be rederected to the file wich is a .txt file.
You'll just get the .txt file in your browserwindow so all you have to do from there is CTRL+A > CTRL+C and you have the whole script on your clipboard.
Next go to your rpgmvx and open the script window, press insert below materials and click inside the freshly made clear window.
Then CTRL+V and you got the script without any new junk on your harddrive.
Though I have to say, your project file will grow in size, so "downloading" (rightclick > save as...) isn't more space consuming as the way I just told you.

Anyway, just click the link and it'll open the .txt file in a new window/tab (it works for me, I use IE).
If you're not sure if you get the right think, rightclick and do a "open in new window/tab", see if that works.

If that does not work and for some crazy reason YOU HAVE TO DOWNLOAD IT TO YOUR HARDDRIVE pop-up comes up...save the file (wich is less that 1MB) to your desktop, open it, copy what's inside and remove the file again (SHIFT+DEL will remove it instantly instead of putting it in your trashbin).

Hope that helped ya out and took a way some frustration.
If not...well, I'm not going to put the script in code tags, since I want only want to enable members to download my use my script so I can recieve feedback.


Greatzz,
SojaBird.
Emp-groove
K... I said 'junk on my hrd drive' because I move my finished games from C: to a disk (D:)
Thanks...

PS: I'm new here, so... can u help me out a bit? :...
SojaBird
Hey. No problem. Sure I can help around. Just let me know when need info or what so ever.

Greatzz,
SojaBird.
Eiserne
I'm not sure how to fix this, but when I put the script in my project, add the trophies etc, it all pops up when I click new game.

Example: When I click new game, it goes through the movie scenes nicely. But then when I actually start playing, all of the trophies pop up at once saying " ETC trophy has been found ". Is there any way to remove that from the script? I don't want it to say that they've been found, just that they've been completed.

Thanks.

EDIT: I found out how, I edited this line:
CODE
# for normal display
    Time_Span_Text     = 4
    
    Display_StartUps   = false
    Reward_Prototype   = true
which is at line 133, and changed the Display_StartUps = true to Display_StartUps = False

Hope this has helped anyone else that reads it!
SojaBird
Hey,

Yea I'll make a tutorial on how to configure the Achievement-script soon.
Hope that makes things more clear wink.gif


Greatzz,
SojaBird.
kccarmea
Hey, how do I add new items into the shop? And can you add skills to buy?
SojaBird
Hey kccarmea,

To add items to the shop, use this code
CODE
#-------------------------------------------------------------------------------
# Achief.new_buyable(price, name, description, *icon)
#   - price: Price to buy the achievement (number)
#   - name: Name of the achievement (string)
#   - description: Descripition of the achievement (string)
#   - icon: Icon-id of icon for the achievement (number)
#-------------------------------------------------------------------------------
For example Achief.new_buyable(5, "5points buy", "Spent 5 points on this buyable achievement.").
This'll add the achievement, named 5points buy to the list of the achievement-shop, wich costs 5 points.
It has no icon (since the default is 0, wich is empty).

Hope this helped, gonna make a tutorial on how to use it soon though.

About buying skills, that aint possible yet, though it's a nice feature I'd add in the next version (just as buying items/weapons with points).


Greatzz,
SojaBird.
kccarmea
QUOTE (SojaBird @ Apr 26 2010, 07:56 AM) *
Hey kccarmea,

To add items to the shop, use this code
CODE
#-------------------------------------------------------------------------------
# Achief.new_buyable(price, name, description, *icon)
#   - price: Price to buy the achievement (number)
#   - name: Name of the achievement (string)
#   - description: Descripition of the achievement (string)
#   - icon: Icon-id of icon for the achievement (number)
#-------------------------------------------------------------------------------
For example Achief.new_buyable(5, "5points buy", "Spent 5 points on this buyable achievement.").
This'll add the achievement, named 5points buy to the list of the achievement-shop, wich costs 5 points.
It has no icon (since the default is 0, wich is empty).

Hope this helped, gonna make a tutorial on how to use it soon though.

About buying skills, that aint possible yet, though it's a nice feature I'd add in the next version (just as buying items/weapons with points).


Greatzz,
SojaBird.


Yeah, buying and selling weapons and skills with points would be great. That is what I'm looking forward to.
kccarmea
How would you subtract points from a player?
bazbroketail
Hi there. I am really liking this achievement script. A couple requests, or rather ideas if you will, for another update. One, to have a condition for how many battles you fight. So like you can have an achievement when you have fought 100 battles, then 1000, so on and so forth. Another idea, is if it would be possible to make a condition compatible with this script:

http://www.rpgrevolution.com/forums/index....showtopic=22090

I was thinking maybe like have a condition for when a character learns a new attribute, or levels up an attribute completely.

Just some thoughts and ideas for you to consider. Thanks. In the meanwhile, this is a great script and I am having fun using it and creating some fun achievements.
SojaBird
@kccarmea
Douple post wink.gif
Next update will get the feature.
Perhaps it'll come soon, since I've 1 week of from my study.
To subtract points, just add negative ones with the use of the (sorry, still undescribed) callscript function Achief.add_points(value).

@bazbroketail
Great you like it.
The option of the battle things, sure that can be done.
I'm not sure how the script you mentioned worked, though I could have a look at it, and make a seperate add-on script so you could let them work together.


Greatzz,
SojaBird.
bazbroketail
QUOTE (SojaBird @ Apr 29 2010, 07:45 AM) *
@kccarmea
Douple post wink.gif
Next update will get the feature.
Perhaps it'll come soon, since I've 1 week of from my study.
To subtract points, just add negative ones with the use of the (sorry, still undescribed) callscript function self.give_points(value).

@bazbroketail
Great you like it.
The option of the battle things, sure that can be done.
I'm not sure how the script you mentioned worked, though I could have a look at it, and make a seperate add-on script so you could let them work together.


Greatzz,
SojaBird.


That would be awesome. I look forward to see what you add on in future :-)
SojaBird
@bazbroketail
That's good to know smile.gif

I've actualy made a new script (Skin Changer) and I felt how enjoyable it was.
So I'll be working on this script realy realy soon again smile.gif
I've also come up with a new awsome feature that I'd like to implent in a upcomming update (hopefully this one, but it could also become the one after that), wich is a progresbar for sertain achievements.
In this way it's even more easy to hold track of sertain things.
It also makes the script posible to be used as a quest-log (with use of the catagories that are comming up as well soon)


Greatzz,
SojaBird.
SojaBird
Hey everyone.

So I actualy though I could keep you up to date on the latest progres of the script it's update.
Therefor I'll just copy a part of my script-update in progress in here.

What I'm going to show is actualy the list I'm following to update the script.
CODE
Fixlist
  +NMI bug
  +Menu_Enabled option
  +Shop message BG remove
  +Multiple classes
  +Call script message BG remove
  +Sort achievements
  +Check monster kills (notefield?)/battles (variable?) achievement
  +Buy items/weapons/armor with points
  *Buy skills with points (same as items/weapons/armor but with character select)
  (*Buy achievements for money)
  *Describe more features (like add_points etc)
  *Progression bar
  (*http://www.rpgrevolution.com/forums/index.php?showtopic=22090 achievements)
  *Remove-from-menu option

So every item with a + PLUS in front of it, is done.
The * STARS still have to be done.
Things inbetween (those things) are just some quick ideas of me how to do sertain features.

I hope to post the new version soon (perhaps as beta), so you can get back to work again with using this in a even more awsome way smile.gif


Greatzz,
SojaBird.

ps. I also found this page and it made me think I even gonna make a add-on so it can support even more achievements based on my Factions script.

EDIT: I'll update the list while working wink.gif
ninja jeiku
This is a great script very very useful, thanks alot, i was wondering do you require us to credit you for this script in credits?
Thanks
SojaBird
QUOTE
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.
wink.gif And thanks for liking it!
SojaBird
A quick and little, but exiting update!

Today I'll release the BETA of the new upcomming update, as celebration of my birthday smile.gif
I'll add it in a couple of hours when I'm done working.

I might add this (the BETA update) tomorrow since it's my birthday today tongue.gif


Greatzz,
SojaBird.
IceMaverick
mmm im not much of a coder... or a coder in any way, shape, or form. So i came across a little problem here...
"script "Achievements" Line 186: NoMethodError has occured. Private method ` gsub!' called for 71:fixnum."


name.gsub!(/\n/) {""}
description.gsub!(/\n/) {""}
if completed
hidden = false
hide_icon = false
end
return if !self.achievement(name).nil?
for index in 0..999
if $game_system.achievements[index].nil?
break $game_system.achievements[index] = Achievement.new(
name, description, icon, hidden, hide_icon, completed)
end
end
end

And my little codebox insert doesnt seem to want to work at the moment so sorry about that Dx
If you can tell me whats going on, thatd be nice happy.gif
SojaBird
Hey there,

Yea so you've probably put some things in a achievement wrong.
I can imagen these things happen, since there's a lot that must be stated with the creation of new achievements.
Now for your problem, make sure your achievements are written correctly with the right interpuction-sings.
What I think that happend, is that you've forgotten to put a discription in somewhere.
Make sure you use strings for the name and description.

Example
CODE
Achief.new("Cooky Monster", "Eat at least 1000 cookies", 167)
This will create a new working achievement called Cooky Monster with a description saying Eat at least 1000 cookies and it has the icon with id 167.

So make sure you're using "..." these the correct way.


Greatzz,
SojaBird.
IceMaverick
Mmm, no dice, i had it in there correct, but maybe im being stupid and putting it in the wrong place. Where should i be inserting this code?
SojaBird
Could you tell me what you've done and how you've added your achievements?
Perhaps just quote that part of the script...

I hope I can help you then.
If you're not sure how to use the script, look at the demo-project, I've added some tips and info there.


Greatzz,
SojaBird.

ps. The script comes along pretty nice, items/weapons/armor now can be bought with points! (most recent status-update)
IceMaverick
#-----------#
# Start-up: #
#-----------#
Start_Achievements = ["Test!", "Just Testing it.", 3]
#[Name, Description, Icon, Hidden, Hide_Icon, Completed]




Start_Buyables = [
#[Price, Name, Description, Icon]

]

Start_Conditions = ["Test!","switch(15),true"]
#[Name, Condition]



Start_Rewards = ["Test!","gold(300)"]
#[Name, Reward]



Start_Points = [
#[Name, Points]

]

end


Also, i would love to look at your Demo, it would help me more than anything, but winrar isnt playing nice with the unpacking so it isnt working and its kind of making me angry... -_-

EDIT: Well, i decided to delete te entire script, redownload it, and stuff it back in there with the exact same stuff (Yay copy and paste!) and now it works absolutely perfectly xD Don't know what was wrong, but its all good now, Thanks!
SojaBird
Hey,

It's nice you've got it working again.
I think it had something to do with you, not using the double array thing:
CODE
Start_Achievements = [
["Test!", "Just Testing it.", 3]
]
Would have worked perhaps.

Anyways, not sure, just be happy you've got it working again biggrin.gif

About the winrar thing... is it just your winrar or the demo-rarfile that screwed it up?

Enjoy and keep an eye out for the new version (you might have to replace the script again then tongue.gif)


Greatzz,
SojaBird.
IceMaverick
Its the demo, as soon as i figured out that your file was rar. i went out and grabbed it so i could open it really quick, but it didnt work out too well... when i open it with winrar, it gives me a few errors, none of which i really understand, except for one, i picked out "file is corrupt" out of it so...

And by the way, can you add multiple achievements at the start? And if so, how? Because i tried to and it only made the first one show up. Because i really don't feel like adding every single achievement as i go.
SojaBird
Hey IceMaverick,

So I've tried out the demo myself, but it seems to be working perfectly for me strangly...
To add multiple achievements at the start, just use this methode, but don't forget to leave the first [ and last ] in there!
CODE
Start_Achievements = [
  ["Test!", "Just Testing it.", 3],
  ["Some more!", "Try an other achievement.", 5],
  ["Got it?", "Understand how it works.", 150]
]
This way of putting items in, also works for the rest of the achievement-startups such as conditions, rewards, buyables, points etc.


Greatzz,
SojaBird.
IceMaverick
Yeah thats what i thought, i tried that before and got a couple syntax errors so i must have left something out... oh well, ill just toy around with it for a while, and mess with my winrar until it works with your demo.
Thanks for all the help, great script happy.gif
SojaBird
Hey,

Yea well you could try to post the errors if you'd like.
Or just wait till the new update (or BETA) comes out to see if that fixes your thing.

You could also just past your whole configuration part of the script in a spoilered codebox wink.gif


Greatzz,
SojaBird.
Jarryd
When I Start A New Game And Walk Over A Event Square It Gives Me The Error:

Script 'Scene_File' line 214: TypeError occurred.

no marshal_dump is defined for class Window_Achievement_Dislplay

So I Have To Wait Till The Whole Achievement List Disappears Before I Can Move...
SojaBird
I'm gonna look at it for you.
Can you perhaps explain or describe what kind of event it is where you're walking over when you get the error?
(It probabely has something to do with saving right).


Greatzz,
SojaBird.
Jarryd
Just talking to people
SojaBird
Oke thanks...

I'm gonna see what I can do for you wink.gif


Greatzz,
SojaBird.

ps. Don't pm me if you've posted a reaction here, I'll find it tongue.gif wink.gif
Jarryd
Lol, Okay,
I Can Get It All To Work After Its Finished The Animation Thing On Screen, Just Not While Its Still Going

And Also, For The Script How Do You Get Rid Of The Starter Achievements?

Please don't double post, posts merged ~ Regashi
SojaBird
Allright I'll see what I can do for you.
To get rid of the start-achievements, just remove them from the script.
Or just wait till the next version.
I'll put a clean version as a script and the demo will have the examples in it.

Just a bit more waiting will do miracles smile.gif


Greatzz,
SojaBird.

ps. Why Do All Your Words Start With Capital Letters tongue.gif Lol?
Jarryd
Because lower-case letters are ugly lol
I tryed removing the start achievements sections, but then it comes up with all these errors for lines being connected
to the start achievements and I can never fix so I end up giving up.
SojaBird
Make sure you keep this part in there
CODE
Start_Achievements = [
]
wink.gif
Or wait for the update (in about 1 week).


Greatzz,
SojaBird.
Shrimpen91
Great script SojaBird, Loving it!

But I wonder, can I make the "Complete achievement" just pop up in like top left corner instead of panning from bottom to top, and not show the "Found achievement"-message? Or did I perhaps miss that being explained when I looked through the previous pages? :/
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.