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: Simulator Enhancements (03/13/24)

Author Topic: Starfarer Custom Content Interoperability Project (SCCIP)  (Read 3402 times)

K-64

  • Admiral
  • *****
  • Posts: 1117
    • View Profile
Starfarer Custom Content Interoperability Project (SCCIP)
« on: August 20, 2012, 09:15:14 AM »

This is an idea of mine that will hopefully help users who like to have lots of mods activated at once. For Total Conversions, like Caelus and Ironclads, this won't matter a bit, since they're meant to be run on their own, but for smaller mods, such as single faction and such, this should help reduce conflicts.

Right, so this isn't a very prominent problem thus far, however with the increasing popularity of Starfarer, it will become a very real issue in the future (I've only been bitten by it once, and it was easy enough to remedy). What I am talking about, is prefixes to all unique IDs in your mods. Some of you may do this already, through force of habit (I'm ashamed to say I do not), however there are a large amount of mods (including mine) which do not take advantage of prefixing things. You may be thinking "So you're suggesting we put a prefix to the start of our stuff, so what?". So it means that you can post the prefix you are personally using for your mod here, so that people don't accidentally use what you are, and cause issue.

What I wish to see with this, is a greater sense of harmony between mods, so while 15 mods that someone uses has a ship class of, for example "Zeus", they will all be ingame without incident due to the unique identifiers on each. If there is sufficient support for this project, I shall put up a list of used prefixes in this post so that it's simple to glance and see what's already used.

Peace out.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7174
  • Harpoon Affectionado
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #1 on: August 20, 2012, 11:18:43 AM »

Logged

K-64

  • Admiral
  • *****
  • Posts: 1117
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #2 on: August 20, 2012, 11:21:58 AM »

That doesn't address the issue though, only highlights it.
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #3 on: August 20, 2012, 11:31:53 AM »

Tehe, I read the forums first before making mods xD

I guess this is sorta on topic, but I personally add prefixes to everything I Can, ( habit I guess now :P )
Don't forget all you people with custom subsystems! Those count too!


Note on Adding Ships/Weapons/etc (Important!)

Anything your mod adds (a ship, a ship variant, a weapon, a mission, etc) has an id. Please use a prefix specific to your mod for these ids. For instance, in the 2nd example mod, you'll notice that the new ship's id is "ex2_red_tempest", with "ex2_" being the mod-specific prefix.

Also, put graphics your mod adds in a separate directory. If your mod name is "my_mod", you could put your ships under graphic/my_mod/ships, weapons under graphics/my_mod/weapons, etc.

If you don't do this, other mods and future versions of the game might have unintentional conflicts with your mod. That would be very, very bad.

Note: DO NOT put weapon and ship data files in a different directory. The game expects to find those under data/weapons and data/ships respectively, and these already have IDs to help tell apart. Multiple mods having the same filename for a weapon/ship is fine as long as the ids are different (see first point above).

Logged

K-64

  • Admiral
  • *****
  • Posts: 1117
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #4 on: August 20, 2012, 11:35:00 AM »

Okay, I did not know about that second bolded part. Though I would've thought prefixing the sprites as well would prevent such issues, wouldn't it? So taking that example before you'd have (prefixes entirely random here)

mod1/graphics/ships/cv_Zeus.png
mod2/graphics/ships/mh_Zeus.png
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #5 on: August 20, 2012, 11:40:57 AM »

Uomoz Corvus does this, I found that out after i Got in it, so I switched over my own directory scheme just to make life easier xD

\my_mod\graphics\neut\ships\herp.png
\my_othermod\graphics\neut\ships\herp.png

with this scheme, as long as you get the first part of the directory right, you can have 2 seperate .pngs with the same name without a prefix but still use them independently.

or you can just do,

\my_mod\graphics\neut\ships\neut_herp.png
\my_mod\graphics\neut\ships\derp_herp.png

and it'll still work, but naming something the same twice in one folder usually just doesn't ever work, in game or in your os. Lol
Logged

neonesis

  • Commander
  • ***
  • Posts: 248
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #6 on: August 20, 2012, 02:36:21 PM »

As I understand, it's all completely not about file names, but about object IDs.

File name is just something to load the file, nothing more - it's the ID that is used to manipulate the data.

As far as I understand.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #7 on: August 20, 2012, 02:43:03 PM »

File name is just something to load the file, nothing more - it's the ID that is used to manipulate the data.

* Except for PNGs, where the filename (plus path) also doubles as the id - hence, mods being able to replace vanilla graphics wholesale.

** Also except for sounds, where a mod can override a sound by simply providing a file with the same path + name, without changing sounds.json.
Logged

K-64

  • Admiral
  • *****
  • Posts: 1117
    • View Profile
Re: Starfarer Custom Content Interoperability Project (SCCIP)
« Reply #8 on: August 20, 2012, 03:30:57 PM »

As I understand, it's all completely not about file names, but about object IDs.

File name is just something to load the file, nothing more - it's the ID that is used to manipulate the data.

As far as I understand.

That's what I'm getting at. The IDs for all things in mods should be prefixed in a specific way. And images/sounds (If applicable). But file names would need them as well I would imagine, for example, if you have something like two TradeGen.java files in different mods, wouldn't they interfere with each other?
Logged