Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 222 223 [224] 225 226 ... 710

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

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3345 on: May 19, 2017, 06:14:51 PM »

Alex, I tried this:

Code
						CommMessageAPI message = Global.getFactory().createMessage();
message.setSubject(pickedSystem.getName());
message.getSection1().setTitle("Summary");
message.setLocationString(explorerHQ.getContainingLocation().getNameWithLowercaseType());
message.setStarSystemId(explorerHQ.getContainingLocation().getId());
message.setCenterMapOnEntity(explorerHQ);
message.setType("Log Entry");
message.setShortType("Fleet log");
message.setTimeReceived(Global.getSector().getClock().getTimestamp());
message.setTimeSent(Global.getSector().getClock().getTimestamp());
message.setSmallIcon(Global.getSettings().getSpriteName("intel_categories", "star_systems"));
FleetLog.addToLog(message, null);

That still didn't result in the System's name being show on the Hyperspace map or Intel screen.  Pretty confused here; what else needs to be done?
« Last Edit: May 19, 2017, 06:22:28 PM by xenoargh »
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3346 on: May 19, 2017, 06:22:39 PM »

Not sure - are you getting the message to show up in your intel? I just tried (basically) the code you pasted and it works.

Code: java
CommMessageAPI message = Global.getFactory().createMessage();
message.setSubject("Erebus");
message.getSection1().setTitle("Summary");
message.setStarSystemId("erebus");
message.setType("Log Entry");
message.setShortType("Fleet log");
message.setTimeReceived(Global.getSector().getClock().getTimestamp());
message.setTimeSent(Global.getSector().getClock().getTimestamp());
message.setSmallIcon(Global.getSettings().getSpriteName("intel_categories", "star_systems"));
FleetLog.addToLog(message, null);

"Erebus" being a particular procgen system in that save.

http://imgur.com/a/Ia5oB

(There's a bunch of icons next to the star system because the code added a bunch of messages due to running every frame; was a quick-and-dirty test.)
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3347 on: May 19, 2017, 06:24:01 PM »

Quote
are you getting the message to show up in your intel?
Nope, it's not showing up anywhere.

This code's running during onNewGame().
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3348 on: May 19, 2017, 06:28:36 PM »

Might not be showing up because it's 2 months old, then. Filter stuff etc.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3349 on: May 19, 2017, 06:33:24 PM »

Aha!

OK, so I can write a simple iterator to find that sucker once the Economy's done, then!  I'll try that out :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3350 on: May 19, 2017, 06:57:53 PM »

Ah... nope?

Code
	@Override
public void afterGameSave(){
List<StarSystemAPI> systems = Global.getSector().getStarSystems();
for(StarSystemAPI system : systems){
if(system.isProcgen()){
List<SectorEntityToken> entities = system.getAllEntities();
for(SectorEntityToken entity : entities){
if(entity.getMarket() != null){
CommMessageAPI message = Global.getFactory().createMessage(); 
message.setSubject(system.getBaseName()); 
message.getSection1().setTitle("Summary"); 
message.setStarSystemId(system.getNameWithLowercaseType()); 
message.setType("Log Entry"); 
message.setShortType("Fleet log"); 
message.setTimeReceived(Global.getSector().getClock().getTimestamp()); 
message.setTimeSent(Global.getSector().getClock().getTimestamp()); 
message.setSmallIcon(Global.getSettings().getSpriteName("intel_categories", "star_systems"));
message.setLocInHyper(system.getHyperspaceAnchor().getLocationInHyperspace());
FleetLog.addToLog(message, null);
}
}
}
}
}

Sooo... am I asking the wrong question? 

I just want the Star's name to show up on the Hyperspace map, like Askonia, etc. are. 

But the procGen stars don't show up on the map, except when we're looking at the star in the Intel screen (which is weird; shouldn't they all be seen, but greyed out or something, to tell players they haven't been explored yet?).  This is involving a procGen star, so is that the issue?  Hmm, could try setting it to not-procGen and see...
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3351 on: May 19, 2017, 07:00:04 PM »

You're aware of the map filter, right? The row of buttons on the bottom? The non-intel map is set to only show inhabited systems by default. The intel maps only shows the names of systems such that there exists a message matching the *intel* filter settings tagged with that star system id.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3352 on: May 19, 2017, 07:07:37 PM »

But... this location is inhabited???

Code
market.setSize(6);
market.addCondition(Conditions.POPULATION_6);

What else triggers that?

Or is there something in the System?  Will look.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3353 on: May 19, 2017, 07:14:09 PM »

"inhabited" is defined as "part of the economy", i.e. getSector().getEconomy().addMarket(market) or some such.

(Which, incidentally, means that during-tutorial Galatia gets missed by the "inhabited" filter, which is a bug...)
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3354 on: May 19, 2017, 07:16:37 PM »

Hmmm.... that's weird, I thought it was already part of the economy.  Checking this out now...
Logged
Please check out my SS projects :)
Xeno's Mod Pack

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3355 on: May 19, 2017, 07:24:29 PM »

SUCCESS.  That was the missing part of this puzzle.

Well, yay, we now have a generic-ish way to generate named locations with Stations with economies and populations for Factions that non-coders can use, that use procGen Systems (i.e., no need to know all the hand-build stuff).

Not sure if it'll pass Janino yet, I'll probably need to build out the JAR to get data from a simple JSON to make it truly non-coder-friendly... but whatever, the core works now...
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Clockwork Owl

  • Admiral
  • *****
  • Posts: 790
    • View Profile
    • Starsector South Korean Community
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3356 on: May 20, 2017, 03:32:44 AM »

1. How do I make a sound play when a MIRV splits? "fireSoundTwo" in .wpn file didn't work...

2. How do I play sound via script?
« Last Edit: May 20, 2017, 04:23:37 AM by Aron0621 »
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3357 on: May 20, 2017, 03:34:38 AM »

Ok, a few more questions from a local ***.


How does the number of fighter bays (and the number of actual launch bays for each) interact with the fighter number defined in the ship_data.csv?

Unless I'm mistaken, the ship_data number dictated how many wings a ship can carry. But what effect does actual number of Launch PORTS and BAYS play in the whole thing?

4 launch PORTS with 1 BAY or 1 PORT with 4 BAYs? What's the practical difference?
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3358 on: May 20, 2017, 04:09:26 AM »

How does the number of fighter bays (and the number of actual launch bays for each) interact with the fighter number defined in the ship_data.csv?

Unless I'm mistaken, the ship_data number dictated how many wings a ship can carry. But what effect does actual number of Launch PORTS and BAYS play in the whole thing?

4 launch PORTS with 1 BAY or 1 PORT with 4 BAYs? What's the practical difference?

The value under "fighter bays" under "ship_data.csv" is the number of wings the ship can carry.

The ports in the "____.ship" file mark the visible points on the ship sprite that appear to "spark" while fighters are being repaired, as well as where fighters will appear to launch from and land. Normally there'd be a handful (3-6?) of "ports" for each "bay", to add an element of randomness.

At least, that's how I use them.
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3359 on: May 20, 2017, 04:31:40 AM »

So 4 bays with 2 ports and 2 bays with 4 ports function exactly the same?

Does the total number count for the repair speed or number of fighters that can be repaired at once or is it just for show?


Also, can ships that have launch bays, but don't have defined fighter wings repair friendly fighters?
« Last Edit: May 20, 2017, 04:42:05 AM by TrashMan »
Logged
Pages: 1 ... 222 223 [224] 225 226 ... 710