Help with a mission script
-
Well done, and please keep your investigations going!
-
This one uses nomad gunboats:
C:\Program Files\Microsoft Games\Freelancer\DATA\SHIPS\loadouts_special.ini :
i added this to the vanilla ini and also added it to loadouts.ini because im not sure which it uses.
[Loadout]
nickname = Nomad_Gunboat
archetype = no_gunboat
equip = infinite_power
equip = ge_ng_engine_01
equip = sfx_rumble_cruiser
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = no_thruster, HpThruster01
equip = nomad_turret01_mark01, Hp_1_01
equip = nomad_turret01_mark01, Hp_1_02
equip = nomad_turret01_mark01, Hp_1_03
equip = nomad_turret01_mark01, Hp_1_04
equip = nomad_turret01_mark01, Hp_1_05
equip = nomad_turret01_mark01, Hp_1_06
;equip = cloak_nomad_gunboat, HpCloak01C:\Program Files\Microsoft Games\Freelancer\DATA\MISSIONS\M13\npcships.ini:
[NPCShipArch]
nickname = MSN12_Nomad_Gunboat
loadout = Nomad_Gunboat
level = d16
ship_archetype = no_gunboat
pilot = MSN12_Nomad_Gunboat
state_graph = GUNBOAT
npc_class = lawful, GUNBOATC:\Program Files\Microsoft Games\Freelancer\DATA\MISSIONS\M13\m13:
[Mission]
npc_ship_file = missions\m13\npcships.ini[NPC]
nickname = Nomad_Gunboat
npc_ship_arch = MSN12_Nomad_Gunboat
individual_name = 217202
affiliation = fc_n_grp
space_costume = benchmark_male_head, li_male_elite_body, comm_ge_generic1[MsnShip]
nickname = nomad_gunboat1
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat2
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat3
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat4
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat5
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat6
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat7
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[MsnShip]
nickname = nomad_gunboat8
NPC = Nomad_Gunboat
radius = 0
label = nomad_gunboat[Trigger]
nickname = INIT_ALL
system = ANY
InitState = ACTIVE ;Init All
Cnd_True = no_params
Act_ActTrig = INIT_NEWPLAYER
Act_ActTrig = start_init[Trigger]
nickname = INIT_NEWPLAYER
system = ANY
Cnd_BaseEnter = Li01_01_base
Act_ActTrig = welcome_to_missions[Trigger]
nickname = welcome_to_missions
system = Li01
Cnd_SystemEnter = Li01
Act_PopupDialog = 458755, 458761, CLOSE
Act_ActTrig = start_init[Trigger]
nickname = start_init
system = Li01
Cnd_SpaceEnter = no_params
Act_SpawnShip = nomad_gunboat1, nomadcap, -32155, 300, -27259, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat2, nomadcap, -32155, 300, -26059, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat3, nomadcap, -32155, 300, -26459, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat4, nomadcap, -32155, 300, -26859, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat5, nomadcap, -32155, -300, -27259, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat6, nomadcap, -32155, -300, -26059, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat7, nomadcap, -32155, -300, -26459, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomad_gunboat8, nomadcap, -32155, -300, -26859, 0.780800, 0, 0.624700, 0
Act_PlayMusic = none, none, none, music_dangerous_chase
Act_ActTrig = music_timer[Trigger]
nickname = music_timer
system = Li01
Cnd_Timer = 240
Act_ActTrig = end
Act_PopupDialog = 458755, 458761, CLOSE
Act_ChangeState = SUCCEED -
Yep. Ship spawning works nice, thx for tutorial
And it is possible to create dynamic dockable bases and i tnink jumpholes/jumpgates by [msnsolar] sections
One problem if other player joins to the server with the same mission (m13) - count of solars grows, and if any player on mission recconnects - again additional mission scenes - more solars and npcs :))
So storyline npcs are more āstableā than āsolarsā x)
-
Yea, ive had this problem tooā¦ for the moment ive just been deleting the character i used to start the script to try get around this.
I also tried with only starting the script from a /restart command using FLHook or FLShellā¦ but again the server will spawn x2. (my theory is that its because my /restart character has already been connected with the serverā¦ im looking into trying to figure a way to catch the character before it has a nameā¦ (i.e before you name your character, you choose a restart which will start the script(s)).For people running a server i guess that a /restart is ok if you watch the number of ships you want to spawn, as long as the character is deleted afterwards.
Update on cloaking NPC:
Iāve made some hex edits for longer range scanners and draw distances, ship lod ranges too, and it seems to help.
At the moment iām looking into changing the NPC shipās loadouts after they have uncloaked (so they dont have cloaks mounted anymore).EDIT: Funny find!
Bases can use Cloaks too :D. Iāve just spawned the nomad city in New york and made it uncloak -
Sorry about the double post, but i just wanted to show a video teaserā¦
http://www.youtube.com/watch?v=XHHX1mgMJBQ
P.S sorry about the poor quality.
Cheers, Khayman
-
Brilliant!
Bwt for me any ship class and state graph other than fighter/class_fighter not worked - npc stays in place, as i said before, but with fighter/class_fighter and different pilots works well! %)
-
HeIIoween wrote:
Brilliant!Bwt for me any ship class and state graph other than fighter/class_fighter not worked - npc stays in place, as i said before, but with fighter/class_fighter and different pilots works well! %)
i just remembered that i added this to the nomads in the factionprop.ini:
[FactionProps]
affiliation = fc_n_grp
legality = unlawful
nickname_plurality = plural
msg_id_prefix = ignore
jump_preference = jumpgate
npc_ship = MSN13_Nomad_Fighter_Populator
npc_ship = fc_n_no_fighter_d19
mc_costume = mc_fc
firstname_male = 229608, 229608
firstname_female = 229608, 229608
lastname = 229608, 229608
rank_desig = 197140, 197140, 197140, 10, 15
formation_desig = 197808, 197820
formation = fighters, fighter_guild
formation = gunboats, gunboat_wall <ā--------------------dont know if that will help you or not.
Cheers, Khayman
-
Thinking how to prevent npc spamā¦
How would be interpreted f1, alt+f4, other char selection or other server - Cnd_SpaceExit?
-
im looking into trying to figure a way to catch the character before it has a nameā¦
Just a random thought, you might could ask at the ProcyonHookās forums. They have done some thing that you can select your character outfit if you create a new character (even though I am sure they did a lot of coding with it) - Might be worth a try. Actually, aside of Adoxa and a few others they might be able to help you with such a specific thing.
-
Partial mission objects anti-spam. When player reconnects - no more additional copies of solars/npcs.
[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 = li01 InitState = ACTIVE Cnd_True = no_params Act_ActTrig = go_mis [Trigger] nickname = go_mis system = Li01 Cnd_SystemEnter = Li01 Act_ActTrig = mis_yes ; if we have Mission_13 at players file - start_init Act_ActTrig = mis_no ; if we have No_Mission at players file - the_end_end [Trigger] nickname = mis_yes Cnd_HasMsn = yes Act_ActTrig = start_init [Trigger] nickname = mis_no Cnd_HasMsn = no Act_ActTrig = the_end_end [Trigger] nickname = start_init system = li01 Cnd_Timer = 10 Act_RandomPop = true Act_RpopAttClamp = true Act_RpopTLAttacksEnabled = true Act_SpawnSolar = fp7base Act_SpawnSolar = freeport7_space_dome1 Act_SpawnSolar = freeport7_space_dome2 Act_SpawnSolar = freeport7_space_dome3 Act_MarkObj = fp7base, 1 Act_MarkObj = freeport7_space_dome1, 1 Act_MarkObj = freeport7_space_dome2, 1 Act_MarkObj = freeport7_space_dome3, 1 Act_ActTrig = the_end_end [Trigger] nickname = the_end_end system = Li01 Cnd_SystemEnter = Li01 Cnd_Timer = 240 Act_ChangeState = SUCCEED
-
khayman wrote:
The problem with that is:
Act_ChangeState = SUCCEEDwhen this happens your bases will disapear
Copy of base will disappear.
-
Update!
At the end of any *.fl file:... [MissionState] mission_accepted = 1 ; yes we have mission att_clamp = true tradelane_attacks = true scan_clamp = true gcs_clamp = false hostile_clamp = false random_pop = true [BStoryMissionDone] [StoryInfo] ship_bought = false Mission = Mission_13 MissionNum = 0 delta_worth = -1.000000 debug = 0
At /data/missions/m13.ini:
[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 = li01 InitState = ACTIVE Cnd_True = no_params 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_ActTrig = start_init [Trigger] nickname = mis_no Cnd_HasMsn = no 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_MarkObj = freeport7_space_dome1, 1 Act_MarkObj = freeport7_space_dome2, 1 Act_MarkObj = freeport7_space_dome3, 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_SystemEnter = 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 = Li01 Cnd_SystemEnter = Li01 Cnd_Timer = 1 Act_ChangeState = SUCCEED
-
Nice find!!
the server host doesnt have to start a script running!
any client can start a script running that they dont even have.What i mean isā¦.
i had the server setup and ready to run my scripted mission07.
Before i started the script, a player joined the server and it automatically set my mission07 running for me, so i switched off the script.The server still ran the script only once and is still stable!.
so im now looking at starting all players with a āstandard and silent mission scriptāā¦ iāll use it to unlock the usually locked jumpholes and gates, rep changes, dock restrictions and hopefully be able to offer players missions from certain bases etc.
-
I have crazy idea to write special mission player traffic, and replay it after each server restart. Itāll be bot - the mission creator X))
-
At /data/missions/m13.ini:
[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
.
.
.Isnāt it Mission1a? Freeport 7ā¦
-
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