Jump to content
Sign in to follow this  
ArmAIIholic

360 degrees XYZ infinite spawning system

Recommended Posts

Welcome to the 360 degrees XYZ infinite spawning module (360ISM) for infantry for single player missions.

created by ArmAIIholic

You can find a description of this script on my website or you can visit thread I started here on the ArmA forum.

It is a part of the much bigger idea, so if you are interested in more than infinite spawning script and instant battles read these:

Sandbox game in non-sandbox editor http://www.agapije.in.rs/2010/06/sandbox-game/

or Sandboxing ArmA http://forums.bistudio.com/showthread.php?t=100506

The easiest settings you’ve ever made – easy installation, implementation and settings – add this module, setup and play, your mission folder stays clean, no need to sync with player.

Twenty easy tweakable settings make this script useful in any situation, from populating the world to creating patrols and huge AI battles.

No predefined locations - every inch of the map is potential spawning point and, the most important, battlefield, there are no fixed bases, zones and/or HQs. It’s completely your choice and creativity. You can just start the script and sit back and enjoy. If you want to make intense firefights with few triggers and playable team this is a solution for you. Create instant huge battles with lots of AI and different development from play to play. However, anytime you want to bring back more tactical aspects of this game you are free to do that. Just turn off this script and proceed with a mission.

No predefined pathways – depending on your settings the AI will have the goal to find you, everything else is on the in-game AI and fight they will engage in. Therefore, this gives the missions high replayability. Every time it will be different and player will have to adapt to the new situation.

Change difficulty level or completely change game settings on the fly without terminating the script.

Create safe, hot, gradient and directional zones for true sandbox-ization of ArmA.

Module is open for adding custom teams and squads, special units or members of other factions, custom loadouts etc.

No caching units, still you can deploy particular number of units or just let the script make a warfare for you. It’s fully compatible with any mission created in the editor.

Stable version, tested, without bugs, with script handles and script flow control to ensure fluid infinite spawning warfare. Modular / hierarchical organization of scripts makes it very flexible.

Downloads: not available for download anymore - switch myself to WICT.

--------------------------------------------------------

Notes:

This script is only for infantry and populating the world with patrols and squads. It's not meant to be for vehicles because they will probably have hard time navigating terrain. I am making something else for vehicles.

If you have any questions, suggestions, or you are changing something and distributing this script, please let me now.

Thank you and enjoy scripting.

--------------------------------------------------------

Acknowledgement:

First of all thank you [GLT]Myke for your help and always rich answers. You never make yourself misunderstood. Thanx pal.

Second, thank you community and all the people that supported me with good and bad critics when I first posted Sandboxing ArmA II.

Especially, thank you Katipo66 for support right from the beginning -- this is for you -- no scripting at all :D

bobtom (for supporting me both *there* and here),

tyler4171 for future adaptation for OA

and these fellows here writing fabulous scripts

BASIC spawn script. For a complete idiot. Me. Searched...

ArmaII Object class library

ArmA II & OA Classnames

How do you create a module?

Create units in battle

Edited by ArmAIIholic
Making SAFE and HOT zones

Share this post


Link to post
Share on other sites

Checking this out now, looks like you've been busy!

---EDIT------------------------------------------------

Ok it wouldnt work for me with the trigger set to not present, it did work using the 'Present' option... i noticed with all missions including your example there were script errors, i cant recall them but had 'invalid number in expression' in part of the error dialog.

Questions: So does this act similar to the ACM module except units can spawn from anywhere on the map (the ACM module allows you to set spawn distances from 1mtr to infinity afaik?) or is the point of difference that enemy units will hunt you down specifically and if so do they know about you from where ever they spawn or only if they stumble upon you, and when they know about you do they communicate your position to other enemy units? probably you answered that one in your original thread but just wanted a bit more detail to their purpose.

Do spawned friendly units patrol randomly and only engage when stumbling upon enemy units? are you able to take command of friendlies if you come across any?

Really interested in your project :)

Edited by Katipo66
Have tested:

Share this post


Link to post
Share on other sites

Ok, here it is in order:

1) ])rStrangelove -- nametag? I am not familiar with that. I am still learning this scripting so if you can be more specific or just throw some link, I will appriciate it. Thanx.

2) Katipo66 thanx for support. Now

a) The trigger should be working with not present, but I will check it when I get home.

b) Debug and errors dialog? where can I find that and monitor, so I can improve my script?

c) You understood well - there is no such location and units can spawn from anywhere on the map (except water of course). I don't know about ACM -- Ambient Combat Module - is it the same as Advanced Combat Environment??? Anyway, this script do not use any kind of predefined locations or game logic or objects. It is very simple :) it just looks for an appropriate point taking into account many variables. I wrote about that on my website -- explained the whole mechanism and variability factors.

d) I can freely say that both friend and enemy units have your relative position when they start / spawn. Because they have random waypoint relative to your position set to aware and destroy they will engage in any fight nearby. So, they won't necessarily come to you as you see in the benchmark example. Some units will come to the front line, some units will be in the flanking position, some units will go behind enemy lines. The whole idea was to build a system that can easily upgrade any mission created in this editor. Moreover, you can build last stand mode with this, protect the flag mode or you can set parameters in such way that you get a huge battlefield with lots of AI and firefights. So if you are creating large scale battle the purpose of this script will be to bring reinforcements on both sides and make unexpected thrill moments every time one plays. Since this script can have wide range of usage there is no point in synchronizing communication in order to attack just one man on the battlefield (player). However, there is a need to bring battlefield "under the player's nose" so I made a compromise.

e) I will continue to work on the improvements and already working on shortening the code and debugging. I am also working on other scripts that will spawn missions, random patrols pathways, vehicles etc. I will also try to improve some search pathways for these patrols so I can achieve ideas you are mentioning here. Commanding units will be part of the missions.

As the title says this infinite spawning script for infantry and I intend to make it even better. And to keep that feature: easy implementation and settings :D

I hope I didn't choke you, but you had questions, so I am hoping that this was helpful.

---EDIT------------------------------------------------

I will try to put all variable settings into settings.sqf, executed in init.sqf, so that when you (anybody else) download improved version(s) of this script, your mission settings will stay the same (if you do not overwrite it) and you can upgrade all the missions that use this script easily. And of course, the tutorial will be much more simple.

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

No, no choking here, i think that type of detailed friendly support for a mod/mission/project is excellent... thanks!

You can debug by putting this: "-showScriptErrors" in you target field of your shortcut like this...

"C:\Program Files\Bohemia Interactive\ArmA 2\arma2.exe" -showScriptErrors

theres other cool things you can put there such as -nosplash -world=empty etc

Share this post


Link to post
Share on other sites

Nametag

The main purpose is to make sure scripts/addons remain compatible and work together without causing problems, at least from variable naming POV.

As example, you use a global variable named "MyVar" but another script uses the same variable name for it's own purpose. I guess you see the problem.

To avoid this, almost all of us ahve agreed to ofpec nametags which helps us to keep naming unique. As example, works i make will have the nametag GLT_ (derived from our clan) so the variable would get the name "GLT_myVar", not conflicting with any other variable from other script/addonmaker.

b) Place one Russian soldier anywhere you want and set his probability of presence to 0, because he is necessary for spawning (acts like HQ).

You can avoid the need of a pre-placed unit by using the createCenter command.

In general, i suggest you add this site to your bookmarks.

:EDITH:

Argh, clicked on save instead preview.....anyway.

Instead using a marker, maybe switching to a gamelogic would be a good idea when thinking on the long term. For me this sounds like a project that would perfectly fit into a module addon. Modules are GameLogic objects, so designing the scripts from the start for a Gamelogic would make it easier to make a module addon out of it later. Also reduces the hassle for end users aswell.

:and EDITH again:

Look there:

C:\Users\WINDOWSUSERNAME\AppData\Local\ArmA 2

there you'll find the arma2.rpt which is the logfile. All errors during gameplay (aswell some other status messages) are registered there. And also scripterrors are reported there. A must for debugging.

Edited by [FRL]Myke

Share this post


Link to post
Share on other sites

[GLT]Myke oh man..... Thanx what can I say (speechless). I'm reading right now

this command can be used to initialize a side which has no units present in the Mission.sqm, so that you can spawn groups and units for it.

and this one

that's how they should be used when naming variables and files: TAG_namespace

I understand now, thanx very much!!!

I check every single one command there Category:Scripting Commands ArmA2, and I was a "good little student", read the most of them before started (that was advice I got and it is right way to do it).

Thanx for error log.

And I am working on cutting global variables out of the equation and you will see why. A very convenient solution to all these problems.

Share this post


Link to post
Share on other sites

@ Katipo66 --- you can not use not present, you are right. My mistake above... But if you want to make safe zone you should switch activation and deactivation, more precisely do this:

- place the player inside the trigger zone

- set activation drop menu: anybody

- set: repeatedly

- set it: present

- set the condition to: player in thislist;

- set the on activation: [] exec "quit.sqs";

- in the on deactivation: [] exec "start.sqs"; nul = [] execVM "controller.sqf";

This is just a hint / clarification. I will fix that. I am making new manual and re-writing functions, so hopefully it won't be complicated at all.

---EDIT------------------------------------------------

I changed mistakes in the manual above.

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

Cheers Arma11holic... thats a very simple solution i didnt think off :)

Share this post


Link to post
Share on other sites

This sounds very interesting, would this be the remedy I look for when trying to make OA's Zargabad be similar to Fallujah? :)

Share this post


Link to post
Share on other sites
would this be the remedy I look for when trying to make OA's Zargabad be similar to Fallujah? :)

I am reeeeally :confused: :(

Share this post


Link to post
Share on other sites

Your script is perfect for my little coops i make for my friends and I, I was driving a Stryker down a road and was ambushed by two squads of Militia, love your script mate!

Share this post


Link to post
Share on other sites

Hey tyler4171, I am really excited about releasing new version and working with you on OA. Thanx mate. See you soon :)

Share this post


Link to post
Share on other sites

Here it is as I promised -- a 360 degrees XYZ infinite spawning module, shiny and new, with easy settings and good manual. I hope you will enjoy it.

Nothing more to say. You have to try it.

Cheers

Share this post


Link to post
Share on other sites

Just a few remarks.

I was thinking about further improvements last night and I will change these things:

1) Difficulty 1 and 4 will not be limited. I will put spawn ratio for these two difficulties too, so anyone can make pure west, pure east or something in between.

2) I will completely redesign AI and path creation (since for now there are only several waypoints for each group).

3) And the major change will be introducing frontlines. Not trigger based zones, but true frontlines. Hence I will have to rewrite this spawning script to support camps, reinforcements, frontline fighting etc.

The important consequence will be change in call function structure. However, I will try to make Excel sheet as I did for this one, so that configuration goes smoothly and on the fly.

Cheers

Share this post


Link to post
Share on other sites

Also one thing I forgot, but I thought it's obvious - next script will support vehicles spawning, both ground and air.

Share this post


Link to post
Share on other sites

Mate, use the "Edit" button in the bottom right corner. Doubleposting usually isn't allowed in such short intervals.

Share this post


Link to post
Share on other sites

I know, sorry. Sometimes it puts it automatically in one post, sometimes it doesn't, and this forum doesn't have delete message. Won't happen again.

Share this post


Link to post
Share on other sites

Thanx Katipo66 for testing and suggestions on PM.

I increased the "speed" for the One missed flight, so it should be more dynamic now (as Katipo66 said scripted part was more obvious than not-scripted). And I also increased the limit for the number of groups in two examples of the zones, so it will be clear what is going on.

Everyone who test this should be aware that this is one small useful module, it is complete and definitely working without the problem. You can test it, create some instant missions in about 5 min top, without complicated settings and test its power unlimited times.

However it is only one part in the engine that will work in the new module I am making.

Share this post


Link to post
Share on other sites

NM

The message you have entered is too short. Please lengthen your message to at least 5 characters.

Share this post


Link to post
Share on other sites

Hey there, this seemed really neat, so I'd thought I'd give it a try, thank you!

But... , I created a quick test mission, and enemies are spawning, but they're not shooting at me!! :confused:

I have myself as USMC Blufor private. And I am not set as captive=true, like in your example mission.

Here's the line I copied from one of yours, I just changed difficulty level...

nul = ["yes",4,50,50,50,50,10,20,5,5,5,5,3,"NORMAL","AWARE","ENGAGE","YELLOW",50,50,7,50] execVM "\360ISM\controller.sqf";

(btw, what does the "yes" mean?)

So anyway, I see enemies popping up, but they just won't shoot at me. Help would be appreciated.

Share this post


Link to post
Share on other sites

Thank you for testing.

I will check that out. This will be one big embarrassing mistake, I guess.

I am making new module, so I will make sure such mistake don't happen again.

And "yes" in the calling function is (not a right) way to tell that the script is running for the first time, so if you run it when it's already running (but for example sleeping) it won't start again over the already running script. But I completely changed that part in the new module.

Thanx again for testing.

---EDIT---

It might be a problem with knowAbout (I am not at home right now in order to test it). I remember that I had no problems with enemies attacking the player. Try to increase distance to 250. That would be :

nul = ["yes",4,250,250,250,250,10,20,5,5,5,5,3,"NORMAL","AWARE","ENGAGE","YELLOW",50,50,7,50] execVM "\360ISM\controller.sqf";

Maybe, just maybe, they are not aware of your presence. The reason why the distance was on 50 is because of testing phase -- I cannot wait for them to come.

I will have to test it when I get home, to see for myself.

--EDIT--

I tested it and I don't get it :confused: :mad: :mad:

What can be the source of this strange behavior? They are spawned groups, they will attack another soldiers, but not the player....

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

Another test is done - USMC will fire, Russians don't even return fire...

I don't know what could be wrong. I am now working on the improvements of this module (making a new one), so I will pay attention to that particular problem as well.

So problem is: Russian (EAST) soldiers do not see any USMC soldier, not only the player. Why? Hope I will find out and solve it.

R.Flagg thanx for testing!

--- [sOLVED] ---

Place one Russian soldier on the map and set his probability of presence on zero.

Description: Apparently, createCenter made spawning possible but also made them just as stupid as stupid gets. I used example found on community.bistudio.com/wiki

_SideHQ = createCenter east in the init. Maybe it should be SideHQ = createCenter east without _, maybe, maybe... hm I don't know and I don't care. They were spawning (so HQ is there, right?), but they were dumb, LOL :confused:

The safest and quickest way is just to place that poor soldier!

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

Nice!

They are shooting me dead, and in a hurry. Thanks for the tool, it's sooo easy to use.

Here's hoping the addition of vehicle support works out for you. :don2:

Share this post


Link to post
Share on other sites
Thanks for the tool, it's sooo easy to use.

Next one will be easy as this, but more powerful. Believe me ;)

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  

×