Members | Sign In
All Forums > Mission Scripting
avatar

Log damage in MissionLog

posted Mar 19, 2013 19:30:56 by AdamVanZalinge
I'm attempting to write data to the mission log as soon as the damage for all systems is over 40%. I am unable to get it to work properly. I do have a "<if_variable name="lightStatus" comparator="EQUALS" value="1.0" />" at the start of the script. Am I missing something that makes this work?

<event name_arme="ArtemOver40" id_arme="f697c9ca-ae78-4eb6-afe5-4fa713daebda" parent_id_arme="e067e884-7374-4319-bc10-ca09116d7385">
<if_variable name="lightStatus" comparator="EQUALS" value="1.0" />
<if_object_property property="systemDamageBeam" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageTorpedo" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageTactical" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageTurning" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageImpulse" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageFrontShield" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageBackShield" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<if_object_property property="systemDamageWarp" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />
<set_variable name="lightStatus" value="2.0" />
<log text="artemis?lights?dmg" />
</event>
[Last edited Mar 19, 2013 20:18:43]
page   1
8 replies
avatar
Mike_Substelny said Mar 19, 2013 19:53:12
Have you checked any of your conditions to see if they work?

I don't know if you can use those if_object_property blocks for player ships anymore. When inflicting damage on players you need to use set_player_grid_damage, but I think that is not a testable condition.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
AdamVanZalinge said Mar 19, 2013 20:11:50
I have tested a single condition and set the comparator to "LESS_EQUAL" and that worked to write to the mission log. At this point I am not sure why the inverse of what I want is working.

I am able to use the following "if_object_property" to get the player shield status.
<if_object_property property="shieldsOn" name="Artemis" comparator="EQUALS" value="1.0" />

So, I assume there must be a way to make it work.
[Last edited Mar 19, 2013 22:04:59]
avatar
Mike_Substelny said Mar 20, 2013 14:18:06
What damage state were you checking in your test? Torpedo? Warp? Beams?
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
AdamVanZalinge said Mar 20, 2013 14:55:34
Maybe I have a misunderstanding of what "systemDamage" is used for. How about I tell you what I am planning on doing and hopefully that will help.

My plan is to make a separate app to parse the mission log file and output the data through the serial port to an Arduino micro-controller. The micro-controller will control Lights, fog machine, and etc.

Right now I am trying to make it so if the total damage of the ship is greater than 40% then send some data to the log.

Eventually I will want to send over data for if you are Over 60%, for each time the ship is "hit", and anything else that I might find a use for later.
avatar
Mike_Substelny said Mar 20, 2013 18:25:39
And what had your tests revealed? Does this statement ever come out as true?

<if_object_property property="systemDamageBeam" name="Artemis" comparator="GREATER_EQUAL" value="0.4" />

That statement used to work in the original Artemis 1.0, but in mid 2011 Artemis 1.50 added the grid damage system so that Damage Control teams are deployed on the 3-D grid. I don't think that statement works anymore. Please try it and let us know.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
AdamVanZalinge said Mar 21, 2013 03:41:32
It seems like it isn't testable. So I will have to change my plans and go a different direction for my project.

Thanks for the second set of eyes Mike.
avatar
JoeGreene said Mar 21, 2013 04:24:56
Is there a statement one can use to get gridDamage data?
I'm getting out my stick tomorrow to poke it and see.... but results could be weeks away..
avatar
AdamVanZalinge said Mar 21, 2013 15:27:04
It doesn't look like it. I've tried "get_player_grid_damage" and "if_player_grid_damage" to see if there was some undocumented checks for it.

Login below to reply: