(objGetArmorCriticality obj item|armorSegment) -> criticalityType
(objGetFitCount ...)
(typMarkImages unid) -> True/Nil
George: can you explain what those do? (and for ObjGetFitCount, what args?)
I looked on trac for objGetArmorCriticality the returns are just Critical/NonCritical. Will there be more criticality types?
TypMarkImages... loads images? o.O
[George] Function Explanations
-
- Fleet Admiral
- Posts: 2876
- Joined: Thu Feb 03, 2011 5:21 am
- Location: Hmm... I'm confused. Anybody have a starmap to the Core?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Get on Discord for mod help and general chat


Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
objGetArmorCriticality: critical/nonCritical are the only two values returned (they are the only two values that make a difference).RPC wrote:(objGetArmorCriticality obj item|armorSegment) -> criticalityType
(objGetFitCount ...)
(typMarkImages unid) -> True/Nil
George: can you explain what those do? (and for ObjGetFitCount, what args?)
I looked on trac for objGetArmorCriticality the returns are just Critical/NonCritical. Will there be more criticality types?
TypMarkImages... loads images? o.O
objGetFitCount: This is implemented inside Code.xml (there is a comment there):
(objGetFitCount obj item) -> number of items that will fit in given obj.
typMarkImages: (Bad name, I know). This take any unid and loads any images needed by the unid. For example, if you have a station and you know that the station is later going to create 100 different ship classes, then you can call typMarkImages on all those ship classes in the station's OnCreate. This will force the engine to load the images at create time instead of later (when it might interrupt the game). Note that the engine already figures out what images to load based on what it creates in the system, but it can't tell if you're going to create something with script later.
With criticality available in script the other criticality values could make a difference if the scripter wanted them to. It wouldn't be too hard for a playable capital ship to implement device damage via noncritical breaches if the actual noncritical strings were available.
Literally is the new Figuratively