Is there any way to detect if the conversion pack is installed?
Here's an example for how this could be used.
Let's say that a person is going to play a single player map(multi would probably CTD using this) that requires units from the conversion pack. Let's also say that for whatever silly, misbegotten reason they don't have the conversion pack. I'm now excluded from that elite group as of 3 minutes ago: P
It would be very nice if you could use a function to return the true/false install state of the pack. This would allow you to tailor the sides according to the player’s setup. No conversion pack installed? No convo units are used.
Now, after all this speculation I have two questions; Is there a command like this? And if not could one be made?
IsConversionPackInstalled()
Moderator: Moderators
-
- Black Sun Slicer
- Posts: 619
- Joined: Wed Aug 23, 2006 4:10 pm
-
- Jedi
- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: IsConversionPackInstalled()
He, thats what I need to.
Also, for BFX I need the same.
Also, for BFX I need the same.
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: IsConversionPackInstalled()
Yes, there are a few ways you can do this. The easiest being that you check for the existence of the file you want to load the units from before you read it. If it doesn't exist, then you don't attempt to read it. I don't remember the exact name of the function and I can't look it up right now. Its one of the ScriptCB functions. I've tested it ingame and it works fine. Thats how all the v1.3 patch's settings files work.
However, if you use it to determine which units to load and if two people go online and attempt to play the same map with different units, I expect them to have problems.
However, if you use it to determine which units to load and if two people go online and attempt to play the same map with different units, I expect them to have problems.
-
- Black Sun Slicer
- Posts: 619
- Joined: Wed Aug 23, 2006 4:10 pm
Re: IsConversionPackInstalled()
Alright makes sense. I've seen that function before(something like ScriptCB_DoesFileExist) and I've always wondered what else it could be used for.
So, single player only... That should work. Thanks Zerted.
So, single player only... That should work. Thanks Zerted.