Jump to content
BadAss -Mapfact.net-

Mapfact.net releases DAC

Recommended Posts

I want activate Zones in sequences. First zone loads immediatly second zones loads 30 seconds laters, 3rd 60 seconds and so on. I couldnt figure out the activating deactivating section in the read me. Is it also possible to launch zones from a script?

I also keep getting some errors regarding camps, Ill post them in a bit.

OK, heres the first error I keep getting,

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

(((_rCamp select _i) select|#| 5) <= 0)': Error Zero Divsor

This is something to do with the DAC KI addon. AI moving to camp waypoints.

This happens sparadically, and I guess when the AI trys to move to a camp WP.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">'((format["",_zone select 0 + _zone select |#| 1] == format ["", _tempcamp select 0 + _tempcamp select 1]) && (_tempcount > 0))': error Generic error

Heres the second. I think it happens when a group dies and tries to respawn.

Any ideas why these would happen?

Thanks in advance.

Share this post


Link to post
Share on other sites

hi,

@Combat-Agent:

You generate units on side of the resistance...right?

With this side DAC has problems crazy_o.gif

Please try to generate the appropriate zones on side west or east (with the same units).

Then these errors should not emerge any longer.

In the next Patch this error is repaired. smile_o.gif

bye

silola

Share this post


Link to post
Share on other sites
In the next Patch this error is repaired. smile_o.gif

bye

silola

Hi silola

There have been so many discussions about mods in this thread that I cant keep up with what everyone is doing. Will the new patch be soon notworthy.gif Would love to know.

Share this post


Link to post
Share on other sites

hi,

@Combat-Agent:

Sorry....I had ignored your question confused_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I want activate Zones in sequences. First zone loads immediatly second zones loads 30 seconds laters, 3rd 60 seconds and so on. I couldnt figure out the activating deactivating section in the read me.

Here a simple example....

Assumed you would like to activate 5 zones (z1 to z5) successively. Then each zone must contain its own Activate value.

At least one zone should be directly at the beginning active. That means this zone gets the Activate value 0

That could look therefore in such a way:

[z1,[1,0,0]......

[z2,[2,11,0]......

[z3,[3,22,0]......

[z4,[4,33,0]......

[z5,[5,44,0]......

The size of the value is not determining thereby. Therefore it could look also in such a way:

[z1,[1,0,0]......

[z2,[2,1451,0]......

[z3,[3,272,0]......

[z4,[4,33765,0]......

[z5,[5,9,0]......

Important it is in your example only that there is different values , since each zone is to be activated separately.

Well, now you need an external script that then the zones z2 to z5 activated (z1 is directly active).

Here the simple script:

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

~1

;If 60 seconds passed since start of the mission

@time > 60

;The zone with the Activate value 11 is activated

DAC_Activate = 11

;If 120 seconds passed since start of the mission

@time > 120

;The zone with the Activate value 22 is activated

DAC_Activate = 22

;If 180 seconds passed since start of the mission

@time > 180

;The zone with the Activate value 33 is activated

DAC_Activate = 33

;If 240 seconds passed since start of the mission

@time > 240

;The zone with the Activate value 44 is activated

DAC_Activate = 44

exit

I hope that you could follow this example smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Is it also possible to launch zones from a script?

That is naturally also possible. You create the zones like always, only without the DAC script call and into the condition line you write ... this

Then also an external script that starts the initialization of the zones (example):

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

;[]exec „CallZones.sqs“

@time > 1

[z1,[1,0,0],[3,2,20,5],[ ],[ ],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[z2,[1,0,0],[3,2,15,5],[ ],[2,1,25,12],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[z3,[2,0,0],[ ],[ ],[3,1,5,8],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[z4,[2,0,0],[ ],[ ],[25],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[z5,[3,1,0],[ ],[ ],[3,1,20,8],[ ],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[z6,[4,1,0],[ ],[ ],[ ],[1,2,50,0,100,10],[0,0,0]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

.....

exit

That's all wink_o.gif

@gunterlund:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">There have been so many discussions about mods in this thread that I cant keep up with what everyone is doing. Will the new patch be soon

I know that m8 wink_o.gif but the Patch is very complex and all changes must be well considered icon_rolleyes.gif

bye

silola

Share this post


Link to post
Share on other sites

I guess i overlooked your answer to my question, or you overlooked my question, or something else .. smile_o.gif

Anyway, I narrowed a lot of things down since that post about the server lag issue. I saved around 10fps by optimizing my scripting and eventhandlers..

Still, with DAC enabled... it seems there is still a huge fps drop when 12+ players are ingame. I was hoping you might have any insights still... The funny thing is when playing it with 24 ai's there is no problem at all, not even when all are engaging in combat smile_o.gif

Share this post


Link to post
Share on other sites

hi sickboy smile_o.gif

Do you have this difference directly at the beginning of the mission?

Does it make a difference, if you deactivate the DAC AI (DAC_KI_Addon = 0)?

Unfortunately I cannot recognize a script that regarding the number of players,

on the server could prepare problems. icon_rolleyes.gif

The server does not have to process also more Scripts, if correspond more player participate.

Logical way the server has to process more data and processes, if several human players participate

in the mission. As that affects itself exactly, I cannot judge unfortunately.

Sorry m8, that I cannot offer a solution to you. confused_o.gif

On our server DAC always made a good job....so far.

bye

silola

Share this post


Link to post
Share on other sites
Do you have this difference directly at the beginning of the mission?

Does it make a difference, if you deactivate the DAC AI (DAC_KI_Addon = 0)?

The difference is only there, after our first DAC zone activates..

So at the start of the mission the server fps is very good, with 1 dac zone active from the start with about 3 heli's and 3 trucks, loaded with 2-6 soldiers... which is a difference of about 5 server fps compared to the start of the mission with no dac running at all yet.

Then, when our first objective activates when we come near it, with these settings:

just for reference:

dacc=3

dacst=1

dacr=10

es=0

dace3=1601

dacd4=252

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

[z1_1,[11,1,51,300,300],[3,3,18,5],[],[4,1,12,2],[],[es,dace3,dacd4]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[z1_2,[12,1,51,1100,1100],[4,2,28,6],[2,3,12,5],[2,1,12,5],[dacc,2,125,dacst,80,dacr],[es,dace2,dacd1]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

I also tested it with only the original DAC in, so without the "Are players further than x Meters away from spawn camp, then spawn or in case of not needed anymore, destroy" code smile_o.gif

It didnt change much, just the normal fps variations depending on what is generated etc smile_o.gif

The kbps in/out aren't unusually high or anything, so there doesnt seem to be much communication either smile_o.gif

I guess the next thing that needs testing is the KI_Addon=0, I will let you know the result, but if that doesnt weigh much, I guess the next is calculate how many units there are generated and which, in general... Then put the same amount and types of enemy in staticly, get the players to there and see how much server fps is left then... If it saves 20fps then we might think there is a problem with DAC, or a combination...

Always hard these bughunts... many are easy, this one is a bit harder.. ... so many variables, and hard to eliminate all of them smile_o.gif

Nice to read about your progressing with the new DAC ... you know I can't wait smile_o.gif Oh, and if you didn't know yet... I have no problem in being your beta tester smile_o.gif As I play daily with my m8s.. and mainly DAC... think of the possibilities wink_o.gif

Share this post


Link to post
Share on other sites

Having a small problem. As of yet i don´t know if the camps in my map do spawn units, but everytime (i guess) they want to the following error message appears: clickety clack.

These are the zones, they´re loading the jungle fever units:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[Z1,[1,0,0,150,150],[30],[],[],[],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[Z2,[1,0,0,160,120],[3,2,1,6],[],[],[1,2,30,1,30,5],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[Z3,[1,0,0,200,200],[4,4,1,6],[],[],[1,2,60,1,100,15],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

Also after DAC has initialised it says something about 1 vehicle cached, although there is none..

Not a biggie, but as it´s supposed to be played in MP i´d rather be sure that it´s not some sort of fatal error smile_o.gif

Share this post


Link to post
Share on other sites
Having a small problem. As of yet i don´t know if the camps in my map do spawn units, but everytime (i guess) they want to the following error message appears...

Not a biggie, but as it´s supposed to be played in MP i´d rather be sure that it´s not some sort of fatal error smile_o.gif

I had that error a few times before... I think it was due to camps being spawned on wrong locations, where the camps keep on blowing up and respawning themselves (a protection Silola built in so that if a vehicle drives over the camp by accident or sth similair, the camp gets back spawned smile_o.gif)

So maybe check the spawn locations and the waypoint generation settings, try to tune em and see if it helps?

(Fastest test would be moving the particular zone into an open field, and retesting ur mission)

I was thinking of a way how this problem can be circumvented...

make an invisible H as the main spawn building, and create the camp on top of it, do not respawn the camp when it gets destroyed... makes it more realistic, still the units spawn due to the invisible H... hmm ?

Share this post


Link to post
Share on other sites

hi,

@Mr.Burns:

Normally this error arises, if units on the side “Resistance†become respawned.

That is because of an incorrect IF query, in which a local variable is queried,

which was not defined before.

In addition, it is conceivable that it is connected with the Respawn type.

You could try to use the standard attitude.

If you do not generate vehicles, then is this value not of importance.

You can therefore leave it on 0.

[Z1,[1,0,0,150,150],[30],[],[],[],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[Z2,[1,0,0,160,120],[3,2,1,6],[],[],[1,2,30,0,30,5],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[Z3,[1,0,0,200,200],[4,4,1,6],[],[],[1,2,60,0,100,15],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

In addition to test purposes use the standard Unit_Config.

Only use it, to determine whether the error nevertheless comes.

[Z1,[1,0,0,150,150],[30],[],[],[],[0,1016,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[Z2,[1,0,0,160,120],[3,2,1,6],[],[],[1,2,30,0,30,5],[0,0,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

[Z3,[1,0,0,200,200],[4,4,1,6],[],[],[1,2,60,0,100,15],[0,0,11]]exec "DAC\Scripts\DAC_Init_Zone.sqs"

I hope that helps you. smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Also after DAC has initialised it says something about 1 vehicle cached, although there is none..

You can ignore this message. That is only an incorrect counter wink_o.gif

bye

silola

Share this post


Link to post
Share on other sites

Hi silola,

tried both of your suggestions yesterday, sadly to no avail.

First attempt with spawntype changed and on second try added the normal east units. But the error message still came up.

Maybe i´ve messed up some configuration files, gotta try with vanilla DAC to be sure.

Share this post


Link to post
Share on other sites

@Silola i reinstalled ofp and i lost many of my .txt files and stuff so i got no clue how things used to work :P

i put out a group of east units and named them s1 , s2 ect.

also added 3 triggers with the right codes in and then i added this into the DAC_Config_Units.sqs file

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

i also did add this

_UnitTyp = _this select 2

;\\\\\\\\\\\\\\\\\\\\\\\\\\\

#Unit_Config_2

;///////////////////////////

_Unit_Pool_S = ["JAM_SoldierGHDCrew","JAM_SoldierGHDPilot","JAM_GBHDOfficer","JAM_GBHDSoldierRPGALL","JAM_GBGLAKMHDSoldier","JAM_GBGLAKMHDSoldier","JAM_GBHDSoldierRPG","JAM_GBHDSoldierRPGALL","JAM_GBMGHD","JAM_GBHDSoldierRPGALL","JAM_GBSoldierAAHD","JAM_GBMGRPDHD","JAM_GBHDSoldierRPGALL","JAM_GmosNagSniper","JAM_GBSoldier","JAM_GMedicHD","JAM_GBSoldierAAHD"]

_Unit_Pool_V = ["TruckV3SG","UAZG"]

_Unit_Pool_T = ["T55G","oldtruckMGJAM"]

_Unit_Pool_A = ["MI17","MI24"]

_Unit_Pool_C = []

i get a error saying that i need all units to be correct like crew , pilot and officer in the config units file.. i copied and pasted the names from the jam readme file, what could be wrong there?

Share this post


Link to post
Share on other sites

Not sure, but maybe not all the JAM names are correct. What I'm sure about is that the JAM_Remington is actually a JAM_Remington700, so it's possible there are more errors. You should try to put all JAM units in the editor, name the first something recognizable like JAM123, search for it in the mission.sqm and copy-paste all the names. Or search for them in the config of JAM.

Share this post


Link to post
Share on other sites

I noticed this a long time ago, but always forget to ask/tell:

Maybe I'm wrong but I think you should look at this. In DAC, I saw in many places, a code like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_gwp = _WPAll select (random ((count _WPAll) - 1))

I suppose this is for selecting a random element from an array. I studied this with some guys in an other thread here, and the conclusion was that the possibilities are not the same for all elements. The 1st and the last elements have half the possibility than the others. I know I shoultn't give lessons to you, but I suppose in those parts, I should be something like this:

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

_rand = _rand - (_rand mod 1)

_gwp = _WPAll select _rand

Again, forgive if I'm wrong.

Share this post


Link to post
Share on other sites

hi smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">I suppose this is for selecting a random element from an array. I studied this with some guys in an other thread here, and the conclusion was that the possibilities are not the same for all elements. The 1st and the last elements have half the possibility than the others.

That is absolutely correct.

But hey...DAC generates everything with each mission start against new.

The whole waypoints, all units, the respective waypoints for each group etc.

Nothing is like that as it was before. smile_o.gif

To that extent this inaccuracy is not of great importance.

If waypoint pool would never change and also if the groups would have always the same waypoints,

that could be noticeable. But there is no remarkablenesses in such a way.

Or do you have another opinion? icon_rolleyes.gif

bye

silola

Share this post


Link to post
Share on other sites

I agree with you, almost smile_o.gif .

Just a "what if" situation: if I've got three soldiers in the DAC units config, the middle soldier (in the array) will appear as many times ingame as the 1st and 3rd together. Perfectionists could solve this by making the last entry always the same as the first. (BTW I'm not doing that, because you're right about it not being so important). Oh , the WP array was just an example, that was the first I found, when I wrote the previous post. My mind was firstly on the units.

But, hey, no hard feelings, it was just a note. DAC is really great even with this notworthy.gif

Share this post


Link to post
Share on other sites

This error has been reported by various people throughout the thread:

Quote[/b] ]((format["",_zone select 0 + _zone select |#| 1] == format ["", _tempcamp select 0 + _tempcamp select 1]) && (_tempcount > 0))': error Generic error

I was getting the error aswell, but I fixed it!

The error occurred when troops were trying to respawn with DAC_KI_Spawn set to 'local' spawning only in DAC_config_creator.sqs

To fix it replace the following line in DAC\KI_0\DAC_Waiting_For_end.sqs and DAC\KI_1\DAC_Waiting_For_end.sqs:

?((format["%1",_zone select 0 + _zone select 1] == format["%1",_tempcamp select 0 + _tempcamp select 1]) && (_tempcount > 0)):if(_temptyp == 0) then {_temparray1 = _temparray1 + [_i];_temparray2 = _temparray2 + [_i]} else {if(_temptyp == 1) then {_temparray1 = _temparray1 + [_i]} else {_temparray2 = _temparray2 + [_i]}}

by:

?((format["%1",(_zone select 0) + (_zone select 1)] == format["%1",(_tempcamp select 0) + (_tempcamp select 1)]) && (_tempcount > 0)):if(_temptyp == 0) then {_temparray1 = _temparray1 + [_i];_temparray2 = _temparray2 + [_i]} else {if(_temptyp == 1) then {_temparray1 = _temparray1 + [_i]} else {_temparray2 = _temparray2 + [_i]}}

welcome.gif

Share this post


Link to post
Share on other sites

hi Zendjir smile_o.gif

Thank you that you found this error thumbs-up.gif

That is really a stupid embarrassing error banghead.gif

I do not know, why I inserted this "format" there. It functions also without this....

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?((((_zone select 0) + (_zone select 1)) == ((_tempcamp select 0) + (_tempcamp select 1))) && (_tempcount > 0)):if(_temptyp == 0) then {_temparray1 = _temparray1 + [_i];_temparray2 = _temparray2 + [_i]} else {if(_temptyp == 1) then {_temparray1 = _temparray1 + [_i]} else {_temparray2 = _temparray2 + [_i]}}

You know my Scripts in the meantime better than I tounge2.gif

bye

silola

Share this post


Link to post
Share on other sites
Quote[/b] ]That is really a stupid embarrassing error

wink_o.gif Small errors like this tend to sneak into the code when scripting such grand things like DAC. You shouldn't feel bad about it smile_o.gif

Quote[/b] ]You know my Scripts in the meantime better than I tounge2.gif

Heh, not by a looooong shot. It took me nearly 3 hours to figure it out. There are so many variables in your scripts, it was like unravelling a ball of yarn (sp?). And then to realise it was such a simple fix.

Share this post


Link to post
Share on other sites

Hi guys

Applied the quick fix into my mission and it felt like it worked better (got my ass more kicked), but then this error came up:

dacerror1.jpg

It stood there till the end of the mission..

huh.gif

Share this post


Link to post
Share on other sites

Have you inserted Silola's line or the code I provided? I have not tested Silola's code yet so I don't know if it will create new problems. But then again, he wrote DAC, not me.

Share this post


Link to post
Share on other sites
Have you inserted Silola's line or the code I provided? I have not tested Silola's code yet so I don't know if it will create new problems. But then again, he wrote DAC, not me.

Used your fix, gotta read through silolas post again to see the difference smile_o.gif

Share this post


Link to post
Share on other sites

Greetings to all

Got a question as always huh.gif

Trying to include DAC into my dynamic campaign. So I'd like to ask is it ok, to move the DAC_Players array into my init.sqs or some other place that is running at the beginning of the mission?

I ask this because I'm adding units dynamically to the DAC_Players array, and I want to add some even before DAC is started. I want to do this dynamically, because those units can die and by my knowledge they will be deleted from DAC_Players. And my units can be (and will be) respawned later. So it's ok this way?

Im doing something like this:

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

_rand = _rand - (_rand mod 1)

( GDC_EnemyOffN select _rand ) createunit [ GDC_LeaderTent, GDC_lead_group, bla bla... something other ]

DAC_Players = DAC_Players + [leader GDC_lead_group]

Also wanted to ask, should I put enemy units too in that array? Or how else can I make DAC respond to them? For example my own enemy patrols that I also spawn dynamically.

Many thanks smile_o.gif

EDIT: done a bit of testing with DAC_Players. I think I somewhere read, that the unused entries are automatically removed. Does this happen only at start, or even during dameplay? Does the units (that I put into DAC_Players) have a unique ID set to them or is it enough if I put them with the "foreach group" command (since I've got no reference to them)? And one last thing (I know, everyone's  pistols.gif at me), I watched the DAC_Players array, and in the end of it are some <obj null> entries. Suppose those are the dead guys. Are they removed, or will be reused when I spawn that guy again, on neither of the two?

Sorry for harassing you Silola, but I really need these things to make GDCE really what I meant it to be. If I ever go to Italy or where you're from, I'll bring you a barrel of beer.

Oh, almost forgot, the replacement of the DAC_Player array elsewhere, didn't work and I returned it to it's original place. Now it's ok.

Share this post


Link to post
Share on other sites
Oh, almost forgot, the replacement of the DAC_Player array elsewhere, didn't work and I returned it to it's original place. Now it's ok.

Wouldnt know any reason why you couldn't put it in init.sqs or any other sqs called by init.sqs etc ?

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

×