Help scripting in crew
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 47
- Joined: Sat, 13. Oct 18, 12:24
Help scripting in crew
I've managed to create a new gamestart and have it so i have a small 4 ship fleet. I am having trouble putting crews of these ships at gamestart. I'm using placeobjects to spawn the ships. If anyone can help me to have at the least service crew on the ship that would be much appreciated.
-
- Posts: 1124
- Joined: Fri, 25. Jan 19, 03:26
Re: Help scripting in crew
Code: Select all
<create_ship name="$NewShip" macro="ship_arg_xl_builder_01_a_macro" zone="player.zone">
<owner exact="faction.player" overridenpc="true" />
<loadout loadout="$thirdloadout.{1}" />
<pilot>
<select faction="faction.argon" tags="tag.aipilot"/>
</pilot>
<people>
<fillpercent exact="100" />
<person role="service" weight="75">
<select faction="faction.argon" tags="tag.crew"/>
</person>
<person role="marine" weight="25">
<select faction="faction.argon" tags="tag.marine"/>
</person>
</people>
<units>
<unit category="unitcategory.build" exact="50" />
<unit category="unitcategory.defence" exact="10" />
<unit category="unitcategory.repair" exact="20" />
<unit category="unitcategory.transport" exact="20" />
</units>
<safepos object="$HQ" radius="5km" min="5km" max="10km"/>
</create_ship>
-
- Posts: 47
- Joined: Sat, 13. Oct 18, 12:24
Re: Help scripting in crew
ok that works for my created ships. Is there a way to have a named npc on my starting ship. Say i want to create a companion for the player. so I want to name this npc.
I have tried adding
<people>
<person macro="argon_male_marine_helmet_01_macro" role="service" name="Jet Summers">
<skill type="piloting" exact="15"/>
<skill type="morale" exact="15"/>
<skill type="engineering" exact="15"/>
<skill type="management" exact="15"/>
</person>
</people>
to the loadout of the starting ship. Doesnt seem to work.
Also this is causing the ships to spawn without engines shields or guns
I have tried adding
<people>
<person macro="argon_male_marine_helmet_01_macro" role="service" name="Jet Summers">
<skill type="piloting" exact="15"/>
<skill type="morale" exact="15"/>
<skill type="engineering" exact="15"/>
<skill type="management" exact="15"/>
</person>
</people>
to the loadout of the starting ship. Doesnt seem to work.
Also this is causing the ships to spawn without engines shields or guns
Last edited by SystemsEternal on Mon, 4. May 20, 00:39, edited 1 time in total.
-
- Posts: 143
- Joined: Thu, 1. Aug 13, 05:59
Re: Help scripting in crew
You will probably need a custom character macro for that. Take a look at libraries/character_macros.xml
-
- Posts: 47
- Joined: Sat, 13. Oct 18, 12:24
Re: Help scripting in crew
I dont think Id need a custom charcter_macro as they only decide what model the charcter is.
the string
<person macro="argon_male_marine_helmet_01_macro"> with a name in it as <person macro="argon_male_marine_helmet_01_macro" name="Jet Summers"> should work afaik but doesnt.
In fact using this doesnt even put the "person" on the ship.
And nothing I add to my create ships script is adding a loadout. Do i have to pick between crew and engines, shields, guns, thrusters? as when i dont have the
<loadout loadout="$thirdloadout.{1}" />
<pilot>
<select faction="faction.argon" tags="tag.aipilot" macro="argon_male_marine_helmet_01_macro"/>
</pilot>
the ship gets a standard loadout
Ive tried using the same string that is used in the gamestarts for the playership:
<engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_01" /> hasnt worked
the string
<person macro="argon_male_marine_helmet_01_macro"> with a name in it as <person macro="argon_male_marine_helmet_01_macro" name="Jet Summers"> should work afaik but doesnt.
In fact using this doesnt even put the "person" on the ship.
And nothing I add to my create ships script is adding a loadout. Do i have to pick between crew and engines, shields, guns, thrusters? as when i dont have the
<loadout loadout="$thirdloadout.{1}" />
<pilot>
<select faction="faction.argon" tags="tag.aipilot" macro="argon_male_marine_helmet_01_macro"/>
</pilot>
the ship gets a standard loadout
Ive tried using the same string that is used in the gamestarts for the playership:
<engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_01" /> hasnt worked
-
- Posts: 1124
- Joined: Fri, 25. Jan 19, 03:26
Re: Help scripting in crew
For everything except the custom character, you can look at my dynamic war start for an example.SystemsEternal wrote: ↑Mon, 4. May 20, 01:11 I dont think Id need a custom charcter_macro as they only decide what model the charcter is.
the string
<person macro="argon_male_marine_helmet_01_macro"> with a name in it as <person macro="argon_male_marine_helmet_01_macro" name="Jet Summers"> should work afaik but doesnt.
In fact using this doesnt even put the "person" on the ship.
And nothing I add to my create ships script is adding a loadout. Do i have to pick between crew and engines, shields, guns, thrusters? as when i dont have the
<loadout loadout="$thirdloadout.{1}" />
<pilot>
<select faction="faction.argon" tags="tag.aipilot" macro="argon_male_marine_helmet_01_macro"/>
</pilot>
the ship gets a standard loadout
Ive tried using the same string that is used in the gamestarts for the playership:
<engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_01" /> hasnt worked
Here's how I do loadouts for it
Code: Select all
<generate_loadout macro="macro.ship_arg_s_scout_01_a_macro" faction="faction.argon"
wares="[ware.software_flightassistmk1, ware.software_dockmk2, ware.software_scannerlongrangemk2, ware.software_scannerobjectmk2, ware.software_targetmk1, ware.software_trademk1,
ware.engine_arg_s_combat_01_mk3, ware.weapon_gen_s_gatling_01_mk1, ware.shield_arg_s_standard_01_mk3, ware.thruster_gen_s_allround_01_mk3]"
level="1" result="$secondloadout" />
<do_all exact="2" counter="$i">
<create_ship name="$NewShip" macro="ship_arg_s_scout_01_a_macro" zone="player.zone">
<owner exact="faction.player" overridenpc="true" />
<loadout loadout="$secondloadout.{1}" />
<ammo>
<macro ref="macro.eq_arg_satellite_02_macro">
<fillamount exact="100"/>
</macro>
</ammo>
<pilot>
<select faction="faction.argon" tags="tag.aipilot"/>
</pilot>
<people>
<fillpercent exact="100" />
<person role="service" weight="75">
<select faction="faction.argon" tags="tag.crew"/>
</person>
<person role="marine" weight="25">
<select faction="faction.argon" tags="tag.marine"/>
</person>
</people>
<safepos object="$HQ" radius="5km" min="5km" max="10km"/>
</create_ship>
<set_skill entity="$NewShip.pilot" type="skilltype.piloting" exact="10" />
<set_skill entity="$NewShip.pilot" type="skilltype.engineering" exact="5" />
</do_all>
<remove_value name="$secondloadout" />
-
- Posts: 47
- Joined: Sat, 13. Oct 18, 12:24
Re: Help scripting in crew
Cheers that works exactly as i want it.
Using it as a base, I created 3 loadouts for the 4 ships i wanted. Now all i need is to figure out how to add a crew with the characters I want. A marine named Jet Summers and a split female engineer named Fae t'Xa.
Then I'll be all good to finish my custom start.
Using it as a base, I created 3 loadouts for the 4 ships i wanted. Now all i need is to figure out how to add a crew with the characters I want. A marine named Jet Summers and a split female engineer named Fae t'Xa.
Then I'll be all good to finish my custom start.