Home   Help Search Login Register  

Author Topic: AMAZING INSIGHT ! (Maybe) - description.ext  (Read 587 times)

0 Members and 1 Guest are viewing this topic.

Offline Roni

  • Members
  • *
  • Play the Game !
AMAZING INSIGHT ! (Maybe) - description.ext
« on: 09 Feb 2005, 08:25:18 »
Hi All

This is just a quick note to relay a flash that came to me in the car today.

If the description.ext can recognize the ConfigSounds syntax, shouldn't it recognize ALL config syntax ?  In other words, shouldn't we be able to implement addons via the description.ext ?

Imagine - I want to create a mission with a custom animation or weapon effect.  Simple - design in the description.ext and there it is, ready when the mission starts.  And why not ? - sounds are defined in the config but new ones can be added via the .ext, why not other classes ?

Second insight - if this is true then can you use any and all syntax of the source code (C++ ?) in this area ?  Can you call functions or another .ext file ?  If so, couldn't you create whole addons, unPBO'd, store them in a subfolder and call them via the .ext (description.ext calls newGun.ext, which defines all the configs for the new addon ?).

As I said, if this is true, then the possibilites are amazing.  It should be simple to test (ie - define a new version of the M16 in the .ext and try it out in the mission) but I'm stuck at work and won't be home for another four hours !

And if it doens't work then please ignore this post . . .  :tomato:



Roni
« Last Edit: 09 Feb 2005, 08:26:11 by Roni »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:AMAZING INSIGHT ! (Maybe) - description.ext
« Reply #1 on: 09 Feb 2005, 09:39:17 »
I've tested this some time ago, and it did not work...

I think OFP has very specific interpreters per code, for example you can preprocessFile any kind of file (any extension) and call them later...
For example I have preprocessed and called (or call loadFiled) files with the next extensions (in addition to .sqf):
.ini, .cpp, .hpp, .h, .cfg, .sqs, etc...

They work, but the downside is that no matter what the extension is you still need to use the scripting commands and .sqf syntax, so if you for example preprocess and call (or call loadFile) a .cpp it will not work if it's regular .cpp...
Also, you can use the regular "" exec "this.sqf", but then the .sqf needs to use the .sqs syntax...

So it's very likely that when the *.ext interpreter finds some class in the .ext that the interpreter has not been 'told' how to deal with it will just ignore it...
I tried this by making a new vehicle class in the description.ext and trying to camCreate/createVehicle it, but no luck there...
The positive note (and the fact on which I base that interpreter assumption above) was that OFP didn't CTD or give any error, but no such description.ext 'configged' vehicle was available for creating...

But, if someone has different results, do tell... :P
This could open a few more doors if it worked...
« Last Edit: 09 Feb 2005, 09:40:23 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AMAZING INSIGHT ! (Maybe) - description.ext
« Reply #2 on: 10 Feb 2005, 04:52:36 »
Hi H

Okay, second try (last 15 mins of typing lost !).

First off, if you call a file using the call loadFile command aren't you still operating in the sqs/sqf environment ?  I'm no expert, but I'm guessing that that's why you can't use the config.cpp type commands - the shell that you're using is still the scripting shell, not the underlying config shell.

To test this you could ty to call a file with an entirely insane extension such as "something.xL3vnA" and see if it works.  My prediction is that it SHOULD work, so long as the reference and the file extension line up, and so long as the text in the file is interpretable as scripting commands (ie, was created using a text editor).

That being said, this doesn't help here.  My theory is this - whenever a mission is started the OFP engine does the following things -

Runs the file description.ext as a config type file (ie using C++syntax ?) and records any new definitions contained in it.

Runs the file init.sqs as an sqs type file (ie using scripting command syntax) and creates any effects etc created by that file.

Runs the onbriefing.sqs and other start up files, as above.

Runs any other file required or called by any of the above, of whatever extension, using the scripting command syntax.

Runs the game, along wth any sqs or sqf files called by it, again using the scripting command syntax.

My belief is that the desciption.ext file is the only file automatically run that uses the C++ syntax, my hope is that this file has available to it the full syntax and not just the configSounds class.

I WILL pursue this more at home and let the community know what I turn up . . .

Cheers



Roni


Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:AMAZING INSIGHT ! (Maybe) - description.ext
« Reply #3 on: 10 Feb 2005, 09:12:48 »
Quote
My belief is that the desciption.ext file is the only file automatically run that uses the C++ syntax, my hope is that this file has available to it the full syntax and not just the configSounds class.
All the sqs/sqf talk as just an example/explanation why I have come to the conclusion I have...

I defined a new test Jeep class in the descriptioon.ext and tried to camCreate and createVehicle it, but no go...
So my guess is (like I said) that the *.ext interpreter does not recognise classes like CfgPatched, CfgVehicles, etc...

But sure, I'm not saying you should not dig deeper with this... ;)
Maybe your results are better...
« Last Edit: 10 Feb 2005, 09:14:04 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:AMAZING INSIGHT ! (Maybe) - description.ext
« Reply #4 on: 11 Feb 2005, 06:05:32 »
Damn work !

I've been to busy to get back to this but trust me, I am definitely going to follow this up.

More news as I make it !



Roni