Guest Posted April 9, 2014 Updated version frontpaged on the Armaholic homepage. Grimes' Building Occupation Script v1.1 ================================================ We have also "connected" these pages to your account on Armaholic. This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have. When you have any questions already feel free to PM or email me! Share this post Link to post Share on other sites
pulstar 55 Posted April 9, 2014 could this be turned into a PBO? Having to copy the files to each map for quick play can be tiresome. Share this post Link to post Share on other sites
KC Grimes 79 Posted April 9, 2014 could this be turned into a PBO? Having to copy the files to each map for quick play can be tiresome. The download is setup so that to play the sample mission you simple copy the mission file in the .rar to your MPMissions directory. The only thing that needs to be carried over for use in your own missions is the G_Occupation.sqf file, which contains info and an example line for how to execute the file. That said, to do this with the download as a .pbo the mission maker would need to unpbo that file, which just takes more time. So I am not quite sure where you are coming from with this. However, if you truly want a .pbo, I suggest that you just make it yourself. The mission folder is in the download. @ Katipo - Glad it worked! @ Foxhound - As always, thanks for the mirror. I'll update the OP. Share this post Link to post Share on other sites
Harzach 2518 Posted April 9, 2014 ;2663496']So I am not quite sure where you are coming from with this. I think he's asking for a mod version, which is - frankly - a bad idea. Share this post Link to post Share on other sites
KC Grimes 79 Posted April 9, 2014 I think he's asking for a mod version, which is - frankly - a bad idea. Ah, ok, this I understand. And I agree, that is just not going to happen. For one, I don't know squat about making addons, and I am one to avoid them like the plague (having a dependability is just not necessary). Two, the only way I see this being a "mod" is as a module that is placed ingame where a fancy, BIS-looking dialog is used for filling in the params in a neat, easy way versus the confusion of a bunch of numbers and bools in close proximity. That said, if anyone wants to nominate this script on the Feedback Tracker as a new feature module, be my guest! :P 1 Share this post Link to post Share on other sites
SavageCDN 231 Posted April 9, 2014 Posting so I remember to come back and check out this script :p Share this post Link to post Share on other sites
pulstar 55 Posted April 10, 2014 Okay then, is it possible to modify this script to spawn squads/sections? Share this post Link to post Share on other sites
KC Grimes 79 Posted April 10, 2014 Okay then, is it possible to modify this script to spawn squads/sections? As in from CfgGroups, technically yes, but I have no intention of doing that since the functionality is basically there already. You are able to set the group size in more ways than one, and they can be fixed or random sizes. As well, you can set the composition of the spawned squads. This feature is present, but is actually a little more hidden then I intended. I'll fix that, and update in the coming weeks. For now, here's the info: -You can add or remove classnames in the _sclasses arrays. The script is already setup to select 1 at random per individual spawn. That said, scroll down into the script itself until you see 4 different definitions of _sclasses, 1 for each faction. Stock, only the base unit of that faction is spawned. However, you can simply add a comma and throw in a classname as a string in order to have a more diverse squad. EX: case EAST: { _sclasses = ["O_Soldier_F","O_Soldier_SL_F","O_Soldier_AT_F"]; }; * Not sure if those classnames are real, just used them as an example The way the script works is it will simply select one of those classes at random when spawning a specific unit. So you could end up with a squad of 3 SL classes, or a squad with 2 AT and 1 Base, or anything else you can think of with those three. For info on how to set squad size and such, please read through the description, as it is explained thoroughly since it is essentially the purpose of the script. Let me know if you have any further questions! Share this post Link to post Share on other sites
pulstar 55 Posted April 20, 2014 Thanks. Very useful script. Btw, is it only limited to sides? I don't want to spawn mixed groups from various factions. How to separate them? Or maybe I should just edit a new file to each faction? Share this post Link to post Share on other sites
KC Grimes 79 Posted April 20, 2014 The script will only spawn 1 side. By "mixed group" I mean that their are various classnames in that group, but all of just 1 faction. To spawn multiple factions, simply execute the script again but with different parameters. No need to have multiple of the G_Occupation.sqf file unless you are wanting to have 2 different variations of WEST groups. For instance, in your first execution you want an SL, some AT, and some AA, but in the 2nd group you don't want AA. You'd have to have 2 copies of the file, so you can define your group composition separately. Then you'd execute them individually as needed. The script is setup to be successfully executed multiple times, all at the same time. This is also what I suggest. Get the lag out of the way at the beginning, then enjoy a seamless mission. Share this post Link to post Share on other sites
Cigs4 18 Posted July 27, 2014 Hello, Grimes! Is it possible to use another OPFOR or just CSAT? Like CAF_AG for example? If yes, how can I do that? Thanks for this great script. Share this post Link to post Share on other sites
MrBagel 21 Posted February 25, 2015 Hello, Grimes!Is it possible to use another OPFOR or just CSAT? Like CAF_AG for example? If yes, how can I do that? Thanks for this great script. Any answer to this would be fantastic Share this post Link to post Share on other sites
normre 10 Posted October 24, 2015 Curious if anyone else is having this issue. Script will only spawn EAST or WEST unit. Script seems to run fine for other factions (debug mode output indicates units spawned), but no units on map. Any ideas? Share this post Link to post Share on other sites
uncookedzebra 13 Posted January 10, 2017 @normre I would like to point out in Line 110 it says case GUER: { _sclasses = ["I_Soldier_F"]; }; When it should be case Resistance: { _sclasses = ["I_Soldier_F"]; }; See: https://community.bistudio.com/wiki/Side Sorry for digging this one up but I would like to see this script updated on Armaholic :) Share this post Link to post Share on other sites
KC Grimes 79 Posted February 11, 2018 @Cigs4, @normre, @uncookedzebra, @killzone_kid Howdy folks! Thanks to some free time and suggestions and assistance (though years ago... oops), I have released V1.2 of the Grimes Building Occupation Script. This update contains significant bug fixes, optimizations, and otherwise improves performance or makes change that provide for intended performance. Building randomization is working again, invalid spawns are no longer an issue, resistance and civilians spawn correctly, and the documentation is greatly improved. V1.2 is completely backwards compatible, so just swap out the old G_Occupation.sqf with the new one, consider running a debug trial, and enjoy! The updated download link is in the OP. Expect an Armaholic mirror soon. For now, the download is through github. On that note, this project is now on github for others to more freely learn from it and contribute! Additionally, that is where the detailed changelog will be located. Share this post Link to post Share on other sites
davidoss 552 Posted February 11, 2018 Hard work. Any way using if (!isServer) exitWith {}; and below player variable is not good idea. You can slightly simplify call check code using params. The max group 144 is not true anymore now you can have mutch more Share this post Link to post Share on other sites
KC Grimes 79 Posted February 11, 2018 5 minutes ago, davidoss said: Hard work. Any way using if (!isServer) exitWith {}; and below player variable is not good idea. You can slightly simplify call check code using params The player variable is only used for debugging, which is most likely done on a hosted local server. I do not anticipate anything in here having trouble on a dedicated server, but if it did, it would probably showScriptError anyway. You raise a good point, but I just prefer sideChat for debugging instead of hinting or diag_log. In the future I could put in a function that does diag_log if isDedicated, which would certainly be more towards the "right way". Regarding validation using params, I did not know that was possible but see now that it is and looks cleaner. I will certainly keep this in mind going forward. Thanks for the suggestions! Share this post Link to post Share on other sites
KC Grimes 79 Posted February 12, 2018 @davidoss I see your mention of 144 groups no longer being the limitation and discovered that the limit is now 288. I have made that update, and while I was at it I also changed "player sideChat" to "systemChat" as a compromise. The use of the params command for validation looks great. The only thing I have against it is that the error that is displayed via showScriptErrors is generic, whereas the individual if/then statements allow for an individual error message. I do not think it is worthwhile to have the block of if/then checks with error messages in the exitWith of the params statement, and believe this would be the only way to incorporate an individual error message for each parameter. Am I mistaken? Any opinion on this? Thanks again. Share this post Link to post Share on other sites
KC Grimes 79 Posted February 13, 2018 Updated OP to V1.21 thanks to feedback and testing. Changed how debug messages work and upped the group limit to the new engine limit of 288 per side. Share this post Link to post Share on other sites
davidoss 552 Posted February 13, 2018 On 12.02.2018 at 11:40 PM, KC Grimes said: Am I mistaken? Any opinion on this? No its true , but using params you do not need to std for most cases. In your script using params you need only check for side all other parameters you can set default and optional Thanks for update Share this post Link to post Share on other sites
Guest Posted February 26, 2018 The Armaholic mirror has been updated with the new version: Grimes' Building Occupation Script v1.21 Share this post Link to post Share on other sites