Jump to content
Sign in to follow this  
smacker909

drop back and punt?

Recommended Posts

At what point do you look at your mission and realize what a huge mess you've made? I as start to get more comfortable with scripting in arma I find myself adding every little thing I can think of to my latest mission. Now I realize I need to scrap it and start over because it's turned into a huge pile of spaghetti ! I think not having much of a coding back ground doesn't help.. when I just wanted to jump in and make something work at first and didn't care about implications of poor planning later on .. :)

Share this post


Link to post
Share on other sites

Well it helps a lot if you plan the mission before you start working at it. And it's not really necessary to add every script you run over just because it sounds cool. I know a lot of damn good missions which have only 2 or 3 scripts running.

Share this post


Link to post
Share on other sites

I know how that feels. Now imagine you've created about 6 missions and counting, and then you discover a cool new script you want to apply across the board.

Share this post


Link to post
Share on other sites

This is part of the game for me too, for every mission I release, there are 4 or 5 more that I sort of toyed with and never brought much further off the ground. I learn something profound and new with each one, and I usually just apply that in the next iteration. On one hand, you shouldn't release a frankenstein scenario, but you will just know it's ready when it is. Sometimes that means re-building, but rarely should you have to start again from scratch if it's the exact same mission concept.

W0lle's advice is highly valuable-- I like to make a small diagram with what I want to be the core flow of the mission (primary objectives, branching choices, etc.). Things can change beyond your original scope, but it definitely helps put a fence around your project before it grows too unwieldy, and you can always fall back on it when shit gets too complicated.

Share this post


Link to post
Share on other sites

I usually come up and a basic idea and a few steps to it. Start to lay things out and then spend a week trying to get one unrelated but probably cool thing to work just right, fail and give up. :P There's 282 missions in my missions editor folder, maybe 4 are complete. :)

Share this post


Link to post
Share on other sites

good to know I not alone. Being a novice still.. part of my problem is how I implement ideas.. I think it's getting better, but still a long ways from ideal coding / scripting methods ;)

Share this post


Link to post
Share on other sites

By far the secret seems to be, keep things simple. While you might want to have a dramatic low level helo insert for a mission, it's a lot easier to simply start the players on the ground and have the insert helo fly away instead.

Or just get things working with simplified versions of what you wanted to have happen, then work on adding in things once your mission is playable.

Share this post


Link to post
Share on other sites

It takes time, patience, and a healthy share of searching on Google or [mostly] here on the forums. Unless you have a degree in computer science, natural aptitude for code, or some other special reason to know how to properly implement your ideas within the system, you are bound to have to learn through trial and error.

Share this post


Link to post
Share on other sites
Now I realize I need to scrap it and start over because it's turned into a huge pile of spaghetti !

NEVER SCRAP IDEAS - store them somewhere - how many times ive gone back to my old scripts that have been superseeded by new ones to work out how i got the thing to work in the first place-

my stored scripts go back to OFP and i still use the idea behind them often.

my BattleZone and BattleField Missions have between 100 and 200 scripts to make them work.

I suggest work on the core of the mission as one module - ie will run with just that part.

then do all the added things as seperate modules which link into the core module with one line of code.

then its easy to test the module and add it to other missions you make.

in BZ and BF every vehicle made runs 1 script first and depending what type that vehicle is - it loads the module for its type or class.

to add a module or script for a class of vehicle i just add it there. same goes for men ect.

that way its also easy to set up params to run that module or script. one if statement and its done.

if you need to share info between scripts and modiles use setVariable and getVariable

IE - in BZ and BF all vehicles make there own plans and other scripts need to know what they are in order to work

so every time they get a new domove order there destination gets stored in a setVariable stored in that vehicle.

_veh setVariable ["dest",_newpos,true]; true if clients need to share info fasle if not.

then in any other script that knows who the vehicle is the info is retrieved with

_dest = _veh getVariable "dest";

basicly make a small database that each unit/vehicle carries within it self as a setVariable then use that to link your modules and scripts to the info they need to run.

use the core module to setup that database and setup the scripts for that module in seperate folders

that way its easy moved to new missions and if that spaghetti things happen then you know what goes where in your next attempt.

BattleZone V5 means over 500 rewrites :)

this way is also very MP friendly

also most of the stuff i used from BF3 in BZ was done with one line of code and drag and drop a folder from BF to BZ.

one last thing LEARN FSM - its easier than it looks.

Share this post


Link to post
Share on other sites
one last thing LEARN FSM - its easier than it looks.

I need to do this, FSM still scares and confuses me. :)

Share this post


Link to post
Share on other sites

Thanks for the tips.. that's good stuff. I have briefly looked at FSM but will have a second look.

Share this post


Link to post
Share on other sites
I need to do this, FSM still scares and confuses me. :)

Me too, I've read about it, I understand how it works, just never took the step to try and implement one. Same goes for BI's preferred conversation system.

Smacker, same went for me. I had to come back to it a few times before it made sense.

Edited by h34dup

Share this post


Link to post
Share on other sites
Me too, I've read about it, I understand how it works, just never took the step to try and implement one. Same goes for BI's preferred conversation system.

Smacker, same went for me. I had to come back to it a few times before it made sense.

FSM is pretty much a giant switch statement that can have nested switch statements within the statements. and conditions are checked per frame.

However I totally agree on the conversation system. Its a nightmare setting up branches of conversations and questions.

Share this post


Link to post
Share on other sites
FSM is pretty much a giant switch statement that can have nested switch statements within the statements. and conditions are checked per frame.

However I totally agree on the conversation system. Its a nightmare setting up branches of conversations and questions.

Right? It's just so much easier to addActions and remove them depending on player choice.

And I guess that's what has scared me about diving into FSMs, I have spent hours fuddling with switch statements trying to get random dialogue responses to work, only to pair way back down to simpler if..then's.

Share this post


Link to post
Share on other sites

(1) Plan things. Proper planning and preparation prevents piss poor performance in mission making and other assorted aspects of life. Set clear achieveable goals and work to attain those. Do not deviate in pursuit of additional aims that could sidetrack you hopelessly. Note those down for incorporation in another mission, but stick to the original plan.

(2) Keep it simple. Work out ways to accomplish things with as little scripting as possible to ensure reliability. Split out different parts of a mission and merge them later on after you are satisfied that these parts work. Maintain a series of components that can be easily reused in multiple missions (eg a standard helicopter extraction setup). Plan incremental improvements over a series of missions rather than attempt to incorporate all ideas into the very first scenario you build.

Regards,

Sander

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×