[Release] [ALPHA] "Arma III" Styled Missions

I just noticed this other blip thread which is very on point (blips & distance) but I’m not sure the conclusion. An element again suggests SetNetworkIdSyncToPlayer but creator of the thread concludes a blip needs to be on a player to defy the blip distance limit (but it’s not clear he tried the element’s solution - I think I will ask him).

1 Like

this is the case here…
sometime when the npc get far from me the blip disapear… but get back if i found him back.

Somtime i dont lost even coast ti coast…
Soo its seem that depend who host the mission.
Host see all
client see when close.

Does it make sense? How to change distance var to make them stay on map coast to coast…

Oh I see. That’s even more confusing if a blip on a mission ped first appears, then disappears and even reappears again, on the remote clients. Meaning initial network sync does happen but something goes wrong after.

In the blip thread I last posted above it is suggested that this blip distance effect is a consistent ~500-600 units, at least with respect to vehicles. @dragonkyn says a blip on a player ped can defy this limit, presumably even for a remote client, but it’s not clear from his results whether he found a way for a blip on an NCP ped to defy this limit. I messaged him.

The two theories raised in the thread seem to be: (1) the element’s theory that maybe the blip disappears because the entity disappears - is no longer cloned/synced, and therefore SetNetworkIdSyncToPlayer could be a solution because it forces sync/existence of the entity on the problem client. (2) possibly the distance limit is simply built into the blip function on remote clients (but why only remote clients?) which would mean the actual entity still persists, at least after initial sync/load on the remote client, and this would also mean the above native would probably not help.

Your experimenation may support the second theory. There could be issues of initial network sync of the entity but obviously those eventually get resolved once you first see the blip on the remote client. I wonder if periodically checking a combination of DoesEntityExist and blip = GetBlipFromEntity(ped) / DoesBlipExist(blip) would track down the source of the problem? Again, this may be low priority in the grand scheme of things.

I will say that if the issue is a hard limit built into the blip function (at least of non-hosting clients), then I’m surprised this not come up much more in the forums. And doesn’t GTA Online allows blips across great distances for multiple players (co-op missions & jobs)? Or maybe that is different for some reason.

only the blip (target disapear)…
lets say its a ped in a car driving away from you…
When he reach a certain distance. If not the host blip will gone… but if i drive in the direction he went and get closer the blip appear …

Oh that is clearer. I’m assuming this means there is (probably) no issue of the underlying entity getting de-synced, just the blip disappearing due to distance.

I admit I haven’t looked at this part of the code. But after the blip first appears on remote clients, is the script continuously re-checking whether it exists? I’m assuming that when the blip disappears at distance that DoesBlipExist would return false. And an attempt to forcibly re-set/re-create the blip would still fail to make it appear due to distance? Otherwise it would be too simple a solution I guess.

So strange.

1 Like

To answer my own question (partially), I snooped around more in the latest version. The check for blForceCheckForBlips is commented out but if that code is running then it is pretty much doing exactly what I asked about above. I guess that settles the matter that you can’t simply re-check and re-create the blip because on a remote client the distance continues to suppresses it?

I found the native SetAiBlipMaxDistance but I guess AI blips are completely different. Why didn’t they give a corresponding native for non-AI blips? This blip distance thing remains a mystery!

I see how you have creatively avoided (so far!) having to mess with entityIDs <-> netIDs with the use of decorators and the entity enumerator – which is so handy. Tricky!

1 Like

Hi Loque,

Yes, it is doing a re-check to re-create blips if necessary, as you saw in the code.
yeah, thats basically the rationale, when NPCs and their decor values come back into ‘reality’ for the client, that code will be ready to re-add blips.

Your ideas for request collision are cool, I wonder if that would make a difference. sixsens is testing more with multiple clients than me and I believe the blips can/will fade out when you move away from them, even with set mission entity as true… . On sixsens server I saw the blip move on a long way away from us in a speeding vehicle and did not fade for me… but we caught up to the NPC eventually as well.

Yeah, I avoided the netid stuff when I saw that there still seemed to be some limitations with what I was trying to do even using that. That the netID can be used, only if the the entity is on the clients machine and you can never assume it will be. I will check more with those network methods too, but will probably wait until another version after this one is finished and more maturity with the tech before getting into that.
The setAIBlip is interesting, I remember not using probably because it did not seem to apply… but again, maybe that might work…

Thanks for your guidance and help too, I would not have gotten the random missions done otherwise.

2 Likes

I was never able to over come the client limitation for NPC/Vehicle blips. I had to create a work around that involved player ped blips instead as there is no distance limitation for rendering on the map. 0.60mi (500 units) was the lucky number when it came to NPC/Vehicle blips. After that it’d disappear and when brought back in range would still remain invisible.

Best of luck in your quest folks - hopefully you will succeed where I failed. :slight_smile:

3 Likes

Have 2.9.2 Alpha…

http://www.mediafire.com/file/psg9hh5lc35a7ec/mrp-missions-2.9.2.zip/file

New stuff:
–Improvements to the mission timer added in 2.9.1. Better GUI for the time, based on sixsens recommendation.
–You can now place up to 2 blips for a mission. Like a start and end for IsDefend missions, to help with players not always seeing enemy blips across the whole map.
–Other fixes
Mission ‘Safehouses’. These will be around the map and will be the place to go to get health, armor and supplies/weaponry/weapon components for a mission at both a time and optional $ cost.
When you use a safehouse it will by default shut down for a period of time, before being able to be accessed again by the player. It will be the big green dot with a roof on it.

Admins can configure what gets given at a safe house per mission, including weapon components. How much using a safehouse costs etc… Players will automatically get health and armor restored as well. Many other configurable options as well.

Random Mission Generator
2.9.1 added random missions anywhere on the map to the random mission generator added in 2.9.0(?)
You can set a mission to use the random mission generator by adding an IsRandom=true, to it. Mission12 has this as an example
This will look at locations on the map you give it. You can override random mission generator settings per mission as well.
If you also add to an IsRandom=true mission, the flag: IsRandomSpawnAnywhere = true, it will spawn a mission anywhere on the map within the range you give it:
i.e. IsRandomSpawnAnywhereCoordRange = {xrange={-3500,4200},yrange={-3700,7700}},
Default is around the whole map and will spawn boats if it finds water.

You can add safehouse information and other attributes to the locations you add to the random generator, similar to the way regular missions are defined. Or you can set a flag that makes random missions use an array of safe house locations you give it, which it will randomly pick from for each random mission.

There is a ton of configurability built in. Not to be confused with Config.RandomMissions, which will randomly pick missions in the mission list, regardless of regular or IsRandom missions.

3 Likes

Wow, you guys are moving on this. I am still curiuos as to the how the cash for completed missions work. It was originally ESX cash or GTA cash?, is it possible to make the pay in dirty_money? so people get them to their inventories after completed missions in vrp? cause some devs run one kind of banking script and others run another. Dirty_money or whatever people call their rewards for bankrobs/storerobs would be pretty cool to have as an option - just my two cents, else great work on the whole mission setup! :smiley:

1 Like

it work both way… gta money or esx money
i can modify the esx version to let you gain dirty money… give me time.

It would be nice to get dirty money in the vRP version :slight_smile: I don’t use esx :frowning:

sorry then i work with esx only

noooh :slight_smile: please make it so dirty_money drop :slight_smile: I’ll try to figure it out then :slight_smile:

Put Fivem and GTA V on my laptop as well to finish working on synch issues so I could have 2 clients to dev with. My desktop runs the server and client (typically host) and connects localhost, my laptop will connect via wifi to the desktop server on the local network as the other client.

sixsens did some testing with the previous build and found some performance issues. So I put in some optimizations that will hopefully fix that.

Interestingly unlike on sixsens server on a previous build, I noticed that BOTH clients for me could see NPC blips from across the map, all the time. Also, there was a problem with decor variables being set for an NPC on a non-host client… they did not get carried to the host player. The other way, setting the decor value on the NPC on the host did get propagated to the non-host client. I had to fix this by calling the server and letting all clients know (particularly the host) to change the decor value on the NPC and that worked. This fixed a problem with hostages that are rescued not being tag as so, so multiple players could rescue the same hostage.

Have 2.9.3 alpha:
https://www.mediafire.com/file/g912qafjfz3ge5h/mrp-missions-2.9.3.zip/file

–Fixes problems and errors with the non-host client, including the decor value problem mentioned above, other tweaks.
–Besides the ‘safehouse’ where you go to get mission equipment for the mission at an optional $ price, there are now safehouse vehicle and boat zones that can spawn, which will be shown as a blue tank and blue boat icons. Players can go there and grab a vehicle for the mission. They will be charged $ similar to using the safe zone, when they hop in a vehicle, which they claim. (prices are shown in the in-game map per blip information). A player can claim only so many vehicles per mission (configurable like all other settings), which can stop griefing. If a player hops in a mission vehicle driver seat already claimed, their ped will immediately get out and the player will see a notice. They can hop in as a passenger of an already claimed vehicle though.
–‘Crackdown’ mode, when turned on, after the player visits the safehouse and pays for the health/armor/equipment for the mission, they will also get ‘cybernetically upgraded’ with superjump, super run and superswim as well.
–Safehouses and safehouse vehicle/boat zones can all be easily turned off as well now.
–For regular missions, from previous builds you can define vehicles without an NPC in it (no ‘id2’ attribute), and it can be used as a player vehicle. Now you can add isboat=true attribute and they will be anchored and not float away.
That all I can think of atm.

EDIT: There was also another odd problem a simple triggerevent being called on the non-host client to display a message. It was being called but no text on screen displayed. I was able to do a workaround for now using chat messages.

The last few things I want to add for alpha are:
– a variant of IsDefend missions. Where instead of players stopping the NPC getting to a marker zone, they must stop the NPCs killing a target.
–IsDefend support added to random mission generator
–Scoreboard that shows total mission cash earned by players over a session, or some type of mission stats. Like cash earned per mission.

I see $ stat as GTA’s score, so the safe zones are ways to sacrifice score to buy something that can potentially give greater score, so perhaps there is some strategy there.

Other than that some extra gravy like before spawning a mission, checking there are no players too close say, as well as performance tweaks.

2 Likes

Great work on these updates.

This is similar to what I tried doing once to troubleshoot sync issues on a test server. The problem I ran into, as I recall, was that Steam/GTA/Fivem (can’t remember which) didn’t seem to like that I was using my one copy of GTA V on two computers at the same time so that I could connect to my server with two clients. Did you not experience this or did you find a workaround?

I must again say I love what you’re doing guys! I’m so sad in a way I can’t figure out how the money could drop for vRP banking wallet money. Cause this is exactly the kind of RP I would love for my server :slight_smile: So I really hope you find a way to put in the code how to get dirty money as rewards just like bankrobbery script :sunny: One could also argue that the payout would be in dirty money as its a covert ops most of the time you’re put on :wink:

On fresh server restart… when get ingame.
Mission1 autostart… and has a timeout…
Mission stop right away and say timeout.

Alone ingame… i let time goes down on mission1
20 seconds left… and mission stop and say time out

3 player online mission 1
my timer… 1m45
2nd player timer 1m10
3rd player timer 2m50

maybe fix it by showing hurryup for last 2 minute instead of timer

also …
mission1…
my timer 5:10
2nd player 5:00
3rd player 5:50

mission stop timeout around 5min left

@PolarisSurvivor: There are 2 places where money is calculated… 2 functions called at mission end in the DONE event… calcCompletionAwards, and another killhostagepenalty or something. You can see where native money is calculated or ESX if is enabled, that might help you.

@sixsens, wierd… I have been specifically testing the timer with 2 clients and did not experience any desyncing of time between server and clients. and a joining client during a mission was synced with time left by the server very well.
Though I guess I’m not surprised it is not working perfectly in all cases.
I could put in a check every minute or maybe every 10 seconds by the server to make sure all clients are synced with server mission time. if a client somehow hits the timeout before the server it should not do anything, but sounds like the server is arriving at time out before.

I bought another copy of gta von my other steam account. I would be using it anyway as an extra account for lan/onine games. You can do it on sanboxie evidently with 1 copy, there is a thread on here about it.