Then I made part of them known to the player at start (mk1 and amk2), through a script. Up to here no problem.
I wanted to make part of the blueprint only available if you buy a special package (let's call it upgrade_mod_mk3) from a pirate trader.
So wrote a simple condition, that the ware is present in player's inventory and it is at least one.
The ware is added to wares and stock and the traders do sell it. Also tried adding the ware in the inventory from the start.
But that does not trigger the blueprint's unlock either (while those I add from the start, mk1 and mk2, are normally unlocked and available at the modding bench)
this is the code:
Code: Select all
<set_value name="$ModsMk3" exact="
[ware.mod_engine_boostthrust_01_mk3,
ware.mod_engine_forwardthrust_01_mk3,
ware.mod_engine_rotationthrust_01_mk3,
ware.mod_engine_travelthrust_01_mk3,
ware.mod_shield_capacity_01_mk3,
ware.mod_shield_capacity_02_mk3,
ware.mod_shield_rechargerate_01_mk3,
ware.mod_weapon_damage_01_mk3,
ware.mod_weapon_damage_02_mk3,
ware.mod_weapon_speed_01_mk3,
ware.mod_weapon_surfaceelement_01_mk3,
ware.mod_ship_mass_01_mk3]"/>
<do_if value="player.entity.inventory.{ware.upgrade_mod_mk3}.exists and player.entity.inventory.{ware.upgrade_mod_mk3} ge 1">
<do_all exact="$ModsMk3.count" counter="$i">
<add_encyclopedia_entry item="$ModsMk3.{$i}.id" type="equipmentmods"/>
<add_blueprints wares="$ModsMk3.{$i}"/>
</do_all>
</do_if>
Code: Select all
<conditions>
<check_any>
<event_cue_signalled cue="md.Setup.GameStart"/>
<event_player_created/>
<event_game_loaded/>
</check_any>
</conditions>
They don't work, if you have the package in the inventory the blueprint are not unlocked.