Eventing or scripting, why do you choose one over the other?

I think answers will depend on many things.  Ability of user, Compatability, and Scope.  There was a point when every single one of us picked up some version of RPG Maker and did not even know how to Event.  We learned how to event, then, we learned how to script.  We may have had some programming experience prior to learning to script.  Scripting has more of a learning curve than Eventing, so many people look for Event solutions for everything because they have not yet learned how to achieve the same things via scripts.  Each has advantages and disadvantages.  Eventing solutions will keep a high level of compatability as it doesnt need as many scripts to pull off the same things.  Scripting tends to be used for goals that are otherwise unachievable or excessively redundant by Eventing.
I much prefer using scripts for 2 reasons. 1, I have nearly 10 years experience and a uni degree in programming, and 2, things created as a script are a hundred times easier to transfer between projects than events are.

Events still have their place, but I feel events are limiting to what you can accomplish when trying complex things.
I prefer scripting because I work faster when typing things than when clicking things... Plus it gives me more freedom. :3
Lately I have done a lot of eventing and I can now make my own custom menus and minigames with it. I like the straight forward logic and after all it's easier than scripting (for me).
As a person with minimal scripting knowledge, I prefer scripting except for trivial things. Some things in the engine are just not accessible from events alone (checking if message window is open, checking screen tone, checking map notetags, checking if X actor has Y armour equipped in Z equip slot, checking if a variable is contained in an array etc...).

Also I hate looking at my project and seeing long ass event pages, I try to use Script Calls whenever is possible to just call a method from Game_Interpreter or to reduce several Conditional Branches to two-three lines of code. Multiple Conditional Branches inflate even the shortest of event pages.
Haven't read the entire topic so I apologize if someone has already said something similar, but let me give a good example of a place where scripting makes things WAY easier than eventing alone:

When I was first learning XP, I wanted to make a "higher or lower" game similar to Card Sharks' bonus round (or Tyranu Evavu, if you've played Neopets).  Two of the challenges were making sure that you wouldn't draw the same card twice, and tracking the value for each card.  I played around a lot and eventually got it to work pretty well using thousands of event lines.

To make sure you didn't draw the same card twice, I designated 52 switches that would turn ON once you drew the card (and OFF at the end of the game).  I had to make a conditional branch for every single possible card and change which switch was being affected for each one.  I had to add a line that said "if it's card ID #9 (the 4 of clubs, which is considered the 9th lowest card in the deck), then Turn Switch #109 off, and set the "Current Card Value" to 4.  If I ever wanted to change the value of a card (with Aces, for example), I'd have to hunt for all the different places where I work with a branch for an Ace.  The game had some special features and such, but it took about 30 hours and about 1000 lines of eventing to get working well.

I recently remade the game in VX Ace, this time equipped with some scripting knowledge.  To be perfectly clear, I'm still using events per se, but I'm using the "Script..." event command all over the place.  Instead of creating 52 separate branches for each possible card, and needing to modify EVERY SINGLE ONE if I make a change to the game, I can simply write something like:

proceed = false

number = rand(52).to_i + 1

while proceed == false

unless drawn_numbers.include?(number)

drawn_number.push(number)

$game_variables[101] = (number + 7).to_i

proceed = true

end

end

Nine lines, and two of them are just the word "end".  This RGSS scripting will pick a random number 1 through 52, and check to see if it's already in the (previously declared) drawn_numbers array.  If it is, it will loop through again and pick another number.  If not, it will add it to the array, and set Variable 101 to a value based on the number that would appear on the card (in this example, Card #9 the 4 of Clubs, Card #10 the 4 of Diamonds, Card #11 the 4 of Hearts, and Card #12 the 4 of Spades) will all set that variable to 4.

Another example would be a randomized treasure chest.  I could pick a random number 1-16 for Variable 103 and then have 16 different items using event commands, which might take fifteen minutes to set up.  Or I can say something like $game_party.gain_item($game_variables[103], 1) using the Script command or Script Editor, and accomplish the same thing in thirty seconds.

Eventing is a little easier to learn, and it's safer in the sense that making a typo will most likely cause the logic to get a little screwy instead of blowing up your game with a crash.  But once you get beyond the simplest eventing (like giving the player a pre-specified item or fully healing the party's HP), eventing becomes inefficient, and you can save truly enormous amounts of time and data by using some basic scripting.
I try to use the right tool for the job.  I prefer to use Events for most straightforward things, like NPCs, doors and the likes.   It's a lot easier to edit an Event in these cases.

However, I use scripts for things which are really cumbersome or awkward to perform using straight Events, like "Transport player to a new map if they collide with the edge of the current map."

And there are some things which would be nearly impossible to do with Events, like using a custom save system or changing the battle system.  These need scripts.

So I don't prefer one or the other.  I pick whatever is most effective to do the job I have in mind.  And I intersperse Events and scripting freely, with no specific preference.
However, I use scripts for things which are really cumbersome or awkward to perform using straight Events, like "Transport player to a new map if they collide with the edge of the current map."
Why? You could just use a parallel process event to check the player location and teleport if it's on the edge. XD
A mix of eventing and scripting for me. A lot of stuff you can easily do with events and don't really need a script for it, but sometimes eventing is very complex so you may have to use a script.
Why? You could just use a parallel process event to check the player location and teleport if it's on the edge. XD
What happens if 5 different parts of the same edge will transfer you to 5 different maps?
you could still use conditional branches for that. You just need the range of which tiles teleport to which map. 🙂
you could still use conditional branches for that. You just need the range of which tiles teleport to which map. 🙂
Well, that is true.


I'd say it would be better to use events for this as well since the transfer itself is local only to this one (set) of events.
I am a eventing master. I can event anything but many times I don't feel like it so I find a script. Also, some things will take a long time to event like an on-world battle system. I did it before but it just took a lot of time to do it. So instead, I found scripts that can do it for me. Or like Sideview system is eventable but takes a long time to event. Also, it can slow your performance if it's too much. Scripts can slow your game but you'll need ALOT to slow it down. If you get a lot of events and put them in one map then that Map will start to be slow. For example, everything will move slowly even the character (happened to me before trying to do an on-world battle system using events). Also, eventing is easy to learn as long you don't get confused while making one because it's so many to keep track of. But I personally favor eventing way more than scripting.
I prefer events, since I CAN'T script. I CAN event and I'm fairly good at it, too!

Original thread: https://forums.rpgmakerweb.com/threads/eventing-or-scripting-why-do-you-choose-one-over-the-other.35971/