Jump to content
Sign in to follow this  
KeyCat

Praise to OFP's script engine!

Recommended Posts

I must say that I'm a bit amazed how incredible this script engine is! It's very well written and performance seems top notch.

Now 4 years later I have lots of scripts running in all my MP missions (AI, support, tracers, fire, dust, grass, smoke, etc.) and it seems it doesn't matter how many you throw at the script engine. If they are well written scripts it still chugs along nice even on my low/mid end PC and I can't remember I even had a single CTD due to a bad script, maybe I did but it's very rare.

OFP's script engine is a masterpeice!

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Forgive my n00b'ness here but arent other game engines also doing this? Plenty of other game have scripts running in the background as well dont they like BHD or BF shall we say?

Share this post


Link to post
Share on other sites
I can't remember I even had a single CTD due to a bad script, maybe I did but it's very rare.

See what you gotta do is make one script that executes another script that executes the aforementioned script... OFP doesn't, or in my case, didn't like that.

Share this post


Link to post
Share on other sites
Forgive my n00b'ness here but arent other game engines also doing this? Plenty of other game have scripts running in the background as well dont they like BHD or BF shall we say?

Ehh!? To my knowledge there are not one single other game/simulator that gives you access to it's inner core the way OFP does! At least not right out of the box...

No offense but heck! The games you mention doesn't even have a decent mission builder (if any?) and let alone a script language out of the box. Of course they have code (scripts) running in the background but I guess you will have a very hard time trying to change/tweak/improve something there as an end user. It's all locked up tighter than a frogs ass  tounge_o.gif

Lets see what we have in OFP...

First of all we have an incredible good mission builder, the best I've ever seen <period> If you learn it well you can do pretty awesome stuff with that alone and without writing a single line of code.

On top of that we have a very powerfull script langue that gives you almost strait access to OFP's inner core so you can change/tweak/adapt/expand/improve many many things. As we have seen with all ingenious addons/mods/scripts released over the past years "the sky is the limit". Now thats what I call good game/simulator design! And it's damn efficiant to!

I'm not saying it's perfect in every aspect, few things are. The scripting language can be improved and I'm sure BIS will do just that in OFP 2.

There are other games/simulators with some similarities but overall not as good as OFP. I know that Sub Command/Dangerous Waters have a good mission editor and limited script/trigger possibilities, think it's the same with Jane's F/A-18 simulator and Quake had something called "Quake C" that I assume was/is pretty powerfull (I never used it) but again not at OFP's level and not right out of the box

@ Nemesis6: Yea, but thats badly written scripts  wink_o.gif

/Christer (a.k.a KeyCat)

PS: On a second thought maybe this thread should be in general instead? If any moderator thinks the same then move it and sorry for my rambling.

Share this post


Link to post
Share on other sites

Ofcourse none of those games are open to editing as OFP is , but that wasnt the point , point was that those games do also have such scripting capabilities only thing is that its all locked as you say from end users only game devs can control them. Its not as if they are non-existant from such capabilities.

Share this post


Link to post
Share on other sites
Ofcourse none of those games are open to editing as OFP is , but that wasnt the point , point was that those games do also have such scripting capabilities only thing is that its all locked as you say from end users only game devs can control them. Its not as if they are non-existant from such capabilities.

You missunderstood me completely then... That was exactly my point!

With OFP we as end users have the power to change/tweak/adapt/expand/improve many things thanks to the script engine and whats amazes me is how damn good it works!

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

The Max Payne games has a pretty decent scripting engine too if I'm not misstaking. smile_o.gif

Share this post


Link to post
Share on other sites

The only problem is, OFP is old. While, after all these years, there are no doubt thousands of scripts out there, the engine itself is lacking and the scripting is limited.

For example, cover. On most islands, there is a lack of cover, (as the first mission's journal in CWC Campaign said, bushes are not cover, they are concealment, two very different things) and all you have is terrain. While a human player can do that effectively, especially if he has terrain detail set to high or very high, the AI cannot, even with human help through orders. And when there is cover, such as rocks or buildings, the AI does not take advantage of it. And, the same with terrain, it's hard to get the AI in a good position and have them take advantage of the position you order them to.

Another example, suppression. Firefights in OFP are quite short because of the lack of suppression and cover. There's no fear of death in the AI or the player, so both sides just go prone and shoot at each other until the other side is dead, or they are. Firefights that would last hours in real life are ended in mere seconds in OFP. This is connected to lack of cover: Even if there was suppression in OFP, what would they be suppressed behind? JAM and HD weapons and recoil make an effort to lengthen firefights, and sometimes they are successful. However, it's still not a realistic firefight by any means.

Here's a third one, that may even be fixed by scripting one day, although I wonder why it hasn't been already: Tanks. Since when do tanks carry laser-guided missile launchers instead of cannon? OFP tanks are waaaay too accurate.

Number 4: Lack of Urban Combat. I know, I know, OFP was meant to be a Central European combat zone, but that idea is pretty much null when you think about it. If OFP's lack of urban combat can be blamed on a targetted Central European atmosphere, why did the designers make it so easy to make new islands and addons that changed OFP drastically? Urban fighting (and CQB fights in general) in OFP is pitiful. You can stand right next to an enemy AI soldier, full skill, and watch him slowly move his gun around you. After laughing for a few seconds, you pour 5 bursts into his chest from your M-16, and move on. Indoor combat is even worse than outdoor combat.

5th point: The AI's fighting ability. I've seen the AI do incredibly stupid things and incredibly smart things. Sometimes, i'll watch 5 squad mates die from a grenade (which totally ruins single player, especially in multiple squad actions, because you'll lose your supporting squads and your own squad so easily) and other times I'll watch them just sit and wait as 5 enemy soldiers on the attack close in on them. I've also seen AI soldiers take advantage of this, and had a machine-gun or two mow down a half-dozen clueless enemies. Those are just some examples.

I know that OFP is old and limited, and I accept that. It's still the best single-player FPS out there, and this game's mission editing, ease of making addons, and powerful scripting engine, you have near infinite amount of possibilities with OFP. But I'm worried that OFP2 will have these basic problems and others, and that it will just be a copy of OFP1 with better graphics and a Vietnam setting.

Share this post


Link to post
Share on other sites

smile_o.gif Of course I second your praise KeyCat. A very rich script language for a game/simulator.

But keep it coming!

Share this post


Link to post
Share on other sites

I agree that the OFP scripting engine is well versed and creates many opportunities, but it is by far a masterpiece IMO.

There are numerous bugs, inconsistancies, and unknowns in my experience. Also, I've had OFP slow to a crawl via too many scripts, if you haven't... you didn't try hard enough!  tounge_o.gif

biggrin_o.gif

I breifly... breifly touched the scripting system for Neverwinter Nights and I must say that is right on track with what a scripting engine should be... C++-like in every aspect and just as much integration with the core as OFP is. They even wrote a book covering all the references and basic possibilities, I think... keep in mind this was also created around the same time as OFP. I believe there were others too.

EDIT: Added: URL to a NWN Scripting Reference for comparison http://www.nwnlexicon.com/

Also, as more and more games are written in C#, people are starting to realize the possibilities of the System.Reflection based script set. It exposes the ENTIRE programming language to scriptors and allows developers to allow access to various libraries of their choosing. A very romantic scripting system.... imagine creating a game and allowing the entire MP net code to be moddable by allowing access to the appropriate System.NET.Sockets namespace (or other)...or perhaps you expose your objects on a read-only level... but yet give scriptors access to read ALL properties of those objects.

EDIT: Added: Link to a game topic discussing C# as a scripting language

http://www.gamedev.net/community/forums/topic.asp?topic_id=311887

Yeah,... OFP is far from a masterpiece, but I am looking to see what is done in OFP2!

Share this post


Link to post
Share on other sites

OFP has a LARGE share of bugs and errors. But the possiblitys for modding it is pretty much endless. You can make just about mod any game your heart desires using the OFP engine. Anything form a tactical FPS to an RTS. Its by far more versitile and more easily moddible than any other engine. Not to mention that it is extreemly easy to build and install addons. Everything about modding flashpoint is user friendly, it is just as good for someone who has never modded anything before, as it is for someone who is an expert modder.

Share this post


Link to post
Share on other sites

I dont think I've run into any errors or bugs in OFP, only limitations. It is a VERY nice engine/language to work with once you know what your doing, OFP2 better keep the same general idea! I dont want to have to re-learn the scripting language sad_o.gif

Share this post


Link to post
Share on other sites
The only problem is, OFP is old. While, after all these years, there are no doubt thousands of scripts out there, the engine itself is lacking and the scripting is limited.

I think we are starting to talk about two different things here.... Yes, the OFP 1 game engine has limitations that can't be fixed by modders or scripters (and thats why we wait for OFP 2).

But thanks to the script engine many things have been overcomed. Maybe not with perfect solutions due to above mentioned limitations but lots of things have been improved.

I agree with most/all game engine limitations you mention below, just a few comments...

Quote[/b] ]

While a human player can do that effectively, especially if he has terrain detail set to high or very high, the AI cannot, even with human help through orders.

Agree, I always play with high terrain.

Quote[/b] ]

Even if there was suppression in OFP, what would they be suppressed behind? JAM and HD weapons and recoil make an effort to lengthen firefights, and sometimes they are successful.

I have suppression "working" in the Group Link II script. It's not perfect but at least now enemy AI hits the deck and slows down if you open up with a heavy machinegun. As you say, JAM and HD ammo on AI helps to make firefights longer.

Quote[/b] ]

Here's a third one, that may even be fixed by scripting one day, although I wonder why it hasn't been already: Tanks. Since when do tanks carry laser-guided missile launchers instead of cannon? OFP tanks are waaaay too accurate.

100% agree and it's already "fixed"... Again it's far from perfect but still an improvement IMHO. Check out "Armour Battle Fix MP" in my signature.

Quote[/b] ]

There are numerous bugs, inconsistancies, and unknowns in my experience. Also, I've had OFP slow to a crawl via too many scripts, if you haven't... you didn't try hard enough!  

@ CrashDome: Can't say that I've experienced that many bugs myself, limitations yes but not many bugs? Making a CPU crawl is easy to do in any programming language, just takes some tight loops. Also note I wrote "well written scripts" in my first post tounge_o.gif

Quote[/b] ]

I breifly... breifly touched the scripting system for Neverwinter Nights and I must say that is right on track with what a scripting engine should be...

Hehe, I covered my back by writing "to my knowledge" and that just shows I don't know to much tounge_o.gif

Since I come from a simulator background I never played any of the games you and dmakatra mentioned but the scripting system seems to be cool stuff. Thanks for the links will follow up when time permitts...

Quote[/b] ]

OFP has a LARGE share of bugs and errors.

@ iceman316: Do you mind telling us what all those bugs and errors are?

I'm not saying OFP is perfect, again few things are, but current version (1.96) only have a few (minor) bugs still there. If you haven't you should try out OFP 1.00 then you have something to compare against smile_o.gif

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

I love the editor and the scripting language, but some commands are so buggy they become useless:

I'm gathering info about these, here are a few I've found :

Combatmode : Returns the combatmode, but it only works when you call setcombatmode from a script or trigger, not via the action radio commands.

Scripted waypoints type : Nice and easy to use, but completely useless, because status is not saved  mad_o.gif

Animate : Reset after reloading the mission mad_o.gif

Setface : Reset after reloading the mission mad_o.gif

Correct me if I'm wrong smile_o.gif

Share this post


Link to post
Share on other sites

Yup, OFP scripting is the second best I ever saw, and yup, the NwN one is the best I saw smile_o.gif

LOMAC LUA scripting seems to be improving at each patch/addons too.

Share this post


Link to post
Share on other sites
LOMAC LUA scripting seems to be improving at each patch/addons too.

Last time I looked at LOMAC's LUA it it was mostly for cockpit builders. And LOMAC's mission editor sucks compared to OPF's sad_o.gif

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

It's been upgraded with Flaming Cliffs, and should be with upcoming patches for FC. Not as good as OFP, sure, but there should be some good options (spawning units ingame, etc...)

Share this post


Link to post
Share on other sites

Sounds cool! I'm glad ED improve that aspect of the simulator as well. I didn't buy FC and probably never will but I'm looking forward to see what the upcoming addons/versions will add in terms of attack choppers but also the (currently lacking) campaign system.

@ CrashDome: I jumped over and took a brief look at the NWN's script functions and WOW! I counted 1900+ functions there, to bad I'm not into that kind of games but it surely is something for BIS to "beat" in OFP 2 smile_o.gif

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Scripting? Is that where you put the triggers in the mission editor and waypoints for AI to move? I made a mission like that once!

Share this post


Link to post
Share on other sites
Scripting? Is that where you put the triggers in the mission editor and waypoints for AI to move? I made a mission like that once!

sometimes it is wondrous, how amazing missions you can make without or with little scripting... wow_o.gif

Share this post


Link to post
Share on other sites

I'm basicaly a noob at writing code. But, I have to agree with KeyKat.  However if youre not making missions using KeyKat's GL2 with snYpir's Support pack youre not making Missions your making Arcade Romp and Stomp Games like AA.   tounge_o.gif .

Seriously, I have never left OFP since its beginning and I still am a noob when it comes to coding. However Thanks to the masters that do document their scripts, I have been able to cut and past a kludged together sqs that works for a particular need! May the Force be with and bless all of you guys!  Where else can an Idiot (Like myself) create a good (I didnt say GREAT) Mission that works in an MP environment ? !

OFP engine rules! (for now!).  Code Scripters, Modders, Island Makers and Players, I salute you!  

smile_o.gif

Oh and you Forum Moderators and Host are beyond belief. To have the patience to put up with all this is beyond remarkable.

Share this post


Link to post
Share on other sites

Even though the current scripting system offers many possibilites...,

I'd say it's.... hmmm.... very primitive. It has some aspects of real-time programming, but no basic features like threadsafe, semaphores. Absolutely no exception handling. It's hard to debug (in fact there's no true debugger at all) and error reporting is extremly poor - most errors are not reported at all! The whole #label and goto "label" construction should be banned and burn in hell, because in most cases it's hard to read and understand. The scripting language is not compiled, but interpreted on-the-fly which causes poor performance. There're many more things that could be greatly improved. ... and there're MANY other games that offer equal if not better scripting than OFP.

If you think otherwise, it only shows you have a little/no experience at real programming. wink_o.gif

That's why I'm trully impressed with some complicated scripting achievements made for OFP. I know it takes a great deal of commitment and patience to make it all work. smile_o.gif

Share this post


Link to post
Share on other sites

Blunt.... but correct in most aspects. I totally agree with you on the need for some of this stuff - but only out of competitive reasons. Like you mentioned, others are beginning to release some very intense scripting options.

From a code-writer's standpoint this language can be very confusing.

However, if I may step into the shoes of the designer of various script engines for a moment,

Those labels may be 'bad news' but they are completely needed in a situation where there is line-by-line compilation. I agree I want more features of a high-level programming language and compiled scripts, but to say

Quote[/b] ]If you think otherwise, it only shows you have a little/no experience at real programming.

actually shows how limited your knowledge of programming is.[EDIT] Er.. I'm not trying to call your knowledge into question, but I'm trying to point out that alot of these out-dated practices such as line-by-line compilation require some of these principles to function usefully.[End Edit] I mean how about native code? ever worked with that? There are some well understood principles being applied to this scripting language that you might think should be banned but is actually good examples of some basic principles of programming that even high-level programming languages actually use - they just sugar-coat it into a single word or phrase.

Share this post


Link to post
Share on other sites
I'd say it's.... hmmm.... very primitive. It has some aspects of real-time programming, but no basic features like threadsafe, semaphores. Absolutely no exception handling.

IMO you are comparing appleas with oranges! It's was never designed to be a programming language per se so of course it's primitive when you compare it with high-level languages like Delphi, C++, C# etc.

Also, remember how much you payed for OFP. I mean for ~USD 100 (OFP + OFPR) you can't really expect to get a military combat simulator + a "real" programming language.

Quote[/b] ]

The scripting language is not compiled, but interpreted on-the-fly which causes poor performance.

As you say it is interpreted and for that it performs very well IMO.

Quote[/b] ]

and there're MANY other games that offer equal if not better scripting than OFP.

Yea, thanks to this thread I've learned that there are other games with equal or better scripting but I'm pretty sure you can't mention one single combat simulator that offers better scripting than OFP?

Again, it's not fair to compare apples with oranges... That being said I hope BIS continue to improve it in OFP 2 since as you say it can still be improved...

/Christer (a.k.a KeyCat)

Share this post


Link to post
Share on other sites

Heh, don't get me wrong, I'm not trying to play smart-ass here, but my I'm only saying what my personal opinion is. I've only point out that current scripting language can be vastly improved upon.

I do know very well, that labels are the simple solution to on-the-fly compilation problems and as you said it's the line-by-line compilation method that is the exact problem here. I don't want this thread to go into "bitching about OFP scripting language" direction, but just look how many other issuses are affected by this and many potential error situations are created. If it's all about ease of use, why not precompile the code before execution (like in Perl)?

I've never programmed in actual binary native code if that's what you mean, but I've some experience in assembler programming for x86 and MIPS R4000 architecture. I do also have some experience with high level languages, ranging from C, C++, Perl and Java to such exotic things as Clipper and that's why I think it's high-level structural (or even object-oriented) programming what should be available for OFP2. It just makes development simplier and faster.

@Keycat: I won't show you any other example just because we all know that OFP is one-of-a-kind game. Yet, this doesn't prove better scripting cannot be introduced to it.

Ok... enough of these rant, I should be thankful for what I got, right? tounge_o.gifbiggrin_o.gif

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  

×