Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - SomeDegenerate

Pages: [1]
1
How does the game fetch the tooltip for an industry? I'm running into a null pointer exception whenever I mouse over my industry; it appears I've missed something to tell the game how to make the tooltip or have left some field blank somewhere.

Thanks!

2
Modding / Re: Adding an Industry
« on: October 28, 2019, 06:33:44 AM »
When you're making your mod, have you been using a compiler to make a .jar file? You kind of need to compile the modPlugin and extensions to baseIndustry in order for the game to use it. You'll also need to add in the path to the modPlugin in the mod_info.json.

How do you mean, compile to baseIndustry? Do you just mean compile my industry class, which extends BaseIndustry? If so, then yes, I have been doing that - I compile all of my classes (of which there are two - ColonyRelays.ColonyRelay, which is the actual industry file that extends BaseIndustry, and data.campaign.ids.ColonyRelays_Industry, which is a java file simply containing the public static final String COLONYRELAY = "colonyrelays" (the id of my industry in the industries.csv file)) into a .jar, which I then feed into the mod_info.json file.

I also have no Mod Plugin, because as far as I can tell from looking at other mods that implement new industries (Blackrock Driveyards and Shadowyards, to name two) nothing in the plugin serves to initialize industry. Unless I just need an empty plugin file for...some reason?

Read this for a how-to regarding setting up your system for debugging mods. 

Sorry, I don't see a link - could you send that again?

In other news, I have actually done a bit of digging and as it turns out, my industry isn't recognized at all - praise for LazyWizard and his console. Now it's just a matter of figuring out why it's not being recognized...

3
Discussions / Re: Buying Ships
« on: October 23, 2019, 07:22:17 AM »
You definitely don't have to be commissioned to get new ships, even good ships. It's true that you typically find the best ships in the military markets, but it's far from necessary to be commissioned to get the best ships - it's not unheard of to find even capital-class ships in the open and black markets. Heck, I got my Odyssey off the open market, and I've seen Conquests, Legions, Astrals, and Onslaughts just in the same places. Look for planets that have Orbital Works industries, and military planets (even if you're not commissioned there still tends to be some juicy stuff on their open and black markets).

Don't be afraid to arouse suspicion buying black market ships either - when you buy a ship off the black market, even with the transponder on, it doesn't cause a change in the market, so you won't get a reputation hit. As long as you're not carrying anything illegal, the resulting security scan won't matter either.

4
Modding / Re: Java Bounty Board
« on: October 23, 2019, 07:11:10 AM »
Coder slowly learning Starsector's API here. An opportunity to justify spending more time working with Starsector, bring some mods to life on one of my favorite games, potentially see more projects that would never have seen the light of day, and earn some money out of the deal? Hell yeah I'd be interested.

Then again, with the modding staff forum we have the beginnings of something like that - just no framework for being paid, really. At the very least I think a sort of "available jobs" board that works opposite of the "available staff" board might be a good idea. 

5
How do I get the game to read my industries.csv, and are there any conditions (i.e. an empty field in the csv) that would make the game disregard the industries inside? Is that something that happens automatically, or is there some initialization I need to do in the mod plugin?

To build off of that - how do I make an industry buildable? Even when overriding and setting isHidden() to return false and isAvailabletoBuild() to true, my industry still won't show up. I'm currently testing to generate a planet with the industry to verify that the industry exists in the first place.

Thanks!

6
Modding / Re: Adding an Industry
« on: October 21, 2019, 07:54:38 AM »
Aaaaaand we have several exceptions and...no mention of my mod plugin despite the fact that the error message says that the crash was due to my mod. Lovely.

I'm gonna do some detective work, but if anyone knows how industries work and what they need I would appreciate it!

7
Modding / Re: Adding an Industry
« on: October 21, 2019, 07:50:10 AM »
Indeed I have, though I can see where the question comes from, lol. Honestly I'm absent-minded enough to forget something like that - especially seeing as I've only just set up the mod plugin properly to read the csv...maybe.

So maybe that was the problem, let me see here...

8
Modding / Adding an Industry
« on: October 21, 2019, 07:29:17 AM »
I didn't see this topic anywhere else on the boards, so I decided to make my own thread. As the title suggests, I'm trying to add an industry to Starsector, specifically a structure. Currently in my mod folder I have a data\industries.csv file with my industry in it, which points to my "[MODFOLDERNAME].data.scripts.[INDUSTRYSCRIPT].java and my graphics\[INDUSTRYNAME].png file, but when I load an existing save where I have a colony established it doesn't show up in the menu. My question is what I'm missing, what elements do I need to make an industry in Starsector?

I can post screenshots of my filepath and the script that adds and removes my industry if necessary. I've tried to model my industry after the structures in the game, so the [INDUSTRYSCRIPT].java extends BaseIndustry.

Thanks in advance!

9
Modding / Re: How to add custom fighters?
« on: October 20, 2019, 10:33:19 AM »
Are you looking for help on making sprites/kitbashing the fighters, how to put their stats in a csv, or a complete, from-the-ground-up guide?

Functionally they're almost the same as regular ships - they've just some small differences in tags and the like when you're working under the hood. You shouldn't have problems, depending on which ship and weapon editor you're using, but if I know what you're struggling with I should be able to point you in the right direction. Or ask for a more experienced modder's help :P

10
Bug Reports & Support / Re: Missing Red Planet Quest?
« on: October 20, 2019, 09:35:46 AM »
The spacer has a random chance to show up at any bar that is not a Luddic church, Luddic path, or pirate bar. In effect this means that you just have to open the bar in every dock you visit and, eventually, she'll be there regardless of whether or not you ignored her in the past. Off the top of my head I don't remember if you can find the Red planet yourself or if it spawns once you speak to her, but I THINK it's generated with the rest of the sector at the start of each game.

11
Modding / Re: Today I learned that in Java, Maps are not Collections...
« on: October 18, 2019, 05:00:57 PM »
I would think the best solution for that would be to have a separate interface for methods (toArray/contains/remove) that don't apply to all collections (or perhaps I should call them data structures?). The fact that the Map and Collection interfaces have so many methods in common seems like a clear indicator that they should have a common ancestor.

You know, you're absolutely right: that would have been another, perfectly valid way to set the language up. Another way to handle the issue - at least, most of the issues - would have been through method overloading, where you could, say, feed the method that would have to behave differently your Map object as a parameter. This has its own set of problems, but I digress.

The point is that there are several ways they could have handled the issue, and they probably chose the option they did to minimize the work on their end. Providing a separate interface for each of your collections - which would require you to write many identical methods, if I'm going through this correctly in my head - when all of your collections EXCEPT Map behave the same in the context of those methods is inefficient. Why not instead compartmentalize Map as its own class since it's the only collection that behaves radically differently from the others, then justify it with some mumbo-jumbo about how Maps aren't really a collection?

I know that if I had just spent hours trying to put together a Collection class and there's this ONE COLLECTION that isn't behaving properly because it needs some SPECIAL METHODS and I can't figure out how its DUMB, STUPID SELF is supposed to play nice with some of the methods that all of my other collections have in common I would be liable to say "*** it, I'm making a separate class, John over in HR can deal with it."

Of course that's mildly facetious, but you have to poke fun at Java every once in a while to stay sane  ;D

Really, I'm just bitter because I thought I could rely on (myVar instanceof Collection) returning true if myVar is a map.

Oooooh, yeah, that is not fun. At least you've got it now though, and congrats for figuring out on your own what the problem was! You're a more patient man than I!

Mind if I ask what it was for? I'm a bit of a fan of your work, especially the Starship Legends mod. That added some excellent flavor to the ships, and fantastic lasting consequences of performance, IMO.

12
Modding / Re: Today I learned that in Java, Maps are not Collections...
« on: October 18, 2019, 11:29:27 AM »
Just gone over that same deal in my own Java course. I wouldn't focus on it too much, the only functional difference you'll notice is some occasional differences in the methods you'll call (for example, Maps have their own foreach loop).

All of the following is speculation, but I'd say that Oracle made the decision to have Maps not extend Collection for functionality reasons. You can see this in the documentation - Collection and Map have many of the same methods, with differences like a lack of a toArray() and contains() method in Map and the inclusion of a containsKey() and entrySet() method in Map. If you think about it in the context of Java's class structure, this makes sense: when you call contains() on a Map, would you want to check keys or values? When you attempt to call toArray() on a Map, how will that work, given that Map has two entries for every one that would be in an array? It's easier to compartmentalize it and have Map only be able to input and output in a certain way.

Plus there's the fact that Oracle in general and Java in particular do their own thing. Always have, and I doubt that'll ever change :P

At any rate, please do take what I said with a grain of salt - while I've been working with Java for years I'm self-taught, meaning that if I ever didn't understand something that I needed chances are I just changed my program such that I didn't need it or copy+pasted someone else's code off of stackoverflow. And, as I'm sure you guessed by the fact that my Java course is only just going over data types in Java, I've only just started my formal education in CS. I'm just as likely to be full of *** as spot on.

Cheers!

tl;dr: Because of the way Java's class structure works it's more convenient to keep Collections and Maps separate. Probably.

13
Right, so I've managed to muck something up. As I try to reference getEntityById([RelayID]) from LocationAPI, I get an error that the method getEntityById() is undefined for type [MyClassName]. Then when I try to refer to it statically via LocationAPI.getEntityById(), I get a "cannot make a static reference to a non-static method" error - so I'm at a bit of a loss. I've had no trouble importing methods from other packages - though upon second look it seems that all the methods I've needed have been a part of the package I'm already operating in.

For reference, my class extends BaseIndustry as I'm trying to create a new Planetary Structure. I can paste my code here if that helps.

Thanks!


Never mind. I forgot Java was Object Oriented there for a second. Solved the problem by, y'know, creating a LocationAPI variable from which I could call the getEntityById function.

It's been a long day, lol.

14
Hi! That'd be LocationAPI.removeEntity().

So you might do something like:

if (entity.getContainingLocation() != null) {
    entity.getContainingLocation().removeEntity(entity);
}

Thanks, I appreciate it. Off to figuring out what's broken and fixing it XP

15
Hello all,

I recently ran into a small amount of frustration in-game (hint: it involves colonies and comm relays) and, because my OCD micromanagement knows no bounds, I thought, "Hey, I know some Java. I've never made a mod before in any program, I'm more than a little rusty, and my Eclipse setup is on my old computer, but how hard could it be?"

Almost a week, several hours of crawling through the documentation, and a not-insignificant amount of coffee later, I've run into another problem juuuuuust before what I could call a pre-alpha is ready. Which brings me to my question: what's the method for removing a SectorEntityToken/CustomEntity? I can get the ID, location, what have you, but I cannot, for the life of me, figure out how to actually remove it.

Thanks in advance!

Pages: [1]