Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 310 311 [312] 313 314 ... 710

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1728030 times)

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4665 on: June 27, 2019, 02:34:55 AM »

OK, on those two questions:

1.  Adding your own NPC to a planet:  an example of that is in TutorialMissionIntel.java in the API (which I'm going to presume you've unzipped somewhere as a code reference). 

It's a little confusing there, if you haven't read through that stuff much; look at mainContact.  If you don't already have one installed, I'm going to firmly recommend you install a good search / grep tool, when trying to figure out things in the API.

I'll check it out

Quote
2.  Making a "custom fleet that flies around" is too vague.  If you just want to spawn a FleetAPI, then go look at RogueMinerMiscFleetManager, for example; it shows how to use Factory to spawn a CampaignFleetAPI.

The code to spawn a fleet in a random system (or picked from a list) and send it to roam around/attack a market isn't that difficult. Plugging it into the game is.
Remnants are spawned at sector generation, but that's not what I need.
I need to periodically (let's say once a month) check for conditions (number of active fleets, etc..) and spawn fleets and that is what is giving me trouble.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4666 on: June 27, 2019, 08:46:06 PM »

Quote
Destroyed ships are recoverable, though at a lower rate than disabled ones, and they get a "compromised structure" d-mod.

Also, in case you're not aware: ships with "Reinforced Bulkheads" do not (currently, I'm considering that) break apart.
I'll take a look at that.  Also, there are a few other things in Skills that boost that, that may be affecting AI ships.

Overall, it's pretty difficult to get the rate down to what I wanted (roughly: 1% for a Capital).  I'll probably rewrite Reinforced Bulkheads; I don't want loot drop free Cruiser+ ships to be nearly as common as they are now.

Basically, I'm playing around with putting ship prices high, drop rates low, for the high-end ships; it won't completely change the power-curve for high-end, optimized fleets in a game where the player can take Officers to Level 29, but it's better than nothing and it should get better as the somewhat-meh Skills get evened out a bit.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Vayra

  • Admiral
  • *****
  • Posts: 627
  • jangala delenda est
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4667 on: June 27, 2019, 08:50:00 PM »

I need to periodically (let's say once a month) check for conditions (number of active fleets, etc..) and spawn fleets and that is what is giving me trouble.

Isn't that basically what either the raid or Lion's Guard HQ (depending on what you're trying to do) scripts do?
Logged
Kadur Remnant: http://fractalsoftworks.com/forum/index.php?topic=6649
Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=16058
Vayra's Ship Pack: http://fractalsoftworks.com/forum/index.php?topic=16059

im gonna push jangala into the sun i swear to god im gonna do it

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4668 on: July 01, 2019, 03:06:35 AM »

Hum, is there a reason why planet mouse-over descriptions can have multiple paragraphs displayed while stations will only show the first one?
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4669 on: July 01, 2019, 07:17:15 AM »

There really isn't; I think it's also supposed to limit it to 1 paragraph for planets, but that hasn't come up so I never noticed it. That much text is a bit much for that tooltip, imo; the first paragraph in all (or nearly all) descriptions is supposed to work as a stand-alone summary. General idea being to have something brief the player can read and not throw too much text at them, especially in a hover-over campaign tooltip that hides what's going on underneath it.

IIRC for planets, you can view the full text in the planet detail screen while for stations you should see it on interacting with the station, right?
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4670 on: July 01, 2019, 08:55:00 AM »

Actually yes indeed, the cutoff is dependent on the total length. Problem is, the text in the intel screen is not scrollable, so that's an issue at lower resolutions:

Spoiler
[close]

I was trying to divide my texts into,
tooltip: historical description of the place
interaction text: technical description of the place, plus some flavor if needed
market flavor: in character impression, visual description of the place.

So while technically possible, cramming everything in the interaction text is less than ideal, especially since I have a few places that do have a lot to tell about themselves.
« Last Edit: July 01, 2019, 08:58:35 AM by Tartiflette »
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4671 on: July 01, 2019, 09:06:56 AM »

Let me make a note to add a scrolly thing there.

Does seem like a less than ideal place to lore-dump, though, hmm. Another option might be to add an intel item when first visiting a planet like this; that would have a lot more room to work with (especially if it was using the large description). Just in general, the intel screen is more suited to that sort of thing.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4672 on: July 01, 2019, 09:56:26 AM »

Well, soon I'll probably start to add permanent "Local magazines" to read in those planet's bars, a bit like what we started implementing in one of my mod with LazyWizard, where you can meet various people that break up the lore dumps into smaller, more digestible dialogs.
« Last Edit: July 01, 2019, 09:59:13 AM by Tartiflette »
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4673 on: July 01, 2019, 10:06:32 AM »

Cool! That sounds great.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4674 on: July 03, 2019, 12:34:08 PM »

When end-users click on a location (System in Hyperspace, location in a System) in the Map view, or have a fleet destination set via the Intel screen (clicking on a Bounty, for example) where is that data stored?  I'm having a little trouble finding this in the API.

I want to play around with new ways to travel around the map, essentially.

Ah, nevermind!  It's apparently in Global.getSector().getUIData().getCourseTarget()
« Last Edit: July 03, 2019, 12:46:21 PM by xenoargh »
Logged
Please check out my SS projects :)
Xeno's Mod Pack

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4675 on: July 05, 2019, 04:06:49 AM »

I need to periodically (let's say once a month) check for conditions (number of active fleets, etc..) and spawn fleets and that is what is giving me trouble.

Isn't that basically what either the raid or Lion's Guard HQ (depending on what you're trying to do) scripts do?

Where are those scripts located? I want to check them out.
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4676 on: July 05, 2019, 08:48:01 AM »

If you're using IntelliJ, you can right click on starsector.api.jar and choose "find in path..." to search the API for keywords. This is extremely useful for finding vanilla examples of what your'e trying to do. Netbeans probably has a similar feature.
Spoiler
[close]

If you're not writing enough code to justify installing an IDE (which doesn't seem to be the case), then you can unzip the API jar and search for keywords in java files using a command console, like this:
Spoiler
[close]

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4677 on: July 05, 2019, 09:50:37 PM »

Three quick (hopefully) questions:

1. Is there a good way to tell if a station is one of those partially complete pirate stations with only one module prior to battle? I haven't been able to find a way to differentiate them from complete stations with the same hull ID. I can count their modules, but only after I have a ShipAPI to work with, and by that time it's too late.

2. For ships with multiple sections, like stations, do stats adjustments from things like hullmods and officer skills propagate to the modules?

3. Is there a good hook I could use to override "$dangerLevelOverride" for every fleet the player might view the tooltip of?

Thanks!

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4678 on: July 06, 2019, 08:55:13 AM »

1. Is there a good way to tell if a station is one of those partially complete pirate stations with only one module prior to battle? I haven't been able to find a way to differentiate them from complete stations with the same hull ID. I can count their modules, but only after I have a ShipAPI to work with, and by that time it's too late.

Use member.getStatus().isPermaDetached(int index) - this'll let you figure out which modules, if any, are permanently removed, which is what the not-full-strength pirate stations use.


2. For ships with multiple sections, like stations, do stats adjustments from things like hullmods and officer skills propagate to the modules?

Officer skills: yes. Hullmods: no. (Thus, for example, the Targeting Supercomputer is installed on every module that needs it.)

3. Is there a good hook I could use to override "$dangerLevelOverride" for every fleet the player might view the tooltip of?

Hmm - a custom inflater, possibly, though I don't 100% remember if the timing would be right for that to work. Or (as you've probbably considered) a script that updates this for fleets around the player...
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1727
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4679 on: July 06, 2019, 12:04:16 PM »

Use member.getStatus().isPermaDetached(int index) - this'll let you figure out which modules, if any, are permanently removed, which is what the not-full-strength pirate stations use.
Exactly what I was looking for, thank you! It worked like a charm once I realized the core of the station could be detached (at first I was only iterating until ship.getVariant().getModuleSlots().size()).

Officer skills: yes. Hullmods: no. (Thus, for example, the Targeting Supercomputer is installed on every module that needs it.)
Ok, makes sense, just not for my specific case. Thought I'd make sure before implementing a method of propagation myself.

Hmm - a custom inflater, possibly, though I don't 100% remember if the timing would be right for that to work. Or (as you've probbably considered) a script that updates this for fleets around the player...
Yeah, I'm currently using a script that updates every few seconds and when certain things happen, but fleets slip through the cracks every once in a while. I'll experiment with a custom inflater.
Pages: 1 ... 310 311 [312] 313 314 ... 710