Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: james777 on July 31, 2008, 07:31:42 am

Title: How do you make the ships table infinite?
Post by: james777 on July 31, 2008, 07:31:42 am
How do you make the ships table infinite?
Title: Re: How do you make the ships table infinite?
Post by: Shade on July 31, 2008, 07:41:24 am
That requires code changes, not something that can be done through modding. You do have two options, though:

1) Use an Inferno build, which have a higher limit than regular fs_open builds.
2) Use ship templates, as those can cover several ships in a single table entry.
Title: Re: How do you make the ships table infinite?
Post by: Wanderer on July 31, 2008, 07:43:05 am
There is always some limit for amount of material that can be loaded into the game.
Title: Re: How do you make the ships table infinite?
Post by: james777 on July 31, 2008, 07:47:02 am
Oh, ok.
Title: Re: How do you make the ships table infinite?
Post by: Stormkeeper on July 31, 2008, 01:04:29 pm
Having unlimited anything in a game might cause serious memory issues when running it.

Its like opening a container, and never closing it. People keep putting more and more things in it and eventually it overflows.
Title: Re: How do you make the ships table infinite?
Post by: blowfish on July 31, 2008, 01:08:05 pm
2) Use ship templates, as those can cover several ships in a single table entry.

That won't work, since every ship defined, even ones that use a template, take up room in the ship classes array, which has a capacity of 130.

For those who don't understand the tech speak, that means that ship templates won't allow you to have any more ships.
Title: Re: How do you make the ships table infinite?
Post by: Stormkeeper on July 31, 2008, 08:45:43 pm
Simplified version:

The array is like a box. With 130 spaces. Even when you use a ship template, each ship in the template, will also take up space in the box. So unless you use an Inferno build, or modify your own code, eventually it will be full.

What happense if you exceed the limit tho? Do the overflowed ships just not appear?
Title: Re: How do you make the ships table infinite?
Post by: blowfish on July 31, 2008, 09:11:19 pm
The array is like a box. With 130 spaces. Even when you use a ship template, each ship in the template, will also take up space in the box. So unless you use an Inferno build, or modify your own code, eventually it will be full.

Pretty close, but ship templates do not take up space in the ship classes array.  The ships that use the templates, however, do.  Ship templates have their own array, which is dynamic, meaning that you can have as many ship templates as you want.  You are probably asking: why not do this for ships as well?  The answer is that a lot of things, including pilot files and multi, rely on their being a limited number of ships.

What happense if you exceed the limit tho? Do the overflowed ships just not appear?

Yes.  You can't have more objects in an array than there are spaces available.
Title: Re: How do you make the ships table infinite?
Post by: Excalibur on July 31, 2008, 11:07:44 pm
You need more than 130 ships?
Title: Re: How do you make the ships table infinite?
Post by: Scooby_Doo on August 01, 2008, 02:05:49 am
Wait for 3.10? release.

You need more than 130 ships?

I know with Saga + mine > 130.  I have to disable one before I get a new one to become visible.
Title: Re: How do you make the ships table infinite?
Post by: Stormkeeper on August 01, 2008, 06:15:11 am
How many ships are there in the first place? 60 odd ?
Title: Re: How do you make the ships table infinite?
Post by: Snail on August 01, 2008, 07:26:08 am
107
Title: Re: How do you make the ships table infinite?
Post by: james777 on August 01, 2008, 10:30:53 am
is the wep table infinite?
Title: Re: How do you make the ships table infinite?
Post by: Droid803 on August 01, 2008, 12:04:55 pm
No, but there are fewer weapons by default, so there's more room.
Title: Re: How do you make the ships table infinite?
Post by: Hellstryker on August 01, 2008, 12:30:06 pm
How many weapons -does- it hold exactly..
Title: Re: How do you make the ships table infinite?
Post by: Droid803 on August 01, 2008, 12:32:08 pm
Forgot. Someone mentioned it at one point...when I was complaining about ship limits.
Title: Re: How do you make the ships table infinite?
Post by: Wanderer on August 01, 2008, 12:47:41 pm
Brief checks for some of the asked limits from the code....

Max number of ship table entries: 130 (multi) / 130 (standard) / 250 (inferno)
Max number of weapon table entries: 200 (standard) / 300 (inferno)
Title: Re: How do you make the ships table infinite?
Post by: Snail on August 02, 2008, 10:52:39 am
IMO Inferno builds should be renamed, as it stands most newbs are confused with the Inferno mod, Inferno R1, Inferno SCP, Inferno Alliance, Inferno builds, etc. etc.
Title: Re: How do you make the ships table infinite?
Post by: chief1983 on August 04, 2008, 01:17:57 pm
Scoob, if you mean 3.6.10, it won't be there.  But it won't be as far off as 3.10 either, it should be part of the changes planned for 3.7 I believe.  That's still a ways off though.
Title: Re: How do you make the ships table infinite?
Post by: Scooby_Doo on August 04, 2008, 05:54:54 pm
Scoob, if you mean 3.6.10, it won't be there.  But it won't be as far off as 3.10 either, it should be part of the changes planned for 3.7 I believe.  That's still a ways off though.

My bad, I meant 3.7. 
Title: Re: How do you make the ships table infinite?
Post by: karajorma on August 05, 2008, 04:49:01 am
IMO Inferno builds should be renamed, as it stands most newbs are confused with the Inferno mod, Inferno R1, Inferno SCP, Inferno Alliance, Inferno builds, etc. etc.

Good point. Especially as the biggest mod using them so far is probably TBP not Inferno. :D

Since the tradition is to name them FS2_Open_VersionNumber_INF.exe we should choose a new name beginning with those letters. Infinity, Inflated,  etc. ;)
Title: Re: How do you make the ships table infinite?
Post by: Getter Robo G on August 05, 2008, 07:37:32 am
You need more than 130 ships?

Realistically I need about 300, unrealistically about 1000 would be nice... :)

Note 300 would about cover the Federation alone... I would have to serverly limit myself to 100 each faction: Feds, "allies", antagonists "enemies"...

Title: Re: How do you make the ships table infinite?
Post by: Stormkeeper on August 05, 2008, 07:57:44 am
o_O So many ?
Title: Re: How do you make the ships table infinite?
Post by: james777 on August 05, 2008, 10:51:59 am

So unless you use an Inferno build, or modify your own code, eventually it will be full.


How do modify the code so it can more ships?
Title: Re: How do you make the ships table infinite?
Post by: chief1983 on August 05, 2008, 11:00:43 am
Well, you have to learn C++ and Object-Oriented programming first.
Title: Re: How do you make the ships table infinite?
Post by: Topgun on August 05, 2008, 12:29:32 pm
I just uped the #defines :nervous:
Title: Re: How do you make the ships table infinite?
Post by: blowfish on August 05, 2008, 01:25:48 pm
I just uped the #defines :nervous:

Just be aware that it will break any pilot files you have