Just to let you guys know I'm currently working on the issue looking at Game_CommonEvent, Game_CharacterBase, Game_Character, Game_Player, Game_Follower, Game_Followers, Game_Vehicle and Game_Event. I've decided to tackle everything that's left besides Game_Interpreter, which will get its own issue, and then we're moving on to the Sprite classes. It's gonna be a big one! Should hopefully be up within the next few days, though tomorrow is my wedding anniversary.
Slip into Ruby: An introductory guide to RGSS for beginners.
Learning Ruby and RGSSxYe're married, Buckie-me-lad?
Well, Happy Anniversary to you, then! 😀
Celebrate appropriately, and get the next lesson up whenever you feel up to the task after the festivities. 😉
Well, Happy Anniversary to you, then! 😀
Celebrate appropriately, and get the next lesson up whenever you feel up to the task after the festivities. 😉
Yep, one year ago today, Warpmind! Thanks, I will do. 🙂
Then what are you doing here on your anniversary? Go and enjoy! And congrats.
Thanks a lot for the tutorials, started reading today, maybe learning a little scripting will be good for my events.
Thank you, this is beyond awesome! Resources like Learn Ruby the Hard Way or Ruby Monk gave me a general sense of the language and syntax, but it was still all very abstract, so I tackled a few scripts and ran into problems. But it gave me the ability to understand the inner workings of scripts and your articles are perfect for this. I can't wait for the series to be finished, dont' give up!
EDIT: Reading the last replies, I realised we got married at the same time. Funny how life works! 😉 'Grats to you!
EDIT: Reading the last replies, I realised we got married at the same time. Funny how life works! 😉 'Grats to you!
This is awesome and very appreciated! Just finished all 4 parts of chapter 1 tonight.
I came here in hopes of turning my crafting system into a legitimate in-game window. This has my hopes WAY up. However, I only know what Ruby/RGSS is because of RPG Maker VX Ace which I only discovered in March. So I'm very new to all of this. Hoping you can help with something.
I've created a very elaborate crafting system with hundreds of Variables, hundreds of Items, hundreds of Common Events, and thousands upon thousands of Conditional Branches. It uses the text box and show choices. It was a masterpiece I put together from scratch through a lot of trial and error and now works flawlessly - at least for items completed. I'm only 50% done with all the weapons. I still have to do armor and potions, and place the rest of the gathering nodes.
But I kept thinking, there's got to be an easier way. That thought lead me here. I want to be able to just add in the items and its needed components, and let the program decide if there are enough components in the inventory, and display them accordingly - in the color red if the inventory is short on components.
So I'll continue to read up on RGSS and hope to figure this all out.
However, with what you've showed us, how can I limit the EnemyList to display only a specific array of enemies. For example, let's say [001:Slime] to [016😛uppet]? I've been tinkering with the script, and the most I've been able to do without causing a fatal error is make the cursor start on the puppet.
Thanks for all your hard work!
Brigg
PS Long Live Tiddles!
I came here in hopes of turning my crafting system into a legitimate in-game window. This has my hopes WAY up. However, I only know what Ruby/RGSS is because of RPG Maker VX Ace which I only discovered in March. So I'm very new to all of this. Hoping you can help with something.
I've created a very elaborate crafting system with hundreds of Variables, hundreds of Items, hundreds of Common Events, and thousands upon thousands of Conditional Branches. It uses the text box and show choices. It was a masterpiece I put together from scratch through a lot of trial and error and now works flawlessly - at least for items completed. I'm only 50% done with all the weapons. I still have to do armor and potions, and place the rest of the gathering nodes.
But I kept thinking, there's got to be an easier way. That thought lead me here. I want to be able to just add in the items and its needed components, and let the program decide if there are enough components in the inventory, and display them accordingly - in the color red if the inventory is short on components.
So I'll continue to read up on RGSS and hope to figure this all out.
However, with what you've showed us, how can I limit the EnemyList to display only a specific array of enemies. For example, let's say [001:Slime] to [016😛uppet]? I've been tinkering with the script, and the most I've been able to do without causing a fatal error is make the cursor start on the puppet.
Thanks for all your hard work!
Brigg
PS Long Live Tiddles!
OK, I'm really no pro and I'm quite new to ruby and RGSS3 as well, but I've been reading and I might have some ideas to share with you.
@ Crafting system:
This seems like a big can of works to open. Have you checked existing scripts for this instead? Maybe none will do EXACTLY what you want, but there's bound to be one close enough / understandable enough to supply a good basis you can modify for your system. If you didn't know about it, you can search the Master Scripts List for a crafting or alchemy systems, surely something was already made... Although I don't know how up-to-date that page is, so a google search could also yield other interesting results, I guess.
@ the EnemyList thing:
Maybe use the Array#select method?
I'M not sure if EnemyList is an Array or Hashmap, but if it's an array, you could do something like EnemyList.select { |i| i <= 16 } to return an array of all the enemy ids lower than 16. If it's a Hash, another idea could be:
list_of_enemies_to_show = []EnemyList.each { |En| list_of_enemies_to_show << En if En && En.id <= 16 }# Or, in non-shorthand:EnemyList.each do |En| if En && En.id <= 16 list_of_enemies_to_show.push(En) endendBy the way, that ruby-doc page is my new best friend. I bookmarked it and it is always the first resource I go to with questions like "Surely there's a simple way of doing *******". That, or a good old google search. 😛
@ Crafting system:
This seems like a big can of works to open. Have you checked existing scripts for this instead? Maybe none will do EXACTLY what you want, but there's bound to be one close enough / understandable enough to supply a good basis you can modify for your system. If you didn't know about it, you can search the Master Scripts List for a crafting or alchemy systems, surely something was already made... Although I don't know how up-to-date that page is, so a google search could also yield other interesting results, I guess.
@ the EnemyList thing:
Maybe use the Array#select method?
I'M not sure if EnemyList is an Array or Hashmap, but if it's an array, you could do something like EnemyList.select { |i| i <= 16 } to return an array of all the enemy ids lower than 16. If it's a Hash, another idea could be:
list_of_enemies_to_show = []EnemyList.each { |En| list_of_enemies_to_show << En if En && En.id <= 16 }# Or, in non-shorthand:EnemyList.each do |En| if En && En.id <= 16 list_of_enemies_to_show.push(En) endendBy the way, that ruby-doc page is my new best friend. I bookmarked it and it is always the first resource I go to with questions like "Surely there's a simple way of doing *******". That, or a good old google search. 😛
Could I suggest that where there is a query along the lines of "how do I make my own script do X?" people start a fresh thread in the Script Support forum rather than derail this one with interesting but unrelated questions.
Thank you.
Thank you.
@ksjp17
LaFlibuste was responding to my on-topic post about the Chapter 1 "Slip Into Ruby" script, not my own. I don't have my own script. That's why I am here.
@LaFlibuste
Thanks for the response! I'm going to throw that into Trihan's script just to see if it works or not.
Thanks for your help! 😀
Brigg
Long Live Tiddles the Cat!
LaFlibuste was responding to my on-topic post about the Chapter 1 "Slip Into Ruby" script, not my own. I don't have my own script. That's why I am here.
@LaFlibuste
Thanks for the response! I'm going to throw that into Trihan's script just to see if it works or not.
Thanks for your help! 😀
Brigg
Long Live Tiddles the Cat!
Still working on the next one! Hopefully coming soon, guys. Thanks for all the praise and encouragement: you are the reason I do this, and it means a lot that people are actually getting use out of it.
I second ksjp's request to keep this topic free of actual questions not related to the series, but feel free to send me a PM if you need any advice or help.
On the subject of the subset of array elements, select works but you could also simply use the built-in range selectors:
list_of_enemies_to_show[5, 10] would return 10 elements of the array starting at index 5 (remember that as arrays are zero-indexed this would actually be the 6th item).
list_of_enemies_to_show[3..7] would return elements 3, 4, 5, 6 and 7.
I second ksjp's request to keep this topic free of actual questions not related to the series, but feel free to send me a PM if you need any advice or help.
On the subject of the subset of array elements, select works but you could also simply use the built-in range selectors:
list_of_enemies_to_show[5, 10] would return 10 elements of the array starting at index 5 (remember that as arrays are zero-indexed this would actually be the 6th item).
list_of_enemies_to_show[3..7] would return elements 3, 4, 5, 6 and 7.
Just to make sure I'm understanding correctly the $ indicates a global variable, and it's ill advised to use them if you don't want various scripts to inherit different aspects of code in other scripts?
So then how does the engine factor in things like experience and levels through the whole game?
I'm also a little lost in aspects that don't use words, but symbols instead. Mostly familiar with variables, strings, prompts, puts, while, case, _a, and _s. Having come from text-based-adventures recently.
Obviously RPG Maker VX Ace is very different from Ruby text adventures. Like user_input = gets.chomp not being available was a bit of an odd discovery.
So then how does the engine factor in things like experience and levels through the whole game?
I'm also a little lost in aspects that don't use words, but symbols instead. Mostly familiar with variables, strings, prompts, puts, while, case, _a, and _s. Having come from text-based-adventures recently.
Obviously RPG Maker VX Ace is very different from Ruby text adventures. Like user_input = gets.chomp not being available was a bit of an odd discovery.
gets.chomp actually does work, but you have to do the input in the console so it isn't that useful.
Yeah, $ is for global variables. The engine handles experience and levels because they are properties of the actor classes, which have their own methods for accessing them. That's different from being global.
Just a quick update guys: I'm still working on the next SIR, but I have a game project that's due at the end of the month so hings have been pretty hectic on my end for a while.
I was actually considering making Slip into Ruby a video series instead: this will not only allow me to churn them out more quickly, it means I can label stuff and you can basically jump to whatever it is you need help with. Who would prefer this method of delivery?
Yeah, $ is for global variables. The engine handles experience and levels because they are properties of the actor classes, which have their own methods for accessing them. That's different from being global.
Just a quick update guys: I'm still working on the next SIR, but I have a game project that's due at the end of the month so hings have been pretty hectic on my end for a while.
I was actually considering making Slip into Ruby a video series instead: this will not only allow me to churn them out more quickly, it means I can label stuff and you can basically jump to whatever it is you need help with. Who would prefer this method of delivery?
I wouldn't.
I have looked at videos, and it is incredibly difficult to see small but crucial differences e.g. is that (), {} or []? Is that a colon or a semi-colon? Also it is a total pain (imo) to have to keep stopping the video and wind back because you haven't quite understood something, or want to check what's just been said against something that was said earlier etc. etc.
There is also the further complication that many users of this forum have English as their second, third or even fourth language. With the written word they can go at their own speed, whereas the spoken word can be much more tricky. Throw in any accent on top of that (looks carefully at the location under your avatar, yep, could be an accent there) and that can make the spoken word even more difficult.
I have looked at videos, and it is incredibly difficult to see small but crucial differences e.g. is that (), {} or []? Is that a colon or a semi-colon? Also it is a total pain (imo) to have to keep stopping the video and wind back because you haven't quite understood something, or want to check what's just been said against something that was said earlier etc. etc.
There is also the further complication that many users of this forum have English as their second, third or even fourth language. With the written word they can go at their own speed, whereas the spoken word can be much more tricky. Throw in any accent on top of that (looks carefully at the location under your avatar, yep, could be an accent there) and that can make the spoken word even more difficult.
I second that. Aside from what ksjp17 said, for me it's very difficult to fully concentrate on video-lessons, I prefer written content (Also because I tend to read texts on my smartphone when I'm not at home, at a place where there isn't internet connection or when waiting for something, like at the bank queue, etc).
Thirded. Also, text can be printed to read offline. Not so easy with video...
Bleh. Okay, text it is. 😛
So I totally just noticed that I did two whole updates of this and you guys probably had no idea because I forgot to update the topic. I've posted Slip into Ruby in so many places that a few slip through the cracks sometimes. Sorry! OP has been updated with the new links.
I was wondering what changed in the tread when I saw it XD
I want to thank you for these tutorials!
I'm studying Ruby Script for RPG Maker VX Ace, and your first tutorial help me understand all of the information I already knew but didn't understand.
I look forward to reading the rest you've written!
I'm studying Ruby Script for RPG Maker VX Ace, and your first tutorial help me understand all of the information I already knew but didn't understand.
I look forward to reading the rest you've written!
Original thread: https://forums.rpgmakerweb.com/threads/slip-into-ruby-an-introductory-guide-to-rgss-for-beginners.38900/