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


#142

i notice since last update but could have be before… i didnt realize till last update cause i had time to test it a lot.

Sorry to disturb with that…

also… in last version
if a mission is start and my partner is there… if he goes offline and get back…
sometimebnpc target blip doesnt appear for him.

On last update… on fresh restart of server… the first to connect… sometime the mission doesnt autostart.

When starting mission1 live… im the only one to see Target NPC blip on map… (sometime)


#143

nice!!!


#144

2.8.5 has a lot of new stuff and hopefully may have some fixes. There is a fix for the missing NPC blips for other/joining players, which I also noticed.

I made changes to the friendly/hostage NPCs, so they just be still, rather that a call to citizen.wait every second. This may have been causing the session problems.
Also, in missions.lua set Config.EnemiesCanSpawnPickups = false to start off with (this is set to true by default)
if you still have session problems, I added a setting in client.lua called blKeepPropsOnGround, which can be turned false, which I would then recommend, this will stop another citizen.wait thread every second (though I recommend keeping this on to start off with). Finally, I would also remove all reward and mission pickups from missions.lua, This would stop more spawns, since 2.8.5 has a newer much better pickups system now that you will probably prefer to use anyway.

Changes in 2.8.5 (beyond what I mentioned above):
–‘UseESX’ flag. Set that to true in client.lua and server.lua, to use ESX money rewards instead of native. (thanks sixsens, I added your code changes).
–Brand new ‘pickups’ system. You can define what weapons/gadgets as well as what weapon components get given to players at the start of every mission as well as what is given to player who conquers the objective, or whoever kills at least one target in an ‘Assassinate’ type mission. A player who falls in either category at mission end will also get full health and armor restored. You can use this system with the ‘old’ pickups system that defines pickups spawns at coordinates, but I would dissuade using the old way. Saying that…
–You can set it so that enemy NPCs that die will spawn weapons/pickups from the spawnableWeapons array you define in client.lua, where their body was at mission end. I recommend setting this off if you are experience session problems.
–When you define vehicles in missions.lua, if you leave out the ‘id2’ value, it will spawn by itself without an NPC driver. You can use these vehicles say as mission vehicles for the players. They will disappear after the mission.
–10 fleshed out proper missions, including different props, NPCs and scenarios. The final mission Mission10 is known to act flaky, if you encounter issues like invisible NPCs, comment it out in missions.lua. Let me know if you encounter anything like that, also floating props or disappearing props.
–NPC Peds in missions.lua have new behavior flags.
–the map will now show enemy, object,target, friendly/hostage blips which will have the $ value for each that you get at mission end.
–various other bug fixes/tweaks that I cant remember :slight_smile:

http://www.mediafire.com/file/dd7i6v240qscugx/mrp-missions-2.8.5.zip/file


#145

didnt download yet… and will be a pleasure to test tonight as its seem cool…
thanks for spending time on those issue.
i appreciate.

Do we still have the option to set mission pickup.
as i understand, there is still
money award by npc kill
Money award for objective
money penality for killing a friendly npc
mission pickup?
New spawn weapon drop by npc if kill (that could be a problem as many use script anti weapon drop from npc) maybe not

can wait to test this out


#146

The new pickup system is defined near the top in missions.lua.
i.e. Config.SpawnMissionPickups = {“WEAPON_CARBINERIFLE”,“WEAPON_COMBATPISTOL”,“WEAPON_KNIFE”,“GADGET_NIGHTVISION”}
_Config.SpawnRewardPickups = {“WEAPON_RPG”,“WEAPON_COMBATPISTOL”,“WEAPON_KNIFE”,“GADGET_PARACHUTE”} _
Config.SpawnMissionComponents = {“COMPONENT_AT_PI_SUPP WEAPON_COMBATPISTOL”} --space between attachment/component and weapon it goes on
Config.SpawnRewardComponents = {“COMPONENT_AT_PI_FLSH WEAPON_COMBATPISTOL”} --space between attachment/component and weapon it goes on

these are not really pickups, but weapons/components/gadgets get given to players at mission start and mission end (reward). So you need to use those hashes instead of pickup hashes. Like other settings, you can define globally and per mission, with mission taking precedence.

So if you wanted to give a combat pistol to the player at mission start, and then reward them with flashlight and suppressor components, if they were the player who completed the objective or killed at least one target, then you would define for that mission:
SpawnMissionPickups = {“WEAPON_COMBATPISTOL”}_
SpawnRewardComponents = {“COMPONENT_AT_PI_FLSH WEAPON_COMBATPISTOL”,“COMPONENT_AT_PI_SUPP WEAPON_COMBATPISTOL”}
-space between attachment/component and weapon it goes on

Removing id2 attribute when defining vehicles is a great way to define mission specific vehicles for players.

NPC drivers will be more aggressive. NPCs are more dangerous, they can see and hear at much greater distance. Friendly/hostage NPCs are more chill now. You can set NPCs to be invincible with invincible=true, which I found helpful with some friendly NPCs. You can have NPCs die when they spawn, with dead=true. You can make NPC peds wander around from start with wander=true, NPC drivers (id2) drive around from start with driving=true. You can make enemy ground vehicle drivers have more chance to evade players with flee=true. Due to quirkness (and probably my own lack of understanding), for NPCs that fly planes, use driving=true,pilot=true
See missions.lua

yes, you can define,
Config.MissionSpaceTime
Config.TargetKillReward
Config.KillReward
Config.FinishedObjectiveReward
Config.HostageKillPenalty
Config.EnemiesCanSpawnPickups
Config.SpawnMissionPickups
Config.SpawnRewardPickups
Config.SpawnMissionComponents
Config.SpawnRewardComponents

per mission as well. I never got around to tweaking the missions with these values. Also, never got around to adding the armor= attributes to all the peds, so you will need to do that.

I also reverted back to hostage kill penalties only affect the player who killed the hosatge, that makes more sense.

MissionSpaceTime I also added, which defines the downtime between the end of the current mission and the next. Sometmes, you may want a quick pause, where you want to have one mission lead off from another in a scenario.
Also… Check out the showNativeMoneyGUI variable in client.lua, it can be turned on to show native money amount on screen, you may be able to tweak that for ESX money.

Just doing some more playtesting… there was a typo somewhere that causes NPCs to go docile… will fix and re-upload… :stuck_out_tongue: and post back here


#147

i have to be honest… its was cool with pickup on floor…
mission pickup was something new and pretty cool to see.
finding stuff that is hide in a mission was nice
and finnaly in last version they work fine and disapear and once pick they were gone…
i was hiding armor and health pickup around the mission… that way we feel as a real game.

dont like to be given stuff at a start of mission…
without pick them up…
same for geting them at end of a mission without any pickup…
i want them to work for getting stuff or at least search…
as i have a rp server… i have to keep it this way.


#148

OK, the fix for the typo just uploaded, NPCs should be fine now
http://www.mediafire.com/file/dd7i6v240qscugx/mrp-missions-2.8.5.zip/file

Had a deep dive into the tech to see if I could get some of my ideas into the missions. I ran into a few obstacles, mostly with network syncing and my lack of experience with the tech. In mission 10, I tried a lot of different ways to make NPCs sync or load themselves properly, like SetEntityAsMissionEntity, changing the resource manifest version (thanks Loque), changing ped type from network player to mission and back etc… there is no doubt a way to solve it, but its beyond my time and effort. I noticed how spawning NPCs that are more than so many meters away from each other and/or player can cause issues. I looked into the corruptsnail code and I see that it is nothiing too different than what I am doing, except making sure that zombie NPCs are spawned within 50 metres of the player.

I wanted to add a mission timeout function as well, but tied into the above, the code really needs to be moved into a proper server managed syncing, before getting any more fancy.
Maybe someone else, like the original author in the future can take this on. This resource should work well, if it is managed, where a mission starts and all players are connected and ready to go, it might not be so stable for a 24/7 server, will let sixsens verify that :slight_smile:
my main aim was to get something I could use for myself in a coordinated network game, like on a LAN, but hopefully others will get some use out of it.

i have to be honest… its was cool with pickup on floor…
mission pickup was something new and pretty cool to see.
finding stuff that is hide in a mission was nice
and finnaly in last version they work fine and disapear and once pick they were gone…
i was hiding armor and health pickup around the mission… that way we feel as a real game.
@sixsens
You dont have to use the new pickup system, you can turn it off and you can still use the old one, or you can have both on at the same time, or just the new one.
the new setting Config.EnemiesCanSpawnPickups will spawn pickups at end of mission on dead peds at mission end.


#149

Wiiiiiiii

Sounds good

As Usual ill test every piece of it… Start testing tonight around 22 o’clock.

There is a lot to test… haha

Shame on me. Didnt know that both pickup system were still on…

you said i let sixsens tweek it for esx… What money thing were you talking about?


#150

I’m not sure how ESX works with the GUI, but the setting showNativeMoneyGUI will turn the display on to show player’s current cash on the screen (Native Money by default). That can be tweaked to be used for ESX money to display.

Oh yeah, there is also a lua file I added in this version called dbunkers_lite.lua. Its used to add teleporters, and I use it for the Humane Labs Mission10. If you use an ipl resource like fivem-ipl, this will provide some well tested and tweaked teleporters and their markers for virtually all the DLC areas. You can go into that file and un-comment the ‘doneblips’ code, which will show blips of all the places you can visit where the teleports are. Again, you need fivem-ipl or the other one loaded for it to work. I’m not sure which ipl resource is the most up to date.


#151

when we get money… at mission end… we see what amount we got…
if i am the guy who get objective or only a killer or didnt participate… we see what weve got.

the only things bad about it…
if i didnt participate on last mission that just end… i still see (you earned 0$) at least its true

Work perfectly on last version for seeing what weve earned… ESX or Not :white_check_mark:


#152

Yeah, I agree, filtering out users not to get messages would be better. That gets back to the resource being re-developed to be more server managed.


#153

im not gonna complain on little thing like this as it can be tweak by the Server Owner much easily…

I did find a way to give a true item from database to a player that get to the objectif and finish it…
but it work with esx.


#154

Ah cool, I remember you asking that. I was not sure how to do it. glad you got it working.


#155

add in client.lua after those 2 TriggerEvents

TriggerServerEvent("sv:two", message)
TriggerServerEvent("sv:two", message2)
TriggerServerEvent("giveitem")              ----Here what i add after sv:two trigger

add in server.lua

RegisterServerEvent('giveitem')
AddEventHandler('giveitem',function(ply)
	
	local _source = source
	local xPlayer  = ESX.GetPlayerFromId(_source)
     xPlayer.addInventoryItem('defib', 1)
	 TriggerClientEvent("esx:showNotification", _source, "Vous recevez un Kit de Soin")
end)

In Esx… For this to work you must have the item in your database
The item will be given once to the player who get the objective.


#156

oh yeah, this is the problem I had with Mission 10… NPCs started doing this:

Alright something I noticed is getting punched by thin air or Zombie peds that haven’t loaded in, they are entirely invisible on your end but are there on someone elses, the collision and everything hasn’t loaded so you can’t see anything from them even a shadow and they end up killing you, any ideas of any Network Syncing Natives I could test to resolve this or would it be my custom skins I got for the Zombies etc?

It seemed to be related to how many were spawned, and how far away. For me I was only 1 client connecting to localhost and got it


#157

about the teleporter addon… i already have my own and everthing is already open no need for teleporter as the door open on much of my ipl.
thanks for letting me know


#158

Cool. I’m a newb with most of this stuff anyway.

Its been a long day :stuck_out_tongue: I had some code commented out due to testing, that got accidentally uploaded in my last update. Its fixed now, that should be the last… http://www.mediafire.com/file/dd7i6v240qscugx/mrp-missions-2.8.5.zip/file


#159

Ok, one final update after some more playtesting… I took out Mission11 which was still in there and did nothing, and finally I realized that to get NPCs to fly properly, to spawn them in the air!
http://www.mediafire.com/file/dd7i6v240qscugx/mrp-missions-2.8.5.zip/file


#160

Ok already start to edit all of it so if i call it right… i just have to erase last mission (11) and im up to date?


#161

Also can i get some little hint about all of those set… Sometime it obvious sometime not:

wander=true
More Agressive?
dead=true
Surely A dead NPC for scenario implementation
driving=true
give me detail please
pilot=true
same
dontsetheading=true
really dont know
friendly=true
This one i get it :wink:
drivespeed=120.0
surely true pilot or driving max speed…
flee=true
The NPC will flee as soon as im around… in car or running?
invincible=true
For friendly NPC that we want to keep alive.

Also can we make a NPC helping us if we give him a weapon?