Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Planet Search Overhaul (07/13/24)

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 - tomatopaste

Pages: 1 ... 16 17 [18] 19 20 21
256
Ah - your best/only bet might be to temporarily remove the star anchor jump-points from hyperspace. Either that, or temporarily giving it a sensor profile - i.e. something like:

jumpPoint.setSensorProfile(<some number>);
jumpPoint.setDiscoverable(true);

That *might* also work as far as concealing stars.

That's really funky, but if it works is also genius. I'll do some fiddling and see if that works out. Thanks

257
Ah, awesome! That even starts fully zoomed out. Thanks a bunch!

Yep!

Also, and this might be more of a bug report, buuuut.... a pather base that was supplying cells in my colonies decivilized and became an abandoned station, but somehow it's still supplying them? So I can't get rid of them because I can't do anything with the station other than store stuff in it. Wat do? Can I, like, edit the save file to get rid of that? I can look up the names of places in the save file, but I can't make heads or tails of what to edit in there.

Ah, it is a bug report - thank you, and fixed. I'd already done this for pirate bases (that is, making sure they can't decivilize), but missed Pather cells. The good news is Pather cells are currently bugged so that if your stability is 2 or higher, incidents will never happen, so you're basically free to ignore them - no need to remove them from the save file. Which I think could get kind of tricky anyway.


Hello, after some theorising about a possible TC with some folks that hinges around the idea of a custom hyperspace map with fog of war. This isn't possible to implement in the vanilla map, so my question is, is it currently possible to override the hyperspace map GUI element? Furthermore, how is the hyperspace map rendered in game? How is it layered, what elements can be removed, can elements be added?

If not, some API hooks to apply effects / or somehow replace the hyperspace map would be greatly appreciated.

Thanks  :)

See: HyperspaceTerrainPlugin.renderOnMap(), and renderOnMapAbove() it its superclass. Although, you're not asking just about the hyperspace terrain, are you? You couldn't hide stars, I don't think. Terrain, you could - but that's just the HyperspaceTerrainPlugin. It's hard to say because I don't understand exactly what the goal of having fog of war here would be - what would be hidden and why?

The goal would be to hide everything, and have abstract regions on the map highlighted, with sections charted as the player travels outwards. At first this would be blind, but quests etc. could potentially give coordinates of specific locations in the murk. This would mean being able to clear absolutely everything from the map and have custom objects rendered over it, but it doesn't sound like that's possible at the moment.

258
Hello, after some theorising about a possible TC with some folks that hinges around the idea of a custom hyperspace map with fog of war. This isn't possible to implement in the vanilla map, so my question is, is it currently possible to override the hyperspace map GUI element? Furthermore, how is the hyperspace map rendered in game? How is it layered, what elements can be removed, can elements be added?

If not, some API hooks to apply effects / or somehow replace the hyperspace map would be greatly appreciated.

Thanks  :)

259
I'm using engine.getFleetManager(ship.getOriginalOwner()).spawnShipOrWing(...) to spawn in my drones fighter-style, and am using engine.getFleetManager(ship.getOriginalOwner()).setSuppressDeploymentMessages(true); to prevent the deployment messages, but upon ending missions (untested in campaign), the spawned drones all appear:
Spoiler
[close]
How do I prevent this? Thanks!

260
Hello! When using the method ship.getLaunchBaysCopy() on a ship with existing launch bay weapon types, but no fighter slots, it returns an empty list. Is this intentional, or am I missing something? Also, it would be useful if there was an API hook for FighterLaunchBayAPI to get the absolute location. Thanks :)

261
Hi there is it possible when making a customised star system to position it randomly on the sector map?

      
Spoiler
//Star
      PlanetAPI star = system.initStar(
         "star",
         "star_yellow",
         800,
                        x
                        y   
         600);
[close]

So I would like the x and y coordinates to have random values say between -20000 to -10000 or 10000 to 20000 (I want to not have it spawn amongst the core worlds)

Is it possible to use (int)Math.random() for this? and how would you make the "or" argument?

Thank you!

Basic java, you just want to replace the numbers 800 and 600 with a randomX and randomY where
Code
int randomX;
        int randomY;
        do {
            randomX = ThreadLocalRandom.current().nextInt(-20000, 20000);
            randomY = ThreadLocalRandom.current().nextInt(-20000, 20000);
        } while (!(-10000 < randomX && randomX < 10000) && !(-10000 < randomY && randomY < 10000));

262
Per drone, yeah.

Thanks - that works quite well :)

Another question though: how do I get the instance of the statsScript associated with a ship's system?

263
One other thing you want to do that's subtle in its effects:

drone.getAIFlags().setFlag(AIFlags.DRONE_MOTHERSHIP, 20000f, mothership);

If this isn't done, things will work, but enemy AI will be more distracted by the drones than it should be.

Do you mean
Code
ship.getAIFlags().setFlag(ShipwideAIFlags.AIFlags.DRONE_MOTHERSHIP, 20000.0f, (java.lang.Object)this.ship);
or per drone?

264
How do I associate the drone the shipsystems spawns with the mothership, so that when getDroneSource() is called on the drone, it returns the ShipAPI instance of the mothership? basic java, heh

265
If you're implementing your own, then there would be no DroneLauncherShipSystemAPI and no states - whatever you code up has to handle states etc. You would, I think, set the AI to what you need when manually spawning the drone.

I see - oh well, thanks for the help :)

266
I'd suggest using type:"STAT_MOD" since that doesn't do anything and lets your script have full control. The script can be specified via "statsScript".

Thanks for the reply - although I have yet more questions. In my modplugin, I assign the drones their AI with pickDroneAI, which passes DroneLauncherShipSystemAPI. If the ship system is of the STAT_MOD type, won't this break it? Is there a workaround, like using pickShipAI instead? This is important since the drone AI relies on being able to get the current state of the system's orders enum (RECALL, DEPLOY and ATTACK) from the passed DroneLauncherShipSystemAPI.

267
How do I link to a custom shipsystem script in the .system file? My one extends BaseShipSystemScript, and implements DroneLauncherShipSystemAPI, and as far I can tell there is no CUSTOM value for the 'type' key. Thanks!

268
Hmm - I don't think so, no - sorry! I mean, you might try to write a custom version of the drone launcher system from the ground up - basically launching drones/maintaining its own state as needed - but the existing drone launcher system isn't that flexible.
Yikes - well, I might as well go all out. Can I have some info on how the existing system launches drones onto the map? Is it as simple as spawning in the combat entity with a reversed velocity? Do I need to extend BaseShipSystemScript? How does it interface with the systems csv and/or json configuration?

EDIT: Nevermind, I found the obfuscated source so I'll use that as a guideline to implementing my ideas

269
Modding / Re: [0.9.1a] Mobile Star Fortress v0.2.1 - Let them Fight!
« on: March 13, 2020, 04:34:29 AM »
why

270

Can I override this message by getting the status key somehow? Would like to change this text since it is misleading with how I've changed the functionality of this system. Thanks :)

Pages: 1 ... 16 17 [18] 19 20 21