Designer - Setting Variables and Controlling Inventory

  • 5 Replies
  • 149 Views
*

Freddy

  • Administrator
  • Jr. Member
  • *****
  • 93
Designer - Setting Variables and Controlling Inventory
« on: July 19, 2021, 09:13:31 PM »
This is a place holder for a more detailed explanation and to remind myself how this works!



This is the context for a particular page. These are the background tasks that occur when a player lands on this page.

Two things are going on here in the lower half; one portion is changing a variable XP and the other portion is changing things (inventory items).

1) Variables - to add a variable to the page you use the Vars drop down menu, pick the variable you want to adjust and then click + to enter it into the page context.

So here we have already added XP to the page's context. And then we have entered ++30 for the adjustment to the variable.

++ is incrementing
-- is decrementing

So here we are incrementing XP by 30.

You can use integers or dice notation. So if you want to increment XP by a roll of 2 x 6 sided dice you would enter:

++2d6

You can also just add an absolute value. So you could set XP to 40 regardless.

2) Things - things are objects in the game like maps, weapons, chests and all kinds of things like that - objects that can be picked up and added to your inventory. You add them to the page's context just like you do with variables - first find it in the drop down, then click the + button to add it to the page.

You use the same process for incrementing/decrementing or setting an absolute value as you would with variables.

The idea of adding them to the page context individually like this, is so that there is not an exhaustive list of variables and things - so I did it like this so only the variables and things we are interested in appear on the page. Otherwise it's just going to be too busy.

You can remove the variables or things from the page by again selecting the name in the drop downs and clicking on the X button - this will remove it from the context.

Beside the inputs is a little flag icon and a checkbox (blue with tick) - this simply tells the game engine to notify the player of the change. So, for example, when they land on that page it will say something like Your XP has increased by 30 and so on for the things too. If left unticked the game engine will just do the operation silently in the background.
« Last Edit: September 06, 2021, 07:52:40 PM by Freddy »

*

Data

  • Global Moderator
  • Newbie
  • *****
  • 27
  • Gamer
Re: Setting Variables and Controlling Inventory
« Reply #1 on: July 25, 2021, 10:00:58 AM »
Well I read all that but it's pretty hard to get my head round it  ;D

I think you are going in the right direction though and with all these things there will be a learning curve when using it.

*

Freddy

  • Administrator
  • Jr. Member
  • *****
  • 93
Re: Setting Variables and Controlling Inventory
« Reply #2 on: July 25, 2021, 02:13:33 PM »
Hehe  :)

Which parts need more explaining? Possibly how you add a variable/thing to a page perhaps?

I'm thinking of doing videos too.

*

Freddy

  • Administrator
  • Jr. Member
  • *****
  • 93
Re: Setting Variables and Controlling Inventory
« Reply #3 on: July 31, 2021, 03:12:05 PM »
Note to self - I have added 'max' to return the player to their starting value. Used after things like sleeping to restore health.

*

Data

  • Global Moderator
  • Newbie
  • *****
  • 27
  • Gamer
Re: Setting Variables and Controlling Inventory
« Reply #4 on: August 05, 2021, 10:48:22 AM »
Hehe  :)

Which parts need more explaining?

I think it might just be one of them things that will make more sense once you start to use it and work it out for yourself, well that's how my brain normally works, I tend to never read instructions, hey I'm a bloke after all  ;D

*

Freddy

  • Administrator
  • Jr. Member
  • *****
  • 93
Re: Setting Variables and Controlling Inventory
« Reply #5 on: August 05, 2021, 03:06:42 PM »
 :D Okay no problem. I am the same.

If you can code PHP and HTML like you can then you should pick this up quickly I reckon.

I've tried to keep things logical. A lot of it is just about showing or hiding things on screen depending on the game/character's/player's situation.

Things like variables are more for special situations, it's not likely you will have do do a lot with them on every page.

 


General - Supported mobile screen size
by Freddy (Game Engine Documentation)
September 10, 2021, 05:37:26 PM
Change Log
by Freddy (Feedback & Announcements )
September 10, 2021, 05:34:49 PM
General - Audio Control for Client
by Freddy (Game Engine Documentation)
September 10, 2021, 01:58:19 PM
Saved game bug fixed
by Freddy (Feedback & Announcements )
September 08, 2021, 04:40:54 PM
Welcome
by Freddy (Welcome)
September 07, 2021, 01:50:34 PM
General - Saved Games
by Freddy (Game Engine Documentation)
September 07, 2021, 11:57:05 AM
Designer - Settings
by Freddy (Designer Documentation)
September 07, 2021, 09:22:51 AM
Designer - Weapon Creation
by Freddy (Designer Documentation)
September 07, 2021, 07:44:52 AM

Users Online

2 Guests, 0 Users

Most Online Today: 3. Most Online Ever: 27 (September 18, 2021, 01:09:16 PM)


top