General Barron – User talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(reply to kju)
m (Text replacement - "\[ *((ftp|http)s?:\/\/[^ ]+)([^{])=([^}])([^ ]+)" to "[$1$3{{=}}$4$5")
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Wiki edits=
=Wiki edits=
If you come across obvious mistakes (as in the [http://community.bistudio.com/wiki?title=getMagazineCargo_(VBS2)&curid=7383&diff=44574&oldid=40682&rcid=45682 getMagazineCargo] article you annotated), feel free to correct the description.<br>
If you come across obvious mistakes (as in the [http://community.bistudio.com/wiki?title{{=}}getMagazineCargo_(VBS2)&curid=7383&diff=44574&oldid=40682&rcid=45682 getMagazineCargo] article you annotated), feel free to correct the description.<br>
This is, after all, a Wiki, and if you're 100% sure that information is wrong somewhere, just edit it, and leave a note in the edit summary.<br>
This is, after all, a Wiki, and if you're 100% sure that information is wrong somewhere, just edit it, and leave a note in the edit summary.<br>
If an article should be deleted, notify one of the [http://community.bistudio.com/wiki?title=Special%3AListusers&group=sysop&username= sysops] here, or, if the commands ''did'' exist at some point, but has been removed, just put the [[Template:vbs2-obsolete|vbs2-obsolete template]] into the article.<br>
If an article should be deleted, notify one of the [http://community.bistudio.com/wiki?title{{=}}Special%3AListusers&group=sysop&username= sysops] here, or, if the commands ''did'' exist at some point, but has been removed, just put the [[Template:vbs2-obsolete|vbs2-obsolete template]] into the article.<br>
Thanks, --[[User:Kronzky|Kronzky]] 18:50, 18 January 2009 (CET)
Thanks, --[[User:Kronzky|Kronzky]] 18:50, 18 January 2009 (CET)


=Renaming Pages=
= Renaming Pages =
If you need a page to be renamed (as in the [http://community.bistudio.com/wiki?title=locationNull_%28VBS2%29&action=history locationNull] case), just ask one of the sysops here to do it. It's easier (and cleaner) than to first delete it, and then having to create a new version. --[[User:Kronzky|Kronzky]] 14:34, 6 May 2009 (CEST)
If you need a page to be renamed (as in the [http://community.bistudio.com/wiki?title{{=}}locationNull_%28VBS2%29&action=history locationNull] case), just ask one of the sysops here to do it. It's easier (and cleaner) than to first delete it, and then having to create a new version. --[[User:Kronzky|Kronzky]] 14:34, 6 May 2009 (CEST)


=PreProcessor Commands FILE=
= PreProcessor Commands FILE =


gday GB!<br>
gday GB!<br>
Line 22: Line 22:
I added a simple example to the linked page. I'm not sure what other types of examples you are looking for.
I added a simple example to the linked page. I'm not sure what other types of examples you are looking for.


I haven't tested what it gets replaced with when you use it inside of a config file. You'd have to test it out yourself. I'd be careful to look out for differences between (a) a converted config (packed via the BI packer), (b) an unconverted config (packed using a community packer), and (c) an unpacked config (#included into a type (b) pbo's config file, but the included file sitting outside of any pbo).
I haven't tested what it gets replaced with when you use it inside of a config file. You'd have to test it out yourself.
 
I'd be careful to look out for differences between (a) a converted config (packed via the BI packer), (b) an unconverted config (packed using a community packer), and (c) an unpacked config (#included into a type (b) pbo's config file, but the included file sitting outside of any pbo).
 
The difference between the above is *when* the macro is processed. For converted configs, all preprocessing is done during the packing process. For unconverted configs, the preprocessing is done when the game is loaded (or when the mission is loaded, for description.ext's).
 
--[[User:General Barron|General Barron]] 21:31, 8 September 2009 (CEST)
--[[User:General Barron|General Barron]] 21:31, 8 September 2009 (CEST)
gday GB!
thanks and sorry for the late response.<br>
Your example makes sense, yet my goal is more complex. First to what I want to achieve:
model = "\myTag\myModel";
MyTag is the prefix the file is in. Either defined in the PBOPREFIX or the <br>
folder name. Unfortunately BI made relative path not possible at many instances.<br>
Here it would have look like: "model = 'myModel'; - if the file is in the <br>
same folder as the config.
Long story short. It is very annoying to set the right path all the time.<br>
Especially if you repath (aka change the container name/location).<br>
The idea was to use the __FILE__ macro to avoid all the hassle like:
model = __FILE__\myModel;
model = "__FILE__\myModel";
That is the plan. And that I am unable to get to work. Cheers. --[[User:WGL.Q|.kju]] 20:06, 16 September 2009 (CEST)
-
If that doesn't work, why not try using a define at the top of your config? Something like:
<pre>#define configDir \ca\mystuff\mything //path to config's folder in P: drive (excluding drive letter)
Then in your config, use:
model = configDir\mymodel;</pre>
Then you only need to change the one define if you move the location of your config. Or, if you made a custom build pipeline, you could even automatically write the #define at the top of your config via a batch file or other program.
--[[User:General Barron|General Barron]] 23:16, 16 September 2009 (CEST)
gday GB!
thanks for the reply. This is what we use now. I was just hoping to uncouple<br>
it completely from any static definition. Cheers. --[[User:WGL.Q|.kju]] 08:59, 17 September 2009 (CEST)

Latest revision as of 17:27, 28 April 2023

Wiki edits

If you come across obvious mistakes (as in the getMagazineCargo article you annotated), feel free to correct the description.
This is, after all, a Wiki, and if you're 100% sure that information is wrong somewhere, just edit it, and leave a note in the edit summary.
If an article should be deleted, notify one of the sysops here, or, if the commands did exist at some point, but has been removed, just put the vbs2-obsolete template into the article.
Thanks, --Kronzky 18:50, 18 January 2009 (CET)

Renaming Pages

If you need a page to be renamed (as in the locationNull case), just ask one of the sysops here to do it. It's easier (and cleaner) than to first delete it, and then having to create a new version. --Kronzky 14:34, 6 May 2009 (CEST)

PreProcessor Commands FILE

gday GB!
would you please share some examples how to use __FILE__:
http://community.bistudio.com/wiki/PreProcessor_Commands#__FILE__
I am trying to get it work in a cpp - more precisely inside an eventhandler path.
Is it even possible there? Some overall working examples of all known cases
would be very much appreciated - cheers!

--.kju 07:56, 5 September 2009 (CEST)


I added a simple example to the linked page. I'm not sure what other types of examples you are looking for.

I haven't tested what it gets replaced with when you use it inside of a config file. You'd have to test it out yourself.

I'd be careful to look out for differences between (a) a converted config (packed via the BI packer), (b) an unconverted config (packed using a community packer), and (c) an unpacked config (#included into a type (b) pbo's config file, but the included file sitting outside of any pbo).

The difference between the above is *when* the macro is processed. For converted configs, all preprocessing is done during the packing process. For unconverted configs, the preprocessing is done when the game is loaded (or when the mission is loaded, for description.ext's).

--General Barron 21:31, 8 September 2009 (CEST)

gday GB!

thanks and sorry for the late response.
Your example makes sense, yet my goal is more complex. First to what I want to achieve:

model = "\myTag\myModel";

MyTag is the prefix the file is in. Either defined in the PBOPREFIX or the
folder name. Unfortunately BI made relative path not possible at many instances.
Here it would have look like: "model = 'myModel'; - if the file is in the
same folder as the config.

Long story short. It is very annoying to set the right path all the time.
Especially if you repath (aka change the container name/location).
The idea was to use the __FILE__ macro to avoid all the hassle like:

model = __FILE__\myModel;
model = "__FILE__\myModel";

That is the plan. And that I am unable to get to work. Cheers. --.kju 20:06, 16 September 2009 (CEST)

-

If that doesn't work, why not try using a define at the top of your config? Something like:

#define configDir \ca\mystuff\mything //path to config's folder in P: drive (excluding drive letter)

Then in your config, use:

model = configDir\mymodel;

Then you only need to change the one define if you move the location of your config. Or, if you made a custom build pipeline, you could even automatically write the #define at the top of your config via a batch file or other program.

--General Barron 23:16, 16 September 2009 (CEST)

gday GB!

thanks for the reply. This is what we use now. I was just hoping to uncouple
it completely from any static definition. Cheers. --.kju 08:59, 17 September 2009 (CEST)