Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Guaranteeing a name?  (Read 1131 times)

breadbocks

  • Bay Watcher
  • A manacled Mentlegen. (ಠ_ృ)
    • View Profile
Guaranteeing a name?
« on: April 10, 2011, 01:14:22 am »

So, I'm doing a let's play a few forums down, and I made a guy, only problem is he died before I thought to back up the save. So now, I can't get his last name back. Is there a file I can modify to have only his name possible in the game?
Logged
Clearly, cakes are the next form of human evolution.

Carlos Gustavos

  • Bay Watcher
    • View Profile
Re: Guaranteeing a name?
« Reply #1 on: April 10, 2011, 08:50:39 am »

You could change lines 241-243 in newgame.cpp and recompile.

Or you can edit the save file. But it gets a little tricky if the names don't have the same length. Before the start of the <creature> element there are four bytes defining the length of the element. If the new name has a different length you'll have to correspondingly change this count. Though, if the new name is shorter you might get away with ending the name with nulls to give it an equal length.
Logged

breadbocks

  • Bay Watcher
  • A manacled Mentlegen. (ಠ_ృ)
    • View Profile
Re: Guaranteeing a name?
« Reply #2 on: April 10, 2011, 08:55:57 am »

I ended up giving up and going with a similar last name. But the names really do need to be set on a standard rotation, rather than randomly flipping through the 100 names.
Logged
Clearly, cakes are the next form of human evolution.

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: Guaranteeing a name?
« Reply #3 on: April 10, 2011, 01:18:32 pm »

You say the names really need to be on a standard rotation. I'm not convinced. The situation you're describing is a very specific case, and while I sympathize with it, the obvious solution to reconstructing a lost game for a let's play is to back up your save file. Or to just say you had to reconstruct the game since you died and didn't have a backup, so you picked a new name; I've seen at least one other LCS Let's Play that did exactly that.

The given names aren't designed to be chosen specifically. If they were, I'd have just let you type it in rather than re-rolling on the name table. There's no technical reason that I couldn't let you do that. The reason it isn't that way is that it would strip away the whole point of having a given name on your character in the first place. Your given name is something you have little control over. It's not like your code name, which you pick yourself.

Iterating through the names in order would gunk up the random name generator by giving it predictable results and degrade the experience for repeat players. A more implementation-intensive solution to the problem you're describing that avoids this issue would be to have a list you can page through, like Dwarf Fortress does, and retain the randomizer as an additional feature. But this again runs contrary to the purpose of the given name.
Logged

Steele

  • Bay Watcher
    • View Profile
Re: Guaranteeing a name?
« Reply #4 on: April 10, 2011, 04:37:33 pm »

You can modify the name during character creation with Cheat Engine. I used it for that purpose myself when my first character died.

http://www.cheatengine.org/

Run Cheat Engine (Referred to as CE from now on) and LCS.
In CE, select crimesquad.exe from the process list, and change "Value type" to Text.
Enter the first or last name of your founder as it appears when choosing his/her name, sex, and history in the box above "Scan type" in CE, then click "First Scan". Double click the address in the list on the left, then right-click on the address in the bottom and choose Change record -> Value. Enter whatever name you wish. If the new name is longer or shorter than the original, a pop-up will alert you to this fact and ask if you want to continue. Click yes, then yes again when the second pop-up asks if you want to add a 0-terminator.
You're done. When you go back into LCS the name will at first appear to be unchanged, but it has.
« Last Edit: April 10, 2011, 04:40:57 pm by Steele »
Logged