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.


Topics - dalolorn

Pages: [1]
1
Modding / Subsystem effects not initializing correctly?
« on: June 01, 2015, 09:51:44 AM »
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.

I've got a subsystem effect, AddScalableSubsystemSightModifier (renamed to AddSensor for convenience):

Code: [Select]
class SubsystemSightData {
bool hasLeader = false;
uint id;
float workingPercent;
any data;
}

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.");

#section server
void start(SubsystemEvent& event) const {
SubsystemSightData info;
if(event.obj is null)
return;
if(event.obj.hasLeaderAI) {
info.hasLeader = true;
info.id = event.obj.addSightModifier(uint(priority.integer), multiplier.decimal, addedRange.decimal);
info.workingPercent = event.workingPercent;
}
event.data.store(@info);
}

void tick(SubsystemEvent& event, double time) const {
SubsystemSightData@ info;
event.data.retrieve(@info);
if(event.obj is null)
return;
if(event.obj.hasLeaderAI) {
if(!info.hasLeader) {
double finalMult = multiplier.decimal * event.workingPercent;
if(finalMult < 1.0)
finalMult += 1;
info.hasLeader = true;
info.id = event.obj.addSightModifier(uint(priority.integer), finalMult, addedRange.decimal * event.workingPercent);
info.workingPercent = event.workingPercent;
}
else if(info.workingPercent != event.workingPercent) {
double finalMult = multiplier.decimal * event.workingPercent;
if(finalMult < 1.0)
finalMult += 1;
event.obj.modifySightModifier(info.id, finalMult, addedRange.decimal * event.workingPercent);
info.workingPercent = event.workingPercent;
}
}
else
info.hasLeader = false;
event.data.store(@info);
}

void end(SubsystemEvent& event) const {
SubsystemSightData@ info;
event.data.retrieve(@info);
if(event.obj is null)
return;
if(event.obj.hasLeaderAI && info.hasLeader) {
event.obj.removeSightModifier(info.id);
}
}

void save(SubsystemEvent& event, SaveFile& file) const {
SubsystemSightData@ info;
event.data.retrieve(@info);
file << info.hasLeader;
file << info.id;
file << info.workingPercent;
}

void load(SubsystemEvent& event, SaveFile& file) const {
SubsystemSightData info;
event.data.store(@info);

file >> info.hasLeader;
file >> info.id;
file >> info.workingPercent;
}
#section all
}

And I've got a BasicSensors subsystem:

Code: [Select]
Subsystem: BasicSensors
Name: Basic Sensors
Description: #S_BASIC_SENSORS_DESC
BaseColor: #9ed6ff
Elevation: 1

Tags: BaseCost, IsSensor, Category:Sensors, HasInternals, ExteriorCore, DefaultUnlock, NonContiguous
Hull: Flagship, Station

Size := HexSize * Hexes
SensorRange := 150 + (Hexes * 12.5) + log(Size/(10 *ShipSize)) * Hexes
SensorPriority := 100
Hex.Mass := HexSize / 2
Hex.Resistance := 0.1
Hex.HP := 15 * HexSize

Ship.ExternalHexes := Ship.ExternalHexes + ExteriorHexes

Modifier: SensorFactor(factor)
SensorRange := SensorRange * factor

Hook: ABEM_sensors::AddSensor(Priority = 100, AddedRange = SensorRange)

Module: Core
Sprite: TechIcons::1

Module: Default

A 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.

Relevant files are at GitHub:

https://github.com/Alarcarr/ABEMMOD/blob/feature/Sensors/data/subsystems/sensors/BasicSensors.txt - Basic Sensors subsystem
https://github.com/Alarcarr/ABEMMOD/blob/feature/Sensors/scripts/definitions/ABEM_sensors.as - The sight modifier hooks - AddSightModifier seems to work perfectly on my working copy now that I've finished tangling with the sorting algorithms, but the subsystem variant is still in a million pieces
https://github.com/Alarcarr/ABEMMOD/blob/feature/Sensors/scripts/server/orders/LeaderAI.as - The sensor implementation in LeaderAI, in case it matters - the sight modifier functions are at the bottom of the file, just before the write functions.

2
Random Noise / Rule of the Stars
« on: May 15, 2015, 12:45:00 PM »
EDIT: Came up with a tentative name.

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

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/Synopsis

A 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.

Analyzing planets...

Quote
Planet #1: Extreme concentration of various materials used in manufacturing of electronic components. Gravity estimated at 0.61 Earth gravity. High ambient temperature and radiation. Probability of suitable colony site: 0 percent.

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 AI noted the second planet for further consideration.

Quote
Planet #3: High quantities of nutrients. Low quantities of human-usable water. Gravity estimated at 1.17 Earth gravity. Probability of suitable colony site: 21.79 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.

Quote
Planet #4: High quantity of usable water. Gravity estimated at 1.09 Earth gravity. High ambient radiation, low nutrient level. Probability of suitable colony site: 9.53 percent.

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.

Quote
SENSOR RESOLUTION DOWN TO 43 PERCENT. MAINTENANCE OVERDUE BY 28702 YEARS, 8 MONTHS, 2 WEEKS, 3 DAYS, 15 HOURS, 26 MINUTES, 12 SECONDS--

Even the AI didn't need that much detail right now. It will have to do... it thought, and continued the diagnostic.

Quote
AIRLOCKS...

100% OPERATIONAL

INTERCOM...

100% OPERATIONAL

MANEUVERING THRUSTERS...

7% OPERATIONAL; FUEL LINES DAMAGED, MINIMAL FUEL RESERVES ACCESSIBLE TO THRUSTERS

DIAGNOSTIC COMPLETE

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


******


Quote
Captain's Log, September 12 - 31330(?)2

Lots of mourning. Lots of depression. Mercy's 'concerned'. Didn't know AIs could get concerned. Now I'm concerned.

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.

A signal from outside the system. What is this?

A few seconds passed as Mercy ran a detailed analysis of the signal.

Quote
Signal analysis complete. Probability of artificial origin: 87.47 percent.

Content analysis in progress...

Suddenly, Mercy was no longer alone.


******


Quote
Captain's Log, November 4 - 1

I'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...

3
Modding / Is it possible to detect the system type of a Region?
« on: January 26, 2015, 10:45:57 AM »
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.)

4
I'm trying to run the game without Steam to do a quick test on the GitHub build of ABEM. Other mods enabled are all my shipset ports, my flag extension, and the 'Multiple Theme Enabler'.

However, when I start the game, it spits this out into the console:

Code: [Select]
Locale key '´╗┐STUFF' is not a valid identifier
Locale key '´╗┐BARL' is not a valid identifier
Duplicate material: Subsystem
C:\Program Files\Steam\SteamApps\common\Star Ruler 2\scripts\definitions\ftl.as:
 Compiling bool canSlipstream(Object&inout)
  Error (159:37): 'ST_Slipstream' is not declared
 Compiling int slipstreamCost(Object&inout, int, double)
  Error (164:48): 'SV_SlipstreamOverhead' is not declared
  Error (165:48): 'SV_SlipstreamDistCost' is not declared
  Warning (166:23): 'distCost' is not initialized.
  Warning (166:43): 'overhead' is not initialized.
 Compiling double slipstreamRange(Object&inout, int, int)
  Error (171:48): 'SV_SlipstreamOverhead' is not declared
  Error (172:48): 'SV_SlipstreamDistCost' is not declared
  Warning (173:28): 'overhead' is not initialized.
  Warning (173:57): 'distCost' is not initialized.
 Compiling double slipstreamLifetime(Object&inout)
  Error (178:41): 'SV_SlipstreamDuration' is not declared
ERROR: Failed to build module 'ftl' in manager 'menu' (code -1).
 Error: mismatched argument count, expected 3 arguments.
Invalid arguments to hook: ModAttribute()
Invalid arguments to hook: UnlockSubsystem(ResearchLab)
Invalid arguments to hook: UnlockSubsystem(ResupplyModule)
Invalid arguments to hook: UnlockSubsystem(SupportReactiveArmor)
No subsystems matched 'mod/HpFactor' / ''
Invalid modifier: HpFactor(1.07)
Could not instantiate hook [AddModifier at 0x98aeaa8] on tech ImpAllHealth
No subsystems matched 'mod/HpFactor' / ''
Invalid modifier: HpFactor(1.14)
Could not instantiate hook [AddModifier at 0x98af250] on tech ImpAllHealth2
No subsystems matched 'mod/ArmorResistFactor' / ''
Invalid modifier: ArmorResistFactor(1.10)
Could not instantiate hook [AddModifier at 0x98af100] on tech Further Development
No subsystems matched 'mod/ArmorResistFactor' / ''
Invalid modifier: any::ArmorResistFactor(1.10)
Could not instantiate hook [AddModifier at 0x98aef08] on tech ImpArmorDR
No subsystems matched 'mod/ArmorResistFactor' / ''
Invalid modifier: any::ArmorResistFactor(1.25)
Could not instantiate hook [AddModifier at 0x98af170] on tech ImpArmorDR2
No subsystems matched 'tag/ProjBase' / ''
Invalid modifier:  tag/ProjBase::SpeedFactor(1.2)
Could not instantiate hook [AddModifier at 0x98b05c8] on tech ImpProjSpeed
No subsystems matched 'tag/ProjBase' / ''
Invalid modifier:  tag/ProjBase::SpeedFactor(1.4)
Could not instantiate hook [AddModifier at 0x98afd40] on tech ImpProjSpeed2
Events: Could not find function menu_server::new_game::void changeEmpireSettings_client(Player&, EmpireSettings@ settings)
Events: Could not find function menu_server::new_game::void chatMessage(Player&, string text)
Events: Could not find function menu_client::new_game::void chatMessage_client(string text)
Events: Could not find function menu_client::new_game::void chatJoin_client(string text)
Events: Could not find function menu_client::new_game::void chatLeave_client(string text)
Loaded in 22.6 seconds
C:\Program Files\Steam\SteamApps\common\Star Ruler 2\scripts\server\components\ObjectManager.as:
 Compiling const Design@ getDefenseDesign(Empire&inout, double, double = 1.0)
  Error (50:17): 'ST_HasMaintenanceCost' is not declared
ERROR: Failed to build module 'components.ObjectManager' in manager 'server' (code -1).
Shadow scripts: 583ms load, 3123ms compile
C:\Program Files\Steam\SteamApps\common\Star Ruler 2\scripts\server\planets\SurfaceComponent.as:
 Compiling void SurfaceComponent::buildWithDefense(Object&inout, double, double)
  Error (1493:19): 'ST_HasMaintenanceCost' is not declared
 Compiling void SurfaceComponent::spawnDefenseShips(Object&inout, double)
  Error (1558:19): 'ST_HasMaintenanceCost' is not declared
ERROR: Failed to build module 'planets.SurfaceComponent' in manager 'server' (code -1).
Server scripts: 492ms load, 4470ms compile
Client scripts: 654ms load, 9242ms compile
Loaded in 10.0 seconds
Error: Could not load image 'C:\Program Files\Steam\SteamApps\common\Star Ruler 2\mods\ABEMGit\data\images\subsystems\twin_turret_railgun.png'
Error: Could not load image 'C:\Program Files\Steam\SteamApps\common\Star Ruler 2\mods\ABEMGit\data\images\subsystems\OrbitalEngine.png'
Error: Could not load image 'C:\Program Files\Steam\SteamApps\common\Star Ruler 2\mods\ABEMGit\data\images\subsystems\armor_remnant.png'

Parts I know exactly what's gone wrong with:

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.

5
Modding / Modding Examples
« on: January 13, 2015, 04:40:51 AM »
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?! :D)

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... ;)

Edit: Example in the post below. Making a list for future use.


6
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.

Pages: [1]