Ineffable Wingbolt BMA Posted February 6, 2014 Share Posted February 6, 2014 How is it that every SW game is so open that you can modify the scripts (especially the creature behaviour files) ? Are the scripts compiled just in time, before the game executes and if so how ? Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted February 6, 2014 Share Posted February 6, 2014 In BoA, at least, the scripts load as you get to each area, so a town script loads when you enter the town, and comparable things happen with the other scripts (the scenario script is loaded when you enter the scenario). I believe that the script is compiled when it is loaded. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast keira Posted February 6, 2014 Share Posted February 6, 2014 Older SW games have the data stored as binary into a .dat file, with some stuff hard-coded iirc. However, the newer games also use an avernumscript-like format for some things. The game then acts like a scripting engine, loading the scripts as it needs to and compiling them to bytecode in real-time. This is how most script languages (Python, PHP, prolly perl, etc) work. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt BMA Posted February 7, 2014 Author Share Posted February 7, 2014 But what about the extra time taken in compiling each each script each time, in games like Geneforge where the script isn't normally expected to change between program executions ? I don't understand why Jeff took the trouble of creating a whole customized compiler (assuming that is difficult to do) unless he wanted players to understand what is actually going on, and create script-cheaters and AI-variations for his games (and that's improbable). I was reading Scripting language and Softcoding. I understand that none of this actually matters to an end user, but I'm curious about why Jeff's doing things this way. Quote Link to comment Share on other sites More sharing options...
Well-Actually War Trall Ishad Nha Posted February 7, 2014 Share Posted February 7, 2014 Post-BoA, most stuff is scripted, but a few things are still written into the program itself. Shop inventories for starters. (In Geneforge 5, Special Items and Quests are hard-coded too.) What is Jeff doing? He may not mind script cheaters at all, I have never seen any evidence that he minds. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted February 9, 2014 Share Posted February 9, 2014 But what about the extra time taken in compiling each each script each time, in games like Geneforge where the script isn't normally expected to change between program executions ? I don't understand why Jeff took the trouble of creating a whole customized compiler (assuming that is difficult to do) unless he wanted players to understand what is actually going on, and create script-cheaters and AI-variations for his games (and that's improbable). The advantage of using a custom scripting language is that it can be designed specifically to make it easy to do the kinds of task you want to do for a specific project, rather than wrestling with the complexity of a full general-purpose programming language. It also makes it easy to make small changes to the game during design and testing without having to recompile it every time. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt BMA Posted February 9, 2014 Author Share Posted February 9, 2014 That's neat, I didn't think of that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.