DANMAN3712 DANMAN3712

HARDCODED LIMITS - by DANMAN

HARDCODED LIMITS - by DANMAN

BREAKING THE MODS

Hello All,

It has been made apparent now that there are many hardcoded limits in the game, which cannot be modded around, and are like a brick wall once you hit them. For example, here are some hardcoded limits that I have come across:

Structures and units - These cannot be changed or altered, which means that you cannot mix unit types.  You cannot have a orbital defense cannon have fighters and you cannot have a fighter bay have weapons

Captial ship limit. - the limit was 5, but this has been now changed to 9 in the 1.1 BETA, which IS much better

Weapon limit - you cannot have more than 3 different weapons on a ship

Ability limit - You cannot have more than 4 abilities per unit

Star Abilities - you can only have 1 ability on a Star.  Planets can have 4

Sounds - there is a max of 1100 sounds, spread across dialog, music, and effects.  The cobination of these files cannot reach 1100, or the game will dump

MODELS- the 3D models, or meshes, can only have a maximum of 10 emitters for any particular weapon, engine, etc., or the game will crash.

STRING FILE - EDIT - No limit now, as far as I can tell.  I have over 5780 entries so far.

I am writing this for all modders, so that they know that there are hardcoded limits which they cannot be changed or modded around at this time.  I am also writing this for the developers, in hopes that they will read this and consider changing these limits so that us modders can do what we do without having to worry about hitting an invisible ceiling.

I would appreciate everyone's support in this, from both modders and gamers alike. 

Thankyou.

DANMAN

296,479 views 156 replies
Reply #51 Top
StringInfo
ID "IDS_FRIGATE_XXXXXXX_COUNTERDESC"
Value ""


COUNTERDESC uses a stringinfo slot. -meh


Is it possible to make a new "Name.str" for planets, stars, capitalship names and taunts; a file only relating to structures/ships/abilities or is SINS designed to use only 1 .str file?
Reply #52 Top
Unfortunately, I think its only 1 string file per language.
Reply #53 Top
If Ironclad is based in Vancouver they may all be on holiday right now. Each province is a bit different but it was a long weekend here this weekend.

I wouldn't start to wonder until it hits mid-week and there is still no apparent response.

-dolynick
Reply #54 Top
Thank you all once again for your support. And yes, thinking optimistically, I hope that the developers are either too busy working on this to respond or are away on holiday. I sent them emails last week that I am still waiting for a response on. Also, in order to proceed with my mod, I think we mave have to resort to taking out a lot of "vanilla" stuff in order to make room. This is a bandaid fix for now, and I will soon enough reach the limit again. So, the hard codes still need to be either adjusted or removed.

Thank you all again for your support.

DANMAN
Reply #55 Top
They are hopefully busy testing the new turret code  :) 
Reply #56 Top
yeah i was going to make a really long post about this but it's already been beat into the ground

key points:

1. there have already been threads about this and the response has been "no we're not forgetting about the modders blablabla" and yet we still don't have the slightest of clarifications about what the difference between the "beta tools" and the "final tools" are much less anything substantial.
2. a great many posters here are delusional: absolutely zero of this is going to be fixed. i'm not trying to be a pessimist here but really it's been how long since the game's release? at most some of this will be changed for the expansion and by that time half these mods will be dead
3. the only way mods are going to succeed is if they make do with what they have despite the arbitrary limits. it sucks for me too. but it's pretty clear this is the only real way forward sooo

i plan to discuss this in the next Dawn of Victory news post
Reply #57 Top
just a quick question to clarify the limits
the nuls are the only one i will directly have to deal with so is it per weapon type (ie max of 30) or is it per facing (max of 120) because spreading 10 nulls over 3 facings and about 60 guns is gona be realy freaking hard to look convincing
Reply #58 Top
They are hopefully busy testing the new turret code   


Hopefully!

yeah i was going to make a really long post about this but it's already been beat into the groundkey points:1. there have already been threads about this and the response has been "no we're not forgetting about the modders blablabla" and yet we still don't have the slightest of clarifications about what the difference between the "beta tools" and the "final tools" are much less anything substantial. 2. a great many posters here are delusional: absolutely zero of this is going to be fixed. i'm not trying to be a pessimist here but really it's been how long since the game's release? at most some of this will be changed for the expansion and by that time half these mods will be dead 3. the only way mods are going to succeed is if they make do with what they have despite the arbitrary limits. it sucks for me too. but it's pretty clear this is the only real way forward soooi plan to discuss this in the next Dawn of Victory news post


This is what I fear as well.

just a quick question to clarify the limitsthe nuls are the only one i will directly have to deal with so is it per weapon type (ie max of 30) or is it per facing (max of 120) because spreading 10 nulls over 3 facings and about 60 guns is gona be realy freaking hard to look convincing


Here's the lowdown on the null or "dummy" points within a 3D model:
You may only have 10 for each type. So, 10 of weapon-0, 10 of weapon-1, 10 of weapon-2

Thats it for weapons. Same for abilities, 10 for ability-0, 10 of ability-1, 10 of ability-2

10 exhaust ports

10 hanger bays

10 total of flair points (blinking lights, turrets, special effects, etc)

Thats it. Stray from this, and the game will dump EVERYTIME.

Hope this helps everyone.

DANMAN
Reply #59 Top
oh god... i just had to strech 10 nulls over 38(!!) guns... thats never gona look right... anyway i hope to dear god they raise that limit even if it is just a small rise...

thanks for the in depth description DAN that will help me immensly
Reply #60 Top
FourAces, Annatar, DANMAN, all of you are right.

FourAces: If it is a $50 expansion with same modding potential or 7 Deadly Sins as it is now, my money stays in my wallet. That being said, I certainly hope the inevitable expansion has seriously expanded modding potential so that it and a bigger and better 7 Deadly Sins can peacefully coexist.

Annatar: While you certainly are right about FourAces going a bit overboard, the fact is a lot of people on these forums are angry about the very strict hardcodes built into Sins of a Solar Empire. A lot of mods are getting close or are AT that limit already, The Last Stand and 7 Deadly Sins being two. And if the expansion is worth the price, I will buy it. And, removal of some of the hardcoded limits will be a major factor for me.



I agree totally with Sparda on this one. When I first bought the game I enjoyed the fresh approach they brought to the game. However, I was disappointed to not find a campaign mode in the game. Additionally, it didn't take long to get to the point where I was bored. That is until I ran across Dan's 7DS mod. Incorporating a number of different mods into a single package (only being able to enable one mod at a time is another hardcode!!) and adding unique content to boot has made the game enjoyable again.

I know that I for one wont even consider buying an expansion or Sins 2.0 (or whatever) until I hear that 7DS will be compatiable and is available for it. That's how much this mod has meant for me. With out it, I'd just put the game back on the shelf to sit with a ton of others that have lost their attraction.

Reply #61 Top
FourAces, Annatar, DANMAN, all of you are right.FourAces: If it is a $50 expansion with same modding potential or 7 Deadly Sins as it is now, my money stays in my wallet. That being said, I certainly hope the inevitable expansion has seriously expanded modding potential so that it and a bigger and better 7 Deadly Sins can peacefully coexist.Annatar: While you certainly are right about FourAces going a bit overboard, the fact is a lot of people on these forums are angry about the very strict hardcodes built into Sins of a Solar Empire. A lot of mods are getting close or are AT that limit already, The Last Stand and 7 Deadly Sins being two. And if the expansion is worth the price, I will buy it. And, removal of some of the hardcoded limits will be a major factor for me.I agree totally with Sparda on this one. When I first bought the game I enjoyed the fresh approach they brought to the game. However, I was disappointed to not find a campaign mode in the game. Additionally, it didn't take long to get to the point where I was bored. That is until I ran across Dan's 7DS mod. Incorporating a number of different mods into a single package (only being able to enable one mod at a time is another hardcode!!) and adding unique content to boot has made the game enjoyable again.I know that I for one wont even consider buying an expansion or Sins 2.0 (or whatever) until I hear that 7DS will be compatiable and is available for it. That's how much this mod has meant for me. With out it, I'd just put the game back on the shelf to sit with a ton of others that have lost their attraction.


Thank you! I hope every one is as passionate about the game as you are, and as I. I work on the mod and game EVERY DAY, and have been since its release in January. I hope whatever expansion or patch or whatever will be compatitble with 7DS, and other mods. I am sure they will be, but they will need to rewrite some things to allow for all the new content.

oh god... i just had to strech 10 nulls over 38(!!) guns... thats never gona look right... anyway i hope to dear god they raise that limit even if it is just a small rise...thanks for the in depth description DAN that will help me immensly


Prezo, you are most welcome. I am anticipating seeing your mod. Good luck with the modeling. The only way I know to make it work, especially if you have lots of guns lined up and only 10 nulls to use, is to make a custom particle effect weapons fire, so that the particle fires more weapons at once, rather than just one.

DANMAN
Reply #62 Top
/bump

/signed

I agree 100% that more freedom for modding should be allowed. For this will only make the game more epic, longer lasting and a more dedicated following.
Reply #63 Top
/bump/signedI agree 100% that more freedom for modding should be allowed. For this will only make the game more epic, longer lasting and a more dedicated following.


Thank you Kreyson. It is great to have you here. Thank you for your support.

DANMAN
Reply #64 Top
UPDATE:

I have good new, and bad news. The good news is that after starting from scratch, and rebuilding my entire ENGLISH STRING file from the ground up, apparently it WORKS!

I now have 5786 entries, that is 40 more than my percieved limit, and all seems to be well.

The BAD news is that I seemed to have started quite a stir here, and I apologize for that. Hopefully, you will still all be able to use the other limit information that I have provided, as those limits still remain. Just the String file thing seems to have been fixed. But like I said, it would also be great for Ironclad to step up and change some of the other limits.

Hopefully though, IronClad will still see this thread, and consider what impact the modding community does in fact have.

I want to thank everyone for their continued support, and hopefully I did not cause to much of a stir to cause people to give up modding Sins. Sins of a Solar Empire is by far one of the greatest games ever made, and is one of the reasons why I have stuck around for so long. Hopefully you all will follow suit. Thank you all for your support. Lets see if we can get those other limits changed...

DANMAN
Reply #65 Top
So wait, the string file isn't actually capped? :P
Reply #66 Top
So wait, the string file isn't actually capped?


For now, no. It seems that perhaps my file got corrupted.....somehow. I don't know exactly how. Trust me, I put in over 2 days worth of work trying to make it work, and it failed every time at that limit number.

Then, just for kicks, I decided to rebuild the string file from scratch, and it took me about 6 hours to get everything back. I started it up, and to my surprise, it worked.

So, as far as I can tell, the String file has no limit. I am sure there is one there, but I have not hit it yet. However, I am about to do a test to see exactly how far it will go. For all we know, the real limit may be right around the corner.

THANK YOU very much Annatar, for supporting me and this thread. I meant it for all modders to make use of, and hopefully that has been done and they will use it as a resource for their modding.

DANMAN
Reply #67 Top
That's great news! We still need the other limits to be fixed, but at least the most important one hasn't been reached.
Reply #68 Top
That's great news! We still need the other limits to be fixed, but at least the most important one hasn't been reached.


Yes! Thank you gihren for your support. It was really nice to see the team, and other modders, come together for this common cause.

Thank you all for the support!!!

DANMAN
Reply #69 Top
So I can put away the zippo?
Reply #70 Top
Welp, I'm glad it's not actually capped. :) Like I said in my very first reply, I would be very surprised if it was. Speaking from a coding perspective, and making an educated guess:

Since the strings file has a counter, the code needs a variable to store the string count. Since I very much doubt the variable is defined as a short int (16 bits for a 32-bit OS) but a just a basic int (32 bits), it can go to some very large numbers before it tries to store a value that's too big for it. Especially if it's defined as an signed int.. But even 16 bits stores values much higher than 5k strings (a signed 16 bit int can hold values from -32767 to +32767, an unsigned can hold +65535)

Then I imagine the strings themselves are loaded into a dynamic data structure that really doesn't care how many strings it has as long as it has enough memory to hold them all. Or an array of strings with as many elements as defined by the read string count (which seems the most logical).

And, from the coding perspective, there's no reason to set a hard cap on the number of strings. All the other hardcodes exist for a reason - the engine interacts with them and depends on them being in place (for example, the limit of 10 emitters per weapon type, since that's how all the meshes are built and that's all the engine knows). For Strings, it just plucks them out whenever a string is called and writes it, it *shouldn't* care how many there are.

Enough rambling out of me though! As long as it works :)
Reply #71 Top
Trust me, I put in over 2 days worth of work trying to make it work, and it failed every time at that limit number.

Then, just for kicks, I decided to rebuild the string file from scratch, and it took me about 6 hours to get everything back. I started it up, and to my surprise, it worked.

Kitkun's rule of problem reporting: (First draft)

The problem will resolve itself or the reporter will notice an small but essential error just after they have reported the problem.
Reply #72 Top
So: No string hardcode means: Forward with even more for BETA C! 7 Deadly Sins will prevail!
Reply #73 Top
Prezo, you are most welcome. I am anticipating seeing your mod. Good luck with the modeling. The only way I know to make it work, especially if you have lots of guns lined up and only 10 nulls to use, is to make a custom particle effect weapons fire, so that the particle fires more weapons at once, rather than just one.

thanks i'll try that when i get to the cap ship this might make them look more accurate
thanks again
prezo

Reply #74 Top
Hi folks,

I know that some of the limits are frustrating to the modders.  The reality is that many of them can't be changed because of stability problems when approaching RAM limits (if somebody makes a mod that eats up 4GB of memory, it's going to crash on most machines) and/or UI/design considerations (redesigning the engine to support an infinite number of ships, for instance).  However, I can tell you that we are aware of the limits and hope to increase some of them for the next version of the 1.1 beta. 
+1 Loading…
Reply #75 Top
psugar arrives to save the day :) Thanks for your time, as always!