Help with a mission script
-
No, it is not mission m01a, it is peace from mission m01a with other pilot, loadout, base and faction
-
To stop the multiple spawning of all objects, base’s, npc etc i have two scripts running.
Each new player that joins the server starts on a basic script.
I have a character on a seperate i.d that has the second script info (which spawns everything then locks manhattans dock after launch). In addition to this, i can use this character to begin other missions running by landing on other bases each time locking the dock.
When a server restart happens i use the character and .beam to manhattan where i can start that script again.Seems to be working so far!
-
Locking the dock… …Start that script again…
Well that sucks! If you want people to play on this server you need either unlock the bases and reset the scripts with the server, or lock the bases and don’t restart the scripts (Making it remember what each player did), unless it will drive people crazy redoing the same missions in the same order every day again and again and again… Just thinking of it makes me hate this server, and it doesn’t exist yet.
-
The bases only become locked to my character starting scripts… its so i dont forget that a base starts a script and i land by mistake.
All other players can still land anywhere and the script they are using unlocks jumpholes and changes their starting rep (once)…
When they encounter a character in a base (can be one of many) they are offered missions and rewarded via pop up messages!Hope that helps clear things up.
Cheers, Khayman
-
Intresting:
Cnd_InZone = false, Player, OBJECT_ZONE
Any Zone? Only Player or Object allowed?
Other parameters are:
EXCLUSION_ZONE
NEBULA_ZONE
DUST_ZONE -
Additional Condition (number 43):
Cnd_RumorHeard - not listed in Rasauul’s Storyline Bible
-
Act_SetShipAndLoadout ```This not works! :cry: Adoxa maybe you know how force it to work?
-
Yep, i mean in mp.
Strange, but if i do simple:
... [Trigger] nickname = tr_initialize_init system = li01 InitState = ACTIVE Cnd_True = no_params ;Act_ChangeState = SUCCEED Act_ActTrig = go_mis [Trigger] nickname = go_mis system = Li01 Cnd_Timer = 1 Act_SetShipAndLoadout = none, none
or
... [Trigger] nickname = tr_initialize_init system = li01 InitState = ACTIVE Cnd_True = no_params ;Act_ChangeState = SUCCEED Act_ActTrig = go_mis [Trigger] nickname = go_mis system = Li01 Cnd_Timer = 1 Act_SetShipAndLoadout = no_fighter, no_fighter
Nothing going on, hmhmhmhm….
-
Thx Adoxa!
It works, simply need to relogin -
Did you guys found a solution against multiactivating of the missions? Every login the .fl file grows with new [StoryInfo] parameters.
How exactly do you activate spawning just by one player? I tried a lot in the past 5 hours, but every of my char will spawn objects or no char spawns anything.A solution would be to create a small extern program to remove every [StoryInfo] entry except one in every fl file, so no multiplicating is possible.
By the way, if you set Mission_13 to be No_Mission, it does’nt activate anything.
[StoryInfo]
ship_bought = false
Mission = Mission_13
MissionNum = 41
delta_worth = -1.000000
debug = 0 -
I have the same problem with this multiactivating.
-
try #26 - this must switch mission to no_mission
-
@ skotty - I use FLHook plugin version and i make a restart.fl with this at the bottom:
[StoryInfo]
ship_bought = false
Mission = Mission_13
MissionNum = 0
delta_worth = -1.000000
debug = 0or
i use mpnewcharacter.fl once at the start of a server restart and delete
[StoryInfo]
ship_bought = false
Mission = Mission_13
MissionNum = 41
delta_worth = -1.000000
debug = 0before another script can start.
-
Just to give a quick update:
I think ive stopped the multi-spawning of npcs and bases using mission code only (no flhook required).
I’ll do some more tests, but so far is so good!
If all goes well i will post the code, if people want it.
Testing the server without flhook, flshell or anything of the like, just plain old freelancer (with the 1.1 patch).p.s - with this method it is easy to spawn ships, bases etc but it wont act like some kind of single player mission in multi-player.
I guess its main use would be to add objects, bases, npcs etc without a client needing a mod. -
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?
-
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 :-x
-
Khayman nice! Very nice that you did it without any hook
-
@ 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