Re-download, they're uncompressed for you now. If you've no means to play-test however, then the XML posted previously should be enough to work with I would've thought, unless of course it isn't in which case the download probably won't help much either .dillpickle wrote:Can't help anymore at present, as have no facility to unpack .pck, until I get home Friday... xml I can look at OK.
[Help - Solved] MD Objects & Variables
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
I've determined it's not a syntax issue by outputting the calculated values to a message log. None the wiser as to why it's not populating the two ships with the dynamic values though.
{object.maxshieldcount@this.Aran} (for example) will be populated with the correct value but for some reason isn't used or is ignored (value = 0) when I try to equip this.Aran in Start.xml.
{object.maxshieldcount@this.Aran} (for example) will be populated with the correct value but for some reason isn't used or is ignored (value = 0) when I try to equip this.Aran in Start.xml.
Last edited by Createse on Thu, 20. Mar 14, 19:57, edited 1 time in total.
-
- Posts: 1159
- Joined: Mon, 3. Nov 08, 14:25
It may be that it adds all the wares etc... to the ship and then assigns the object name, which is why it can't find the 'object' - but that's only a guess.
If you take the cargo/equipment that relies on '@object' out of the actual ship creation part and put them after the reward_player, thus:
Then shields/engine tunings/etc... get added to your ships.
If you take the cargo/equipment that relies on '@object' out of the actual ship creation part and put them after the reward_player, thus:
Code: Select all
</reward_player>
<add_cargo object ="this.Aran">
<!-- Marines -->
<ware typename="SS_WARE_SOLDIER_1" exact="{object.marines.maxcount@this.Aran}" comment="Mercenary" />
</add_cargo>
<add_equipment object="this.Aran">
<!-- Shields -->
<ware typename="SS_SHIELD_F" exact="{object.maxshieldcount@this.Aran}" comment="2 GJ Shield" />
<!-- Upgrades -->
<ware typename="SS_WARE_TECH213" exact="{object.equipment.SS_WARE_TECH213.maxcount@this.Aran}" comment="Engine Tunings" />
<ware typename="SS_WARE_TECH246" exact="{object.equipment.SS_WARE_TECH246.maxcount@this.Aran}" comment="Rudder Optomisation" />
<ware typename="SS_WARE_TECH251" exact="{object.equipment.SS_WARE_TECH251.maxcount@this.Aran}" comment="Cargo Bay Extension" />
</add_equipment>
<add_cargo object ="this.Ozias">
<!-- Marines -->
<ware typename="SS_WARE_SOLDIER_1" exact="{object.marines.maxcount@this.Ozias}" comment="Mercenary" />
</add_cargo>
<add_equipment object="this.Ozias">
<!-- Shields -->
<ware typename="SS_SHIELD_D" exact="{object.maxshieldcount@this.Ozias}" comment="200 MJ Shield" />
<!-- Upgrades -->
<ware typename="SS_WARE_TECH213" exact="{object.equipment.SS_WARE_TECH213.maxcount@this.Ozias}" comment="Engine Tunings" />
<ware typename="SS_WARE_TECH246" exact="{object.equipment.SS_WARE_TECH246.maxcount@this.Ozias}" comment="Rudder Optomisation" />
<ware typename="SS_WARE_TECH251" exact="{object.equipment.SS_WARE_TECH251.maxcount@this.Ozias}" comment="Cargo Bay Extension" />
</add_equipment>
Perhaps it does the ship creation (tag to tag) in a single pass like Batch/Bash scripts do, or something similar. Point is, the object obviously doesn't exist at that stage, which is what you or JonfersonSDD said previously - or something.dillpickle wrote:It may be that it adds all the wares etc... to the ship and then assigns the object name, which is why it can't find the 'object' - but that's only a guess.
Haha! That's exactly what I just did after having a short discussion with Bullwinkle. It works as intended. I'll need to use a different variable for marines though, {object.marines.maxcount@object} doesn't work.dillpickle wrote:If you take the cargo/equipment that relies on '@object' out of the actual ship creation part and put them after the reward_player
-
- Posts: 1159
- Joined: Mon, 3. Nov 08, 14:25
Are you sure? I had twenty marines added to both the Aran and the Ozias, admittedly only tested a couple of times.Createse wrote:I'll need to use a different variable for marines though, {object.marines.maxcount@object} doesn't work.
Though you might as well put it back in with the ship creation part with:
Code: Select all
<ware typename="SS_WARE_SOLDIER_1" exact="20" comment="Mercenary" />
Yep, no marines were spawned.dillpickle wrote:Are you sure? I had twenty marines added to both the Aran and the Ozias, admittedly only tested a couple of times.
Code: Select all
<reward_player>
<property>
<ship typename="SS_SH_GO_MSY" name="this.Aran">
</property>
</reward_player>
<add_cargo object="this.Aran">
<ware typename="SS_WARE_SOLDIER_1" exact="{object.marines.maxcount@this.Aran}" />
</add_cargo>
I agree. The rest of my cargo is hardcoded too, in the XML.dillpickle wrote:Though you might as well put it back in with the ship creation part . . . As it's a fixed (hard coded) amount that each ship type can carry