Jump to content
BadAss -Mapfact.net-

Mapfact.net releases DAC

Recommended Posts

Didn't go much into the subject. DAC just signalised that DAC_Players isn't having a player in the array, or the array isn't defined. Maybe I did something wrong, dunno. I'm having 2 inits. 1 real init and the 2nd is going when the mission is started. Since then, some things behave differently.

If the answer's wrong, then didn't understood the question.

Share this post


Link to post
Share on other sites

hi smile_o.gif

The array “DAC_Players†is only for human players, or for AI units on your side.

The array “DAC_Players†is assigned to the array “DAC_East_Units†or the array

“DAC_West_Units†after the initialization. That depends on side of the player.

A better solution would be to store the editor placed units directly in the correct array.

Insert this code into the Init line of the Leader:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[group this]exec "DAC\Scripts\DAC_Add_Units.sqs"

The script "DAC_Add_Units.sqs" looks then as follows:

(Please save the script in the folder “DAC\Scriptsâ€.)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_group = _this select 0

_side = side (units _group select 0)

@(time > 2)

?(format["%1",_side] == "Civ"):exit

?(format["%1",_side] == "East"):{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group

?(format["%1",_side] == "West"):{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group

?(format["%1",_side] == "Guer"):if(DAC_Res_Side == 0) then {{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group} else {{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group}

exit

The arrays (“DAC_East_Units†+ “DAC_West_Unitsâ€) are settled automatic by invalid entries.

The following Scripts are responsible for it: “DAC\KI_1\DAC_Select_E_Target.sqs†and “DAC\KI_1\DAC_Select_W_Target.sqsâ€.

bye

silola

Share this post


Link to post
Share on other sites

Many thanks for your help, as always smile_o.gif

Will do what you said.

Sorry for mixing threads, but what about the waypoints containing globals? Still don't understand why I would do this.

Share this post


Link to post
Share on other sites

Is there a limit to the amount of units that you can place in the DAC_Players array? I've got a mission where I have about 40-50 west units that I want to place in the DAC_Players array, but when I have too many I get an error at the start.

Share this post


Link to post
Share on other sites

hi garcia,

please read the last post of me. That is exactly the solution for you. wink_o.gif

bye

silola

Share this post


Link to post
Share on other sites

Hi there Silola,

Been a while smile_o.gif

I was wondering if there is any news/release scheme setup for the DAC Update for OFP? How are things progressing, need any beta testers?

Only ask since I am very very interested, you should of coarse take your time etc smile_o.gif

Sick

Share this post


Link to post
Share on other sites

hi,

I think that about 80% are finished.

Unfortunately unexpected problems emerged.

Thus the development runs at present somewhat slowly-acting. confused_o.gif

Then the Readme must be still provided and some demonstrations.

I would not have thought that the changes take so much time up.

Sorry sad_o.gif

bye

silola

Share this post


Link to post
Share on other sites

I'd like to offer my help, but unfortunately I'm pretty busy at the moment. I wish your unexpected problems will solve smile_o.gif

Share this post


Link to post
Share on other sites

Hi dudes

maybe someone can help me with

kinda basic i guess questions

how do i add 3rd party units to the game

and how do i find each unit full name

TNX

Share this post


Link to post
Share on other sites

Adding units is described in the DAC readme. Use DAC_config_units.sqs.

For the units classname, search for them in the addon's readme. If not there, maybe someone already posted the names here in the forum. As a last resort, unpack the addon, an look for the names in the config of the units. You can also make a mission in the editor, place just the units you want to use, save it and open it in a text editor.

Share this post


Link to post
Share on other sites

Hi Silola, any news? No posts, but we won't forget DAC. I hope you're not waiting for ArmA.

Share this post


Link to post
Share on other sites

hi,

for the moment I must overcome a small motivation hole (already again). confused_o.gif

Therefore the development progresses only slowly.

I hope that I finished it, before AA becomes released crazy_o.gif

Times the motivation is completely high, and then again completely down. That makes me crazy banghead.gif

sorry and bye

silola

Share this post


Link to post
Share on other sites
Times the motivation is completely high, and then again completely down. That makes me crazy banghead.gif

This happens to me all the time.. you just gotta get your mind on to it and just think your making it for your wifes/girlfriends birthday biggrin_o.gif then you get it done quickly then tounge2.gif

Share this post


Link to post
Share on other sites
hi,

for the moment I must overcome a small motivation hole (already again). confused_o.gif

Therefore the development progresses only slowly.

I hope that I finished it, before AA becomes released  crazy_o.gif

Times the motivation is completely high, and then again completely down. That makes me crazy   banghead.gif

sorry and bye

silola

Take ur time Silola thumbs-up.gif !! Altough anxiously awaiting the release.. take the time you need!! We need you a few years more around m8 notworthy.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]for the moment I must overcome a small motivation hole (already again).

I have a different approach: if I don't have the motivation, I simply don't do it. IMO this should be a hobby, not an obligation, so if you press yourself, the whole thing would lose it's magic. So simply don't do it, when you don't feel like doing it. Those times I do something completely different than OFP (guit, friends etc., or actually playing OFP which is rare these times) and with time OFP calls back. That's my balance.

Anyway, hoping in a new masterpiece smile_o.gif

Share this post


Link to post
Share on other sites
hi,

Times the motivation is completely high, and then again completely down. That makes me crazy banghead.gif

sorry and bye

silola

Apparently that's exactly how Da Vinci worked, so you're in good company. Anybody still in OFP forums 5 years on probably knows exactly how you feel.

Looking forward to the results of that upswing! Watching war movies always helps biggrin_o.gifpistols.gif

Share this post


Link to post
Share on other sites

Didn't start the "how's DAC going" thing with back intentions, but now I really have a (technical) question, not asking just for fun:

Silola, could you help me, implementing some {killed} eventhadlers or some other way, to detect when an enemy died and who killed him? I looked through the code and saw that you didn't use {killed} eventhandlers, just {hit} EH's. So is there a way to check for every enemy unit when killed, who killed him/(or maybe her)?

Share this post


Link to post
Share on other sites

hi,

thank you all for the encouraging words. thumbs-up.gif

@kutya:

---------

For what do you need this information?

What exactly would you like to make thereby?

Would you like to limit this feature only to the Players, or are the information to be stored to each unit?

In order to determine, who killed a unit, you should use the EH “killedâ€. That is correct.

The information could be stored in a global array. Each entry in the array contains the name and the number of killed units of the unit.

Register the global array “DAC_Killer_Units†in the “DAC_Config_Creator.sqs†.

The EH could be merged, where also the EH “hit†is loaded:

{_x addeventhandler ["killed",{_this exec "DAC\KI_1\DAC_Killed_by_Enemy.sqs"}]} foreach units _group

Then the script "DAC\KI_1\DAC_Killed_by_Enemy.sqs":

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_killer = _this select 0

_check = 0

_i = 0

While {_i < count DAC_Killer_Units} do {_temp = DAC_Killer_Units select _i;if((_temp select 0) == _killer) then {_temp set[1,((_temp select 1) + 1)];_check = 1};_i = _i + 1}

~0.1

?(_check == 0):DAC_Killer_Units = DAC_Killer_Units + [[_killer,1]]

exit

Perhaps the example helps you a little bit. icon_rolleyes.gif

bye

silola

Share this post


Link to post
Share on other sites

Thanks a lot (as always smile_o.gif ) for your kind help Silola!

Quote[/b] ]For what do you need this information?

I wanted to detect if the player kills an enemy DAC unit.

You told even more than I needed. I just needed an info on how can I implement the killed eventhandler.

Quote[/b] ]Register the global array “DAC_Killer_Units†in the “DAC_Config_Creator.sqs†.

I wasn't even thinking about this, but it will help a lot, once GDCE tries to get coop compatible.

EDIT: Works perfectly!

Share this post


Link to post
Share on other sites

Thank you Silola and company for your wonderful product!   smile_o.gif

You have provided the OFP community with what can only be considered as a “Must Haveâ€.  Like ECP and CTI before, your contribution is a triumph of OFP development that is clearly without precedent, and simply unrivaled.  Your documentation and support are purely top notch.  Keep up the good work!!!  biggrin_o.gif

I remember the first time I fired up the DAC as if it were yesterday.  As all those markers heaved and oscillated, I got shivers up and down my spine.  Then as the new units started appearing, I lost my breath as my heart skipped a few beats.  Finally, when all those forces started to move about (as if by magic), my jaw about hit the floor as I sat there, shocked, speechless, in a trance-like state.  Before my very eyes, the (already impressive) dynamics of vanilla OFP were multiplied 100 fold!!!  I think I almost had a seizure.  rofl.gif

Although I’ve been using the DAC from the beginning (love the docs) and I’ve been following along periodically on this thread, I just took a moment (ok, several hours) re-reading this whole thread in its entirety.  I’m a bit surprised to find that thus far, no one seems to have posed a question I’ve been wondering about for quite a while.  huh.gif

I’ve spent a considerable amount of time looking through your code, and know my way around a bit.  Any chance you could point me in the right direction on something?

My understanding is that the current DAC Respawn re-uses existing DAC groups.  Unfortunately, in certain instances, this type of respawn would not be appropriate.  (Example- Suppose if new units were to be flown in on a C130, disembarked, and then and ordered into a DAC zone.)

So here’s the question:  help.gif

How would I go about taking an existing non-DAC group and making it into a DAC group (added to a particular DAC zone) on command, well after DAC initiation has completed?

That is, what I intend to do is this:

Incorporate an existing completely non-DAC group into a particular DAC zone, at the desired moment (via, say, a new function).  At this point the previously non-DAC group becomes a DAC group (and belongs to a DAC zone, uses DAC waypoints, responds to DAC AI requests, etc.)

In short, how to convert a non-DAC group into a DAC group (assigned to a particular zone)?

This feature would be extremely useful to all sorts of DAC users, for a number of reasons, but here’s the biggie:

It would provide an alternate method of repopulating DAC Zones.

With this feature, incoming “Reinforcement†groups added into the DAC could supplement the current “Respawning†groups (already provided by the DAC via the Respawn Camps). The mission designer would recieve the additional functionality to decide upon what new units enter particular DAC zones, when they enter, and from where! wink_o.gif

In relation, it would also be nice to be able to “break out†a particular group from a DAC zone.  This would allow a DAC group to, for instance, separate from the DAC (leaving on a temporary hiatus), complete some task, and then return to the DAC zone (or a different DAC zone) when desired and reincorporate back into the DAC.  All of this would be up to the mission designer’s behest.

I’d even try and write a pair of functions to accomplish this if you could get me started.  Of course I’ll be happy to elaborate on any of this if necessary, as it’s a somewhat complex idea to describe.

@all DAC users (who've made it this far... I know, I'm long winded  nener.gif )

Please chime in if you think this would be a useful feature set for the DAC!

Regardless, Silola and others, thanks for everything you’ve done thus far.  We all understand it’s a lot of hard work, and you must know, we appreciate it more than words can describe.  Please know we’re with ya through the highs and the lows.  Take as long as you need.  Like Kutya said, the OFP passion always comes back.  xmas_o.gif

In the mean time… Looking forward to future releases of the DAC!!! yay.gif

MadRussian

Share this post


Link to post
Share on other sites

Hey MadRussian

Thank you for your praise. That returns again motivation to me. smile_o.gif

Your idea to implement editor set units in DAC later, I had already noted on my rough draft.

I had however reset this feature, because nobody had asked up to now for it (You changed this now wink_o.gif).

And in addition also for time reasons.

But I think also that it could be very useful under certain circumstances.

This evening I will try to build a small solution.

In the first version only for infantry units...that's okay?

Well, I announce myself, as soon as I can show something.

And again thanks for your input thumbs-up.gif

bye

silola

Share this post


Link to post
Share on other sites

I second MadRussian's sentiments.Your DAC system is the evolution of OFP.

Many thanks biggrin_o.gif

Share this post


Link to post
Share on other sites

hi,

thx froggyluv smile_o.gif

As promised, here a mini solution, in order to implement editor set units in DAC.

Note please that this feature is made only for infantry groups.

In order to use this feature, you need a script call and the appropriate script wink_o.gif

The script call:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

[group,[zones],wpcount,side,behaviour_no,[options]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

Example: [grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

[grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

1. Parameter:

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

the name of the group

[grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

2. Parameter:

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

An array with valid zones, to be considered are with the waypoint selection.

That can be only one zone, in addition, several zones.

Master zones and also waypoint zones may be registered.

[grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

3. Parameter:

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

The number of waypoints, which the group may infer itself from the zones.

[grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

4. Parameter:

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

The side of the group.

0 = east

1 = west

2 = resistance

[grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

5. Parameter:

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

A valid entry from the “DAC_Config_Behaviour.sqs†(a number)

[grp1,[z1,z2],8,0,3,[1,1,1]]exec "DAC\Scripts\DAC_Insert_Group.sqs"

6. Parameter:

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

The options are:

1. # 0 = reduce group OFF | 1 = reduce group ON

2. # 0 = delete units OFF | 1 = delete units ON

3. # 0 = support other groups OFF | 1 = support other groups ON

Here now the script (That comes to “DAC\Scriptsâ€):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;--------------------------|

; Dynamic-AI-Creator |

;--------------------------|

; Script by Silola |

; 05 / 2005 |

; silola@mapfact.net |

;==========================|

_group = _this select 0

_zones = _this select 1

_count = _this select 2

_side = _this select 3

_behav = _this select 4

_options = _this select 5

_wparray = [];_wptemp = [];_iw = 0;_id = 0;_dt = 4

if((_options select 1) == 0) then {_dt = 9}

@((getdir DAC_StartDummy) > 170)

~(0.1 + (random 1))

#SelectAllWP

?(_iw >= count DAC_WP_Pool_S):goto "CheckCount"

_entry = DAC_WP_Pool_S select _iw

?(count _entry == 2):_iw = _iw + 1;goto "SelectAllWP"

?(!((_entry select 0) in _zones)):_iw = _iw + 1;goto "SelectAllWP"

_iw = _iw + 1

#AddWPtoTemp

?(_iw >= count DAC_WP_Pool_S):goto "CheckCount"

?(count (DAC_WP_Pool_S select _iw) > 2):goto "SelectAllWP"

_wptemp = _wptemp + [(DAC_WP_Pool_S select _iw)]

_iw = _iw + 1

goto "AddWPtoTemp"

#CheckCount

if(_count >= count _wptemp) then {_wparray = _wptemp;goto "SelectBehaviour"}

#SelectRandomWP

?(count _wparray >= _count):goto "SelectBehaviour"

_newwp = _wptemp select (random ((count _wptemp) - 1))

"if((format[{%1},_newwp select 0]) == (format[{%1},_x select 0])) then {_id = _id + 1}" foreach _wparray

~0.01

if(_id == 0) then {_wparray = _wparray + [_newwp];goto "SelectRandomWP"} else {_id = 0;goto "SelectRandomWP"}

#SelectBehaviour

~(0.1 + (random 1))

?(count DAC_Init_Zone > 0):goto "SelectBehaviour"

DAC_Init_Zone = DAC_Init_Zone + [_group]

[_behav]exec "DAC\DAC_Config_Behaviour.sqs"

~0.3

_groupbehav = DAC_KI_Behaviour

DAC_All_Groups = DAC_All_Groups + [_group]

?(_side == 0):{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group

?(_side == 1):{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group

?(_side == 2):if(DAC_Res_Side == 0) then {{DAC_East_Units = DAC_East_Units + [_x]} foreach units _group} else {{DAC_West_Units = DAC_West_Units + [_x]} foreach units _group}

[_group,_wparray,1,10,_groupbehav]exec "DAC\KI_1\DAC_Move_to_WP.sqs"

?((_options select 0) == 1):[_group,_side,1]exec "DAC\Scripts\DAC_Reduce_Group.sqs"

?((_options select 2) == 0):DAC_No_Support = DAC_No_Support + [_group]

[_group,_dt,0,_side,[]]exec "DAC\KI_1\DAC_Waiting_for_End.sqs"

?(DAC_Marker):_m = DAC_UT1_Marker select 0;DAC_UT1_Marker = DAC_UT1_Marker - [_m];[_m,_group,1]exec "DAC\Scripts\DAC_Show_Group.sqs"

~0.1

DAC_Init_Zone = DAC_Init_Zone - [_group]

?((DAC_Com_Values select 0) > 1):player groupChat format["%1 was inserted in DAC",_group]

exit

A marker and a DAC system message are shown, as soon as the group was merged.

I hope that this solution is sufficient for one moment icon_rolleyes.gif

Attention, is not 100% tested

bye

silola

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

×