Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
43 user(s) are online (14 user(s) are browsing Forum)

Members: 0
Guests: 43

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +5€

Current balance: -85€
(last updated 11/2019)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 19 users playing Freelancer on 40 servers.
December. 6, 2019

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

« 1 2 3 (4)


Re: Help with a mission script
Quite a regular
Joined:
2010/11/8 16:38
Group:
Registered Users
Senior Members
Posts: 131
Offline
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
Top
Re: Help with a mission script
Just can't stay away
Joined:
2010/2/2 13:57
Group:
Registered Users
$$$ Supporters $$$
Posts: 351
Offline
Quote:

khayman wrote:
I think ive stopped the multi-spawning of npcs and bases using mission code only (no flhook required).

Will you also tell us what you did? Just making people curious is nasty

Posted on: 2011/2/7 20:31
Top
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: 1754
Offline
Khayman nice! Very nice that you did it without any hook

Posted on: 2011/2/8 6:55
Open Sirius Mod
Top
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: 258
Offline

@ 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
Top
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: 1754
Offline
Checked FLHook 1.6.7 build 23 just for fun.

So, only one change is needed:

Code:
Freelancer\EXE\freelancer.ini :
[Initial MP DLLs]
path = ..\dlls\bin
DLL = Content.dll, GameSupport, HIGHEST
; required to operate gates and docks
; required to create ships in space
DLL = Content.dll, SpaceSupport, NORMAL 
DLL = Content.dll, BaseSupport, NORMAL
DLL = Content.dll, StoryLauncher, BELOW_NORMAL ;story/static missions <------------- added this
DLL = Content.dll, SpacePop, LOWEST ;populator
DLL = Content.dll, AISandbox, BELOW_NORMAL
DLL = Content.dll, TestAutomation, BELOW_NORMAL
DLL = Content.dll, BasePop, LOWEST


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
Top
Re: Help with a mission script
Starport Admin
Joined:
2008/2/26 20:36
From Germany
Group:
Webmasters
Registered Users
Posts: 1777
Offline
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
https://www.freelancerserver.de
https://www.moddb.com/mods/fwtow
Top
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: 1754
Offline
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
Top
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: 1754
Offline
#26 fixed variant. Works even better

Code:

[Mission]
npc_ship_file = missions\npcships.ini

[MsnSolar]
nickname = fp7base
faction = li_p_grp
reputation = li_p_grp
system = LI01
base=intro1_base
position = 3600, 1000, -21000
orientation = 1, 0, 0, 0
archetype = freeport7
loadout = freeport7
label = lbl_fp7base
radius = 0
pilot = setscene_nomad_fighter_FP7
random_name = true

[MsnSolar]
nickname = freeport7_space_dome1
faction = li_p_grp
reputation = li_p_grp
system = LI01
position = 4118, 1000, -21000
orientation = 0, 0, 1, 0
archetype = freeport7_space_dome
label = lbl_fp7base
radius = 0
pilot = setscene_nomad_fighter_FP7
random_name = true
loadout = space_dome_co_01
parent = fp7base

[MsnSolar]
nickname = freeport7_space_dome2
faction = li_p_grp
reputation = li_p_grp
system = LI01
position = 3080, 1000, -21000
orientation = 1, 0, 0, 0
archetype = freeport7_space_dome
label = lbl_fp7base
radius = 0
pilot = setscene_nomad_fighter_FP7
random_name = true
loadout = space_dome_co_01
parent = fp7base

[MsnSolar]
nickname = freeport7_space_dome3
faction = li_p_grp
reputation = li_p_grp
system = LI01
position = 3600, 1000, -20609
orientation = 1, 0, 1, 0
archetype = freeport7_space_dome
label = lbl_fp7base
radius = 0
pilot = setscene_nomad_fighter_FP7
random_name = true
loadout = space_dome_co_01
parent = fp7base

[Trigger]
nickname = tr_initialize_init
system = ANY
InitState = ACTIVE
Cnd_True = no_params
Act_Popupdialog = 999999, 999998, CLOSE
Act_SetVibe = Player, Player, REP_FRIEND_MAXIMUM
Act_MarkObj = Player, 1
Act_LockDock = Player, Li01_to_Li02, unlock
Act_LockDock = Player, Li02_to_Li01, unlock
Act_LockDock = Player, Li03_to_Li01, unlock
Act_LockDock = Player, Li01_to_Li03, unlock
Act_LockDock = Player, Li01_to_Li04, unlock
Act_LockDock = Player, Li04_to_Li01, unlock
Act_LockDock = Player, Li01_to_Li03_hole, unlock
Act_LockDock = Player, Li01_to_Li04_hole, unlock
Act_LockDock = Player, Li02_to_Li04_hole, unlock
Act_LockDock = Player, Li03_to_Li01_hole, unlock
Act_LockDock = Player, Li04_to_Li01_hole, unlock
Act_LockDock = Player, Li04_to_Li02_hole, unlock
Act_LockDock = Player, Li01_08, unlock
Act_LockDock = Player, Li01_09, unlock
Act_LockDock = Player, Dock_Ring_Li01_01, unlock
Act_LockDock = Player, Li01_09, unlock
Act_LockDock = Player, Iw03_02, unlock
Act_LockDock = Player, Br02_to_Iw03_hole, unlock
Act_LockDock = Player, Iw03_to_Br02_hole, unlock
Act_LockDock = Player, Iw03_to_Li02, unlock
Act_LockDock = Player, Li02_to_Iw03, unlock
Act_LockDock = Player, Iw03_to_Br04_hole, unlock
Act_LockDock = Player, Br04_to_Iw03_hole, unlock
Act_LockDock = Player, Li04_to_Iw01, unlock
Act_LockDock = Player, Li04_to_Iw02, unlock
Act_LockDock = Player, Li04_to_Iw02_hole, unlock
Act_LockDock = Player, Li03_to_Iw05, unlock
Act_LockDock = Player, Li03_to_Iw05_hole, unlock
Act_LockDock = Player, Li03_to_Iw06, unlock
Act_LockDock = Player, Li03_to_Iw06_hole, unlock
Act_LockDock = Player, Li02_to_Iw04, unlock
Act_LockDock = Player, Li02_to_Iw04_hole, unlock
Act_LockDock = Player, Iw01_to_Li04, unlock
Act_LockDock = Player, Iw02_to_Li04, unlock
Act_LockDock = Player, Iw02_to_Li04_hole, unlock
Act_LockDock = Player, Iw04_to_Li02, unlock
Act_LockDock = Player, Iw04_to_Li02_hole, unlock
Act_LockDock = Player, Iw05_to_Li03, unlock
Act_LockDock = Player, Iw05_to_Li03_hole, unlock
Act_LockDock = Player, Iw06_to_Li03, unlock
Act_LockDock = Player, Iw06_to_Li03_hole, unlock
Act_LockDock = Player, Br03_to_Bw01_hole, unlock
Act_LockDock = Player, Bw01_to_Br03_hole, unlock
Act_LockDock = Player, Bw01_to_Br03, unlock
Act_LockDock = Player, Br04_to_Br03_hole, unlock
Act_LockDock = Player, Br03_to_Br04_hole, unlock
Act_LockDock = Player, Br04_trade_lane_ring_4, unlock
Act_LockDock = Player, bw01_01_dock_ring_1, unlock
Act_LockDock = Player, osiris, unlock
Act_LockDock = Player, Ku06_to_Bw05_hole, unlock
Act_LockDock = Player, Bw05_to_Ku06_hole, unlock
Act_LockDock = Player, Bw05_to_Rh01_hole, unlock
Act_LockDock = Player, Rh01_to_Bw05_hole, unlock
Act_LockDock = Player, Rh01_to_Rh04, unlock
Act_LockDock = Player, Rh04_to_Rh01, unlock
Act_LockDock = Player, Rh04_to_Rh05_hole, unlock
Act_LockDock = Player, Rh04_to_Bw05_hole, unlock
Act_LockDock = Player, Rh04_to_Bw05, unlock
Act_LockDock = Player, Rh02_to_Rh04_holeb, unlock
Act_LockDock = Player, Rh04_to_Rh02_holeb, unlock
Act_LockDock = Player, Rh04_01_dock_ring, unlock
Act_LockDock = Player, Rh04_01, unlock
Act_LockDock = Player, Rh04_03, unlock
Act_LockDock = Player, Rh04_02, unlock
Act_LockDock = Player, Rh04_05, unlock
Act_LockDock = Player, Rh04_05, unlock
Act_LockDock = Player, Li01_to_Li05, unlock
Act_LockDock = Player, Li05_prison_1, unlock
Act_LockDock = Player, Li05_to_Li01, unlock
Act_LockDock = Player, Li01_to_Li04_hole, unlock
Act_LockDock = Player, Li04_to_Li01_hole, unlock
Act_LockDock = Player, Li01_12, unlock
Act_LockDock = Player, Li01a_to_Li01b_hole, unlock
Act_LockDock = Player, Li01b_to_Li01a_hole, unlock
Act_LockDock = Player, St02c_core_exit, unlock
Act_LockDock = Player, St02_lair_exit, unlock
Act_LockDock = Player, St02_to_St01_hole, unlock
Act_LockDock = Player, St01_dock_ring_1, unlock
Act_LockDock = Player, St01_to_St03_hole, unlock
Act_LockDock = Player, Ku06_to_Ku07_hole, unlock
Act_LockDock = Player, Ku01, unlock
Act_LockDock = Player, Ku01_to_Ku04_hole, unlock
Act_LockDock = Player, Ku04_to_Ku06_hole, unlock
Act_LockDock = Player, St01_to_St02_hole, unlock
Act_LockDock = Player, St01_to_St03_hole, unlock
Act_LockDock = Player, St02_to_St01_hole, unlock
Act_LockDock = Player, St03_to_St01_hole, unlock
Act_LockDock = Player, Li05_to_Li01, unlock
Act_LockDock = Player, Li01_to_Li05, unlock
Act_LockDock = Player, Ku06_to_Ku07_hole, unlock
Act_LockDock = Player, Ku07_to_Ku05_hole, unlock
Act_LockDock = Player, Ku05_to_Ku07_hole, unlock
Act_LockDock = Player, Iw03_to_Br04_hole, unlock
Act_LockDock = Player, Br04_to_Iw03_hole, unlock
Act_LockDock = Player, Bw01_to_br03_hole, unlock
Act_LockDock = Player, Br03_to_br04_hole, unlock
Act_LockDock = Player, Br03_to_bw01_hole, unlock
Act_LockDock = Player, Br04_to_br03_hole, unlock
Act_LockDock = Player, Br04_to_br05_hole, unlock
Act_LockDock = Player, Br05_to_br04_hole, unlock
Act_LockDock = Player, Bw05_to_Ku06_hole, unlock
Act_LockDock = Player, Bw05_to_rh01_hole, unlock
Act_LockDock = Player, Ku06_to_bw05_hole, unlock
Act_LockDock = Player, Rh01_to_Bw05_hole, unlock
Act_LockDock = Player, Rh02_to_Rh04_holeb, unlock
Act_LockDock = Player, Rh04_to_Rh02_holeb, unlock
Act_LockDock = Player, Li01a_to_Li01b_hole, unlock
Act_LockDock = Player, Li01b_to_Li01a_hole, unlock
Act_LockDock = Player, Br05_to_br04_hole, unlock
Act_LockDock = Player, Br04_to_br05_hole, unlock
Act_LockDock = Player, Br03_to_br04_hole, unlock
Act_LockDock = Player, Br04_to_br03_hole, unlock
Act_LockDock = Player, Bw01_to_br03_hole, unlock
Act_LockDock = Player, Br03_to_bw01_hole, unlock
Act_LockDock = Player, Ku06_to_bw05_hole, unlock
Act_LockDock = Player, Bw05_to_Ku06_hole, unlock
Act_LockDock = Player, Bw05_to_rh01_hole, unlock
Act_LockDock = Player, Rh01_to_Bw05_hole, unlock
Act_LockDock = Player, Rh04_to_Rh02_holeb, unlock
Act_LockDock = Player, Rh02_to_Rh04_holeb, unlock
Act_LockDock = Player, Li01_to_Li05, unlock
Act_LockDock = Player, Li05_to_Li01, unlock
Act_LockDock = Player, Li01a_to_Li01b_hole, unlock
Act_LockDock = Player, Li01b_to_Li01a_hole, unlock
Act_LockDock = Player, Ku05_to_Ku07_hole, unlock
Act_LockDock = Player, Ku07_to_Ku05_hole, unlock
Act_LockDock = Player, Ku06_to_Ku07_hole, unlock
Act_LockDock = Player, Ku07_to_Ku06_hole, unlock
Act_LockDock = Player, St01_to_St02_hole, unlock
Act_LockDock = Player, St02_to_St01_hole, unlock
Act_LockDock = Player, St01_to_St03_hole, unlock
Act_LockDock = Player, St03_to_St01_hole, unlock
Act_LockDock = Player, Hi02_to_Ew06_hole, unlock
Act_LockDock = Player, Hi01_to_Ew05_hole, unlock
Act_LockDock = Player, No01_to_Li17_hole, unlock
Act_ActTrig = go_mis

[Trigger]
nickname = go_mis
system = Li01
Cnd_SystemEnter = Li01
Act_ActTrig = mis_yes
Act_ActTrig = mis_no

[Trigger]
nickname = mis_yes
Cnd_HasMsn = yes
Act_SetVibe = Player, Player, REP_FRIEND_MAXIMUM
Act_MarkObj = Player, 1
Act_ActTrig = start_init

[Trigger]
nickname = mis_no
Cnd_HasMsn = no
Act_SetVibe = Player, Player, REP_FRIEND_MAXIMUM
Act_MarkObj = Player, 1
Act_SetVibe = fp7base, Player, REP_HOSTILE_THRESHOLD
Act_SetVibe = freeport7_space_dome1, Player, REP_HOSTILE_THRESHOLD
Act_SetVibe = freeport7_space_dome2, Player, REP_HOSTILE_THRESHOLD
Act_SetVibe = freeport7_space_dome3, Player, REP_HOSTILE_THRESHOLD
Act_ActTrig = the_end_end

[Trigger]
nickname = start_init
system = li01
Cnd_Timer = 10
Act_RandomPop = true
Act_RpopAttClamp = true
Act_RpopTLAttacksEnabled = true
Act_Destroy = freeport7_space_dome1, SILENT ; kill copies of solars (detroy root must be in fuse)
Act_Destroy = freeport7_space_dome2, SILENT ; -//-
Act_Destroy = freeport7_space_dome3, SILENT ; -//-
Act_Destroy = fp7base, SILENT ; -//-
Act_SpawnSolar = fp7base
Act_SpawnSolar = freeport7_space_dome1
Act_SpawnSolar = freeport7_space_dome2
Act_SpawnSolar = freeport7_space_dome3
Act_MarkObj = fp7base, 1
Act_SetVibe = fp7base, Player, REP_HOSTILE_THRESHOLD
Act_SetVibe = freeport7_space_dome1, Player, REP_HOSTILE_THRESHOLD
Act_SetVibe = freeport7_space_dome2, Player, REP_HOSTILE_THRESHOLD
Act_SetVibe = freeport7_space_dome3, Player, REP_HOSTILE_THRESHOLD
Act_ActTrig = the_end

[Trigger]
nickname = the_end
system = Li01
Cnd_Destroyed = fp7base, 1, EXPLODE
Cnd_Destroyed = freeport7_space_dome1, 1, EXPLODE
Cnd_Destroyed = freeport7_space_dome2, 1, EXPLODE
Cnd_Destroyed = freeport7_space_dome3, 1, EXPLODE
Act_ActTrig = the_end_end

[Trigger]
nickname = the_end_end
system = ANY
Cnd_Timer = 1
Act_ChangeState = SUCCEED



Popup dialog = motd

Posted on: 3/16 23:38
Open Sirius Mod
Top
« 1 2 3 (4)