Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Nicknamed dwarves referenced in artifacts  (Read 1443 times)

Golcondio

  • Bay Watcher
    • View Profile
Nicknamed dwarves referenced in artifacts
« on: September 07, 2010, 04:37:20 pm »

I just noticed that dwarves referenced in artifacts (but I guess also in engravings and staues) always have the correct nickname, even if you change it after the artifact has been made: is it normal?
Logged

Man of Paper

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #1 on: September 07, 2010, 04:43:30 pm »

It's not like the name is etched in the wall. It's just their image.
Logged

elizar

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #2 on: September 07, 2010, 04:45:28 pm »

I didn't figure that Toady had made his game like that, keeping references instead of clear-text.

It makes sense in what way data is stored. Let's say we got Event. In it, it is stored who did what to whom. So Event references to at least two persons in that case, who are kept in the data, by a name. A name which is sometimes changed.

Then we have a Artifact who keeps a number of Events. So a change in name comes up in Event, and continues down to Artifact

Ugh, don't mind me, I'm a semi-computer person who's tired and studying for a final exam.
Logged
A quick scan of the stocks menu shows that one of the dead pack animals has a bin full of silk cloth!  It is speedily unforbidden, and my moody glassmaker sprints off to retrieve his prize amongst the smoking, charred, blood-soaked ruin that is the outdoors, totally oblivious to the carnage that was instigated on his behalf.

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #3 on: September 07, 2010, 04:48:12 pm »

It's probably been stored this way ever since 2d, when Toady decided to have legends mode events that the player would discover for himself.
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod

Skid

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #4 on: September 07, 2010, 08:06:47 pm »

It seems to make sense, it's the image of the dwarf, not their name in writing.  The description just tells you which dwarf it refers to since you can't see the image and guess who it is for yourself.
Logged
Playing a cheesemaker in an average Fortress 'round here would be. Freaking. Terrifying.

Golcondio

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #5 on: September 08, 2010, 10:47:44 am »

Yep it does make sense both from the ontological point of view (whatever the nickname, everyone knows it's that dwarf so the reference is right) and from a programming perspective (you generate a value only once, and then reference it everywhere else so that every subsequent change affects the whole system without fail)...
Logged

RemusShepherd

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #6 on: September 08, 2010, 11:16:08 am »

I don't think it's an object reference.  I think it's a string replacement.  Anything with the dwarf's previous name is displayed as the new nickname.

I say this because very rarely you will find another dwarf, or an artifact, or a god, that has the exact name as a previous dwarf.  Nickname the dwarf and all the names change.
Logged

elizar

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #7 on: September 08, 2010, 01:01:49 pm »

It's not that hard to just look at the references made to see if there is something that has been named something before. I would imagine it would be even more pain to look at every engraving/artifact/event references to see if a dwarf has been mentioned, and then make a change. This could rack up to 100 text strings changed instead of just one changed at the core, and the whole other things are simply referring to the core.
Logged
A quick scan of the stocks menu shows that one of the dead pack animals has a bin full of silk cloth!  It is speedily unforbidden, and my moody glassmaker sprints off to retrieve his prize amongst the smoking, charred, blood-soaked ruin that is the outdoors, totally oblivious to the carnage that was instigated on his behalf.

Sizik

  • Bay Watcher
    • View Profile
Re: Nicknamed dwarves referenced in artifacts
« Reply #8 on: September 08, 2010, 01:28:14 pm »

I don't think it's an object reference.  I think it's a string replacement.  Anything with the dwarf's previous name is displayed as the new nickname.

I say this because very rarely you will find another dwarf, or an artifact, or a god, that has the exact name as a previous dwarf.  Nickname the dwarf and all the names change.

Rarely does not mean never.
Logged
Skyscrapes, the Tower-Fortress, finally complete!
Skyscrapes 2, repelling the zombie horde!