Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Architecture : How to make an Altar? & Something else
New Topic New Poll Post Reply
Poster Message
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon How to make an Altar? & Something else (0)  
Does anyone have the code of the altar\machine that you meet in the single player in the game? Or like the one in Tower of the Sorcerer? I am talking about the ones that raise your stats in trade for money.

Also, what script should I use for a custom sword? I was finally able to make it work and all, but when I drop it back again on a slot, I still have as much attack power as I had when I had the sword.

I know it might be alot to ask, but I've been wanting this for a very long time, so any help is greatly appreciated!
11-06-2011 at 12:51 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mxvladi
Level: Smitemaster
Rank Points: 2505
Registered: 02-11-2008
IP: Logged
icon Re: How to make an Altar? & Something else (+2)  
Niborius wrote:
Does anyone have the code of the altar\machine that you meet in the single player in the game? Or like the one in Tower of the Sorcerer? I am talking about the ones that raise your stats in trade for money.

Here's example of script for altar(it waits for player to move at 1,1(right-click to see coordinates), and gives 1 ATK for each 25 greckles and 1 DEF for each 15 greckles):
Click here to view the secret text


Ctrl-C to copy, Ctrl-Shift-B to paste in-game.

[Last edited by mxvladi at 11-06-2011 01:34 PM]
11-06-2011 at 01:31 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Awesome that did it! Thanks a lot!

Now it's exactly the way I wanted it to be. :)
Thanks for your time ;)

Edit: This was a reply to the second post in this topic, will try yours now :)

Edit2: The altar works! Awesome. Oh, and how can I add a command to the CMD Button in the upper left corner? That'll probably be my last question. Thanks for the quick answers everyone!

[Last edited by Niborius at 11-06-2011 01:54 PM]
11-06-2011 at 01:36 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Re: How to make an Altar? & Something else (+2)  
1) Have a character named, say, "Command".
2) In another character, in the Equipment action, set the upper-left box to "Command" and the lower-left box to "Swap", and select the character named "Command" in the right box.

There! Your CMD button has been enabled! However, pressing it is not going to do anything, so to make it do something, you need to give a default script to the character "Command".

The Each Use action plays a key role here, since a command script will otherwise just run once and end. Here is the code for a command button that increases the player's ATK every time it is used.
  
  Each use Go
Label Go
  Set var "_ATK" + 10

Here, the game looks at whether or not the player has pressed the CMD button. If he has, the script will jump to the "Go" label and execute that block of code.

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!
11-06-2011 at 04:44 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
12th Archivist wrote:
1) Have a character named, say, "Command".
2) In another character, in the Equipment action, set the upper-left box to "Command" and the lower-left box to "Swap", and select the character named "Command" in the right box.

There! Your CMD button has been enabled! However, pressing it is not going to do anything, so to make it do something, you need to give a default script to the character "Command".

The Each Use action plays a key role here, since a command script will otherwise just run once and end. Here is the code for a command button that increases the player's ATK every time it is used.
  
  Each use Go
Label Go
  Set var "_ATK" + 10

Here, the game looks at whether or not the player has pressed the CMD button. If he has, the script will jump to the "Go" label and execute that block of code.

Alright, the CMD button became active, but at the first step I made, the game already thinks I've pressed the button and it starts the script. I did just what you told me to do.

I made a script that teleports the player to a different level (like the inventory in the single player of the game) and in that level I made a script that sends the player back to prior location. However at each first step it already activates itself.

Thanks in advance!
11-06-2011 at 06:12 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Re: How to make an Altar? & Something else (+2)  
This inventory code will transport the player to the inventory or away from it back to the previous location whenever the player presses the CMD button.
  Each use Inv
  Go to End
Label Inv
  If ... 
        Wait until var "Inv" = 1
     Set var "Inv" = 0
     Go to level entrance -2,1
  Else 
     Set var "Inv" = 1
     Go to level entrance 2,0
  If End 
Label End

Without knowing anything about your code, however, I do not know why yours fails to work. Perhaps you could share your code? (Control-B your highlighted code and Control-V in a text box to paste it.)

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!

[Last edited by 12th Archivist at 11-06-2011 06:24 PM]
11-06-2011 at 06:23 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
  Equipment 0,4,20014


Pasted code shows up different than in-game, is that correct? Anyways that's the code in one of the characters, the other character now uses the code you just posted. I stil have the same issue :S Not to mention that after like 2 uses, I am stuck in the inventory level.
11-06-2011 at 07:08 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Re: How to make an Altar? & Something else (+2)  
Equipment 0,4,20014
My code differs from your code probably because I use different characters, character IDs, and level names. In this code, I use the variable "Inv", the levels "Secret Path" and "Inv", and the first Go to Level Entrance is a "Return to prior location".

Pasted code shows up different than in-game, is that correct?
Yes. The code is like that because it can be copied back into the hold using Ctrl-C and Ctrl-Shift-B, and (probably) because that is how the program looks at code before compiling it into machine code.

===========

This might not be useful, but let me explain what each part of the code does. Maybe that will help you find where the problem lies.

  Each use Inv
Whenever the CMD button is pressed, the code jumps to Label Inv.

Go to End
If the CMD button is not pressed on a given turn, the code skips to Label End (and does nothing).

Label Inv
  If ... 
        Wait until var "Inv" = 1
     Set var "Inv" = 0
     Go to level entrance -2,1
Should the variable "Inv" be equal to one, set it to zero and return the player to the player's previous location in whatever level and location. Basically, this is the code that will send the player out of the inventory and back to wherever he came from.

Else 
     Set var "Inv" = 1
     Go to level entrance 2,0
  If End
Since "Var" is not one, it must be zero. Therefore, "Var" will be set to one and the player will be sent to the inventory. This code will send the player to the inventory and set "Inv" to one, thus stating that the player is already in the inventory. Bolded for importance.

Label End
As said above, if CMD is not pressed on the current turn, the code jumps down here to not do anything.

===========

I think it would be best if you shared your hold so I could see what exactly is going on.

Best of luck. :)

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!

[Last edited by 12th Archivist at 11-11-2011 01:58 AM]
11-06-2011 at 08:39 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (+2)  
Hey,

I'm sorry for the late reply.

I did another effort with a little help of your last post, but now I am just totally confused to be honest. I don't know if I have to follow the earlier posts as well etc? I really appreciate the help though, but I am just not coming further (I am really feeling stupid now, but I am just blaming the tiredness for now :))

In this post I have included my hold, so that, if you want to, you can have a look at what I did wrong, and perhaps fix the mistakes? (Not trying to ask too much here :S)

I was still experimenting with the code a bit so it might be a little messed up.

Some information I should add: "Boat" is the first level of the game. Therefore you can find the character with the script in there.
"Inv" is the inventory level. It doesn't look like an inventory, I know, but it's based on a living room of a friend of mine, since I am making this hold for him.

Uhm... Yeah the hold is long from finished, so IF you're going to have a deep look, please don't be too harsh yet :P Though it probably shouldn't look too bad.

Thanks!

Edit: I should probably optimize the hold first. Hold on a few minutes! (file size was over 65 MB)

Edit2: Ok it's a little better now. But it still uses 2 custom themes, so it's around 48 MB now.

Edit3: Excuse me for the edits, but the file doesn't seem to appear in my post. Did I do something wrong? Or can I not see my own attachments?

[Last edited by Niborius at 11-15-2011 02:18 PM]
11-15-2011 at 02:02 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon Re: How to make an Altar? & Something else (+1)  
You need 12 rank points to attach files. I gave you one, but someone else will have to give you the other, since I'm broke.

____________________________
http://beepsandbloops.wordpress.com/
11-15-2011 at 05:52 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
west.logan
Level: Smitemaster
Avatar
Rank Points: 608
Registered: 03-09-2011
IP: Logged
icon Re: How to make an Altar? & Something else (+1)  
RoboBob3000 wrote:
You need 12 rank points to attach files. I gave you one, but someone else will have to give you the other, since I'm broke.

Sounds reasonable.

____________________________
-Logan
11-15-2011 at 06:29 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Thanks guys, didn't know about that. Now I seem to have enough. I'm going to attach it to this post.

Edit: Are you sure I don't need More than 12 rank points? It still doesn't seem to work :O

[Last edited by Niborius at 11-16-2011 03:35 PM]
11-15-2011 at 08:06 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
da rogu3
Level: Smiter
Avatar
Rank Points: 491
Registered: 04-06-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Niborius wrote:
Edit2: Ok it's a little better now. But it still uses 2 custom themes, so it's around 48 MB now.

Edit3: Excuse me for the edits, but the file doesn't seem to appear in my post. Did I do something wrong? Or can I not see my own attachments?
Probably because the forum doesn't support files that big.
11-16-2011 at 04:03 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Ok, I've totally optimized it to 26 MB. If it doesn't work now I'll use an upload website to upload it there ;)

[Last edited by Niborius at 11-23-2011 12:34 PM]
11-16-2011 at 05:14 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Alright, got it working! There was still a script inside the command character itself. And I pasted your script in the first script window you get when you click the character (I'm a little vague, I know :S) But anyways, thanks a lot everyone!!!
11-22-2011 at 12:38 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
What exactly have you done? An altar that is supposed to be a part of a hold, or a hold, where you use an altar?
11-22-2011 at 01:31 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Hold where you use an altar. But my last post wasn't about the altar anymore
11-22-2011 at 03:46 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Blondbeard
Level: Smitemaster
Avatar
Rank Points: 1486
Registered: 03-31-2005
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Okay. So in order to play the hold I have to use the megaupload thingy?
11-23-2011 at 10:00 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Niborius
Level: Goblin
Rank Points: 17
Registered: 10-23-2011
IP: Logged
icon Re: How to make an Altar? & Something else (0)  
Oh well please don't play it yet, it's not finished yet but this was just for testing the CMD button thingy. I planned to make the altar later!
11-23-2011 at 12:34 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Architecture : How to make an Altar? & Something else
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.