Jump to content
dreadpirate

Jebus - Just Editor Based Unit Spawning

Recommended Posts

Hi Dread, found another way to allow CACHE and REDUCE to work in MP it seems.

if (!isDedicated) then {
waitUntil {!isNull player};

This seems to work without me knowing how or why (although !isDedicated drops a big hint), but it appears there is no need for you to modify your script as the fault was my end.

Share this post


Link to post
Share on other sites

v1.40 (2017/10/2)

  • Moved JEBUS into its own folder. Reorganised code
  • Dynamic Loadout support
  • "START=" added. Initial spawning delay
  • Multi vehicle groups support RESPAWNMARKERS
  • Various tweaks and fixes

Download

 

I've turned JEBUS into a function, so the setup will change slightly.

 

Instead of

0 = [this] execVM "Jebus.sqf";

it will be

0 = [this] spawn jebus_fnc_main;

 

  • Like 2

Share this post


Link to post
Share on other sites

Is it possible to have a scenario like this:

 

A group does not spawn at start but spawns when player is within a certain radius and then de-spawns/caches when the player is outside of the radius and spawns back in when player is inside the radius again, rinse and repeat, similar to how EOS works except with all the extra cool functionality.

 

Kind of the opposite to this call:

  • 0 = [this, "PAUSE=", 100, "INIT=", "[_proxyThis, 'agia'] execVM 'UPS.sqf'"] spawn jebus_fnc_main;
  • Group initializes Kronzky's UPS script to patrol a marker named 'agia'. Respawning will pause if enemies are within 100m of spawn position.

Ive been messing around in VR but havent figured it out so far.

Share this post


Link to post
Share on other sites
13 minutes ago, katipo66 said:

Is it possible to have a scenario like this:

 

A group does not spawn at start but spawns when player is within a certain radius and then de-spawns/caches when the player is outside of the radius

 

Have you yet tried "CACHE=" which seems to be exactly what you're searching for. How this works with UPS I personally have not tested.

Share this post


Link to post
Share on other sites
17 minutes ago, anfo said:

 

Have you yet tried "CACHE=" which seems to be exactly what you're searching for. How this works with UPS I personally have not tested.

 

Yes i tried with something like: 0 = [this, "LIVES=",[400,800], "CACHE=", 70, "GAIA_NOFOLLOW=", "marker_0"] spawn jebus_fnc_main;

 

But it doesnt seem to quite work for me, tbh im just rushing through it, ill play around with it a bit more...

Share this post


Link to post
Share on other sites
39 minutes ago, katipo66 said:

 

Yes i tried with something like: 0 = [this, "LIVES=",[400,800], "CACHE=", 70, "GAIA_NOFOLLOW=", "marker_0"] spawn jebus_fnc_main;

 

But it doesnt seem to quite work for me, tbh im just rushing through it, ill play around with it a bit more...

 

Ah, in the Jebus script there is a default pause radius of 200m. Meaning if you have a cache distance of 70m, AI won't spawn because you are within the pause radius of 200m. Either change the pause distance in fn_main.sqf, make your CACHE= 201m+, or your PAUSE= less than 70m

Share this post


Link to post
Share on other sites
24 minutes ago, anfo said:

 

Ah, in the Jebus script there is a default pause radius of 200m. Meaning if you have a cache distance of 70m, AI won't spawn because you are within the pause radius of 200m. Either change the pause distance in fn_main.sqf, make your CACHE= 201m+, or your PAUSE= less than 70m

 

Aha! ok thanks for the pro tip, ill check that out

  • Like 1

Share this post


Link to post
Share on other sites

@dreadpirate
I know this is going against the design of your script, but I was hoping to put the jebus script folder within a folder called scripts. Unsurprisingly this is throwing

Script jebus\fn_main.sqf not found

on mission start. Of course if there was no possible workaround I'll happily store the script as intended.

Share this post


Link to post
Share on other sites

Does the caching remove units from the memory to save on performance or just hide them?

 

Also if I had one request it would be nice if the system could remember a units probability of prescence.

 

Otherwise this is a another great system for mission making.

Share this post


Link to post
Share on other sites
On 10/6/2017 at 9:25 PM, katipo66 said:

Does the caching remove units from the memory to save on performance or just hide them?

 

Also if I had one request it would be nice if the system could remember a units probability of prescence.

 

Otherwise this is a another great system for mission making.

 

Im pretty sure it saves on memory. You wont see them until your in a certain range. My understanding anyways. Similar to how ALive handles large armies and fighting

Share this post


Link to post
Share on other sites

@dreadpirate

 

I've noticed a minor issue when respawning a unit with a way point, on multiple respawn markers.  Rather than head directly to the way point the unit will first travel to it's original editor placed position before then heading to the way point.  This happens regardless of where the unit respawns.

 

 

Share this post


Link to post
Share on other sites

@Imperator[TFD]

 

v1.41 (2017/12/29)

  • Stopped units moving to default spawn position when using RESPAWNMARKERS

Download

 

 

@anfo

 

Installing to a sub-folder

  1. Copy the jebus folder into your mission sub-folder (eg scripts)
  2. Copy description.ext into your mission folder (or merge description.ext with yours)
  3. Edit description.ext to point to sub-folder (eg #include "scripts\jebus\cfgFunctions.hpp")
  4. Proceed as normal

@katipo66

On 06/10/2017 at 10:25 PM, katipo66 said:

Does the caching remove units from the memory to save on performance or just hide them?

 

Also if I had one request it would be nice if the system could remember a units probability of prescence.

 

Otherwise this is a another great system for mission making.

It just hides them and disables simulation, which does provide a small performance boost.

Not quite sure what you mean by probability of presence. Perhaps give an example of how you would like it to work.....

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
On 12/29/2017 at 4:44 AM, dreadpirate said:

@Imperator[TFD]

 

v1.41 (2017/12/29)

  • Stopped units moving to default spawn position when using RESPAWNMARKERS

Download

 

 

@anfo

 

Installing to a sub-folder

  1. Copy the jebus folder into your mission sub-folder (eg scripts)
  2. Copy description.ext into your mission folder (or merge description.ext with yours)
  3. Edit description.ext to point to sub-folder (eg #include "scripts\jebus\cfgFunctions.hpp")
  4. Proceed as normal

@katipo66

It just hides them and disables simulation, which does provide a small performance boost.

Not quite sure what you mean by probability of presence. Perhaps give an example of how you would like it to work.....

 

@dreadpirate thanks for my part of the answer, I almost forgot about it.

Not speaking for @katipo66, but I perhaps he means the attribute that says there is a % chance that a unit will spawn at game start?
Also, has design of Jebus been always to hide units? I was always under the impression they spawned from nothing? Maybe I'm confused.

Share this post


Link to post
Share on other sites

Really nice, I will start using this, it seems great that it works with GAIA and you can run init strings through it

 

Thanks!

Share this post


Link to post
Share on other sites

I’m with @anfo for some reason I assumed the units were spawned into game and not hidden, along the lines of the old murkspawn script (which doesn’t work anymore).

 

Of course, if I find out murkspawn also simply hid the units, my world is truly turned upside down.

 

Should this detail be a concern for mission makers, ie take it into consideration on how many units are placed on the map?

Share this post


Link to post
Share on other sites
1 hour ago, Rich_R said:

 

 

I think he means he used hideobjectglobal, which is what cache scripts and dynamic simulation use anyway

  • Thanks 1

Share this post


Link to post
Share on other sites

The caching system uses hideObjectGlobal and disableSimulationGlobal.

 

Otherwise JEBUS units are created from scratch.

 

I did consider having the caching system completely de-spawn and re-spawn units, but I'm not really working on JEBUS at the moment.

Share this post


Link to post
Share on other sites

Thanks @dreadpirate, that makes sense as cache/reduce unit icons can be seen in Zeus when cached. It's good to know all else are spawned.

Share this post


Link to post
Share on other sites

hey dreadpirate I just attempted to use this. Its been a while but the editor placed units attached to a trigger for spawning does not seem to work at this time. I DL you update and attempted it on your demo mission and the AI did not spawn in as well when I walked into the trigger area. ???

Share this post


Link to post
Share on other sites
47 minutes ago, avibird 1 said:

hey dreadpirate I just attempted to use this. Its been a while but the editor placed units attached to a trigger for spawning does not seem to work at this time. I DL you update and attempted it on your demo mission and the AI did not spawn in as well when I walked into the trigger area. ???

Just tried it. The syncing in the demo mission seems to have messed up somehow, but when I fixed it, spawning happened as normal.

Remember that if you're closer than 200m to the spawn position, the pause radius will be active for enemy units.

Use 0 = [this, "PAUSE=", 100] spawn jebus_fnc_main; to set it to 100m.

Share this post


Link to post
Share on other sites

I will give it a go. Thank you for the quick reply. How does your script do with spawning units on the second floors or rooftops ?

The other script I use for editor AI spawning is Editor based AI script by trigger by Murklor  but it will not spawn units with elevations does yours.

Share this post


Link to post
Share on other sites
1 hour ago, avibird 1 said:

I will give it a go. Thank you for the quick reply. How does your script do with spawning units on the second floors or rooftops ?

The other script I use for editor AI spawning is Editor based AI script by trigger by Murklor  but it will not spawn units with elevations does yours.

It doesn't spawn all units in their exact editor positions, no.

I would use a custom "INIT=" string to call a garrison or house occupy script if that was the effect I wanted.

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

×