• Welcome to AtomicTorch Studio Forums.
 

Getting value of item in script, Removing Equipment, Console Scope

Started by martooth, April 25, 2015, 02:27:08 PM

martooth

Hey guys a couple of things, new here, starting a rather large project for a mod for this game. I am stuck on a few things if somebody could be of help that would be awesome, thank you. :D

--------------Issue #1---------------
I'm having a heck of time trying to grab a property from a hull xml file or the npc xml file in a script. I've been over all the api data i can find, and I've tried multiple things but I can't seem to find a way to retrieve this data in a script. If anybody has tried to do this or has an idea of how to do it I'd greatly appreciate it.

What I'm specifically trying to do is to adjust npc ship stats in the CalculateShip.js based off of an element or effect I've given said npc or the hull its using in its respective xml files (which i assume is stored in the npc or item info). The GetHullXmlID in the ships scope correctly gets the hull id but I've been unable to find a way to retrieve any data from that hulls item xml file or item itself.


--------------Issue #2---------------
I am trying to have ship equipment be removed under certain circumstances in a script, I don't issue getting the script firing at the appropriate time but I don't see in the API a function to actually remove equipment or weapons. You can get thier IDs using the "ship.GetEquipment" function but I'm not seeing one for Removing or Setting new equipment. This issue I'm having would also be solved if I could find a way to get item stats and an action that fires when a player tried to undock, which I've also been unable to find.


--------------Issue #3---------------
This one might just be me, but I've been unable to get any of the console scope functions to work, even the ones built into existing scripts don't seem to function (that or when you press ` that isn't the console, which it appears to be lol). Self solving the above issues would become dramatically easier if I could atleast figure out how to display some debugging info.


So if anybody has any ideas I would love to hear them. Thank you again.