Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Timex

Registered:
Posts: 27
Reply with quote  #1 
How do things like shieldStateFront work? I assume this is shield strength. I can Set the numeric property to something. Does setting it to 0 means the front shields are down? what would be setting them to full strength, 100?

How do things like systemDamageFrontShield work?  I can Set the numeric property to something. Does setting to 0 mean there is no damage? what would be setting them to completely damaged, 100? I see there is Set player ship's damage that allows to set node x to y% damage for front shields, how is that different than setting systemDamageFrontShield?

Thanks for your help in advance.



__________________
Timex
Birmingham, Alabama
DizzyKungFu

Registered:
Posts: 87
Reply with quote  #2 
shieldStateFront and shieldStateBack take an integer that represents overall shield value, NOT a percentage. This varies by ship, see the vesseldata.xml for exact numbers (e.g. TSN Light Cruiser has 80, Scout 60). Setting this during a mission script will overwrite the current strength/facing. So assigning 0 will bring the shields down, but to set to the "max", it varies by ship. You CAN assign over the "max" number in the vesseldata.xml.

Damage is a float, 1.0 means fully damaged node, 0.5 means 50% damaged, 0.0 means undamaged.
Darrin

Registered:
Posts: 86
Reply with quote  #3 
Quote:
Originally Posted by Timex
How do things like shieldStateFront work? I assume this is shield strength. I can Set the numeric property to something. Does setting it to 0 means the front shields are down? what would be setting them to full strength, 100?


shieldStateFront and shieldStateBack set the current value of the shields. This is an integer, so you can set it from 0 to ... looks like the game caps it at 10,000. A ship's initial shield values are set by the stats in vesselData.xml. However, I have noticed that sometimes these default values may change when you start the mission, so... I haven't quite figured out what's doing that. The global variables playerShields and nonplayerShields may also adjust these default values, but I'm not sure... I haven't  futzed around with it enough. In general, a Light Cruiser will start with 100 Front/Back shields, Torgoth will start off with 300 Front/Back shields, Kralien Cruiser starts with 40 Front/Back, and so forth. 

shieldMaxStateFront and shieldMaxStateBack is an integer that determines when the shields are considered to be at "full strength". If the shields on a ship are blasted down below this number, they will gradually increase back to this Max value. I haven't tested it, but it also probably tells the game whether to show which color the shields should be on a ship, as in, if it's close to 100%, they show as Green. If the shields are around 50% of their Max, then they show as yellow. Below 25%, they show as Red. (These numbers are guesswork on my part. I'm not sure which specific values determine shield colors.)

Quote:
Originally Posted by Timex

How do things like systemDamageFrontShield work?  I can Set the numeric property to something. Does setting to 0 mean there is no damage? what would be setting them to completely damaged, 100? I see there is Set player ship's damage that allows to set node x to y% damage for front shields, how is that different than setting systemDamageFrontShield?


Ok, so... there are several different "damage" systems in the game. Player ships have nodes, and the number of active nodes determines how much "percentage" of damage the ship's Engineer will see on their display. A TSN light cruiser has four Warp nodes. If all four Warp nodes are destroyed, system damage for Warp will show "0%". 2 nodes active will be 50%, etc. To knock out a system on a player ship entirely, you have to knock out all the nodes for that system. When you use the set_player_grid_damage command, you also specify a percentage value for the damage on that node, usually 0-100. That just tells the game how much time it will take the DamCon team to repair the node. Setting 100% damage on a single Warp node for a TSN light cruiser will show the WARP system at 75% on the Engineering screen (3 out of 4 nodes active). 

Enemy and neutral ships have a much simpler damage system, as they don't have nodes. You just use set_object_property and give it a value... I think it's a float, so 0.0 to 1.0. When Science scans the enemy ship, they can see which specific ship systems have been damaged/disabled. If you use set_object_property to set systemDamageWarp on a player ship, the game just ignores it, because it's a player ship. Enemy/neutral ships will gradually repair damaged systems if you leave them alone, so if you're trying to permanently disable an enemy/neutral ship to keep them from moving, you have to keep resetting the systemDamageWarp/systemDamageImpulse. 

There is also a "Hull Point" damage system which determines when a ship explodes. Player ships have a certain number of hull points, but I'm not sure how exactly they are determined. http://artemiswiki.pbworks.com/w/page/44200768/Damage mentions a formula, but in general, the amount of hull points a ship has is not visible to the player, and that value is not something we can change via the scripting commands. Right now, you can only set hull points on monsters. 






DizzyKungFu

Registered:
Posts: 87
Reply with quote  #4 
Quote:
Originally Posted by Darrin
However, I have noticed that sometimes these default values may change when you start the mission, so... I haven't quite figured out what's doing that. The global variables playerShields and nonplayerShields may also adjust these default values, but I'm not sure... I haven't  futzed around with it enough. In general, a Light Cruiser will start with 100 Front/Back shields, Torgoth will start off with 300 Front/Back shields, Kralien Cruiser starts with 40 Front/Back, and so forth.


This is because some NPC ships will randomly get tagged with specialShipType of "upgraded", "overpowered", or "underpowered".
Timex

Registered:
Posts: 27
Reply with quote  #5 
Thanks guys. This cleared it up for me.
__________________
Timex
Birmingham, Alabama
Timex

Registered:
Posts: 27
Reply with quote  #6 
humm, I'm trying to drain the shieldStateFront value over time with a timer that loops.

every 1 second the condition for timer ends is met and this action...

<addto_object_property value="-1" property="shieldStateFront" name="Artemis" />


You can't add -1 to a property or some other problem? a different way to do it?

__________________
Timex
Birmingham, Alabama
DizzyKungFu

Registered:
Posts: 87
Reply with quote  #7 
Quote:
Originally Posted by Timex
You can't add -1 to a property or some other problem? a different way to do it?


This is a great question! I don't know, unfortunately. It SHOULD be something we can do, so if it cannot be done, I say it should def go into the 3.0 scripting wishlist: https://artemis.forumchitchat.com/post/scripting-wish-list-for-artemis-3-0-10137978

But to be actually helpful here with our current tech, if someone put a gun to my head, I would say establish an integer variable as the max shield strength, e.g. ShieldMax=100. Then each cycle say that ShieldMax=ShieldMax-1. Also each cycle, then assign shieldStateFront value=ShieldMax.
Darrin

Registered:
Posts: 86
Reply with quote  #8 
Quote:
Originally Posted by Timex
humm, I'm trying to drain the shieldStateFront value over time with a timer that loops.

every 1 second the condition for timer ends is met and this action...
 <addto_object_property value="-1" property="shieldStateFront" name="Artemis" /> 


You can't add -1 to a property or some other problem? a different way to do it?


You can add a negative number to a property. So that should work.

However, you may be fighting against the natural recharge rate of the shields. Maybe try changing it to -5?


Timex

Registered:
Posts: 27
Reply with quote  #9 
Quote:
Originally Posted by Darrin


However, you may be fighting against the natural recharge rate of the shields. Maybe try changing it to -5?




Yea I had to adjust the timer and the number to subtract until i got the affect like i wanted.

__________________
Timex
Birmingham, Alabama
ron77

Registered:
Posts: 150
Reply with quote  #10 
Quote:
Originally Posted by Darrin
You can set the shieldStateFront and shieldStateBack over the Max value. They just won't regenerate until they are below the Max value.

Are you saying that if I did set shields to 10,000 (or whatever the maximum limit set by the game is), they won't regenerate for my Light Cruiser until they fall below the (I believe) 60 points maximum shield strength as set in the vesseldata.xml?

Because if you are, that's very interesting to know. [smile]
Darrin

Registered:
Posts: 86
Reply with quote  #11 
Quote:
Originally Posted by ron77

Are you saying that if I did set shields to 10,000 (or whatever the maximum limit set by the game is), they won't regenerate for my Light Cruiser until they fall below the (I believe) 60 points maximum shield strength as set in the vesseldata.xml?

Because if you are, that's very interesting to know. [smile]


Ok, I cobbled up a script to test this. I'm not sure if I was doing something different before, but setting the current shield strength over the Max value doesn't work, it just caps it at the max. So if you want a ship with 10,000 shield strength, you have to set the shieldMaxStateFront/Back first, then set the shieldStateFront/Back. Setting the Max to a lower value later also drops the current shield strength to the new max. 

I'm not sure what controls the recharge rate for shields. I don't see anything in vesselData about it. 


ron77

Registered:
Posts: 150
Reply with quote  #12 
Quote:
Originally Posted by Darrin
I'm not sure what controls the recharge rate for shields. I don't see anything in vesselData about it.

That part is in the artemis.ini
ryleyra

Registered:
Posts: 2,906
Reply with quote  #13 
Note that if you set ShieldStateMax and don't set ShieldState, the shields will start at their current level and slowly charge to the new maximum. If you set ShieldStateMax to a lower value than ShieldState, it will drop immediately.

This can be used for some fun behavior. For instance you can fly in and out of a field that raises and lowers your shields over time.

Also you raise and lower shields (as in turn them on and off) with the ShieldsOn property, which takes a value of 0 or 1.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.