As part of the SJ re-write for Rags 2.4.0.0, I get to rework some of my systems.
Currently, re-working on the equipment system. Code was already done to allow the player to use the other weapons but just wasn't allowed in the missions. The way I did it originally was very... messy. Hopefully, I can come up with something more streamline and simpler while maintain the scalability.
Tuesday, December 3, 2013
Seraphim's Javelin: Reworking Equipment System
Friday, November 22, 2013
RAGS Tips and Tricks #1: Order of Actions
I present to you RAGS Tips and Tricks. Here I'll post the random things I have learned when experimenting with RAGS. Everything here will be done in RAGS version 2.4.0.0.
I make no promises that the way I do things are the best way to do them. But I'll do my best to make it the best. Comments appreciated.
Without further ado...
One of the most important thing about your code is making sure it runs when you want it to and only when you want it to. I attached a helping rags game that will output when actions happen. Think of it as the debug window in a normal player form.
When you first start Order of Actions, we get to see how the game starts.
A few things stand out here, first thing that happens is the Game Title in bold and is followed by the Opening Message right away. I'm very nit-picky and likes my text spaced apart. Note the gap I like between paragraphs... v
^--- So if I want a space between the Game Title and the Opening Message, I need to add it in the Opening Message.
It is worth pointing out that there is a space between the Opening Message and Room 1: On Player Enter First Time. That is from the RAGS engine and is automatic.
Second thing to notice is the Player: On Game Start action happens last! Everything else happens before you get to the Player's On Game Start code. This includes the Player's On Player Enter. Some ways to work around this is to put the player in a starting room before the game actually starts. Tales of the Drunken Cowboy by Mdqp starts off in a character creation room first before the game actually starts.
Another work around is to put all the Game Start code into the action that happens first: the starting room's On Player Enter First Time action. This way you're guaranteed it will happen first and any narratives or text will appear before anything else could happen. The down side is it's not very intuitive. If you need to change something with the start of the game, it doesn't make much sense to check the code in a room. But if you can keep that in mind, this would work fine.
Another thing to notice is all On Player Enter First Time actions occur before the regular On Player Enter actions. And the order is Room, Player, Object, and then Characters. There is no On Player Enter First Time.
When you move South, you'll see:
There's also a space between Character 1: On Player Leave and Room 2: On Player Enter First Time. This is where the player actually moves to the new room. This space is with the RAGS engine and can not be removed. Not a problem if you like extra spacing. If you don't, well...
But wait, there's one last thing. Timers! We got Rooms. We got Objects. We got Characters and the Player. One last thing remains, which is Timers.
Right-click on the Player Portrait and select Timer. I made two timers since there are two different ones we need to worry about at the moment: Run Always and Run a Specified Length.
Timer 1 is Run Always. There is only one action available for this: On Each Turn. Timer 2 is set to run for 3 turns and will restart automatically.
Timer 2 has 5 different actions: On Each Turn, On Turn 1, On Turn 2, On Turn 3, and On Last Turn.
Select Timer 1 (Run Always) and select On. This just sets the Timer Active while Off sets it inactive. This is not Execute Timer nor is it Reset Timer. I'll get to those in a different Tips and Tricks.
You should see the results immediately:
Turn on Timer 2 as well: Right click Player Portrait, select Timer, select Timer 2 (3 Turn Length), and then select On. The new text will be:
We need to use up some actions here for the timers so just right click on the Player Portrait and select Examine and do the same for the Room.
The new text:
Anyways, back to timers. The last three lines tells us the priority of a Set Length Timer: On Each Turn, On Turn X, and lastly, On Last Turn.
Last bit of information before I done here is to move North.
However, you'll notice that there's only Timer 1. There's no Timer 2. The Timer is set to Restart Automatically so it is running. That's the last thing I want to point out. Restarting the timer takes a turn. Right click on the Player Portrait and select Examine.
Of course, there are ways to fix this. One easy way is to reset the timer in the On Last Turn action. But the problem is usually the knowledge of why and not how to fix. If a repeating timer is mistimed, this is probably why.
Anyways, that is it. Thanks for reading; hope this was helpful. Please leave comments or questions. If you want me to talk about something specific, let me know.
Player: On Game Start happens last.
All On Player Enter/Leave First Time happens first before any of the regulard On Player Enter/Leave.
It's Room, Player, Objects, Characters, and then Timers.
I make no promises that the way I do things are the best way to do them. But I'll do my best to make it the best. Comments appreciated.
Without further ado...
RAGS Tips and Tricks #1: Order of Actions
Download here.One of the most important thing about your code is making sure it runs when you want it to and only when you want it to. I attached a helping rags game that will output when actions happen. Think of it as the debug window in a normal player form.
When you first start Order of Actions, we get to see how the game starts.
Game Setup: Game TitleA quick breakdown on the meaning behind the text. The first half is generally where or what. The second half is the section or action. In "Game Setup: Game Title", it is the Game Setup and in the Game Title section. For "Room 1: On Player Enter First Time", it is for Room 1 and the action is On Player Enter First Time. Simple.
Game Setup: Opening Message
Room 1: On Player Enter First Time
Object 1: On Player Enter First Time
Character 1: On Player Enter First Time
Room 1: On Player Enter
Player: On Player Enter
Object 1: On Player Enter
Character 1: On Player Enter
Room 1: Description
You can see a Object 1
Character 1 is here.
Player: On Game Start
A few things stand out here, first thing that happens is the Game Title in bold and is followed by the Opening Message right away. I'm very nit-picky and likes my text spaced apart. Note the gap I like between paragraphs... v
^--- So if I want a space between the Game Title and the Opening Message, I need to add it in the Opening Message.
It is worth pointing out that there is a space between the Opening Message and Room 1: On Player Enter First Time. That is from the RAGS engine and is automatic.
Second thing to notice is the Player: On Game Start action happens last! Everything else happens before you get to the Player's On Game Start code. This includes the Player's On Player Enter. Some ways to work around this is to put the player in a starting room before the game actually starts. Tales of the Drunken Cowboy by Mdqp starts off in a character creation room first before the game actually starts.
Another work around is to put all the Game Start code into the action that happens first: the starting room's On Player Enter First Time action. This way you're guaranteed it will happen first and any narratives or text will appear before anything else could happen. The down side is it's not very intuitive. If you need to change something with the start of the game, it doesn't make much sense to check the code in a room. But if you can keep that in mind, this would work fine.
Another thing to notice is all On Player Enter First Time actions occur before the regular On Player Enter actions. And the order is Room, Player, Object, and then Characters. There is no On Player Enter First Time.
When you move South, you'll see:
SouthLike the On Player Enter, all On Player Leave First Time actions trigger before any On Player Leave action. And the order is Room, Player, Object, and Character.
Room 1: On Player Leave First Time
Object 1: On Player Leave First Time
Character 1: On Player Leave First Time
Room 1: On Player Leave
Player: On Player Leave
Object 1: On Player Leave
Character 1: On Player Leave
Room 2: On Player Enter First Time
Object 2: On Player Enter First Time
Character 2: On Player Enter First Time
Room 2: On Player Enter
Player: On Player Enter
Object 2: On Player Enter
Character 2: On Player Enter
Room 2: Description
You can see a Object 2
Character 2 is here.
There's also a space between Character 1: On Player Leave and Room 2: On Player Enter First Time. This is where the player actually moves to the new room. This space is with the RAGS engine and can not be removed. Not a problem if you like extra spacing. If you don't, well...
But wait, there's one last thing. Timers! We got Rooms. We got Objects. We got Characters and the Player. One last thing remains, which is Timers.
Right-click on the Player Portrait and select Timer. I made two timers since there are two different ones we need to worry about at the moment: Run Always and Run a Specified Length.
Timer 1 is Run Always. There is only one action available for this: On Each Turn. Timer 2 is set to run for 3 turns and will restart automatically.
Timer 2 has 5 different actions: On Each Turn, On Turn 1, On Turn 2, On Turn 3, and On Last Turn.
Select Timer 1 (Run Always) and select On. This just sets the Timer Active while Off sets it inactive. This is not Execute Timer nor is it Reset Timer. I'll get to those in a different Tips and Tricks.
You should see the results immediately:
Player - OnThis means the timer will start the moment it's turned on. Please keep that in mind.
Timer 1: On Each Turn
Turn on Timer 2 as well: Right click Player Portrait, select Timer, select Timer 2 (3 Turn Length), and then select On. The new text will be:
Player - OnTimer 1 happens before Timer 2 due to the Execution Order of the timers. If we switched it around, Timer 2 text would be before Timer 1. Also, notice that for Timer 2, the On Each Turn action happens before the On Turn 1 action. Most of the time, you won't be using both On Each Turn and On Turn X so you probably won't have much conflict here.
Timer 1: On Each Turn
Timer 2 (3 turn timer): On Each Turn
Timer 2 (3 turn timer): On Turn 1
We need to use up some actions here for the timers so just right click on the Player Portrait and select Examine and do the same for the Room.
The new text:
Player - ExamineA quick point for the "Player - Examine" and "Room: Room 2 - Examine" part. The action is actually called Examine in both cases. "Player - " part is automatic. Sadly, I don't know of any way to override this. "Room: " part is also automatic. The format appears to be "Player - <Action Name>" and "Room: <Room Name> - <Action Name>".
Player: Description
Timer 1: On Each Turn
Timer 2 (3 turn timer): On Each Turn
Timer 2 (3 turn timer): On Turn 2
Room: Room 2 - Examine
Room 2: Description
Timer 1: On Each Turn
Timer 2 (3 turn timer): On Each Turn
Timer 2 (3 turn timer): On Turn 3
Timer 2 (3 turn timer): On Last Turn
Anyways, back to timers. The last three lines tells us the priority of a Set Length Timer: On Each Turn, On Turn X, and lastly, On Last Turn.
Last bit of information before I done here is to move North.
NorthEverything sound be familiar by now. The On Player Leave First Time section followed by the regular On Player Leave. A space for when the player actually moves. The On Player Enter First Time already happened at the start of the game so that's not there, but the stand On Player Enter is. And finally the Timers. Looks like the Timers are last. This puts the final order as Room, Player, Objects, Characters, and Timers.
Room 2: On Player Leave First Time
Object 2: On Player Leave First Time
Character 2: On Player Leave First Time
Room 2: On Player Leave
Player: On Player Leave
Object 2: On Player Leave
Character 2: On Player Leave
Room 1: On Player Enter
Player: On Player Enter
Object 1: On Player Enter
Character 1: On Player Enter
Room 1: Description
You can see a Object 1
Character 1 is here.
Timer 1: On Each Turn
However, you'll notice that there's only Timer 1. There's no Timer 2. The Timer is set to Restart Automatically so it is running. That's the last thing I want to point out. Restarting the timer takes a turn. Right click on the Player Portrait and select Examine.
Player - ExamineSo that makes it 4 turns to loop for a 3 turn length timer!
Player: Description
Timer 1: On Each Turn
Timer 2 (3 turn timer): On Each Turn
Timer 2 (3 turn timer): On Turn 1
Of course, there are ways to fix this. One easy way is to reset the timer in the On Last Turn action. But the problem is usually the knowledge of why and not how to fix. If a repeating timer is mistimed, this is probably why.
Anyways, that is it. Thanks for reading; hope this was helpful. Please leave comments or questions. If you want me to talk about something specific, let me know.
TL;DR section
RAGS Tips and Tricks 1: Order of Actions downloadPlayer: On Game Start happens last.
All On Player Enter/Leave First Time happens first before any of the regulard On Player Enter/Leave.
It's Room, Player, Objects, Characters, and then Timers.
Labels:
Order of Actions,
RAGS,
RAGS Tips and Tricks,
Tips and Tricks
Tuesday, November 12, 2013
New Project Appears!
I have some projects floating around in my head. If things go well, you should see something interesting (read: not an actual game) within 2 weeks.
At the same time, I'm hoping to lay down some ground work for Seraphim's Javelin. This is part of the code rewrite to hopefully make everything neater. With any luck, this will result in fewer bugs and more effective code. But this will depend on the amount of free time I'll have.
At the same time, I'm hoping to lay down some ground work for Seraphim's Javelin. This is part of the code rewrite to hopefully make everything neater. With any luck, this will result in fewer bugs and more effective code. But this will depend on the amount of free time I'll have.
Friday, November 1, 2013
Not going to make it
Ugh... I code so slowly... At my current rate, I'll be done by Christmas.
Sigh. Another failed attempt at a game. I'm shelving this for later.
Maybe next time I'll give myself more than one day.
Sigh. Another failed attempt at a game. I'm shelving this for later.
Maybe next time I'll give myself more than one day.
Thursday, October 31, 2013
Restart
My first attempt for a game on Halloween was cut short due to it drastically expanding well beyond short and sweet. When I started plotting out a 9x9 grid, I suspected I won't finish by Halloween. I thought about cutting it down but that wasn't going to be my only problem. So I decided to shelf that game and start another one.
Fingers crossed. Wish me luck. I'll hopefully have a really buggy beta up by midnight Halloween.
Fingers crossed. Wish me luck. I'll hopefully have a really buggy beta up by midnight Halloween.
Tuesday, October 29, 2013
Halloween Game
Just realized Halloween is coming up and I haven't made anything for it. Gonna work hard to release something by Halloween. Hopefully short and sweet.
Tuesday, October 22, 2013
Still working
Been busy with real life stuff. Seraphim's constantly in the back of my mind though. Still working on it, albeit very slowly.
Sunday, September 15, 2013
Back
I'm back. Did some planning for an untitled game (not yet released and won't be released for a while). Eager to get back working on Seraphim's Javelin.
Sunday, August 25, 2013
Got that urge
Got a hankering to start on a new game idea, well one of the many. Not sure how well it'll pan out with SJ and my limited free time. Going to see how far I can get and if it processes to anything worthwhile. Alburn, the developer of incomplete games!
Tuesday, August 20, 2013
Vacation time coming up
A planned vacation is coming up for me. I won't have access to a computer with rags but I will be planning out the extra content for 0.32. It just might take a while to finish it all.
Saturday, August 17, 2013
Re-writing Seraphim's Javelin
Some people are having problems with 2.4.14. Some games I regularly play updated to 2.4.14 and as a consequence, Seraphim got updated to that version as well. Not a good excuse but that's what happened.
At the same time, there are a number of bugs where dressing bugs out or character's actions bugs out (namely Watchmaker's briefing or debriefing). I want to touch up on those and reorganize everything to make it easier for me to track and make sure stuff like that doesn't happen.
Both problems requires a major re-write. So that's why I decided I could just fix both problems and be done with it. The more I ignore these two problems, the more I need to do to fix them.
I'm hoping I could finish this quickly so I could get started on more content.
At the same time, there are a number of bugs where dressing bugs out or character's actions bugs out (namely Watchmaker's briefing or debriefing). I want to touch up on those and reorganize everything to make it easier for me to track and make sure stuff like that doesn't happen.
Both problems requires a major re-write. So that's why I decided I could just fix both problems and be done with it. The more I ignore these two problems, the more I need to do to fix them.
I'm hoping I could finish this quickly so I could get started on more content.
Subscribe to:
Posts (Atom)