Overboy's Forum Posts

  • Does it have autocomplete for existing keys?

    RafaelMatos

    As the Dictionnaries and Arrays Objects you're using, it doesn't have autocomplete for existing keys by default. (This would be impossible to achieve in Construct 3 for any kind of Data Plugin/Behaviors)

    However, I have included my favorite tips and tricks in the example .c3p provided in the Addon Pack.

    One of them is to use Constant Global String Variable as your Keys, especially the keys that you know that you'll use a lot :

    • This way you'll get autocompletion
    • If you want to reorganize or rename your Data/Properties later, it will auto-update everywhere, you won't have to manually edit everything one by one .
    • Also you can Right-Click > Find all references of that global variable easily to find every single place in Eventsheets where you used that Key
    • (Of course, you can also use Local String Variables if you only need that key in a specific scope, for example if all my Inventory Logic is under the same "Inventory" Group in my Eventsheet, i would use local variable instead)
  • RafaelMatos

    Yes JSON+ would definitely help for that purpose, not only because it would be far easier and efficient to pick and to use, but also thanks to all the enhancements that are provided in JSON+ and listed in the addon page.

    As I explained 2 messages above, it allow you to nest any amount of data under the same behavior. You could replace most if not all your Arrays and Dictionarries with a single JSON+ Object or Behavior if it makes sense in your Project.

    You can create/nest JSON arrays at any Path and JSON+ comes with handy Quality of Life enhancements and ACES for Arrays.

  • RafaelMatos

    In Construct 3, UID are the unique identifiers of your instances. It means that this number is guaranteed to be associated to only one instance in your game. Even Objects from different Families / Object Classes are guaranteed to never share the same UID. Even just created instances can't have the same UID as old instances that were destroyed long before. (instances of Text1, SpriteObject1, SpriteObject2 and FamilyX can't have the same UID.)

    It has always been a really handy feature of Construct for multiple reasons, i probably used them in 90% of my event blocks even before I created UID To Anything that makes them even more powerful.

    The main usecase is that they can act as "Instance Reference".

    You can "store an instance reference" in a number variable "MyUID", and then easily pick that specific instance thanks to the action "Pick by UID".

    To store the UID you want to retrieve later, you need to pick the right instance only once (and set it in a Global/Local/Instance variable for example). "Set MyUID to MyInstance.UID"

    UID TO ANYTHING allow you to do much much more thanks to the UID of your instances, as explained on the page. With this tool, you can do a bunch of actions and conditions but also retrieve expressions or instance variables of your instances only thanks to their UID. (even if you didn't pick those instance in your eventblock, as long as you stored the UID). It also solves a bunch of annoying limitations of the Family features and the Eventsheet in general.

    The UID feature (and, by extension, UID To Anything) can be useful in almost any system you could imagine in Construct.

    For example, let's say you have the "People" Family in your TopDown game, one of this Family feature is that People can target other People (their target). A "People" instance (Instance A) can store a reference of their targeted "People" instance (Instance B) thanks to a number variable called TargetUID.

    If you want to know the distance between Instance A and its target Instance B, you could just use the expressions UIDTo.DistanceTo(People.UID, People.TargetUID). Here People.UID and People.TargetUID are 2 expressions of the Instance A, but they return respectivelly the unique identifier of Instance A and Instance B. Which means you were able to get the data of Instance B without even needing to pick it ! UIDTo.DistanceTo is one of the many expression of the plugin, it allows you to get the distance between 2 objects only thanks to their UID.

    An other interesting thing is with UIDToAnything is that your Target could be an instance from any ObjectType/Family and even any Object Category.

    You could set the TargetUID to an instance of a Props Object (such as a barrel) by setting People.TargetUID to Barrel.UID and it would still work, even if it isn't part of the People Family !

    You could even set People.TargetUID to a Text instance (Text.UID) and your code that get the distance between your people and its target would still work ! Imagine how useful it is for a UI System to be able to share logic between Sprite, 9Patch, TiledBackground, Text and SpriteFonts for example.

    The goal of this plugin isn't to replace everything you were doing in C3 before, but it's an powerful additional toolbox to enhance the capabilities of eventsheet, that can be handy in many common situations and that allow you to work around annoying limitations of the engine.

  • Jase00

    UID is one of the safest feature you could imagine in the whole C3 engine. The UID shuffle option didn't break UID TO ANYTHING in any way.

    The example c3p included in the addon explains the best practices and tips and tricks about using UID in general by the way.

    You can add several JSON+ behaviors onto 1 Object Type but i'm not sure why I would do that in my games. JSON+ allow you to nest as many level of data as you want under the same JSON+ Plugin/Behavior. Let's say you want a JSON+ behavior to handle both the Inventory and the Relationships/Factions of a same object : you would just nest everything related to Inventory under a dedicated "Inventory" Key, like Inventory.EquippedHelmet = "Legendary Helmet", and same for relationship, for example : Relationship.Faction3.Admiration = 0.75. Everything could be under the same JSON+ behavior.

    The main usecase where i would have several JSON+ behaviors on the same Object is if those JSON+ behaviors were inherited from different Families allowing me to make common logic between different sets of Objects.

    For example : if I have an "Entities" Family (with data like Health, Damage Resistances) + a "Characters" Family (with data like Inventory or Relationship), both would have JSON+ behaviors, so an objet that is part of both Families would have 2 JSON+ behaviors

  • Thanks for your comments everyone, i'm glad you find those addons useful !!

  • OVERBOY'S TOOLS FOR CONSTRUCT 3

    Helloooo !

    • I've been making games for 10 years using various engines including Construct.
    • They were played by millions of people and showcased by the biggest gaming youtubers of the world. (Markiplier 35M subs, Jacksepticeye 30M subs, DanTDM 27M subs, just to name a few).
    • I'm also a big game jam lover and won the Ludum Dare 3 times.
    • I'm doing consulting/freelancing on Construct 3 projects.

    My Games, Tools and Asset Packs : overboy.itch.io

    I'm currently working on SECRET ROGUELIKE™, for which I created a bunch of tools to extend the features of Construct 3.

    Recently I decided to release some of them and was overwhelmed by the positive response it got, so I'm also sharing this here :D

    • Each tool is detailed on their own page listed below.
    • I'll update this list when i'll release new plugins (You can follow this topic if you want to get notified about major updates and new addon releases)
    • I hope it will help other ambitious C3 devs to achieve their games.

    Enjoy !

    DATA+ 2.0 (Previously JSON+)

    The Best Data Management solution for Construct 3 (1 Plugin & 3 Behaviors) :

    • JSON+ allows you to create all kind of variables, arrays and data structures (even at runtime !) for your game objects and comes with a lot of additional ACEs, Utilities and QOL enhancements, to make the whole process as fast and enjoyable as possible
    • It comes both with a JSON+ Plugin and a JSON+ Behavior
    • Example/documentation Construct Project (.c3p), which also includes a few tips and tricks I found
    • (2.0 Bonus) Array as a Behavior !
    • (2.0 Bonus) Dictionary as a Behavior !
    • Everything is detailed on the page.

    ADVANCED SIGNALS & CUSTOM EXPRESSIONS

    Create your own Behaviors using Events : Custom Expressions, Signals and Triggers (3 Behaviors) :

    • ADVANCED SIGNALS Behavior (Per-Instance Functions on steroid, supporting parameters, multiple trigger eventblocks and polymorphism)
    • CUSTOM EXPRESSIONS Behavior, create your own expressions and getter functions for your Objects and Families. You can even execute logic each time you use those expression and thanks to the polymorphism feature, the same expression could work differently for each Object member of the same Family.
    • SIMPLE TRIGGER Behavior
    • It basically allows you to create your own behaviors only using eventsheet. (In fact it's even more powerful than Behaviors on some aspect thanks to the polymorphism feature)
    • All those behaviors also support polymorphism, making the Family feature way more powerful.
    • Everything is detailed on the page.

    UID TO ANYTHING

    • Act on your instance and get/set their properties, expressions and variables without needing to pick them first, only thanks to their UID ! (Unique Identifiers)
    • Share logic between objects even if they're not from the same Family and even if they are from different Object Category for example (that's right you can share the same code for Text, Sprite, 9Patch and TiledBackground for example !!)
    • Act differently on 2 or more instances from the same Family or ObjectType within the same event block without doing weird tricks
    • Also allows you to work around a lot of Family and Eventsheet limitations, as detailed further on the page

    UTILS (Free Plugin)

    Good Luck on your projects 💪

  • Oh yeah , i just meant that if a Spritesheet folder results in just a little 256x256 px spritesheet (because there is just a few images inside), then it shouldn't try to merge it with an other small spritesheet from outside this Spritesheet Folder.

    But yeah there could be several textures for 1 big Spritesheet Folder.

  • This would be amazing but i think it would be better if we could turn a Regular Folder into a Spritesheet Folder (so a setting per folder) instead of a global project setting turning all Regular Folders into Spritesheet Folders.

    This way we would still be able to use folder for organisation purpose as it works right now and create just a few special "Spritesheet folder" dedicated to memory optimisation whithin the same project.

    It could be an option on the right click context menu of Object Folders :

    Right Click > Turn into Spritesheet Folder (that folder would have a slightly different icon so we immediatly know this folder will force spritesheet packing for all its children)

    Right Click > Turn into Regular Folder (turn back the spritesheet folder into a regular folder)

    Regarding nested Spritesheet Folders, it should probably pack the Spritesheet subfolder into a single spritesheet and the content under the Spritesheet parent folder that isn't itself under a Spritesheet subfolder into an other spritesheet.

    Which means each Spritesheet Folder would be guaranteed to generate a different spritesheet no matter the size of its texture and their parent/child relationship.

  • EDIT : I released an addon pack including a Custom Expressions behavior and everything else i've been advocating for in this thread !

    overboy.itch.io/construct-3-object-signals-custom-expressions

    I posted a suggestion for Custom Expressions

    Vote here: construct23.ideas.aha.io/ideas/C23-I-336

    How it works :

    • It would work the same as returned Function.
    • You can use them using an ObjectType.MyExpression(MyParams) expression.
    • The special event block would be named "MyObject expression MyExpression1 -> Number" like in the mockup.

    Benefits :

    • It would support polymorphism
    • we would be able to create getter function very easily.
    • Would help to keep complex projects clean and readable.
    • No need to use Functions and passing UID parameter anymore
    • Just "MyObject.myexpression1" instead of "Functions.MyObject_myexpression1(MyObject.UID)"
    • Just "MyObject.myexpression2(Params)" instead of "Functions.MyObject_myexpression2(MyObject.UID, Params)" (look how long and unreadable it can get currently)
  • Yes I understand but at the same time, stuff like conditions and actions are SOL-based in Eventsheet while their equivalent in JS interfaces are instance-based.

    It would be better if Custom Actions scripting interface followed the same logic. SOL-based in eventsheet but instance-based in JS.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • I created a suggestion for Custom Actions scripting support a month ago :

    Vote here> construct23.ideas.aha.io/ideas/C23-I-272

    The best way to handle it in scripting would be per instance :

    instance.callAction("MyAction", parameter0)

    As it works for all the other stuff in scripting interfaces.

  • Functions map are tedious to use.

    We need 2 things to solve all issues :

    1. Ability to turn any Function/Custom Action into a Better signal (= Multiple "Listener Block" support) : construct23.ideas.aha.io/ideas/C23-I-165

    It would be the same as calling Multiple Function at once with the same parameters but with an amazing UX, an optional execution order feature and a single thing to "Find All References" for (single name).

    2. Ability to call a Function/Custom Action by its name

    (3. For 2 to be easier to use in some situations, it could be cool to have Function/Custom Actions Names autocomplete and autoupdate everywhere thanks to new System Expressions such as EnumFunctions.MyFunctionName and EnumCustomActions.MyObjectType.MyCustomeAction as in this suggestion : construct23.ideas.aha.io/ideas/C23-I-69 )

    I detailed those 3 points extensively in this thread : construct.net/en/forum/construct-3/general-discussion-7/custom-actionsfunctions-175063

  • You do not have permission to view this post