Topics - dalolorn

I've been meaning to go on the IRC and ask the question there, seeing as it's (usually) faster, but seeing as I never remember to do it...

I've been working on sensors for ABEM. After a lot of struggling getting the sight modifiers to sort properly, everything (and by 'everything', I really just mean 'nebulae and cheating in a bunch of modifiers') seems to work - EXCEPT the reason the system was redesigned in the first place.

class AddSensor : SubsystemEffect {Document doc("Changes the sight range of the ship using a subsystem. Modifier scales based on how much of the subsystem is still operational. If no scaling is required, use AddSightModifier instead.");Argument priority(AT_Integer, "100", doc="The order in which the modifier is executed. The lower the number, the sooner it is executed. NOTE: Only use positive integers here!");Argument multiplier(AT_Decimal, "1", doc="The number by which the ship's base sight range and all previously executed modifiers are multiplied. NOTE: Same-priority modifiers do not multiply each other, they just combine their results when they're done!");Argument addedRange(AT_Decimal, "0", doc="The amount of extra sight range to add, expressed in units. For reference, the sides of the biggest squares on the system grid are 500 units.");

Module: DefaultA bunch of print-assisted debugging (keep in mind that I don't have my working copy handy right now, just the GitHub repository) indicates that the following things happen:

When the ship spawns, the subsystem triggers AddSensor.start(). Because I've printed out whether it ran correctly, I know that info gets initialized in the start() function, as designed. For some reason, though, priority.integer, multiplier.decimal and addedRange.decimal are all 0.

Things get even more complicated, though - while the tick() function does ensure that damage to the core forces it to recompute the modifier and figure out what it did wrong, damaging non-core hexes doesn't seem to have any effect. Since it's been at least a week since I did anything, I don't remember if repairing the core to full health sets the values back to 0.

Also known as 'What Happens When I Participate In a Mod That Expands/Changes Canon'.

Basically, I'm going to take what few clues the game provides (most notably, the lore snippets from the race selection screen), the one piece of Firgof's 'story bible' I remember (Remnants being AI), and ABEM's lore (which is itself an extrapolation from known SR2 canon, with the occasional modification like changing 'Terrakin' into 'Terran') and write around that.

I'm thinking of introducing all the SR2 races, doing some stories around them, then bringing in the ABEM races later on. With that in mind, here's the first part of the Terran intro, which also contains a reference to what time it is in the 'present' (I apologize for the scrolling needed to get past the wall of text - this forum doesn't seem to have [SPOILER] tags like the ones in the SWTOR or SWGEmu forums):

Quote

Missed Mercy

Quote

Context/SynopsisA colony ship from Earth concludes its journey, thousands of years after it was supposed to reach its destination...

*** New Hope Historical Database, 703 years after planetfall ***

When the Mission of Mercy left the Sol system in 2437, it left little of value behind.

Civil unrest, catastrophic ecological damage, and growing disputes over what few resources humanity had were bringing closer an end to our existence in the universe.

Those were dire times. Realizing that their home system was no longer large enough to support the human race - or, perhaps, that their time was an end - the last of the Terran governments came up with a daring plan, triggered by the fresh discovery of a habitable planet within one of the nearby systems:

They would construct a series of ships, and send millions of colonists to this planet - 'New Hope', as they called it - to rebuild, and never again repeat the terrible mistakes of their past. 'Mission of Mercy' was given its name partly because it was among the last ships to leave, carrying supplies that could greatly benefit the colony that would have been established a handful of years prior to its arrival.

What happened to the other ships is unknown, but the Mission never arrived at its destination.

*** The area that would become known as the Gatt system, March 21st, 31330 ***

The AI aboard the Mission of Mercy detected that it was approaching its destination.

The ship had stumbled upon an unstable wormhole more than 25 thousand years ago, and had been searching for an alternative colony site ever since. Worse still, one of the systems it had been analyzing turned out to be a binary system containing a neutron star - late detection had meant that most of the ship's database had been wiped out before it got to a safe distance.

Quote

Planet #2: High quantities of nutrients and water, more than enough to support a massive colony. Gravity estimated at 0.93 Earth gravity. Atmospheric analysis inconclusive, a more detailed analysis is required. Probability of suitable colony site: 68.4 percent.

The biggest problem concerning the AI right now was the amount of fuel it had left. Although it had managed to significantly increase the lifetime of its fuel reserve, time was running out - this was the last system it would be able to analyze.

68.4 percent. Not good enough for safe colonization under these circumstances. Still, it is better than 0 percent...

The ship adjusted its course to take it towards the second planet in the system.

*** Days later, near Gatt II ***

The ship continued its approach, rapidly decelerating to a more appropriate velocity. Running diagnostic on landing-relevant systems...

Quote

LANDING GEAR...

100% OPERATIONAL

CRYOSTASIS CONTROL CIRCUITRY...

100% OPERATIONAL

STASIS UNITS 1-14...

100% OPERATIONAL

HIGH-FOCUS SCANNERS...

82% OPERATIONAL

82 percent? The AI queried the system for a more detailed analysis. Without those sensors, it might not be able to accurately determine a suitable landing site, much less complete its scans of the atmosphere.

The maneuvering thrusters were critical to surviving atmospheric entry and landing in one piece. This is a problem. The AI started computing probabilities and making contingency plans.

There is a 4.72 percent chance of a successful landing under the circumstances. Of this, the probability of landing in a suitable region is 0.14 percent, with a 2.39 percent probability of not landing on water. The remaining 2.19 percent accounts for landing in a less suitable environment.

How do I improve upon that...

Venting atmosphere. If I time it correctly, I can adjust my trajectory to decrease the entry angle - then the thrusters would only be needed for the final maneuvers once the ship was in the atmosphere. I calculate a 38.7 percent probability of success with that plan. The stasis pods would still have enough air inside to sustain the colonists until additional air from the planet could be used to repressurize the ship.

... If it was safe. Otherwise, the chance of death for all colonists is 100 percent.

If only I could confirm that...

Nonetheless, this is the safest course of action. A fraction of a second after the diagnostic cycle completed, doors and airlocks throughout the ship were sealed or opened depending on their location and the amount of air inside them.

The Mission of Mercy had begun its descent.

*** Shortly afterwards ***

"Revival of Captain Joseph Calder complete," the AI noted. "Welcome back, Captain. Revival of your senior staff and all other essential personnel is underway. You may experience momentary disorientation as a result of your time in stasis. Please inform me if your symptoms persist, so that it can be brought to the attention of the appropriate medical staff."

Captain Calder sat up in his pod. The AI was right - he felt somewhat disoriented and groggy after the long time he'd spent in stasis, but there wasn't much he could do about that right now. "What time is it?"

"According to my calculations, there are four hours left before sunset. Would you like me to brief you on the current status of the ship?"

"Yeah, go ahead," Calder answered, slowly getting out of the pod.

"Damage to the maneuvering thrusters has had a significant impact on the quality of the landing. Primary engines are offline and I have lost contact with several sections of the ship. The whereabouts of the other colony ships are unknown. There is an abundance of natural resources in the surrounding area; establishing a colony, while time-consuming, should not be too difficult."

"Wait, back up a bit. The other ships aren't here?"

"Affirmative. I am currently unable to retrieve data as to why this is the case; several data modules are currently inaccessible due to damage from the crash. Others have been damaged directly, and there are some gaps in my memory that I cannot explain at this time."

"Great."

*** A few days later ***

Calder entered his ready room. Originally, the colony ships were meant to be reused for orbital and intra-system travel. Evidently, that wasn't going to happen. The captain sat in his chair and started typing.

Quote

Captain's Log, April 09 - 31330(?)The AI wasn't kidding. There's nobody else on this planet, and instead of being welcomed by the colonists that were sent before us... Nothing. Right now we have to establish some kind of base, just to jumpstart the colony. Wake up the rest of the ship once we're in a position to try to feed everybody.

I'm worried, though. We couldn't revive some of the crew, which means at least some of the pods are damaged. They seem to be working well enough, though, so that's weird.

Maybe we can get to the bottom of this once we're set up. Figure out what happened to the forty-eight million people who went before us.

******

Quote

Captain's Log, July 02 - 31330(?)Well, the colony's set up now. Haven't had much time to write lately. The Ship's AI gave itself a name: Mercy. Not even a hint of creativity.

I gutted the nav. computer last night. Checked the logs while I was knee-deep in cable and fried circuitry. We passed close by a Neutron star a hundred years ago (I think) and it did wonders to the datadrives. Brass tacks: I have no idea where we are now.

Checked Astrometrics1, though, and I do know that the Milky Way isn't anywhere up there. I asked Mercy and she said we got here due to an 'unexpected sensor anomaly'. I suspect we might've tripped over a wormhole or two. Thought those things were supposed to just be theoretical. Anyway, we missed our target destination. This is not New Hope.

******

Quote

Captain's Log, July 17 - 31330(?)Took another look at those pods. Looks like they were damaged. Sure, they'll work - just not in a vacuum. Mercy thinks that's what went wrong. When she vented the atmosphere during the landing... all the damaged pods were depressurized, too.

We're going to start waking up the others in a couple of days. I just hope this was an exception, not the rule...

******

Quote

Captain's Log, August 04 - 31330(?)We woke up the rest of the folks in the pods. Or tried to. We had twelve million souls aboard. Now we're 14,000. I asked Mercy to handle the funeral arrangements for the ones we still had data on. As for the rest... we'll just keep them in pods, I guess. Who knows - maybe at some point we'll be able to revive some of them.

Ship's reactor is good for another three thousand years, give or take, if we can locate some more fuel.

******

Quote

Captain's Log, August 05 - 31130(?)Mercy told me I should find someone else to lead the colony in case I kick the bucket. Redundancy.Just like a machine to worry about redundancy when people are staring at the corpses of their dead loved ones.I told her to do it herself.

******

Quote

Captain's Log, September 02 - 31330(?)Well, it's been almost five months now. I guess if this place hasn't killed us yet, it probably won't kill us at all. That's just about the only positive highlight of the past two months, though. Mercy finding a candidate for her 'redundancy' project doesn't quite cut it.

We've managed to rig up a VR system using one of the empty stasis pods we had left over. Mercy's already booked it for training purposes. I wonder what kind of training program she has in mind...

With the engines shot and the ship gutted for parts the Colony needed the 'Mission of Mercy' isn't going anywhere. Looks like this is home now.At least they kept my ready room mostly intact. Can't stand the smell down there. Note to self: Sewers, pronto.

******

Quote

Captain's Log, April 06 - 31331(?)If I didn't look at the date last night, I'd never think it's been a year already. Unbelievable.We're getting settled in now, and some folks want to go away from the colony, spread out a bit.To be honest, I'm not sure what to say to that. A population density this high isn't good for feeding people with our infrastructure, especially if it's going to get denser, but spreading out opens its own can of worms.

Think I'll sleep on it. Or maybe I should ask Mercy for her opinion - she's probably going to have some unique insights based on 'statistical data' or something like that. Something to help lead the last fragment of humanity we know of.

Sometimes I wonder what happened to the other ships. If they made it, or wound up floating in space like the rest of us.For all I know, they might have reached New Hope, made a colony and gone extinct by the time we got here.

Whatever happened, we can't afford the luxury of thinking there's anyone else alive anymore. This is New Hope now, if not for humanity as a whole, then at least it is for us.

*** November 1st, 31331 ***

Everyone was asleep.

At least, everyone human. As usual, Mercy watched over the colony, using the ship's sensors to look out into the wilderness - and into space, analyzing every bit of data that could be of use to the colonists.

Right now, the only thing of interest was a storm front forming to the southeast. She focused her attention on the storm, calculating how long it would be before it hit the outlying settlements, when the AI was distracted by something else.

Captain's Log, November 4 - 1I've set the year clock to 1. Might as well - the atomic clock's gone now. Only year that matters anyway is how long we've been stuck here.I think Mercy was crying last night. I can't even begin to understand how that works. Can AIs mourn?She told me everyone was suffering - that it was my fault. I shut her down - I don't know if she was a self-evolving rogue AI or some weird glitchy abomination but I don't intend to find out.

I hear my 'replacement' is near finished with the training in the sim-pod. I've checked his data - I'm not impressed.We're deep in the unknown now. Back on Terra Firma, I looked up at the sky and saw just endless possibilities.Here on New Hope I look up and all I can feel is this creeping terror. Something is up there - and we're not prepared to meet 'em.

I hope to God that 'newbie's luck' applies to whatever it is we're heading for - something tells me the kid's going to need it.

NOTES:

1 - Astrology has no relation to the rest of that log, so I changed it to something more appropriate.

2 - It seemed a bit odd that there was still a lot of mourning and depression thirteen months after everyone was said to be dead. Also, a few other things in that log seemed more appropriate within the first year than the second, so 31330 it is.

Overall: I'm not quite fond of how I skipped through the actual crash-landing of the Mission, but I'd probably have done it all wrong. Between that and figuring out what name to use for Calder (my first several surnames wound up being far too easily located on Google, and while 'Calder' isn't all that obscure either, it's a step in the right direction), I spent days without touching this.

EDIT: Tweaked a date - 3 days seemed like an awfully short time for the Mission to reach Gatt II and land...

I've been implementing a bunch of nebulae (and an 'empty space' system, because who says stellar gravity wells and gas clouds are the only interesting places in the galaxy, right?! ) for ABEM, and I've hit a slight roadblock.

I was planning on implementing special orbitals for some of those nebulae, which provided nebula-specific buffs to an empire, sort of like what the Singularity Lab does. Unfortunately, as it turned out, the Singularity Lab checks if the star temperature of a system is 0, which doesn't help me determine what nebula type (if any) I'm trying to build them in. Furthermore, I seem to have found an integer ID for a system type in the documentation, but no function to get that ID from a string, which is a problem.

Am I missing something, or should I try to indirectly detect the system type using region statuses? (I was adding those anyway, so... as long as at least one object remains in the nebula to receive the status, I should be fine.)

The locale keys at the top of the log are my fault; I put them there to avoid EOF (Edit: Silly me, it's BOM, not EOF.) issues. Amusingly, my copy-paste suggests that the issue has been resolved, even though that would mean that the errors shouldn't exist.

The duplicate Subsystem material is something I'll have to refactor at some point. Deleting it just made the game spew out even more (albeit less cryptic) errors.

The three missing images at the bottom are probably my fault, as I was messing with the .gitattributes file and GitHub took it as a green light to do CRLF normalization on binary files. Because it's smart that way. I've been telling Alar to reupload the images, but he hasn't done it yet, so... broken files.

Edit: Needless to say, I've checked the UnlockSubsystem() hooks, and the AddModifier() hooks. As far as I can tell, there's not even a typo to explain that. The empty ModAttribute() call is something from Alar's unfinished government techs, I think.

I could just post the answer to Zminer's problems in his thread. But it's simpler to just bunch it up with anything else I might end up posting in the future. (Also, this provides a place for others to ask for help, which translates into more winning for the modding community, right?! )

DISCLAIMER: While copy-pasting this stuff into the game should work (barring any unnoticed syntax errors, which seem to be my signature), I would advise you not to actually use it until you've figured out the underlying logic. Not only does it help you troubleshoot the code on your own (or alter it), but it'll also help you understand the underlying mechanics. One does not become a veteran modder without such an understanding...

As it is right now, GevronStation and VolkurStation, the Gevron and Volkur station hulls, are completely identical. The only difference is in the ID.

However, as the game checks that ID rather than the underlying hulls when importing designs, it is possible to make a Gevron station, go off and play with the Volkur shipset, and find yourself unable to import your station, instead having to make an identical replica of it. Altering references to GevronStation and VolkurStation to a unified Station ID would make things simpler for those of us playing with both shipsets.

On another note, could we get the option to mark certain designs as 'default', so that the game tries to load them (and possibly replace their namesakes) while starting? This would also be a nice, if less significant, QoL improvement.