Forum Discussion
11 years ago
The text itself would presumably be translated into multiple languages and located with the other game text.
A 'Factory' in programming generally means a class that makes objects. So I would guess that BILL_ARRIVAL_NOTIFICATION in this code is a class that is called inside the _send_notification() function to create the actual 'Tunable' notification objects. I suspect the factory class name is passed into the factory's create method to make the objects distinct.
Probably there is a tunable datafile somewhere that has a reference to 'BILL_ARRIVAL_NOTIFICATION' which in turn points to the language data, either that or 'BILL_ARRIVAL_NOTIFICATION' goes directly to the language files - I'm not sure exactly how the localisation fits in.
So. To make a new notification I would write:
Then find whatever datafiles contain the localisation and see if there is a direct reference to BILL_ARRIVAL_NOTIFICATION in there, if not I would explore the gamedata package with the Datafile tool: (http://www.modthesims.info/showthread.php?t=531876) and see if you can find a reference to the notification somewhere in there that then refers to the localisation data. Wherever it is, eventually you'll need to add the text into the localisation files.
A 'Factory' in programming generally means a class that makes objects. So I would guess that BILL_ARRIVAL_NOTIFICATION in this code is a class that is called inside the _send_notification() function to create the actual 'Tunable' notification objects. I suspect the factory class name is passed into the factory's create method to make the objects distinct.
Probably there is a tunable datafile somewhere that has a reference to 'BILL_ARRIVAL_NOTIFICATION' which in turn points to the language data, either that or 'BILL_ARRIVAL_NOTIFICATION' goes directly to the language files - I'm not sure exactly how the localisation fits in.
So. To make a new notification I would write:
MY_NEW_NOTIFICATION = UiDialogNotification.TunableFactory(description='\n A test notification.\n
self._send_notification(self.MY_NEW_NOTIFICATION)
Then find whatever datafiles contain the localisation and see if there is a direct reference to BILL_ARRIVAL_NOTIFICATION in there, if not I would explore the gamedata package with the Datafile tool: (http://www.modthesims.info/showthread.php?t=531876) and see if you can find a reference to the notification somewhere in there that then refers to the localisation data. Wherever it is, eventually you'll need to add the text into the localisation files.