Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
In the meantime please join the new Discord Server!
If you have any questions please e-mail me through the Platinum Arts website.
RPG Scripting guide
RPG Scripting guide
I know that RPG mode scripting is quite different from FPS mode scripting. And there's a good Hirato's tutorial on wiki, telling us the basics. But going further I'd like to learn more about the commands, global variables, etc. I would be very grateful if someone lists the most useful commands and give their use examples in this topic. I'd like to see a variety of commands and parameters to understand the opportunities we get in RPG mode. I know this list won't be full in the beginning but we can enrich it post by post.
-
- Member
- Posts: 20
- Joined: August 30th, 2012, 9:43 am
- Location: Great Britain
Re: RPG Scripting guide
I believe is possible.
You can use this for triggers, to simulate house ownership. Have a variable House1Ownership. Now if you talk to the landlord and pay 4500 gold (say), you could change the variable. Your location would change (if you use the trigger) only in this case. You can also create an upgraded house when the variable = 2 (use an extra map). Last of all, you need to echo something like "I own this house. Buy it from me for 4500 gold. - Rolf." if the variable is zero.
Code: Select all
if r_global_get $variablename ‹ 1
You can use this for triggers, to simulate house ownership. Have a variable House1Ownership. Now if you talk to the landlord and pay 4500 gold (say), you could change the variable. Your location would change (if you use the trigger) only in this case. You can also create an upgraded house when the variable = 2 (use an extra map). Last of all, you need to echo something like "I own this house. Buy it from me for 4500 gold. - Rolf." if the variable is zero.
Freelance PAS user good at building RPG maps and designing interiors. Hates texturing though...
rydion_dev wrote:This doesn't cut any mustard at all, I'm afraid. It barely cuts tomato sauce!
- kddekadenz
- Member
- Posts: 423
- Joined: July 17th, 2011, 11:02 am
- Name: kdd
- Contact:
Re: RPG Scripting guide
You can do a lot of things with global variables, not only House ownership.rydion_dev wrote:I believeis possible.Code: Select all
if r_global_get $variablename ‹ 1
You can use this for triggers, to simulate house ownership. Have a variable House1Ownership. Now if you talk to the landlord and pay 4500 gold (say), you could change the variable. Your location would change (if you use the trigger) only in this case. You can also create an upgraded house when the variable = 2 (use an extra map). Last of all, you need to echo something like "I own this house. Buy it from me for 4500 gold. - Rolf." if the variable is zero.
I do use it for quests,too.
I'm also missing a list of all RPG commands.
I wouldn't need a description, it just should be formatted like "command [inputtype, e.g. integer]".
Kelgar is an advanced RPG beeing developed in Sandbox
-
- Member
- Posts: 20
- Joined: August 30th, 2012, 9:43 am
- Location: Great Britain
Re: RPG Scripting guide
You can find most commands at README.txt in the relevant folder. Bear in mind that you need to use when defining most recipes. I find that this is very useful with critters.
Questions (For anyone)
1. Should this be for the "greater good", in that everything will be addressed? This could well become a formidable RPG tutorial, possibly Hirato-scale!
2. Can you have "named" recipes?
3. Can you have fixed equipment?
4. Are there plans for a Quest Editor?
5. In v2.8, I'm having a problem. It is that the character merely states his first speech. But he is neccesary for a major quest. I believe this relates to or something like that?
6. Can you have immortal/essential creatures who are necessary for quests?
7. Can you change a variable by a fixed amount?
8. Can you add inter-NPC warfare, e.g. an arena?
9. Can you have random weapons?
10. What about books and food?
11. Can "bed" triggers appear?
12. Can you have a 1024 second cycle...
a. where certain enemies only move at certain times?
b. where NPCs travel logically around a map e.g. shopping?
c. with different songs?
d. with a day/night cycle?
13. Can you have bounties, law and order?
14. Can you code disease?
Code: Select all
$RECIPE_KNOWN
Questions (For anyone)
1. Should this be for the "greater good", in that everything will be addressed? This could well become a formidable RPG tutorial, possibly Hirato-scale!
2. Can you have "named" recipes?
3. Can you have fixed equipment?
4. Are there plans for a Quest Editor?
5. In v2.8, I'm having a problem. It is that the character merely states his first speech. But he is neccesary for a major quest. I believe this relates to
Code: Select all
r_chat talker self
6. Can you have immortal/essential creatures who are necessary for quests?
7. Can you change a variable by a fixed amount?
8. Can you add inter-NPC warfare, e.g. an arena?
9. Can you have random weapons?
10. What about books and food?
11. Can "bed" triggers appear?
12. Can you have a 1024 second cycle...
a. where certain enemies only move at certain times?
b. where NPCs travel logically around a map e.g. shopping?
c. with different songs?
d. with a day/night cycle?
13. Can you have bounties, law and order?
14. Can you code disease?
Freelance PAS user good at building RPG maps and designing interiors. Hates texturing though...
rydion_dev wrote:This doesn't cut any mustard at all, I'm afraid. It barely cuts tomato sauce!
Re: RPG Scripting guide
for the record, global variables in... I think 2.8.0 onwards... are strings, and you're supposed to use it for things like quests and the overall global world state.
@rydion_dev
2, recipes have a "name" slot, set it however you like.
3. impossible, but you can equip a definitive set and remove all interface side stuff that allows this
4. no - the RPG doesn't even know what a quest is; this was done on purpose to allow creativity and variety in the quest design .
5. if it's not talking you've set it up wrong - the nodes are named in 2.8.0 onwards so you need to give them names, there are examples in the "default" game's scripts
6. No, this is not Bethesda quality engine
8. You can easily specify this with faction stats and scripts.
9. Yes - this is in fact a feature of 2.8.0
10. Consumable use types don't work yet, but they can be defined without issue.
11. any type can appear wherever there is a 'spawn' entity, as long as you invoke the appropriate command... I think it was r_spawn_object or something like that, don't remember. if you want them to disappear too, be sure to keep track of them in reference lists.
12. possible in theory, in practice difficult. It doesn't help that the RPG currently has no concept of night/day, something I intend to fix soonish.
13. Yes, you will need to script that stuff though.
@rydion_dev
2, recipes have a "name" slot, set it however you like.
3. impossible, but you can equip a definitive set and remove all interface side stuff that allows this
4. no - the RPG doesn't even know what a quest is; this was done on purpose to allow creativity and variety in the quest design .
5. if it's not talking you've set it up wrong - the nodes are named in 2.8.0 onwards so you need to give them names, there are examples in the "default" game's scripts
6. No, this is not Bethesda quality engine
8. You can easily specify this with faction stats and scripts.
9. Yes - this is in fact a feature of 2.8.0
10. Consumable use types don't work yet, but they can be defined without issue.
11. any type can appear wherever there is a 'spawn' entity, as long as you invoke the appropriate command... I think it was r_spawn_object or something like that, don't remember. if you want them to disappear too, be sure to keep track of them in reference lists.
12. possible in theory, in practice difficult. It doesn't help that the RPG currently has no concept of night/day, something I intend to fix soonish.
13. Yes, you will need to script that stuff though.
This is not a url, clicking it is pointless