Help with a mission script
-
Nice work. Keep going!
-
A quick update:
So ive been testing various things in order for this to work.
I’ve found that if i increase the NPC ship lod ranges it helps, so in theory if i extended scanner range and told the NPC to stay within a smaller radius of the player it should help.This is because i realised that once uncloaked ships left my scanner range and disapeared they would still fly back but they were cloaked again!. (i tried to set a timer so they would uncloak again with no joy)
For MP use i think its probably better to scrap the cloaking devices for NPC if i cant get around this issue. Because if a player wasnt within range of the NPC when they uncloaked, my theory is that they would never see them.
I will keep trying new things to help, but im doubtfull i’ll find a way for cloaking / Uncloaking NPC in MP. (unless people want players complaing about how they were blown up by a cloaked ship)Same as before, any idea’s, thoughts or suggestions are welcome
Cheers, Khayman
p.s: Ive tested this using FLHook now and it seems to work just as good if not better than FLShell. (which i use for a /restart command for starting the missions scripts)
-
@khayman Dirty saying, if i take char file from SP and use it as restart… MP Mission scripting works?
-
@ Gisteron - Yeah, they can still shoot weapons as if they are not cloaked (ive got a feeling that flhook stops players from doing it).
@ HeIIoween - No, for MP scripting to run i added this:
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, LOWESTFreelancer\EXE\MPNewcharacter:
or in my case i used a /restart file you find in flhook and added this at the bottom:[StoryInfo]
ship_bought = false
Mission = Mission_13
MissionNum = 0
delta_worth = -1.000000
debug = 0The reason i made a /restart to start this, was so i could hide the restart (and the mission script) from every player that joins the server, reloads, dies etc starting their own script running. Plus if i make more scripts i can just make a new /restart file to start them.
And then i customised M13 file here:
Freelancer\DATA\MISSIONS\M13
I recommend anyone wanting to try this, just try and start a script from scratch. And prepare yourself for lots of headaches!.
Ive found creating solars such as base’s and objects etc fairly easy (in theory a few hex edits would be better for allowing objects to exist at long ranges so that players not running the script will see these objects too… but thats just a theory).
Creating things like a battleship fleet invasions can be done easily too.
It’s just these damned cloaking devices… :SHEADS UP!
I always delete the character i used to start a script running, this has cut down my headaches from 99 per hour to a tiny 65 per hour!… Good luck!Cheers, Khayman
-
Thx for help, i mean it by default under [Initial MP DLLs] DLL = Content.dll, StoryLauncher, BELOW_NORMAL ;story/static missions <–-----------
-
Intresting thing - dialog…
When player joins, dialog popups - choose your faction - buttons:
- blahblahfaction1
- blahblahfaction2
… - blahblahfactionN
- no thanks, i like this one
When player clicks button - aporpriate restart is activated
“no thanks, i like this one” button left player status as is
So it is for simplify process of faction choosing like 1. Writing to the consle /dots or /showrestarts
2. Looking restart name and trying to type it properly
3. Writing /restart<template></template>
-
There is a little info about this as well under this topic: http://the-starport.net/modules/newbb/viewtopic.php?topic_id=1859&start=0
I dunno what use it is, but the pros and cons of launching missions via the [StoryInfo] block in a charfile are discussed there to an extent.
-
Creating things like a battleship fleet invasions can be done easily too.
Tryed to create small fleet invasion (1 ship :), but stone flower still impossible…
[Mission]
npc_ship_file = missions\npcships.ini[NPC]
nickname = nofi1
affiliation = fc_freelancer
npc_ship_arch = MSN13_Nomad_Fighter_Populator
individual_name = 1[MsnShip]
nickname = ship1
NPC = nofi1
label = nonpirates
random_name = true
position = -35763, 500, -25450[ObjList]
nickname = avoidance_on
system = Li01
Avoidance = true
BreakFormation = no_params
SetPriority = ALWAYS_EXECUTE
GotoShip = goto_cruise, Player, 800, true, -1
follow = Player, 1500, -100, 50, -200[Trigger]
nickname = bse_initialize_init_li01
InitState = Active
Cnd_True = no_params
system = Li01
Act_ForceLand = Li01_01_Base
Cnd_BaseEnter = Li01_01_Base
Cnd_SpaceExit = no_params
Act_GCSClamp = false
Act_ActTrig = start_set_formation[Trigger]
nickname = start_set_formation
system = Li01
Cnd_Timer = 4
Act_SpawnShip = ship1
Act_SetVibe = ship1, Player, REP_FRIEND_THRESHOLD
Act_ActTrig = Frm_select[Trigger]
nickname = Frm_select
system = li01
Cnd_Timer = 1
Act_ActTrig = set_formation_01[Trigger]
nickname = set_formation_01
system = li01
Cnd_Timer = 0.1
Act_GiveObjList = ship1, avoidance_on
Act_EnableManeuver = formation, trueNommie stays like station and does not moving
Should i use FollowOp “patch”? -
@ foxUnit01- Cheers, Any and all help is great
@ currican- I doubt thats the problem as i can watch them uncloak and sit, fight etc forever, untill they leave my scanner range. I also mounted the Cloaks on CloakHp on their ships.
On second thoughts!
I will look into it because i found these scripts work in ways you wouldnt expect and anything is possible at this stage.
And one thing i have learned trying these, is to not take anything for granted!. Thanks for your thoughts@ HeIIoween- I’m not 100% sure where your problem is. I’ve only just started building these things myself and found that throwing away complete hours or work became a habbit
And its only pure determination driving me on.Although you could make sure the pilot of your NPC ship is using, does infact fly around and not sit like a base. (just incase)
I’ve been having a few problems with the nomad capitals myself and had to give them new pilots.
Also i usually put a radius on the ships, so maybe try this (again no idea if it will work):[NPC]
nickname = nofi1
affiliation = fc_freelancer
npc_ship_arch = MSN13_Nomad_Fighter_Populator
individual_name = 1[MsnShip]
nickname = ship1
NPC = nofi1
radius = 0 <–-------------------
label = nonpirates
random_name = true
position = -35763, 500, -25450In the mean time i will build a quick example of a small script and post it.
Good luck!Cheers, khayman
-
Ok, This is far from perfect, but here goes:
C:\Program Files\Microsoft Games\Freelancer\DATA\MISSIONS\M13\npcships.ini :
i made and empty ini named this and put this in there…
[NPCShipArch]
nickname = khayman_q
loadout = King_No_Cloak
level = d13
ship_archetype = or_elite
pilot = MSN13_King
state_graph = FIGHTER
npc_class = lawful, elite_fighter[NPCShipArch]
nickname = MSN01a_Liberty_Cruiser
loadout = MSN01a_Liberty_Cruiser
level = d10
ship_archetype = li_cruiser
pilot = MSN01a_Liberty_Cruiser
state_graph = cruiser
npc_class = lawful, cruiserC:\Program Files\Microsoft Games\Freelancer\DATA\MISSIONS\M13\m13.ini :
Same as before started with an empty .ini
[Mission]
npc_ship_file = missions\m13\npcships.ini[NPC]
nickname = khayman_q
npc_ship_arch = khayman_q
voice = quintaine
space_costume = li_scrote_head, li_scrote_body, comm_li_hatcher
affiliation = fc_uk_grp
individual_name = 197512[NPC]
nickname = nomadcap
npc_ship_arch = MSN01a_Liberty_Cruiser
space_costume = li_scrote_head, li_scrote_body, comm_li_hatcher
individual_name = 237031
affiliation = fc_f_grp[MsnShip]
nickname = nomadcap
NPC = nomadcap
label = nomadcap
label = nomadcapother[MsnShip]
nickname = nomadcap1
NPC = nomadcap
label = nomadcap
label = nomadcapother[MsnShip]
nickname = nomadcap2
NPC = nomadcap
label = nomadcap
label = nomadcapother[MsnShip]
nickname = nomadcap3
NPC = nomadcap
label = nomadcap
label = nomadcapother[MsnShip]
nickname = nomadcap4
NPC = nomadcap
label = nomadcap
label = nomadcapother[MsnShip]
nickname = nomadcap5
NPC = nomadcap
label = nomadcap
label = nomadcapother[MsnShip]
nickname = khayman_q
NPC = khayman_q
radius = 0
label = khayman_q[MsnShip]
nickname = khayman_q1
NPC = khayman_q
radius = 0
label = khayman_q[MsnShip]
nickname = khayman_q2
NPC = khayman_q
radius = 0
label = khayman_q[MsnShip]
nickname = khayman_q3
NPC = khayman_q
radius = 0
label = khayman_q[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 = khayman_q, khayman_q_form_on_trent, -33355, 0, -25859, 90.780900, 0, 0.624700, 0
Act_SpawnShip = khayman_q1, khayman_q_form_on_trent, -33255, 0, -25859, 90.780900, 0, 0.624700, 0
Act_SpawnShip = khayman_q2, khayman_q_form_on_trent, -33155, 0, -25859, 90.780900, 0, 0.624700, 0
Act_SpawnShip = khayman_q3, khayman_q_form_on_trent, -33455, 0, -25859, 90.780900, 0, 0.624700, 0
Act_SpawnShip = nomadcap, nomadcap, -32155, 300, -27259, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap1, nomadcap, -32155, 300, -26059, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap2, nomadcap, -32155, 300, -26459, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap3, nomadcap, -32155, 300, -26859, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap4, nomadcap, -32155, -300, -27259, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap5, nomadcap, -32155, -300, -26859, 0.780800, 0, 0.624700, 0
Act_ActTrig = test_fight[Trigger]
nickname = test_fight
system = Li01
Cnd_Timer = 20
Act_SetVibeLblToShip = khayman_q, nomadcap, REP_HOSTILE_THRESHOLD
Act_SetVibeShiptoLbl = nomadcap, khayman_q, REP_HOSTILE_THRESHOLD
Act_ActTrig = spawn2[Trigger]
nickname = spawn2
system = Li01
Cnd_Timer = 20
Act_SpawnShip = nomadcap, nomadcap, -32155, 300, -27259, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap1, nomadcap, -32155, 300, -26059, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap2, nomadcap, -32155, 300, -26459, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap3, nomadcap, -32155, 300, -26859, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap4, nomadcap, -32155, -300, -27259, 0.780800, 0, 0.624700, 0
Act_SpawnShip = nomadcap5, nomadcap, -32155, -300, -26859, 0.780800, 0, 0.624700, 0
Act_ActTrig = end[Trigger]
nickname = end
system = Li01
Cnd_Timer = 5
Act_PopupDialog = 458755, 458761, CLOSE
Act_ChangeState = SUCCEEDC:\Program Files\Microsoft Games\Freelancer\DATA\SHIPS\loadouts.ini :
added this at the bottom of the normal .ini
[Loadout]
nickname = King_No_Cloak
archetype = or_elite
equip = ge_be_engine_01
equip = shield01_mark07_hf, HpShield01
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_s_thruster_01, HpThruster01
equip = armor_scale_5
equip = special_nomad_gun03, HpWeapon01
equip = special_nomad_gun03, HpWeapon02
equip = special_nomad_gun03, HpWeapon03
equip = co_gun02_mark03, HpWeapon04
equip = special_nomad_gun03, HpWeapon05
cargo = missile01_mark05_ammo, 20
equip = missile01_mark05, HpWeapon06
equip = fc_or_turret01_mark01, HpTurret01
equip = mine02_mark05, HpMine01
cargo = mine02_mark05_ammo, 20
equip = ge_s_cm_03, HpCM01
cargo = ge_s_cm_03_ammo, 20
;equip = cloak_osiris, HpCloak01
equip = LargeWhiteSpecial, HpHeadlight
equip = MediumBlue, HpRunningLight01
equip = MediumBlue, HpRunningLight02
equip = MediumBlue, HpRunningLight03
equip = MediumBlue, HpRunningLight04
equip = MediumBlue, HpRunningLight05
equip = MediumBlue, HpRunningLight06
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = contrail01, HpContrail03
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02
cargo = ge_s_battery_01, 30
cargo = ge_s_repair_01, 30
;cargo = commodity_cardamine, 2When you start and when it ends, an empty popup box appears. thats just so i could throw some text in.
Like i said at the top, its far from perfect but i hope it helps anyone wanting to try this out.
-
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?