How To Design Scripts/Systems

So I’ve watched several videos on how to make specific scripts, game creation tutorials, c# tutorials… etc. In these videos they talk about the “Planning” for the scripts. In there presentation it will show a web like layout showing what the system will do, and basic explaination of how it works. And they say you need to plan out your scripts or design their structure. But they never explain “how” they come up with these designs. When I make a script, I create it, create some variables, and some functionality. No planning what so ever, and just add variables, methods, and so on as I need them through the process of making the script. After watching all these videos I feel I need to learn about designing a system. For example an inventory, combat system, or even a network system. I don’t care about what the system does, just how to design it and think about it before just jumping in hoping when I come out the scripts work. Does anyone have an advice, or know of any tutorials/courses that will help me with this?

Hi i would start with just drawing out how you want it to look write down some ideas of how you think it could work and then go ahead and create the skeleton of it in code maybe even start with psuedocode if you feel like it. instead of just jumping in and programming with no clear goal just take a seat and jot down some ideas