2

I'm trying to remove some restrictions programmed into a game like Sims 3 but some features like age restriction are hard-coded in the game's code so I read some tutorials and I found out that it's something hard-coded in the game's programming. What does hard-code mean in programming?

  • Thanks for the answers everyone. I found most of the game's programming in the dll files, however I couldn't find any codes referencing the age groups although there are plenty of objects that they use without the age restriction. Is it possible to use the coding used in those objects to workaround the restriction? – The Game Master Jun 18 '18 at 14:12
  • 2
    It is traditional to click the tick ✓, for a correct answer. – ctrl-alt-delor Jun 18 '18 at 18:16
6

This usually means it's in the program's code, rather than in say a configuration file or configurable by the user at run time. The designers of the game didn't intend you modify this and you'll have to modify the actual game code. This may be quite difficult.

|improve this answer|||||
  • Beside the difficulty of it, 99% of software needs to be recompiled before effects take change. – JoeriShoeby Jun 18 '18 at 15:47
  • 2
    It might be possible to patch the image – Nick Keighley Jun 19 '18 at 8:03
4

Hard-coded withing programming means that the functionality can't be altered without changing the programs code.

Using age restriction as an example. This will have been done in such a way that the age required can only be changed by making a code change rather than it being configurable through a file that anyone could change.

|improve this answer|||||
1

This is not really a programming question. In the context of video games, many games have files or assets available for users to change. This is called modding the game. Some games encourage this for users to make their own content for the game, others do not, but mods do exist for many games, especially PC ones.

Hard coded in this sense means that the code that controls this feature is not available in files that you have available for to change. Usually this means that it is set in the binary executable file of the game, and there is no easy way to get to that code.

|improve this answer|||||
  • Plenty of non-game software has design decisions of whether to hard-code something or make it configurable. – whatsisname Jun 19 '18 at 16:12
  • @whatsisname: Sure, but there's a difference between a few .ini files or something and games which can have most of their size in such files. Hard coding can also mean simply using a constant in code rather than something like a variable, and I wanted to clearly distinguish between that usage. – Nathanael Jun 19 '18 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.