Major Stress Major Stress

The Hard Code Problem

The Hard Code Problem

An example of how Hard Coding can kill a mod, and what we can do about it.

Hardcoding has caused some serious problems for Sins mods. Unfortunetly most of us were unaware of these difficulties until we came upon them in our projects. There is no documentation to show what we can, or can not change.

The SoA 2 mod is being affected badly by some of these hard code issues. Other mods are being affected as well. Like the Star Wars mod, The BSG mod, etc. etc. The problem is mainly in Total Conversion mods. Where game mechanics must be changed in order to represent the IP being modded. Other mods like re-balance mods, and/or graphic enhancement mods are not affected by these issues. Only Total Conversion mods.

I will have to stop work on my SoA 2 mod. Unless some of these hard coded restrictions are lifted, or a viable way to work around then is found. It will be a shame to do that because much effort went into making the mod as it stands now.

Sins is an easy engine to import models, and other artwork, but that is pretty much all you can do with it. You can change the artwork, but not the mechanics of the game itself. Only what already exsists. So all you are doing is just making a "skin" of someone elses game. There are way too many hard coded restrictions in Sins to make a believeable Total Conversion mod. What good is importing pretty ships if you cant control the weapons firing arc, and you have weapons firing through their own hulls? Or you are unable to make a proper cloak because of hardcoded restrictions, and no matter how you try to work around it you meet with failure, and CTD's. Or all ships come to a screeching halt to slug it out, because that too is hard coded. Why are there "to hit" buffs and debuff's if nothing moves during a fight? lets not get into the hardcoded phase lanes, or single planet per gravity well issue. These are some examples of the issues at hand. Again most modders are unaware of these issues until they stumble upon them themselves, or read about others who stumble upon them.

Dont get me wrong Sins is a great game, and i would not have spent my money, all this time, and put all this effort into Modding Sins it if it wasnt. I am just frustraited to the point to where there is no point anymore. Other people are too.

 

A Total Conversion mod should NOT be a sloppy jury rigged mod that totally trashes the IP you are modding. Be it an established IP like Star Trek, or Star Wars, or something of your own creation, because of these hard code issues.

NOTE: This topic has been edited. This is a community problem. The Title, and OP has been changed to reflect that. My goal is to promote awareness, and education of the modding issues at hand, and to find civil ways of resolving them. So mods like SoA 2, BSG, Star Wars, Etc. dont die. All are welcome to discuss this.

38,538 views 88 replies
Reply #51 Top

But the point is that IC is a relatively small company. They don't have time to rewrite the engine. And a number of the issues that are causing people to say "rewrite the engine" were probably deliberately put in due to budget/time constraints. Writing software is not a quick processes, nor is it an easy one. Hence the point I keep trying to make is that it is probably not economical to make these changes, and the decisions were made as the lesser of two evils. "We can limit this here which will cause some modding issues OR we can not have this base feature that everyone will want..."

Reply #52 Top

Well, the few things that annoy me are the arbitrary hardcoded limits such as sounds, explosions, and capital ship names. 

 

Out of everything, the capital ship names seem the easiest to change as they are merely done by pointers.  The PlayerTech, PlayerPhase, and PlayerPsi entities all point to certain strings in the strings file for the capital ship names.  However, we can't add any other capital ship names.  So a capital ship from an added race has to link to either the TEC, Vasari, or Advent ship names.  Which means Star Destroyers are named things like the TDN Kolossus and the TDN Aotoris.  Can't something this simple be changed for 1.1 Beta 3?

This is bad for you too ManSh00ter, as the Xin capitals are going to be coming out of their yards with either Vasari, Advent, or TEC names.

Reply #53 Top

Quoting Hack78, reply 1
But the point is that IC is a relatively small company. They don't have time to rewrite the engine. And a number of the issues that are causing people to say "rewrite the engine" were probably deliberately put in due to budget/time constraints. Writing software is not a quick processes, nor is it an easy one. Hence the point I keep trying to make is that it is probably not economical to make these changes, and the decisions were made as the lesser of two evils. "We can limit this here which will cause some modding issues OR we can not have this base feature that everyone will want..."
End of Hack78's quote

But the point I'm Making is that if you are going to make an engine that is moddable, do it right the first time, don't screw around your fans and modders by making a half assed moddable engine.  Thus save all the work later on, especially with expansions and addons for the game thats coming.

Reply #54 Top

Well, expansions mean $$$.

 

But Frzn has a point, do it right the first time or not at all.  Ironclad, you really don't want a reputation like EA's.

Reply #55 Top

Quoting SpardaSon21, reply 2

This is bad for you too ManSh00ter, as the Xin capitals are going to be coming out of their yards with either Vasari, Advent, or TEC names.
End of SpardaSon21's quote

No they won't - every capital ship in the game will have an code-name designation like "ARV-778" or "YVT-12". Don't be lazy - rename them yourself. :p

But I totally agree with you. Take another example, engine exhaust color. No way to remove the tinting with team coloring, even when you turn off team colors! I tried messing with shaders, changing particle shader references, nothing works! Or timing on sub-explosions. It actually doesn't matter what you put in the "start time" line in the .explosiondata file, it only works in increments of 2 seconds or so. There is a workaround, but things like these are annoying.

I still don't understand how did such omissions happen, especially when IC actually had modding in mind from the very beginning, you can see that plainly from the pre-launch interviews. I mean I can accept that they haven't included a modable AI or entities into their engine because of time restraints or budget reasons, but come on, engine color? Ship names? I still suspect that the problem is on our end since I can't believe you can't actually add a new race with *new* ship names, its so obvious as one of the first things people are going to try to do.

Reply #56 Top

Trust me.  Both Major Stress and DANMAN have tried.

Reply #57 Top

I tried too, with bountiful minidumps. Hence the "workaround" - every capital ship, including the vanilla races, will start with an arbitrary designation. I'm not thrilled by this but its one of those situations where you choose the lesser of two evils.

Reply #58 Top

Capital Ship names are not hardcoded. Except that AFAIK you can only have 10 random names per faction (correct me if i am wrong). I didnt research this area much, but you can edit the english string to change the names from the vanilla factions. I belive you can add more names for each new faction you create (within the 10 name limit) you just have to specify that factions naming scheme in its own player entity file, and in each ship entity (another lesson in redundancy).

Also you need to be aware that for every new string you add into the english str you need to add that number to the top line "number of strings" in the file. Otherwise you will get errors, and/or minidump CTD's. Same with anything that has a "number of" line above it.

Reply #59 Top

Ah, so you need to edit a reference in ship .entity files? I missed that one, thanks. Well, that's one problem solved then! :)

Reply #60 Top

Actually, DANMAN tried that.  Failure.  Hardcoded, and confirmed by Ironclad.

Reply #61 Top

All in all its just another brick in the wall.

Reply #62 Top

Gah... its time for some Zen. Inner peace... inner peace...

Well I guess we should count ourselves lucky that there isn't a hardcode limit on the muber of entries in the string file too. *knocks on wood*

Reply #63 Top

don't get your hope up, that's one of the few things that you can actually do

Reply #64 Top

Hard work solves problems more often than hope. ;) I've just spent allmost the entire day researching dxt compression in an effort to produce higher-quality textures. It paid off in the end, but it was hard. Learned a lot more about the nuts and bolts behind pwetty pictures than I thought I would. ;)

Anyway the point is - some hardcodes and obstacles we can circumvent, solve or overcome, and some things we can't. Untill I found my solution, I thought that because the engine was expecting the exact format for given textures, I was screwed. Turned out it wasn't so. And that's part of modding and what can make it both fun and frustrating. Issues like the ones in this thread need to be raised (because if we keep quiet then nothing will ever change), but I also do not see any reason for pessimism.

Reply #65 Top

Quoting kryo, reply 13

In any case, I've passed word of these concerns on to IC. Hopefully they can get a chance to take a moment out of slaving away on 1.1 and Entrenchment to address this in more detail.
End of kryo's quote

Excuse me for my skepticism but the last six months of this have resulted in a whopping one useful change, 3 more capital ship slots. It's blatantly clear that nothing is going to happen at any point and that TC teams should save their breath, as it were.

Quoting Hack78, reply 1
And a number of the issues that are causing people to say "rewrite the engine" were probably deliberately put in due to budget/time constraints. Writing software is not a quick processes, nor is it an easy one. Hence the point I keep trying to make is that it is probably not economical to make these changes, and the decisions were made as the lesser of two evils. "We can limit this here which will cause some modding issues OR we can not have this base feature that everyone will want..."
End of Hack78's quote

Too bad. That still doesn't justify misleading your fanbase.

Reply #66 Top

That's a flawed argument anyway.  Budgets increase with sales.  Successful and diverse modding communities have been proven to significantly increase those sales.  These guys easily sold a couple hundred thousand copies of BTS by themselves.  The FFH2 mod is badass topped with more badass.  If it weren't a Stardock product, I'd have trouble justifying the purchase to myself if the Star Trek and Star Wars mods both fall through, and some of these other ones, DoV in particular, look damned interesting.

 

An ability system that you can't expand isn't much use when you're trying to think outside the box, and Sins abilities are in a pretty small box.  Good mods need to be able to add those basics and expand content, not just packaging.  Locking everything down was a mistake, especially since they advertised a mod friendly game from the start.

 

I'd suggest they offer source code access in return for NDA's, but I have a feeling they wont go for it.

Reply #67 Top

Quoting Carbon016, reply 15

Quoting kryo, reply 13
In any case, I've passed word of these concerns on to IC. Hopefully they can get a chance to take a moment out of slaving away on 1.1 and Entrenchment to address this in more detail.
Excuse me for my skepticism but the last six months of this have resulted in a whopping one useful change, 3 more capital ship slots. It's blatantly clear that nothing is going to happen at any point and that TC teams should save their breath, as it were.
Too bad. That still doesn't justify misleading your fanbase.
End of Carbon016's quote

 

Also, everyone is so hyped over Entrenchment.  What excatly does it lets US, the modders do?  All we know is it adds Starbases and has to play with some hardcodes.  And we have no idea if WE will be able to make starbases of our own.

 

The developers admitted that Sins defenses suck.  So instead of fixing the existing broken ones, they sell us new ones.  To me Entrenchment just seems like a $9.99 mod.  And a $9.99 mod seems like a major cash cow to me.  Also, paying $9.99 to remove some hardcodes is like paying $9.99 for modding tools.  Not even EA of all people make you pay for modding capability.

Reply #68 Top

We already have better defenses. I mean, half the mods out there, the first thing they did was improve static defenses. Forget starbases. We can already do them, including modular upgrades. Hell, if it were not for the fact that the Xin are turtlers, I would be seriosuly tempted to have a crack at a starbase which you can deploy, then undeploy and move around like a ship, something Entrenchment bases can't do.

We can also do mines. The only thing we can't do is control AI use of those mines, so I expect Entrenchment will perhaps solve that particular problem. It would be really bad if we had to buy the Expansion in order to use basics such as new AI routines... though unfortunately past experience points in that direction. Though I am pretty certain we will be able to mod the new features if we do buy it.

Personally though, I'm not terribly hyped with Entrenchment. I'll likely get it because it will add to vanilla races and spice up their gameplay, but the entire mini-expansion looks to me, no offence IC, like they reviewed the coolest ideas being thrown around the modding community and then simply added them in.

Should've skipped straight to the next one because it adds where the game *is* lacking - diplomacy options.

 

Reply #69 Top

hehe, guess what, Major Stress's mod was announced on Hailing Frequency's podcast latest podcast #55, which is a very popular podcast for startrek's related stuff.

They didn't know about Major Stress halt of mod after 1.1 patch, so maybe someone needs to head them up?

http://hailingfrequency.co.uk

Reply #70 Top

This is the reason why the Babylon 5 (Yes I am a huge fan) mod was abandoned, I do love this game but this engine seems to be only meant to work for sins and that is one of the very few major problems I have with this game.

Reply #71 Top

Work is continuing on SoA 2 right now. It is after the 0.03 release that work may come to a halt.

AFAIK B5 was not abandoned, but they do have an issue with the lack of animations in the game. They tried to work around it using particles. It 'works', but the omegas rotating section doesnt look right. They are still working on it.

Reply #72 Top

SoaSe is an amazing game-

  -and it's just that, a game!

SoaSe is not a programming language, or a "game creation system", it's Sins of a Solar Empire!

 It's an excellent game that does a great many things based on what it's designed to do.  It's designed to be modified tremendously, according to the entity/buff system.

   If you want to work outside that system, the files won't work- and demanding that they do is a huge conceit.

Reply #73 Top

No, Oblivion is designed to be "modified tremendously". SoaSE *is* an excellent game and is modable (I personally, since I am doing an expansion mod rather than a total conversion, have very few problem with modability), but certain limitations in its architecture make it very difficult to implement anything that is different from the normal modes of gameplay. Even if you do manage to find a way around it, chances are you are going to be thwarted by the very unmodable AI. For example, minefields. Right now there is no way to make AI use them in a proper fashion, and the same is true for any unit or ability which steps outside of the frame set by the vanilla game. For example, one of the early concepts for the Xin, a race in my mod, had them armed with colony "pods" which could also slowly bombard an enemy planet. However, without an active siege frigate, the AI refuses to attack planets. So now the Xin have the Pods, but I also had to introduce a specialized siege ship to make the AI "play".

Reply #74 Top

Here's a pic I found while browsing, it's the guy from "300!"

300!

In developing games in C++ or assembler, you have to make choices that affect the game later on, and those first choices become the core of the game.

for example...

In the beginning, you may use a linked list or an array to store data...  Each data structure has different properties, abilities, and uses.  Linked lists make for good particle systems, where the particles constantly appear and disappear, but arrays are better for statistics, tables, and algorithmic systems...

We can say: "remove all limits of the game", but if it requires changing one data type into another... well, you can't simply remove the core of the game and hope all supporting materials will still work...  The game engine is designed to facilitate the functions of the game, and not the functions of every game...

If Ironclad were to make a system that is COMPLETELY moddable, that could be adapted to make every game you could want...

Such a system is called a develooper's tool, and developers don't give those away for anything!

 

Reply #75 Top

That is completely true. I seem to recall you have to fork over a considerable amounts of cash to get yourself one of those! ;)

But. You can make a game where core areas can be modded. Take Half Life. Counterstrike ended up so popular because it was the first to use the "paintball-like" no-respawn round system. Something which was definitely not envisioned in the original multiplayer modes, but made possible due to the game's highly modable engine. You couldn't make a submarine sim out of Half Life, but you could do a lot of innovative stuff involving shooter gameplay. Take "capture the flags" (note the plural), as far as I am aware Half Life mods again pioneered that concept. That would not be possible without a highly modable engine which allowed you to do more than change art assets and move stats and existing stuff around.

So you can have a highly modable game which is NOT a developer's tool.

A personal note however - I am of the opinion that part of the modding is finding a balance between what you want to do and what you can do. Actually its not that different from making a real game, where you might want to do those photo-realistic textures and ultra-high shaders with refraction and physics simulation of every leaf falling from a tree, but then you have to face your programmers which tell you to sod off. :p Whereas while modding, the game engine does that for them. ;)