Author Topic: Big list of missing script properties  (Read 945 times)  Share 

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Big list of missing script properties
« on: 18 Jan 2017, 15:10 »
MISSING SCRIPT PROPERTIES - these are properties that set or get something that is already implemented in the engine, but just does not have means to know its value or change it in script.

Please help gather a list of such properties, grouped by object type. In many cases that would be super-simple to add readonly properties (ones that can tell you certain value). Changeable properties are less easy, because they often require to add values to savegame, but they are also should be mentioned.

NOTE: this relates to only things that are already in AGS, not completely new features.
For example:
* you can set a property in the Editor, but cannot read or set it in script;
* there is a script function that changes object's state, but no way to get what current state is.

Such list will be very useful, because engine contributors get reminded about them only once in a while, and these requests got forgotten in the presence of more critical tasks.
I would like to make a table in the first post, which lists the required properties, and status of their implementation.

PropertyTypeCommentStatus
Button
Animatingbool, readonlyfrom Animate()
Frameint, readonlyfrom Animate()
Loopint, readonlyfrom Animate()
Viewint, readonlyfrom Animate()
Character
FollowedCharacterCharacter*, readonlyfrom FollowCharacter()
GUI
BackgroundColorint
BorderColorint
Mouse*alternatively make new static CursorModes struct
Animating[]bool, readonly
Frame[]bool, readonlycurrent animation frame (if any)
ModeAnimated[]bool, readonly?array property, get/set whether particular cursor is animated
ModeAnimatedOnlyOnHotspots[]bool, readonly?
ModeAnimatedOnlyWhenMoving[]bool, readonly?
ModeView[]intarray property, get/set VIEW for the mode
ModeHotspotX[]intarray property, get/set hotspot X for the mode
ModeHotspotY[]intarray property, get/set hotspot Y for the mode
« Last Edit: 02 Feb 2017, 20:49 by Crimson Wizard »

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #1 on: 18 Jan 2017, 15:19 »
I'm very much happy to see the emergence of this topic.
To bless this newest thread I have a report to do just now.

Currently the buttons lack about these essential properties :

A) readonly bool Button.Animating
B) int Button.Frame
C) int Button.Loop

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #2 on: 18 Jan 2017, 15:33 »
This is another report to do so far.
I suppose that if the object's property is available in the editor, it should be available in script too.

Actually, you can change the border color of a list box only inside the editor.
You can change the background color of a GUI only inside the editor.

cat

  • Mittens Baronet
  • AGS Baker
  • Toffee Trouble in Creamville
  • cat worked on a game that was nominated for an AGS Award!cat worked on a game that won an AGS Award!
Re: Big list of missing script properties
« Reply #3 on: 18 Jan 2017, 19:57 »
The game version number. Would be useful to show on a title screen etc. so it's easy to figure out what version of the game a player has when analysing bugs.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Big list of missing script properties
« Reply #4 on: 18 Jan 2017, 20:02 »
The game version number. Would be useful to show on a title screen etc. so it's easy to figure out what version of the game a player has when analysing bugs.
Hmm unfortunately it's not saved into the compiled game, but I guess it may be worth adding.

cat

  • Mittens Baronet
  • AGS Baker
  • Toffee Trouble in Creamville
  • cat worked on a game that was nominated for an AGS Award!cat worked on a game that won an AGS Award!
Re: Big list of missing script properties
« Reply #5 on: 18 Jan 2017, 20:16 »
What is it used for now? I mean, I can edit it in the game's general settings.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Big list of missing script properties
« Reply #6 on: 18 Jan 2017, 21:03 »
What is it used for now? I mean, I can edit it in the game's general settings.
It is used to create Windows Game Explorer data, which is embedded into game exe (Windows only).

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #7 on: 19 Jan 2017, 10:56 »
I know that this is against the rule of this topic, however, I am going to say that the same...
It would be very nice if we could have buttons to be able to have their own transparency as well.
Most of the time I need to implement another gui with a single button to do that and play with ZOrder property anytime...

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Via script we can't get anymore those property so far from the editor.

readonly String Button.Name
readonly String Label.Name
readonly String ListBox.Name
readonly String TextBox.Name
readonly String Slider.Name
readonly String InventoryWindow.Name

bool TextBox.HideBorder


// And it would be very nice to have those property so far :)

int Button.Transparency
int Label.Transparency
int ListBox.Transparency
int TextBox.Transparency
int Slider.Transparency
int InventoryWindow.Transparency

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Big list of missing script properties
« Reply #8 on: 19 Jan 2017, 11:05 »
I know that this is against the rule of this topic, however, I am going to say that the same...
It would be very nice if we could have buttons to be able to have their own transparency as well.
Most of the time I need to implement another gui with a single button to do that and play with ZOrder property anytime...
Please, add feature requests to the Bug & Suggestion tracker, or they may get lost and forgotten (happens most of the time):
http://www.adventuregamestudio.co.uk/forums/index.php?project=3

Also, there are serious reasons why I asked to restrict this thread to the "missing" properties: firstly, there is a big difference between making them work in script, and creating completely new behavior. Secondly it is easier to work with the limited task.
From now on I will intentionally ignore anything that does not match the thread's topic.
« Last Edit: 19 Jan 2017, 11:11 by Crimson Wizard »

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #9 on: 19 Jan 2017, 11:11 »
Thank you very much Crimson Wizard, I have just add a new topic in the "Bug & Suggestion tracker" as well.

:EDIT: I am sorry if I break the rules, my mistake.

From now on I will intentionally ignore anything that does not match the thread's topic.

You will do just the right thing.
« Last Edit: 19 Jan 2017, 11:15 by Vincent »

Gurok

  • Rottwheelers
  • When life hands you lemons, combine them with the mop
    • I can help with AGS tutoring
    •  
    • Best Innovation Award Winner 2016, for improving and extending the AGS scripting language
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
  • Gurok worked on a game that was nominated for an AGS Award!Gurok worked on a game that won an AGS Award!
Re: Big list of missing script properties
« Reply #10 on: 20 Jan 2017, 09:47 »
Array.Length (pseudo-property)
Character.FollowedCharacter (you can set it with Character::FollowCharacter, but not get it)

Mouse:
GetModeView() to match ChangeModeView()
Animated, AnimatedOnlyOnHotspots and AnimatedOnlyWhileMoving boolean properties
« Last Edit: 20 Jan 2017, 09:51 by Gurok »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Big list of missing script properties
« Reply #11 on: 02 Feb 2017, 21:00 »
What if we create new CursorModes (name in plural) static struct and move all Cursor mode setting properties there?

What I mean:
Code: Adventure Game Studio
  1. struct CursorModes
  2. {
  3.   static attribute bool Animated[];
  4.   static attribute bool AnimatedOnlyOnHotspots[];
  5.   static attribute bool AnimatedOnlyWhenMoving[];
  6.   static attribute bool Enabled[];
  7.   static attribute int  View[];
  8.   static attribute int  ModeHotspotX[];
  9.   static attribute int  ModeHotspotY[];
  10.  

Every property here will be array, with existing CursorMode enum used as an index, for example:
Code: Adventure Game Studio
  1. CursorModes[eModeLookat].View = 10;
  2.  

There is a possibly better variant to make an actual "CursorMode" object passed as a pointer, but that will be more complicated, requiring to create whole new managed object type. Also, logically next step is to replace CursorMode enumeration completely and declare game objects like cmModeTalkTo, or something like that. I am not ready to go that far at the moment.
With the static struct most of those properties could use existing code related Mouse struct.

Mouse struct may have functions such as ChangeModeGraphic stripped (deprecated, hidden under compatibility switch), and only have 1) items actually related to mouse control itself and 2) active mode specifics (Mode, SaveCursorUntilItLeaves, etc)
« Last Edit: 02 Feb 2017, 21:03 by Crimson Wizard »

Radiant

  • AGS Baker
  • Mittens Knight
  • With a gaze, you can command dragons.
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: Big list of missing script properties
« Reply #12 on: 02 Feb 2017, 21:12 »
Actually the only one I'm missing on a regular basis is Character.StopAnimating (), or alternately being able to set Character.Animating to false.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
Re: Big list of missing script properties
« Reply #13 on: 02 Feb 2017, 21:26 »
It's not possible to set frame delay to idle view via script (the settings for idle view only allow to set the delay of when the idle view should animate). So you need to manually change the delay off each frame in the editor.

This is assuming I didn't missed something, of course. :-[
There are those who believe that life here began out there...

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #14 on: 03 Feb 2017, 20:41 »
@Crimson wizard@

I like the idea that you have got, although using arrays do not have a "quick easy" access to enumerations.
But it does not matter much because this idea would solve some issues actually.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Big list of missing script properties
« Reply #15 on: 03 Feb 2017, 21:35 »
I like the idea that you have got, although using arrays do not have a "quick easy" access to enumerations.
What do you mean?

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #16 on: 03 Feb 2017, 22:48 »
I just get a little confuse Crimson Wizard, I am sorry.
But your new method however would avoid to do such a thing..
Code: Adventure Game Studio
  1. bool IsModeEnabled(this Mouse*, CursorMode mode)

In a more elegant way how you have just proposed.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Big list of missing script properties
« Reply #17 on: 04 Mar 2017, 20:48 »
We also need a counter-list of properties that are valid to be set in the Editor (as default values), but do not exist on property pane:

Object.Solid.
Hotspot, Region, Walkable area.Enabled ?

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Big list of missing script properties
« Reply #18 on: 05 Mar 2017, 11:20 »
We also need a counter-list of properties that are valid to be set in the Editor (as default values), but do not exist on property pane:

Object.Solid.
Hotspot, Region, Walkable area.Enabled ?

Crimson Wizard, I think this would be a fantastic idea to add indeed.
So you can set a certain Walkable area to be disable as its default property as well as for Hotspot and Region too.
I think that since Objects can make use of the property 'View' maybe there could be something similar as for the character pane as you can set the 'NormalView' property. But that would mean to add a default property for the 'View' also for the button pane. (Since it has only the 'Image' property)


@Off topic:
Last night I was trying to change via script the SelectedBackground color, SelectedText color and TextColor from a List Box and I could not do it. (Also to check in case if the "TextAlignment" was set to the 'Left' side so maybe you can place it further as well as on the 'Right' or 'Centre' side... Although this would mean creating a new behavior on the source code)
Later I think I could add this to the 'Bug & Suggestion tracker' in case...