Author Topic: 250 ship limit  (Read 8208 times)

0 Members and 1 Guest are viewing this topic.

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
i've run into the 250 ship limit with my mod
is there a way to raise it for mods themselfs, or is this strictly limited by the engine itself?
if so, could it be raised? 250 is way too low for the kind of mod i'm trying to make, with all sorts of different variants of ships, lots of asteroids etc...  :(
« Last Edit: January 20, 2014, 06:18:54 pm by fightermedic »
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Wowzers.

 

Offline niffiwan

  • 211
  • Eluder Class
Wowzers indeed.

It's hardcoded into the engine, so no, mods cannot change the limit themselves (see inferno builds, and the reason they were originally created)
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline An4ximandros

  • 210
  • Transabyssal metastatic event
i've run into the 250 ship limit with my mod
:wtf:

That must be a lot of props! If you have lots of asteroids, maybe you can combine them into "ship-roids" that are invisible and have the smaller ones as destroyable subsystems (whose complete destruction kills the "controller"?

At this stage the only way to have more ships that I can see is to cheat the engine.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
The problem he's facing isn't concurrent ships in a mission, but total number of ship classes in his table files.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
I'm no SCP leader.. but given the history, I suspect this is not a limit that is going to be bumped very easily. But who knows...

I haven't heard of that limit being hit in quite a long time.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
I've been an advocate of getting rid of the darn thing for long. It did cause pilot file issues, though, so it was never accepted. However, with the new pilot code, maybe it could be either removed or bumped to, say, one million or some other ridiculous value.

 

Offline fightermedic

  • 29
  • quite a nice guy, no really, i am
it all depends on how it is structured in the engine
if we are talking about an array with a fixed size that is used all throughout the engine this might be difficult to change, i'm aware of it
but if it's an easy change i'm very much in favor of raising it, as i can't ever see me get below 250 ships and still have everything i want :(
>>Fully functional cockpits for Freespace<<
>>Ships created by me<<
Campaigns revised/voice-acted by me:
Lightning Marshal 1-4, The Regulus Campaign, Operation: Savior, Operation: Crucible, Titan Rebellion, Fall of Epsilon Pegasi 1.1Aftermath 2.1,
Pandora's Box 2.2, Deep Blood

Other Campaigns I have participated in:
The Antagonist, Warzone, Phantoms & Echo-Gate

All the stuff I release is free to use or change in any way for everybody who likes to do so; take whatever you need

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
it all depends on how it is structured in the engine
if we are talking about an array with a fixed size that is used all throughout the engine this might be difficult to change, i'm aware of it
but if it's an easy change i'm very much in favor of raising it, as i can't ever see me get below 250 ships and still have everything i want :(
Exactly how are your ship classes distributed, that you're reaching the limit? Do you have, like, 100 different kinds of asteroids or something?
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline niffiwan

  • 211
  • Eluder Class
if we are talking about an array with a fixed size that is used all throughout the engine

Yeah - I'm pretty sure it's like this.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Kopachris

  • 28
  • send penguins
    • Steam
    • Twitter
if we are talking about an array with a fixed size that is used all throughout the engine

Yeah - I'm pretty sure it's like this.

More specifically, it's in globals.h, line 48:
Code: [Select]
#define MAX_SHIP_CLASSES 250
And then that number is used all over the code for fixed-length arrays, for-loops, memory management, etc., not just one array.
----
My Bandcamp | Discord: Kopachris | My GitHub

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
The main reason that ship classes couldn't be bumped for so long was because the pilot code would have been broken.  But now that the pilot code has been upgraded, bumping the limit may be possible.

Of course, there are still a few loose ends with the pilot code that should be fixed before this is looked at.

 

Offline m!m

  • 211
We should consider using a std::vector instead of just increasing the size of the array. After loading it would behave just like an array, we would only have to make sure that there are no problems when we are parsing the table.

 

Offline The Dagger

  • 29
  • I like zod ships
If you have different variants of a same ship, can't you use submodels for the variable part of the ship and destroy the ones not needed at mission start, keeping only the one you need for the specific case at hand? Take this comment with a big quantity of salt though, since I don't know anything about FRED though...

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
We should consider using a std::vector instead of just increasing the size of the array. After loading it would behave just like an array, we would only have to make sure that there are no problems when we are parsing the table.

A vector isn't without its own problems.  The ship_info class doesn't have a copy constructor (one of the reasons why ship templates don't work), so that would have to be coded first.

 

Offline m!m

  • 211
I'm not saying that switching to a vector is without problems but if we continue to bump the limit we may consider using a vector as that will both decrease our memory usage (although that's only marginal considering how much we need for model, etc.) and it will be compatible with any number of ship classes.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Yeah, I agree with that, I'm just pointing out that it's not a one-step operation.  Other parsed objects (such as message personas) have been successfully converted to SCP_vector.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The main reason that ship classes couldn't be bumped for so long was because the pilot code would have been broken.  But now that the pilot code has been upgraded, bumping the limit may be possible.

There's a reasonable chance of breaking Multiplayer too. The fix I added previously should continue to work if you use a vector but it's possible there are other places it might break. That said, we should hopefully be able to fix any new breakages in the same way.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Aardwolf

  • 211
  • Posts: 16,384
250 sounds like "almost a byte, but make it a multiple of 50" to me?

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
250 is an arbitrarily chosen number based on the assumption that mods which needed that many slots would be really rare.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns