PDA

View Full Version : replacing string in game


Cherry92
28th Feb 2011, 07:24 AM
I don't like the way that relationship is shown in game...I'm a Chinese, and we have 'tones' of names to call our relatives...
(and because of this, I play English version to avoid those annoying wrong names...)


I had this idea long before, to change the string displayed in the game.
It is not possible to edit the STBL only, as they are not detailed enough, (and some of them even wrong..@@)
I know I have to make it with script.


Though I've no experience writing C#, I think that's not really a big problem...

To start with, of course an easy task first, how I could replace something display in the game...
I've found that already, the thing I need to change is near "Sims3.Gameplay.Socializing.Genealogy", about blood relations, and there're some useful command?? too....etc
I have in my mind, how I could distinguish so many relatives..but I've no idea on how I could replace the output value.. :rolleyes:

I remember that, when I tried to edit STBL before, I 'crashed' my game, and here...
http://thumbs2.modthesims2.com/img/2/5/1/8/4/3/MTS2_Cherry92_1179214_sshot-502.jpg
showed something like "DEBUG_ShowRelationship", but I was unable to 'crash' my game again so I can't confirm, but I believe that's what I want... :P

Even if all the relations become "Testing", it would be okay...at least I have deal with this part...



I know...I am asking something like, how to do 'Hello, World!', but the first step is always the most difficult one.. :blink:

Buzzler
1st Mar 2011, 07:48 PM
I don't quite get it. Do you want to change the game to implement these different tones of relationships in Chinese? That would require a core mod to change fundamental principles of the game. Such a mod would be incompatible with... basically everything, vanilla game and savegames included.

twallan
1st Mar 2011, 08:05 PM
If one is simply trying to the change the translation displayed for the relationship between two related sims:

A Core change to SimDescription:GetMyFamilialDescriptionFor() should be all that is required.

It may be possible to perform the operation non-core, if one could isolate and replace all calls to that function. However several are buried pretty deep in the core, making that approach pretty difficult.

:)

Buzzler
1st Mar 2011, 08:38 PM
If one is simply trying to the change the translation displayed for the relationship between two related sims:Well, yes, but right now the game has no idea of these different "tones". I assume these "tones" would need to be somehow implemented.

twallan
1st Mar 2011, 09:47 PM
I believe Cherry92 is using the word "tones" to describe the various dialectic nuances associated with various family relationships.

http://www.kwanfamily.info/culture/familytitles_table.php

In this case, the only thing that is necessary would be to expand the "GetMyFamilialDescriptionFor" function to include more translations.

:)

Buzzler
1st Mar 2011, 10:09 PM
I believe Cherry92 is using the word "tones" to describe the various dialectic nuances associated with various family relationships.Oh, I see. Then it's a actually a quite doable core mod, yes. Would be a heck of a non-core mod, though. :)

Cherry92
2nd Mar 2011, 04:10 AM
Yeah..twallan is right, and it should be 'tons' but not 'tones' :lol:

I've just look into 'GetMyFamilialDescriptionFor', may be that's what I want to edit...

I'm scared by the 'IL' and I don't think I could handle that in a short time, but C# looks less scary...
If it's really complicated to do it non-core, I can't do it now, I'm not really free until two months later...
Turn out that C# is actually quite different from other script I know...
I was thinking that replacing a string displayed would be easy.. :rolleyes:

Anyway, thanks for your help... I'll try that later :)