Post new topic    
Red Slime
Send private message
Scripting - One file or multiple files? 
 PostMon Oct 25, 2010 3:36 am
Send private message Reply with quote
I see that the scripts for Vikings are all in ONE text file. Personally, I'd prefer to keep everything in a bunch of different files so it's easier to sort, but I'm wondering what the consensus is here. Is there a reason to stick with one file, or would I be fine splitting everything up and importing them one-by-one?
Liquid Metal Slime
Send private message
 
 PostMon Oct 25, 2010 3:58 am
Send private message Reply with quote
It's all personal preference. I like to have the event scripts separate from "game code" myself (In the game I am working on now, the mini-game scripts hsi is bigger or about on par with the main hss). As long as you can read it, it's all good. Fenrir isn't really too OCD of a programmer from what I gather, so he probably didn't care and just slapped it all in one file.

As for your question about importing them one by one, as long as your hss includes the other files, they'll all get imported at once. For me the importing is so fast that I haven't seen any reason to import files separately.
My website, the home of Motrya:
http://www.jshgaming.com
Super Slime
Send private message
 
 PostMon Oct 25, 2010 5:32 am
Send private message Reply with quote
For me, it really depends on the size of the scripts. Do You Want to be a Hero? is one file, whereas Phantom Tactics is something like five.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Metal Slime
Send private message
 
 PostMon Oct 25, 2010 6:30 am
Send private message Reply with quote
I think it also depends on the length of time you anticipate spending on the project, and especially the breaks. Separate files = better organization = easier to return to and tweak things after months away from working on your game, in my opinion. I wished I had done it for Tales 1 (ended up multiple files, but only because my old notepad.exe couldn't open files bigger than a certain limit), and so now I am doing it for Tales 2. I have one file for 'story-driving' scripts, one file for 'utility' scripts (various shortcut-style scripts), one file for the scripts that drive the custom item system, and another couple files for especially long scripts (look-up tables for data when the necessary "get" hspeak function didn't exist).
I am Srime
Liquid Metal King Slime
Send private message
 
 PostMon Oct 25, 2010 8:05 am
Send private message Reply with quote
I always like to keep my scripts all in one file, but I do often keep them somewhat organized within the file, grouping similar scripts together, and giving them (mostly) consistent names.
Metal Slime
Send private message
 
 PostMon Oct 25, 2010 2:35 pm
Send private message Reply with quote
I've always kept mine in the same file, too. Not sure why; I think in the past I might have thought that importing a different script file would overwrite the scripts you already have, so you had to keep them all in the same file.

Of course, I'm generally not all that organized (see Okédoké!, where scripts/sprites/etc. are mostly arranged in the order that I made them... except El Garbanzo's walkabout, which was moved so that sprite 0 could be blank), and trying to be more organized usually leads to me... forgetting where things are, which kinda kills the whole point of organizing stuff in the first place. About the only thing organized in my games are the palettes, and that's only so palette-swapping actually works instead of giving everyone blue skin and neon green outlines. XD
Metal Slime
Send private message
 
 PostMon Oct 25, 2010 6:01 pm
Send private message Reply with quote
Somewhat off topic, but I'm gonna continue down Fnrrf's path and mention that maybe the hardest part of making a large game in the OHR (as in, over 15 hours of gameplay or so) is keeping track of everything. On Bugzilla there is a "needs more search" feature request, or something like that, that would be absolutely stupendous to have. When the script browser was finally added to allow finding your script by name instead of by number I thought I was in heaven. Imagine that same browser setup for attacks! Items! Enemies!

And I think I put a related feature request - why not have (optional) names for palletes? Names for maptile sets? Imagine how terrible it'd be to NOT be able to see your mapnames when you choose what map to edit. Now turn that process in reverse and see how AWESOME it'd be to choose your palette for your new NPC by a name like "male human 1 blue" instead of palette #173.
I am Srime
Display posts from previous: