Hi everyone,
in my current project I have common event that is used for all the different buildings. One building option is +- 40 lines, meaning that right now when I only have 4 buildings its already quite a bit. I've planned about 30 for the start, later on we'll see.
My questions are:
- Is there some kind of limit on how long it can be? I wouldn't expect there to be one, but you never know.
- Is there a search function? Otherwise it might take me a while to find one particular building later on.
- Will such a long event cause lag? Its pretty much all ''conditional'' branches (using the use item on event script) so only one will be played at a time.
Thanks!
Giant Common Events - Is it a good idea?
● ARCHIVED · READ-ONLY
-
-
Why would you choose that instead of one Common Event per building? Using one per building would be a lot easier to manage, debug, and edit.
-
The problem is that I want the player to be able to build everything pretty much everywhere, so that massive event is for the ''empty tile'' when you want to build something there. Don't worry, the actual buildings are separate, would be mad to do it all this way ^^.Why would you choose that instead of one Common Event per building? Using one per building would be a lot easier to manage, debug, and edit.
-
You shouldn't fear lag, especially if you only call it once (on demand) vs parallel/autorun. Don't worry about a possible command size limit either, I've seen some pretty gigantic ones.
The major drawback of your approach would be actually working with it, depending on its proportions, since unfortunately there is no search function for event commands. Divide and conquer as much as you can, to keep it simple and easy to access in case you need to edit or completely change stuff later. -
Doesn't sound very scalable if you need to check every possible tile.The problem is that I want the player to be able to build everything pretty much everywhere, so that massive event is for the ''empty tile'' when you want to build something there. Don't worry, the actual buildings are separate, would be mad to do it all this way ^^.
You should find a better way to keep track of it. -
Use lots of comments to separate the buildings. Something like this:
Code:will separate your buildings clearly and make it easier to find the one you want to work on. As they are shown in a different colour, comments are really handy to break up logic so you can easily tell what blocks of code are for without having to read through them.Comment: ------------------------------------------------ : ------------------------------------------------ : : XYZ BUILDING : : ------------------------------------------------ : ------------------------------------------------