Jump to content
Sign in to follow this  
ArmAIIholic

Unlimited number of units in editor [SOLVED]

Recommended Posts

I can freely say this is my dream coming true in ArmA.

You all know there is no way you can spawn more than 144 groups on the map and there are some eeeeexcellent scripts for dynamic spawning, but what if...

what if...

what if it is possible to make mission in the editor and just keep placing and placing and placing and placing and placing, .......... and placing units and waypoints that will spawn later???? :cool:

Download this mission for Utes and give it a try, see what I mean.

I want to thank Murklor here, cause he made fantastic script Editor based AI spawn script by trigger, I tried that script before, but it used dummy groups, so there was a limit all the time ("full buffer").

Not anymore --- I tweaked it and posted v7 that doesn't use dummy groups thus doesn't have any limitation about number of groups. :bounce3:

=== How to use ===

1. Open mission in the editor, Alt+Tab to mission folder

2. Open init.sqf in some text editor and you will see that...

3. The number of groups _k = 4; in this example, Alt+Tab back to game

4. Start the Preview

5. Approach one of the tents -- one will spawn half (2 groups) the other tent other half (also 2 groups)

6. You will see hint -- 4 cycles and 4 groups (not counting player)

Now fun begins...

7. Set _k = 250;

8. You will groups spawning and disappearing :bounce3: that is Murklor's script at work

9. But noooo dummy groups --- number of all Groups is always (on my PC) 5-10 -- that is my tweak :cool:

10. One tent will spawn 125 and the other 125.

11. Still there is no way to spawn more than 144 to be at the same time on the map, but let's try this...

Now reeeeal fun begins...

12. Set _k = 500;

13. This script will remember those 500 groups (or more :D) and you can spawn them on trigger at any time --- and again you can see them spawning and disappearing for later usage!!! but without drop in performance!

14. If you "trigger tent" you will see that units are spawned , but I experienced serious drop in fps......

However, you can cover the whole of Chernarus with battles and spawn them directly from editor without need to script anything -- What You See Is What You Get, so

no matter how many groups you place on the map, you can separate them in groups and spawn them by trigger -- I just made small experiment to prove that this script really works.

=== Download ===

Editor based AI spawn script by trigger v7, Murklor's script tweaked by ArmAIIholic -- only performance test !!!

also check these downloads :

Editor based AI spawn script by trigger v7, Murklor's script tweaked by ArmAIIholic -- example mission.

World in Conflict Tool aka WICT -- next release will include this script!

The reason I made a new thread (and I hope it will become sticky) is that script and method explained here are something that is essential for anyone who wants to make mission in ArmA editor.

This script is designed by Murklor and tweaked by me, it doesn't require any addon and it's main purpose is to get behind limitation of the number of groups and to manage spawning by trigger.

Anyone who scripted in ArmA will agree that such a thing has never been done before in easy way like this.

Sincerely,

ArmAIIholic

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

Say that I am making a D Day map and I want the AI to continue to assault the beach so can I continuously spawn AI with this script on the beachhead? (I have never used scripts before but this interest me)

Share this post


Link to post
Share on other sites

@Kremator, yes, editor still won't let you place more than 144 groups on the map, but I am working on that too as I write this down.

However, this demo I posted should demonstrate ability of this script to "remember" position and config of 500 groups without drop of performance.

Once I find a way to crack the editor I will post it here.

@TacKLed there is a "wave mode", just visit the Editor based AI spawn script by trigger v7, this just a performance demo.

Share this post


Link to post
Share on other sites

So everything you do is caching groups. Nothing groundbreaking new, already had done something similar in ArmA and also for ArmA 2 comparable systems exist (DAC).

So basically the 144 groups limit still exist and can't be exceeded, just a system to make it feel like there is no limit.

I appreciate and respect the work behind it (and i know it is a lot of work) but it is not that breathtaking as the OP suggests. ;)

Anyway, keep it comin. :D

Share this post


Link to post
Share on other sites

It is not like that [GLT]Myke, let me explain more, since I know about DAC and I made WICT btw --- believe me I know extremely well what dynamic system is... It is not comparable to this.

This is about making many, many scripted missions that can be executed together with all waypoints, tasks, triggers etc. everything that casual mission designer would make without dynamic system, you know : place a group, give them waypoints, bla bla and play.

Murklor's script was caching units and they were accessible with allGroups. In the new version they are not dummy groups of any side, but Logic Side.

Now look here :

One solution is using 3D editor or RTE that will provide you with SQF that you can call and execute. However, it is a little bit complicated, because you have to collect all those files and execute them one by one by some trigger, right? If you merge them you will get a mess...

This is much easier --- suppose I created 10 missions with 2x 144 groups each --- instead of calling 10 separate files, I can make one and call it on server right from the game start, and individual missions will be executed by trigger by Murklor's script.

So, yes, you can have more than 144 groups! :cool: that is my final conclusion and statement :)

What my demo from up above shows is that it caches all units, but keeps resources clear for any dynamic script that checks allGroups :D if you ever saw any of those scripts caching units into Logic Side I will "kneel and obey" :D

Thanx for reading ;)

A2H

P.S. What would be great is to pull out data from e.g. SaveGame regarding cached units and merge them lately and load into new game. That would solve all problems, including working with 3D editor.

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites
So, yes, you can have more than 144 groups!

You can have 144 groups per side. Each side. Also logicside is a independent side.

According to BIWIKI there is possibly 8 independent sides: "WEST", "EAST", "GUER", "CIV", "LOGIC", "ENEMY" (eg: renegades), "AMBIENT LIFE" or "UNKNOWN".

Not sure if each of these sides can take groups or if some do overlap somehow. If they are really independent and can take groups each, the overall group limit would be 8 x 144 = 1152 groups.

Share this post


Link to post
Share on other sites

Yes, you can have more than 144 groups per each side. In example above number of remembered groups of ONE side is 500, since that rule only seams to apply to editor placed units aka units in SQM file.

All other units created during the game don't follow that rule, but there will be serious drop of fps once you reach the limit and the loop I used from 0-500 won't be able to spawn more units unless you remove them.

Please, please, please [GLT]Myke take a look at the example above (it is 5 min of your time) and code in init.sqf and put _k=500 before commenting further --- and tell me do you see what I see --- one tent will "hold the first half" = 250 groups and the other will "hold the second half" = 250 groups --- you can test that by "triggering a tent".

If there is a limit --- second tent would be empty = no more Logic Side to hold the groups --- experiment is simple and elegant --- if there is a limit the first tent would hold first 144 groups and that would be it --- but it isn't --- there are more groups, equal number in both tents.

I am interested in expanding one side's limits, I know who many groups there are and I tested that -- they truly ARE undependable --- but 1152 applies strictly to editor.

Share this post


Link to post
Share on other sites

Let me understand this correctly...

You cannot have more than 144 groups per side (AI center). So, knowing this, what exactly are those scripts doing?

Let's say i am crazy and i place 144 groups (of same side) on the map, and then i have some scripts in the mission which are supposed to spawn another group (of the same side) - what will happen?

Let's say i am even more crazy and i place 200 groups (of same side) on the map ...oops! if i place more than 144 groups (same side) i cannot even "preview" that mission.

What happens, if i place more than 144, save it, and then try to play that mission?

Are you saying that this works?

How do i control which of those 200 groups (placed in editor) will be spawned ?

We know the game won't let more than 144 groups per side, so how does those scripts decide which of those groups are now more important to be spawned instead of others?

Sorry if i sound ungratefull, but based on your description, i first thought you found some way to allow more than 144 groups per side, and now i am little disapointed.

So, could you try to describe how it works, even to lazy people like me, so i won't need to read through those scripts? :)

Share this post


Link to post
Share on other sites

Let me explain more before video comes up --- there will be step by step tutorial how to do this.

You cannot place more than 144 groups of the same side in the editor! Not in SQM! That is the fact. Period.

"Then i have some scripts in the mission which are supposed to spawn another group (of the same side) - what will happen?" --- they can be spawned. The 144 restriction, as I said applies to editor units. However, 3D-editor placed units are spawned as SQF and can be remembered with Murklor's script -- therefore there is no limit of how many units this script can remember - bottom line you can have effect as if you have placed unlimited number of groups in the editor.

As I said in previous post --

If there is a limit --- second tent would be empty = no more Logic Side to hold the groups --- experiment is simple and elegant --- if there is a limit the first tent would hold first 144 groups and that would be it --- but it isn't --- there are more groups, equal number in both tents.

Just test the mission you will see.

Don't be disappointed, I have few thing to test and I will post Youtube tutorial here.

Share this post


Link to post
Share on other sites

private ["_number", "_westgroups", "_logicgroups", "_logicHQ", "_i", "_grp", "_unit", "_lggrp", "_msg"];
_number = _this select 0;
_westgroups = 0;
_logicgroups = 0;
_logicHQ = createCenter sideLogic;
for [{_i = 0}, {_i < _number}, {_i = _i + 1}] do {
_grp = createGroup (side player);
_unit = _grp createUnit [(typeof player), (position player), [], 0, "NONE"];
_lggrp = createGroup _logicHQ;
[_unit] joinsilent _lggrp;
deletegroup _grp;
switch (side _unit) do {
	case WEST: {_westgroups = _westgroups + 1};
	case sideLogic: {_logicGroups = _logicGroups + 1};
};
_msg = format ["Groups WEST: %1\nGroups Logic: %2\nPass: %3", _westgroups, _logicGroups, (_i + 1)];
hintsilent _msg;
sleep 0.1;
};

You can't have more than 144 groups per side, not in editor and not spawned by script.

Try the above script with something more than 288 passes, 300 will fit well.

The amount of unit's per group doesn't matter, a single unit is aswell a group as 100 units can be a single group.

As you see, the script creates a unit in a own group on players side, then joining logic side. So at the beginning, on players side it doesn't count any groups until it reachs 144 passes. Now guess what happens.

Correct, logicside groupcount will not raise anymore but instead west groupcount starts to raise until it reaches 143 (one group taken by player itself thus 144 groups). After passing 288 iterations, no more units will be created.

So it is simply not possible to create more than 144 independent groups per side while you can "abuse" unused sides to work around a bit this limitation.

So all you is what has been done since OFP: working around a hardcoded limit. I appreciate your work and surely it is pretty creative, but please stop selling it as something completely new and unique.

Share this post


Link to post
Share on other sites

[GLT]Myke I have to say you are right. I tested it with waypoints and stuff, and realized it is not working.

But I will fix this script and post it again. Idea still stays to remember unlimited number of groups and their waypoints from (3D) editor.

See you soon...

Share this post


Link to post
Share on other sites

Bro it's like dejavu with your first thread you made here :D

Good work bro, I think I know your MO now :p

Share this post


Link to post
Share on other sites

Well, you can have more than 144 groups per side during a mission, just not at the same time. That's why those scripts exist which spawn groups when needed, to overcome the limit.

DAC does it for ArmA 2 and i wrote such a system myself back for ArmA.

Share this post


Link to post
Share on other sites

Xa xa xa thanx Katipo66, yes, start with WICT was also through bushes and briars, and it was really the same!!! And same "players" in the conversation :)

[GLT]Myke you forgot about WICT? :p just kidding, thanx man you were always my backup since I started scripting here.

Share this post


Link to post
Share on other sites

I just wanted to inform you all that I've further enhanced Murklor's script and created two demo missions for v8 :

Demo_1
is classic Murklor's example, the one that you have also in v7, but with corrections for syntax in waypoint statements

Demo_2
is loaded from Clipboard --- you won't see any units on the map!

So mission is accomplished --- remembering unlimited number of groups and their waypoints from the editor.

Now this thread can be deleted :( :o

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  

×