Jump to content
wolffy.au

ALiVE - Advanced Light Infantry Virtual Environment

Recommended Posts

Upon closer inspection, reinforcements still get sent to the removed objective, although when OPCOM debug is on the objective marker is removed so maybe there is a need to compile an updated list of objectives to the opcom. E.g. when an objective is removed, opcom rescans for objectives (obv the removed one will get ditched).

It is out of my technical knowledge tho lol :p

F5 is my friend today

Hmm, any profiles enroute before the delete is done would keep going, I don't think the OPCOM reroutes units.

I'll run another test that's more likely to confirm that it is forgotten, but I was outputting the objective list straight from the OPCOM's "brain". I haven't looked yet, but maybe there is a way to find out which profiles are already enroute and remove their waypoint, in which case we could make the remove smarter.

Sent from my iPad using Tapatalk

Share this post


Link to post
Share on other sites

That would be great ;) otherwise the fact that there is no objective there anymore is rather moot. Is there a function that calculates the waypoints? maybe re-run that after the delete.

Thanks for all the help, and while im at it, does anyone know of a guide on how to run HC for the CQB modules?

Share this post


Link to post
Share on other sites

How do I tell the pauseModule function which opcom I want paused if I have two modules running?

Share this post


Link to post
Share on other sites
That would be great ;) otherwise the fact that there is no objective there anymore is rather moot. Is there a function that calculates the waypoints? maybe re-run that after the delete.

Thanks for all the help, and while im at it, does anyone know of a guide on how to run HC for the CQB modules?

So add and remove do work and an OPCOM will not send any additional forces, but any enroute will continue. That's not the worst possible scenario, compared to below, so I'm going to look at the problem below first.

However, when I added the same objective back to any OPCOM (e.g. "Add OBJ1", "Remove OBJ1", "Add OBJ1"), it got stuck in some sort of loop with the OPCOM ordering TACOM to attack the target and TACOM not acknowledging anything. So maybe OPCOM was able to forget about the objective, but TACOM maybe not or possibly TACOM for that side "died" when the script errors for units that were enroute to a deleted objective. No idea about the TACOM yet.

By the way, if you want to see the errors that occur when you do the delete, make sure you're running Arma with this command line or launch option added: -showscripterrors

---------- Post added at 13:15 ---------- Previous post was at 13:09 ----------

How do I tell the pauseModule function which opcom I want paused if I have two modules running?

There is a "call" inside the ALiVE_fnc_OPCOM function named pause, but I don't know how you'd resume after calling that pause. So you could test it out with the functions I wrote above, but the call you'd be making would be [_opcom,"pause",true] call ALiVE_fnc_OPCOM. You'd be on your own for figuring out if it works and how to resume it though ;)

Share this post


Link to post
Share on other sites

In the script snippets on wiki there is 'call ALiVE_fnc_pauseModule' which would be written

"[ALIVE_MIL_OPCOM] call ALiVE_fnc_pauseModule",

there is also an ALiVE_fnc_unpauseModule. My question is how, if at all, can I designate which ALIVE_MIL_OPCOM i want to pause?

Share this post


Link to post
Share on other sites

Nice work Cameroon, great to see people pushing the boundaries of what ALiVE can do. It may be worth asking Highhead as he's the author of OPCOM/TACOM and will be able to give you details of how it works.

As a point of interest (and I'm not knocking any of these great scripts you're doing) one of our core design principles is simplicity and we already think that ALiVE is getting a bit too complicated to use! Before we close on Version 1.0 later this year we're keen to rationalise a lot of the features that have crept in during the early dev stages as it risks getting overly complex and messy. We want as much stuff to be done via intuitive and simple module placement in the editor and not use scripts or function calls. Clearly there is a demand for more advanced users to be able to do things like selectively blacklist units or add/remove custom objectives on the fly so these functions won't be taken away. I'll probably set up a separate part of the wiki where we can expand the 'Working With ALiVE APIs' a bit and foster some discussion. Do please let me know if you want to contribute!

-lordsoth- Pretty certain you can't at the moment. HH added multiple OPCOM functionality after the Pause Module function was written so may not have scoped it in. We may have to add a OPCOM UID or something similar - if you stick a ticket on DH about it I'm sure HH will take a look at it at some point, though the Main Effort at the moment is Logistics!

KeyCat - There aren't any production quality showcase videos yet, perhaps we'll make one for our full release (If you want to help make one, we'd be delighted!) ALiVE is basically a flexible and modular battlefield generation tool (demonstrated by the How To videos) and the results speak for themselves (as seen in the gameplay vids).

Share this post


Link to post
Share on other sites
In the script snippets on wiki there is 'call ALiVE_fnc_pauseModule' which would be written

"[ALIVE_MIL_OPCOM] call ALiVE_fnc_pauseModule",

there is also an ALiVE_fnc_unpauseModule. My question is how, if at all, can I designate which ALIVE_MIL_OPCOM i want to pause?

That's why I'm saying you probably have to do it manually, there's nothing prebuilt (at least nothing prebuilt that's documented) to do what you want to do. It might be possible to do with the pauseModule/unpauseModule commands, but you'd have to dig into it to figure out how.

---------- Post added at 14:59 ---------- Previous post was at 14:19 ----------

Nice work Cameroon, great to see people pushing the boundaries of what ALiVE can do. It may be worth asking Highhead as he's the author of OPCOM/TACOM and will be able to give you details of how it works.

As a point of interest (and I'm not knocking any of these great scripts you're doing) one of our core design principles is simplicity and we already think that ALiVE is getting a bit too complicated to use! Before we close on Version 1.0 later this year we're keen to rationalise a lot of the features that have crept in during the early dev stages as it risks getting overly complex and messy. We want as much stuff to be done via intuitive and simple module placement in the editor and not use scripts or function calls. Clearly there is a demand for more advanced users to be able to do things like selectively blacklist units or add/remove custom objectives on the fly so these functions won't be taken away. I'll probably set up a separate part of the wiki where we can expand the 'Working With ALiVE APIs' a bit and foster some discussion. Do please let me know if you want to contribute!

Trust me, I love the simplicity of being able to place down some markers, modules and sync lines and get a dynamic, living battlefield that I didn't have to script out - but I also want to be able to provide some additional direction to enhance the appearance of intelligence as to what the AI (OPCOM, in this case) is doing and to adapt to what the player(s) are doing. For instance, being able to remove objectives from a side if it's losing would allow the built-in ALiVE logic to naturally consolidate before it has no further units to send, giving it a stronger position.

That core principle of simplicity is great and if I could use the editor to enable/disable objectives dynamically that would be AWESOME ;) For instance, if I could sync a trigger to a MCP/MIL/Custom objective and to an OPCOM, where the trigger state of TRUE enables the objective and trigger state of FALSE disables the objective for the sync'd OPCOM then it would be fantastic.

I realize there are probably tons of things that are more important to the project so I'm not specifically making a feature request, but adding a [_opcom,"pauseObjective",boolean] to ALiVE_fnc_OPCOM (and attendant ignore/unignore when it's assigning tasks to profiles/TACOM) and removing "removeObjective" might make it easier on you guys since there'd be a lot less "stuff" to cleanup. I'd still want addObjective to exist of course ;)

Some mechanism to discuss the API and how to use it would certainly be welcome. The Functions Viewer does seem to generally have good comments but there are also a lot of assumptions of backend knowledge, like the profileHandler docs provide a good list of what operations it supports but doesn't say that "external" users should use the global ALIVE_profileHandler (found that in some other functions).

Share this post


Link to post
Share on other sites

EDIT - Bug fixed. Pesky private vars.

Ok, this code is way too big to put directly into a forum post. I've created a set of functions that seems to remove an objective without causing errors.

https://dl.dropboxusercontent.com/u/8018430/cjb_alive_extensions.sqf

I've renamed my functions a bit and there's a whole lot more that removeObjectiveFromSides does now as well.

[ "objectiveName", ["WEST"], true] call cjb_ALiVE_removeObjectiveFromSides;

The new param determines whether any enroute Profiles will be given waypoints to the nearest other objective that isn't being attacked (so they don't unintentionally join in an assault). The function defaults it to true, so you can still call it the original way (just with the new name) and any profiles will be redirected to whatever objective is nearest.

So if you call that, any enroute profiles will be halted and redirected and then OPCOM will be told to remove the objective. This avoids the script error that was occurring and I've been able to add/remove/add/remove/etc an objective and have units sent to the objective whenever it's added (with the regular OPCOM analysis delay). Selection of units appears to follow the regular OPCOM rules, so as far as I can tell, this correctly returns profiles to OPCOM for use.

It hasn't had really extensive testing, so there might be some bugs.

Please forgive the audio - downside to the wireless headset I'm using I think. Also, I think YouTube is still processing the higher bit rates so right as I'm posting this it's only 360p.

NOTE

Just a heads up that it won't cause profiles that are currently engaging an enemy profile to flee that fight.

Edited by cameroon
bug fixed

Share this post


Link to post
Share on other sites

Awesome stuff Cameroon! If it's OK by you I'll link this on the ALiVE wiki?

Also, see your PM's!

Share this post


Link to post
Share on other sites
Awesome stuff Cameroon! If it's OK by you I'll link this on the ALiVE wiki?

Also, see your PM's!

Sure, go ahead - hopefully we'll get some ambitious mission makers to make use of it! ;)

Looks like the forums are being sluggish about PMs - nothing there yet, heh.

Share this post


Link to post
Share on other sites

I like the overall commander idea giving OPCOM objectives. Very powerful indeed with simple use of map click.

Share this post


Link to post
Share on other sites
I like the overall commander idea giving OPCOM objectives. Very powerful indeed with simple use of map click.

I started toying with it this afternoon, at least as a proof-of-concept. Working out a method for deleting is the tricky part. I haven't tried using onMapSingleClick to delete markers and it's proving to be a bit trickier than I thought. I don't have any experience creating other UI type objects so wanted to go with something simpler just to see it in action, turns out it's still not-so-simple ;)

Share this post


Link to post
Share on other sites

Well I got to the point of being able to add/delete objectives via the map, but all my testing from before was from the OPFOR side of things and that OPCOM did not have a Military Logistics synced to it.

Turns out that Military Logistics doesn't like having objectives removed. I can't really debug it and I'm not sure if it breaks the synced Logistics module permanently, or just for that "run" of reinforcement check. Hopefully it's just for one run, which could delay reinforcing but at least it'd otherwise work but I haven't been able to confirm that.

At least for the moment, I'd say if you plan on deleting objectives you shouldn't delete them from an OPCOM that has a Logistics module in effect.

Share this post


Link to post
Share on other sites
Well I got to the point of being able to add/delete objectives via the map, but all my testing from before was from the OPFOR side of things and that OPCOM did not have a Military Logistics synced to it.

Turns out that Military Logistics doesn't like having objectives removed. I can't really debug it and I'm not sure if it breaks the synced Logistics module permanently, or just for that "run" of reinforcement check. Hopefully it's just for one run, which could delay reinforcing but at least it'd otherwise work but I haven't been able to confirm that.

At least for the moment, I'd say if you plan on deleting objectives you shouldn't delete them from an OPCOM that has a Logistics module in effect.

Nice work getting that far cameroon! We are just starting work on the new improved logistics module, we can take your code into account - some great idea there.

Share this post


Link to post
Share on other sites

it's all coming together ayy, well done cameroon.

When my mission is finished I will upload a video as another example of cameroon's dynamic objection creation/deletion in action!

Also, I've been having a problem spawning CQB units on our dedi since the last update... had no problems before that. Tried with military,civilian,JIP,server no combination works.

It's the same for all maps, the units spawn during my testing in the editor just not when launched on the dedi

AND yet another question, is there a way to initialise tacom analysis again so that the wait can be shortened, at the moment it takes ages to send the troops to objectives

Edited by spitfirefrench

Share this post


Link to post
Share on other sites

Also, I've been having a problem spawning CQB units on our dedi since the last update... had no problems before that. Tried with military,civilian,JIP,server no combination works.

It's the same for all maps, the units spawn during my testing in the editor just not when launched on the dedi

There have been reports of certain instances where CQB does not work however I have yet to nail down why. Any vanilla tests on any map I've done have come back just fine with CQB finding lots of locations and spawning in guys.

If you like can you post more details or PM me your mission so I can take a look at it? What island are you using in your mission?

Share this post


Link to post
Share on other sites
There have been reports of certain instances where CQB does not work however I have yet to nail down why. Any vanilla tests on any map I've done have come back just fine with CQB finding lots of locations and spawning in guys.

If you like can you post more details or PM me your mission so I can take a look at it? What island are you using in your mission?

spitfirefrench, if you haven't already, I'd also suggest checking the Arma RPT file (it'll be in C:\Users\<yourusername>\AppData\Local\Arma 3\) and see if there are any errors being thrown (or run with -showscripterrors).

Share this post


Link to post
Share on other sites
Nice work getting that far cameroon! We are just starting work on the new improved logistics module, we can take your code into account - some great idea there.

I think the source of the error is just that there are a lot of threads that access the objectives collections, and there's no good way to make sure they aren't operating on an objective that is no longer valid. If I deleted an objective right at the same time that an OPCOM started its analysis, I could see that blowing up too and then there'd be a dead OPCOM ;)

I can think of a couple ways to avoid running into the problem, but it would probably be ranging far afield for the thread.

Share this post


Link to post
Share on other sites
I think the source of the error is just that there are a lot of threads that access the objectives collections, and there's no good way to make sure they aren't operating on an objective that is no longer valid. If I deleted an objective right at the same time that an OPCOM started its analysis, I could see that blowing up too and then there'd be a dead OPCOM ;)

I can think of a couple ways to avoid running into the problem, but it would probably be ranging far afield for the thread.

Sounds like we need mutexes for SQF :D

Share this post


Link to post
Share on other sites

ALIVE team

any chance of adding compatibility to lingor and panthera?

Share this post


Link to post
Share on other sites

Please stick a ticket on DH - we have a number of requests for maps to add already.

Share this post


Link to post
Share on other sites

Thanks for the hard work and great addon guys.

I have used Neokika's Support Radio for years and love that you guys integrated it into ALiVE as a module.

The problem I have run into has to do with using the Fixed Wing Units for CAS tasks through the Combat Support Module. The first time I use the unit all is well, once that unit has been sent back to base however, it lands and taxi's normally and then will not take off again despite to agreeing to complete new missions.

I checked status and asked for a sitrep - the unit replies giving its location and advises that it's "Fuel State Red".

So the unit is landing, being rearmed and repaired and not being refueled it would appear.

Any thoughts? Any suggestions would be appreciated.

I thought about putting a script call in the initialization for the unit giving it unlimited fuel (even after respawn) but I haven't been able to make any script calls work from the initialization field of CS units.

As I said, if anyone has any thoughts I would very much appreciate it.

Theopolus.

Share this post


Link to post
Share on other sites

Everything about persistence seems to work when server is kept online (players can leave and come back exactly where they were previously with same gear), but as soon as i restart the server everything is lost

What am i doing wrong? Is there a special way to restart a server so it saves correctly?

I used TADST dedicated server tool to setup quick server, when i closed it and then re-launched server all progress was lost.

Edited by Mikederel

Share this post


Link to post
Share on other sites

Are you set up on ALiVE War Room with the latest plugins for ArmA2net as per the instructions? You also need to ensure you use ALiVE's "Server Save & Exit" button, and don't just do #missions to close the game.

Share this post


Link to post
Share on other sites

I did everything they said to setup war room but it never showed up in Recent operations after i played...I also copied Addins from @Alive to @Arma2Net

Also i tried to Save server and exit as admin and all it did was bring me back to my servers lobby like it never went down

Edited by Mikederel

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×