Fractal Softworks Forum

Starsector => Mods => Modding => Topic started by: creature on October 24, 2019, 10:25:44 PM

Title: [RESOLVED!] The type com.thoughtworks.xstream.XStream cannot be resolved.
Post by: creature on October 24, 2019, 10:25:44 PM
Hi, I'm a newbie modder trying to get into scripting but I am getting an error at the very first line of my first mod plugin saying:

Code
The type com.thoughtworks.xstream.XStream cannot be resolved. It is indirectly referenced from required .class files

I followed this Eclipse modding tutorial to get this far:

https://fractalsoftworks.com/forum/index.php?topic=4344.0

It seems that the error is connected to BaseModPlugin, as when I remove the import line

Code
import com.fs.starfarer.api.BaseModPlugin;

The error disappears - except it's the base file that the plugin extends, so nothing else would work without it. Alex mentioned that there might be an issue with some of the jars I imported, so here's a shot of my project tree and the line where the error appears:

(https://i.ibb.co/mRH9Pxg/error.jpg)

Would appreciate if you could help me out with this!
Title: Re: [Scripting] The type com.thoughtworks.xstream.XStream cannot be resolved.
Post by: Alex on October 25, 2019, 10:17:59 AM
I'd try adding the various .jar files in starsector-core/, except for the ones that end in _obf (which are obfuscared core files). The one you probably need for this error specifically is xstream-1.4.10.jar, but add the other ones as well to prevent similar problems in the future.
Title: Re: [Scripting] The type com.thoughtworks.xstream.XStream cannot be resolved.
Post by: creature on October 25, 2019, 05:48:49 PM
I'd try adding the various .jar files in starsector-core/, except for the ones that end in _obf (which are obfuscared core files). The one you probably need for this error specifically is xstream-1.4.10.jar, but add the other ones as well to prevent similar problems in the future.
Thanks Alex! After a long time of trial and error, I've finally found a combination of imported jars that allowed me to run my plugin!  ;D