Jump to content
Sign in to follow this  
silola

Dynamic-AI-Creator (DAC) V3.0 released

Recommended Posts

Would that simply be a
[z1] call DAC_Activate

or more sophisticated like 'omfglocality' variant .sqf?

if (isServer) then {
[z1] call DAC_Activate;
};

Well I tried this code and put in landing = execVM "variant.sqf" in my activation trigger but no joy. Any more detail on how to make this work?

Share this post


Link to post
Share on other sites
Well I tried this code and put in landing = execVM "variant.sqf" in my activation trigger but no joy. Any more detail on how to make this work?

If both don´t seem to work for you it´ll all come down to the famous quote by our OFP Mom: SUFFAH :D

Seriously though, i was just guessing, don´t expect any true answers from me as i´ve only read the manual back & forth multiple times w/o knowing anything about real scripting.

Share this post


Link to post
Share on other sites

@Silola

Maybe this is a stupid question:

Could it be possible to initialize DAC to embrace already existing (editor made units) to get the AI features from DAC to work with them. Generally I mean to get it to work like GL4 with self-initialization?

Or at least would it be possible to self-initialize some of the features? Like the AI talking and shouting?

Share this post


Link to post
Share on other sites

somewhere i read about a Script Version of DAC you a working on ... do you have a release date ?! or some Informations about it ?!

Can i easy switch from my "Addon" mission to the script ?! that would be nice , so i dont have to upload new Mods to my server....

Share this post


Link to post
Share on other sites

Hi :)

@twisted:

a question - this has to be external game logic right? no way of doing it from a trigger when using internal game logic?

You mean to edit the _setBldgBeh and the _setEmpVeh values?

No, there is no possibility to change single values from any DAC_Config file.

If u want to use the DAC_Config_Behaviour file from the demo mission, for example, copy that file into your mission folder, then use the DAC_intern logic

and write this into its init line:

DAC_Single_Config = ["Behaviour"]

Then you have the possibility to modify or to expand this file as much as you want (this DAC_Config_Behaviour file within your mission folder).

(See also readme page 33 - The handling is really easy ;) )

@ Mr Burns:

Would that simply be a

Code:

[z1] call DAC_Activate

or more sophisticated like 'omfglocality' variant .sqf?

Code:

if (isServer) then {

[z1] call DAC_Activate;

The functions "DAC_Activate" and "DAC_Deactivate" are performed on the server only, otherwise the script aborts the action.

Much more important is that the condition of a trigger is also recognized by a server and not by clients only, if you want to call the DAC_Activate function.

@gunterlund:

Well I tried this code and put in landing = execVM "variant.sqf" in my activation trigger but no joy. Any more detail on how to make this work?

Sorry, but I don't know what u mean with landing = execVM "variant.sqf"

Within this script u have insert the DAC functions to activate some DAC zones ?

@Kroky:

Could it be possible to initialize DAC to embrace already existing (editor made units) to get the AI features from DAC to work with them. Generally I mean to get it to work like GL4 with self-initialization?

Sorry Kroky, but there is no function inside DAC to self-initialize editor-placed groups.

The primary mission of the DAC is generating units ;)

But as you can read on page 26 of the readme, there is the possibility of releasing generated units from the DAC system

so that they are controlled by another AI system.

@Anemia:

somewhere i read about a Script Version of DAC you a working on ... do you have a release date ?! or some Informations about it ?!

Unfortunately I can not say the exact date, but I think soon.

Can i easy switch from my "Addon" mission to the script ?! that would be nice , so i dont have to upload new Mods to my server....

I think it will be very easy to convert an existing mission without much effort.

You have to delete the DAC logic and copy a few files to the right place ... that's all.

And you don't need any new mod, but enough space on your hard drive, cause every mission will be at least 7 MB in size

when you want to use all the features of the DAC script-variant :D

Greeting

Silola

Share this post


Link to post
Share on other sites

yes Silola on the variant.sqf. I used the code that burns wrote above. So I created a trigger in my mission and in the activation box I put nul = execVM "variant.sqf" and in that script is the code

if (isServer) then {

[z1] call DAC_Activate;

};

When the trigger fires nothing happens.

Share this post


Link to post
Share on other sites

... and you're sure that the trigger is also fires on the server and not on clients only?

You must ensure that the server recognizes the condition of the trigger and respond to them, otherwise the script will run on the clients only.

Please make a small test:

Within your script "variant.sqf" insert this code:

if (isServer) then
{
NameOfThePlayerUnit setpos [0,0,0];
[z1] call DAC_Activate;
};

NameOfThePlayerUnit = any valid player name, s1 or p12 for example.

(The name of your unit (or the unit u want to play with) inside the editor)

So if the script is really started on the server, your unit will placed into water,

and you can be sure that the server has recognizes the condition of the trigger.

Otherwise your conditions inside the trigger not server friendly :D

I hope it will run :rolleyes:

Greeting

Silola

Edited by Silola

Share this post


Link to post
Share on other sites
... and you're sure that the trigger is also fires on the server and not on clients only?

You must ensure that the server recognizes the condition of the trigger and respond to them, otherwise the script will run on the clients only.

Please make a small test:

Within your script "variant.sqf" insert this code:

if (isServer) then
{
NameOfThePlayerUnit setpos [0,0,0];
[z1] call DAC_Activate;
};

NameOfThePlayerUnit = any valid player name, s1 or p12 for example.

(The name of your unit (or tiihe unit u want to play with) inside the editor)

So if the script is really started on the server, your unit will placed into water,

Uand you can be sure that the server has recognizes the condition of the trigger.

Otherwise your conditions inside the trigger not server friendly :D

I hope it will run :rolleyes:

Greeting

Silola

What code do i put in the activation line of the trigger. ...nul = execvm "variant.sqf "?

Share this post


Link to post
Share on other sites

That's ok ... try it out. But what condition has the trigger? only "this" ?

Edited by Silola

Share this post


Link to post
Share on other sites
That's ok ... try it out. But what condition has the trigger? only "this" ?

blufor present and This in the condition

---------- Post added at 08:57 PM ---------- Previous post was at 08:49 PM ----------

That's ok ... try it out. But what condition has the trigger? only "this" ?

blufor present and This in the condition

Share this post


Link to post
Share on other sites

Just coming back from our first DAC MP session and need to say that we all had a blast, just like in the old times!

Thx again for all the work you´ve put into this armamazing tool Silola! :thumb_down:

blufor present and This in the condition

Another wild guess by me, instead of only this try isserver && this as condition. I really know shit about locality and scripting though, possibly it might not work at all :D

Share this post


Link to post
Share on other sites
Just coming back from our first DAC MP session and need to say that we all had a blast, just like in the old times!

Thx again for all the work you´ve put into this armamazing tool Silola! :thumb_down:

Another wild guess by me, instead of only this try isserver && this as condition. I really know shit about locality and scripting though, possibly it might not work at all :D

Burns were you playing on a dedi server

Share this post


Link to post
Share on other sites
Burns were you playing on a dedi server

Yes, but i haven´t used any of the new features, only vanilla DAC with two opfor, two civi & one waypoint zone, all activated upon starting the map.

Share this post


Link to post
Share on other sites

Thanks Burns for the update.

Well Ive learned alot about DAC over these few days. Silola your right DAC activate does not work on a dedi server unless you do some scripting which I dont know how to do. The way I tested this is if you put your mission 9 out of your demo list on a dedi server it doesnt work. At least not on my server. I also learned that my server may be too slow for DAC. It runs domi just fine but it took for ever to create waypoints and troops in DAC. What would be a big help Silola is if you could make mission 9 dedi server compatible so we can look at it and see how to do it. That would be a huge help. Also none of the DAC initialization and radio messages seem to work from a dedi server. Maybe my mission is too big. I have 12 zones many of which are just waypoint zones. I wanted 5 of them to be activated but this wont work. The mission spawns about 125 troops so its not outrageously big. Burns if you would like to try it just to see if it runs on your server let me know. Ill send it too you. Its very raw right now because I cant get it to work the way I want it but its playable.

Share this post


Link to post
Share on other sites

Just for the record:

"Also none of the DAC initialization and radio messages seem to work from a dedi server."

Both worked just fine during our test. I don´t belive it´s about the size of the mission or how many entities you spawn - my mission had about 300 units with an initialization time of about 40 seconds.

If your mission doesn´t include a ridiculous ammount of addons i´m sure we can take a look.

You could also try my testmission and see if your above quoted problems still exist with that (that one uses a ridiculous ammount of addons though :D ).

Share this post


Link to post
Share on other sites
Just for the record:

"Also none of the DAC initialization and radio messages seem to work from a dedi server."

Both worked just fine during our test. I don´t belive it´s about the size of the mission or how many entities you spawn - my mission had about 300 units with an initialization time of about 40 seconds.

If your mission doesn´t include a ridiculous ammount of addons i´m sure we can take a look.

You could also try my testmission and see if your above quoted problems still exist with that (that one uses a ridiculous ammount of addons though :D ).

Burns check PM and thanks for the help.

Share this post


Link to post
Share on other sites

Hi :)

The way I tested this is if you put your mission 9 out of your demo list on a dedi server it doesnt work.

That's right, and that is the reason why I ask for conditions about your trigger and so on.

Let's take a closer look at this mission....

Inside this mission there are two options to activate/deactivate DAC zones.

For the first option, I used an Action menu. How it works, should be known.

(I think this variant will not work on a dedi server).

The second option is to activate/deactivate a DAC zone via trigger.

This trigger has no "onActivation" code and the "condition" is standard "this".

All the action about activate/deactivate is within a small script > PlayerTrig.sqf

This script is started in the init.sqf (all clients and the server will start this script).

Ok, now we look into this script:

waituntil{time > 3};
_list = "list playerTrig";
while{(alive player)} do
{
waituntil{(player in (call compile _list))};
[z2] call DAC_Activate;
sleep 5;
waituntil{(!(player in (call compile _list)))};
[z2] call DAC_Deactivate;
sleep 5;
};

On the client side, the script works correctly, and the DAC functions are started.

The problem is that DAC noted that the function was started by a client,

and terminates the action.

On the server side there is another problem. The while-do loop processes the value of "player",

but on a dedi server, this value is not known and there are no "player".

That's the reason why the script is terminated directly on a dedi server.

Now we can make some small changes to solve the problem:

First we start the script on server only:

In the init.sqf we change the following code:

old: execVM "PlayerTrig.sqf";

new: if(isServer) then {execVM "PlayerTrig.sqf"};

The second change is within the script...

old: see above

new:

waituntil{time > 3};
_list = "list playerTrig";
while{true} do
{
waituntil{(({isPlayer _x} count (call compile _list)) > 0)};
[z2] call DAC_Activate;
sleep 5;
waituntil{(({isPlayer _x} count (call compile _list)) == 0)};
[z2] call DAC_Deactivate;
sleep 5;
};

With these small changes u can play the mission #9 on dedi server

and the activate/deactivate action should work (trigger variant).

Also none of the DAC initialization and radio messages seem to work from a dedi server.

If you've made the settings as described above, then the messages are displayed,

as shown in the pictures, otherwise you're doing something wrong.

Greeting

Silola

Share this post


Link to post
Share on other sites

Im looking forward to the script version :)

Silola you should get a BIS award for best mod support lol! :) !!

Share this post


Link to post
Share on other sites

silola is there an option to like put a game logic down to define where you want camps built, the reason i say this is i want helos to take off from the camps if that makes sense, to many times i have seen them crash, and also how would i go about making it a condition that when all the ai in the zone have been defeated that objective is done. Thanks

Share this post


Link to post
Share on other sites
Silola you should get a BIS award for best mod "&" support lol
:pray:

Yeah i hope so too. Amazing work.

Any news about the sector-fight demo mission?Anyway Big THX silola.:yay::yay:

---------- Post added at 10:04 ---------- Previous post was at 09:46 ----------

@weedman

silola is there an option to like put a game logic down to define where you want camps built,
look into the readme or demo mission "#D_19_DAC_enemy_contact.utes" there you can see defined camps. "Logic init line" "this setdir 5" (camp) "this setdir" 4 (heli) Edited by TeilX

Share this post


Link to post
Share on other sites

Thanks Teilx , i went through the whole manual and read it like a bible but must have missed that, many thanks :)

Share this post


Link to post
Share on other sites

Ok Silola

time to try a new tactic. Implemented the ideas you showed above and again it works for me great if my machine is the server but it took over 300 seconds to create all the zones waypoints etc on my dedi server (vs 40 seconds on my local machine) so Im thinking of a new tactic. Instead of activating zones I want to try creating zones and eliminating some of the initial overhead the system goes through for setup. Now will I run into the same situation about server side implementation of zone creation. Instead of using triggers in the mission Ill need to write scripts like above to create a Zone using the "Call DAC_fNewZone?

Would it be something like

waituntil{time > 3};

_list = "list playerTrig";

while{true} do

{

waituntil{(({isPlayer _x} count (call compile _list)) > 0)};

_values = [“z1â€,[1,0,0],[5,2,50,8],[],[],[],[1,1,1,1]];

[(position1),250,150,0,0,_values] call DAC_fNewZone;

waituntil{DAC_NewZone == 0};

_values = [“z2â€,[1,0,0],[5,2,50,8],[],[],[],[1,1,1,1]];

[(position2),250,150,0,0,_values] call DAC_fNewZone;

waituntil{DAC_NewZone == 0};

};

How do I exit this loop

Share this post


Link to post
Share on other sites

Bug?

If I have a camp in a zone I activate after being deactivated only the camp activates, no units are spawned. If I take away the camp the units are spawned (camp version 11, empty).

I can work around it so its no biggie, just information if its not intended this way by you Silola.

edit: Is there any way to check when a zone/camp is out of units/respawns? I would like to activate a new zone when another zone is empty/low of units. There will be other enemy AI walking around due to overlapping zones so a simple trigger check will not work in my case (unless its possible to check for units from a certain zone?).

Edited by andersson

Share this post


Link to post
Share on other sites

how do u put addon units in the mission, like ww2 units

Share this post


Link to post
Share on other sites
how do u put addon units in the mission, like ww2 units

In the config_units.sqf. There you will find something like this:

//-------------------------------------------------------------------------------------------------
case 8:
{
	_Unit_Pool_S = 	[
						"RU_Soldier_Crew","RU_Soldier_Pilot","RUS_Commander","RUS_Soldier_GL","RUS_Soldier1","RUS_Soldier2",
						"RUS_Soldier_Marksman","RUS_Soldier_TL","RUS_Soldier3","RUS_Soldier1","RUS_Soldier2"
					];
	_Unit_Pool_V = 	[	"UAZ_CDF","UAZ_AGS30_CDF","UAZ_MG_CDF","Ural_CDF","UralOpen_CDF","Ural_ZU23_CDF"];
	_Unit_Pool_T = 	[	"BMP2_CDF","BRDM2_CDF","BRDM2_ATGM_CDF","T72_CDF","ZSU_CDF"];
	_Unit_Pool_A = 	[	"Mi17_CDF","Mi24_D"];
};

Just copy the whole block and add it for example to "Case 9" like i did for MolatianArmy soldiers:

//-------------------------------------------------------------------------------------------------
case 9:
{
	_Unit_Pool_S = 	[
						"MOL_Rifleman","MOL_officer","MOL_Rifleman","MOL_Medic","MOL_Soldeir_AA","MOL_Rifleman","MOL_Soldier_AT","MOL_Soldier_MG","MOL_Rifleman"
					];
	_Unit_Pool_V = 	[	];
	_Unit_Pool_T = 	[	"ibr_T55"];
	_Unit_Pool_A = 	[	];
}; 

After that change the init-line of the zonemarker to the specified case:

nil = ["z1",[1,0,0],[ ],[ ],[ ],[ ],[1,[b][color="Red"]9[/color][/b],0,6,1]] spawn DAC_Zone

That´s all!

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  

×