Attribute groups?

loganobarrloganobarr Member Posts: 12
edited October 2015 in Working with GS (PC)

I have noticed I am collecting a large amount of game attributes starting to build up in my new game, can you put attributes in groups yet or no? If no, will it ever be added?

Best Answer

Answers

  • loganobarrloganobarr Member Posts: 12

    I can only pray, its very messy at the moment

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @loganobarr, there is a Group Behavior that you can use to organize your Rules and Behaviors. Is that what you are asking?

  • loganobarrloganobarr Member Posts: 12

    no not rules, attributes

  • mhedgesmhedges Raised on VCS Member Posts: 634
    edited October 2015

    He may be referring to variables (attributes), which cannot be grouped or organized after they are created (unless you use the xml backdoor - messy stuff).

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
  • SocksSocks London, UK.Member Posts: 12,822

    I suppose tables are essentially attribute groups.

  • ArmellineArmelline Member, PRO Posts: 5,365

    I'm a fan of attributes, and favour them for things that people will often recommend tables for. Tables are hugely helpful and valuable, but sometimes they're just not needed.

    This means I too often end up with a lot of attributes. Something I find helpful is to do regular checks for which ones I'm actually using. If you attempt to delete an attribute it will tell you all the actors that attribute is used in, and ask you for confirmation. If it isn't used in any, it will just delete it. So I'll frequently try and delete all my attributes and clear out the ones that aren't being used.

  • SLOCM3ZSLOCM3Z Member Posts: 797

    @Armelline said:
    I'm a fan of attributes, and favour them for things that people will often recommend tables for. Tables are hugely helpful and valuable, but sometimes they're just not needed.

    This means I too often end up with a lot of attributes. Something I find helpful is to do regular checks for which ones I'm actually using. If you attempt to delete an attribute it will tell you all the actors that attribute is used in, and ask you for confirmation. If it isn't used in any, it will just delete it. So I'll frequently try and delete all my attributes and clear out the ones that aren't being used.

    What?! It tells you what it is used in? I want that in windows version... :'(

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    If you attempt to delete an attribute it will tell you all the actors that attribute is used in, and ask you for confirmation

    I'm 99.9% sure the Mac version does this as well.

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2015

    @Armelline said:
    I'm a fan of attributes, and favour them for things that people will often recommend tables for. Tables are hugely helpful and valuable, but sometimes they're just not needed.

    That's my approach too, I never use tables and always prefer attributes, maybe it's just habit, but tables seemed to throw up a few bugs from time to time whereas attributes are a core mechanic of GS that have been in since the beginning and are comparatively rock solid (that's not to say tables have not got their place).

    @Armelline said:
    This means I too often end up with a lot of attributes. Something I find helpful is to do regular checks for which ones I'm actually using. If you attempt to delete an attribute it will tell you all the actors that attribute is used in, and ask you for confirmation. If it isn't used in any, it will just delete it. So I'll frequently try and delete all my attributes and clear out the ones that aren't being used.

    Yep, again that's my preferred method, not just for finding redundant attributes, but also for tracking down where an attribute is being used, for example I might have a button that is being lit up by 'game.LightOn', but I don't know what triggers this attribute, so rather than opening up several actors, looking for the rule that triggers 'game.LightOn', I will just head over to the attribute list and hit delete on 'game.LightOn' - at which point GS will reveal all the actors involved in the process - then hit cancel, very useful in large complex projects.

  • FrantoFranto Member Posts: 779

    @mhedges said:
    He may be referring to variables (attributes), which cannot be grouped or organized after they are created (unless you use the xml backdoor - messy stuff).

    XML can be messy, but when it comes to attributes, it will accept any change in their order without any errors, so long as the format stays the same.

    For example, I re-arranged the 60+ game.attributes in my game with no ill effects.

    What I'm thinking the person can do is "group" them each other a text attribute that can act as a group title, and then list all game attributes under each "group" text attribute. In this way, things can be in order.

    And it was recently said by a GS programmer that attributes don't work top to bottom like some other programs, but rather use a notification system{although the lines of code running through actors might still use top to bottom, and on layers bottom to top.}

    XML, if you can understand it, can save you tens of hours. For example, right now, I'm switching out all %operators out of actors(209 of them carry operators) with mod() to fix issues with compatibility in html5, using find and replace in dreamweaver, I can change 10 actors in a few minutes,{most use 3 to 10 instances of operators, some even 20). In the GS creator, 10 actors would take an hour{since there is no ctrl+f}, at least on Windows creator anyway. With an XML editor, you can find and replace them in seconds per actor.

    With 200, I should be done in an hour, but if you have a program that allows you to do edit multiple files, and most actors share the same value within their operator rule, then it would probably just take minutes.

    You have to replace it precisely within the confines of its brackets or cause the actor to have an error and dissappear when you look GS creator. :o

  • ArmellineArmelline Member, PRO Posts: 5,365

    @jamie_c said:
    I'm 99.9% sure the Mac version does this as well.

    I was talking about the Mac version :D No idea if it works in the Windows version.

  • FrantoFranto Member Posts: 779

    Disregard what I said, Dreamweaver has read folder and open documents options for batch search, find and replace, I just used the former to replace all % operators with mod() which occured in the entire game 509 times, including scenes with unlocked actors. Days of work in 3 seconds. :) {Gotta do it for each number value though, since I sometimes use 0.06, 0.1. 0.33 and a few other numerical cycles through out the game.

Sign In or Register to comment.