Reminder: Internet Explorer 6 or below are NOT supported.





There are currently 48 users playing Freelancer on
43 servers. | March. 29, 2023 |
Browsing this Thread:
1 Anonymous Users
Re: Help with a mission script |
||||
---|---|---|---|---|
Quite a regular
![]() ![]() Joined:
2010/11/8 16:38 Group:
Registered Users Senior Members
Posts:
131
![]() |
This thread got me trying out mission scripting. So far I've managed to make NPCs spawn as well as Solars, even a dockable base in SP by experimenting with code here and in the SDK mission files. The main thing that bothered me about this was that the solars and NPCs vanished when I jumped out and returned to the system they were in. Will Solars vanish in MP if a player leaves the system they're in, or do they persist in-game and this is just a problem with SP?
Posted on: 2011/2/7 18:47
|
|||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Just can't stay away
![]() ![]() Joined:
2010/2/2 13:57 Group:
Registered Users $$$ Supporters $$$
Posts:
351
![]() |
Quote:
Will you also tell us what you did? Just making people curious is nasty ![]() ![]()
Posted on: 2011/2/7 20:31
|
|||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/9/11 15:55 From Somewhere at Moscow
Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
1781
![]() |
Khayman nice! Very nice that you did it without any hook
![]()
Posted on: 2011/2/8 6:55
|
|||
Open Sirius Mod | ||||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Just can't stay away
![]() ![]() Joined:
2008/8/18 10:10 Group:
Registered Users FLServer Admins Senior Members
Posts:
260
![]() |
@ Xalrok - Yeah the spawned bases/objects will stay there in multiplayer. (its actually part of the issues were having) After further tests of this, i can report it is NOT as fixed as i thought.. Yes, it does stop the multi-spawning of ships, but there is a downside... When the server starts, the first account (not character) starts the script running.. that account will start the script. Any other players that join the session can see and interact with the spawned stuff, without actually spawning more. If the first account player swaps to another "new character" (on the same MPID) then that new character will again spawn according to the script. Also, if the first account on the server leaves the session, the next player to join the server will start a script. (meaning its again possible to spawn x2 of anything) So, with this method its only ok if you start your server, create a character to start the script, then leave that character on the server. And if you wanted to play on your server from the same machine you would need to use another account MP-id. (i just used another user account on windows xp for tests) My theory is with more work and possibly the mix of flhook starting scripts, it would work much better. As for stopping or killing scripts... i guess that is the next step. Anyways, For anyone that wants to see what i did, can try this out (this is just an example that spawns king near the tradelane outside manhatten) [Mission] mission_title = 1 mission_offer = 1 reward = 4000 npc_ship_file = missions\m01a\npcships.ini [NPC] nickname = ak_m01a npc_ship_arch = MSN12_King voice = king space_costume = li_scrote_head, li_scrote_body, comm_li_hatcher affiliation = fc_or_grp individual_name = 217204 [MsnShip] nickname = khayman NPC = ak_m01a radius = 0 label = Khayman label = allied [ObjList] system = ALL nickname = khayman_form_on_trent SetPriority = ALWAYS_EXECUTE Delay = 19 Follow = Player, 3000, -20, 0, 40 [Trigger] nickname = lets_start system = Li01 InitState = ACTIVE Cnd_CharSelect = true; <- WHEN YOU SELECT CHAR Act_ForceLand = Li01_01_Base Cnd_BaseEnter = Li01_01_Base Cnd_SpaceExit = no_params Act_NNIds = 30000, HISTORY Act_NNIds = 30005, HISTORY ;Act_SetShipAndLoadout = ge_fighter6, khayman Act_ActTrig = take_off_popup_open [Trigger] nickname = take_off_popup_open Cnd_LaunchComplete = Player ;Act_RPopTLAttacksEnabled = false Act_Popupdialog = 60253, 21925, CLOSE Act_ActTrig = take_off_popup_close Act_NNIds = 30000, HISTORY Act_NNIds = 30005, HISTORY [Trigger] nickname = take_off_popup_close Cnd_PopUpDialog = CLOSE system = Li01 Act_SpawnShip = khayman, khayman_form_on_trent, -34321, 0, -25925, 0.780800, 0, 0.624700, 0 Act_Invulnerable = khayman, true, false, 0.950000 Act_SetVibe = khayman, Player, REP_FRIEND_THRESHOLD Act_SetVibe = Player, khayman, REP_FRIEND_THRESHOLD Act_MarkObj = khayman, 1 Act_DeactTrig = lets_start; <- TURN OFF INITIAL TRIGGER
Posted on: 2011/2/8 7:37
|
|||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/9/11 15:55 From Somewhere at Moscow
Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
1781
![]() |
Checked FLHook 1.6.7 build 23 just for fun.
So, only one change is needed: Code: Freelancer\EXE\freelancer.ini : Then run from FLHook console: Code: mission <playernickname> or if you are admin from game chat: Code: .mission <playernickname> I do not know works for one player or group - so check
Posted on: 2015/4/7 5:24
|
|||
Open Sirius Mod | ||||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Starport Admin
![]() ![]() Joined:
2008/2/26 20:36 From Germany
Group:
Webmasters Registered Users
Posts:
1791
![]() |
I dont think you need to add the story launcher.
Also, check this if you want to debug missions (I think Flak's code is based on this): http://forge.the-starport.net/project ... /plugins/dynamic_missions
Posted on: 2015/4/7 13:41
|
|||
aka chaosgrid http://www.freelancerserver.de https://www.moddb.com/mods/fwtow |
||||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/9/11 15:55 From Somewhere at Moscow
Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
1781
![]() |
Ah thx, i saw...Will check. I remember that you shared by mission scripting knowledge with KJ
![]()
Posted on: 2015/4/7 14:34
|
|||
Open Sirius Mod | ||||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/9/11 15:55 From Somewhere at Moscow
Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
1781
![]() |
#26 fixed variant. Works even better
![]() Code:
Popup dialog = motd
Posted on: 2019/3/16 23:38
|
|||
Open Sirius Mod | ||||
|
Re: Help with a mission script |
||||
---|---|---|---|---|
Home away from home
![]() ![]() Joined:
2008/9/11 15:55 From Somewhere at Moscow
Group:
Registered Users FLServer Admins $$$ Supporters $$$ Senior Members
Posts:
1781
![]() |
Not bad server-side idea after 10y still...
![]() Quote: mpnewcharacter.fl Code:
Posted on: 1/23 3:14
|
|||
Open Sirius Mod | ||||
|