[QEU] About Console Retirement Dates

Basically i set a retire date to something low like 1/2/4 it works (im assuming 1=Y/2=M/4=W?)

But if i change that to 2/12/4, it simply does not work nor does my event message warning me of its demise, i do not understand that.

edit: look at latest replies

how long have you waited for the event to happen?

2/12/4 refers to the date if you play using the 30 year option, not the default 35 year game option.

More info here:

all explained here:

Make sure it’s appropriate to ignore the modifier. What if players play a different game length? Often it’s better to apply the modifier and just change your dates to suite.

since this is a question about console retirement you should know that all platform dates in the game have the gameLengthModifier applied. (this is the sole purpose of the modifier after all). it would be inconsistent if you add/change platforms not to do that. but it’s your mod, you can do of course as you wish.

if you want to have the event fire on 2/10/1 when playing with the 42 year option you would set it to 2/5/1, if I’m not mistaken.

but if you want to define a whole bunch of dates using the 42-year time line it’s probably easier if you write a method that calculates the actual date for you…

this method should help you:

var getNormalizedDate = function (source, modifier) {
	var fracweek = General.getWeekFromDateString(source, true);
	fracweek /= modifier;

	var week = (Math.floor(fracweek) % 4) + 1;
	var month = Math.floor(fracweek) / 4;
	var year = (month / 12) + 1;
	month = (month % 12) + 1;

	return Math.floor(year)+'/'+Math.floor(month)+'/'+Math.floor(week);
};

usage:

var normalizedDate = getNormalizedDate('2/10/1',1.4);

first param: the date, second param: the modifier corresponding to this date. so since you want to know what 2/10/1 would be in 42 mode the modifier is 1.4

returns ‘2/3/4’;

where and how would i utilize that code you gave me, i do not know where to put it as to not break the game.

edit: well at least i feel better in the fact that apparently no one else knows how to use it either, but that does not help my cause.

edit2: Reposting my idea on the steam forum here:

Please make the timing system something us mere mortals understand, every single mod is broken out of the gate because they only work in 35 year mode, and me nor anyone else understands patricks explaination.

Maybe the game should track time based on fixed amounts? heres my example:

*Story always ends on 2019 (but continues infinitely afterwards)
30 year mode = 1989
35 year mode = 1984 (would start with the 2 consoles the game always starts with)
42 year mode = 1977 (Grapple ][ and Etaro 2500 with the big game crash of 83 wiping the slate clean for 1984 and thus the normal starting point of the game)

This would fix everything and do away with any time modifiers since time is always a fixed measurement in the game (your simply shortening or extended the game rather than speeding it up),

usually, you would define dates as if you play the 30 year time line because that’s how the game was designed. the longer game-lengths simply stretch the timeline to cover more years.

usage of the method I wrote above is super easy. Your situation is that you want to define dates as if you are playing in the 42 year mode. To do this you would have to re-calculate each date to fit so to make your life easier I wrote this helper method.

Everywhere you would define a date you simply would pass the date through this method first:

eg. on the platform

.platformRetireDate= getNormalizedDate('6/5/1',1.4);

would set the date so that the platform retires in year 6, month 5, week 1 if the player plays the 42 year mode (hence we set the modifier to 1.4).

If someone would rather define dates as if playing in the 35 year mode they set the modifier appropriately as documented in https://github.com/greenheartgames/gdt-modAPI/wiki/Date

Let me know if anything is still unclear.

I might add the method as GDT.getNormalizedDate() in the mod-API so that ppl. don’t have to include it themselves…

i do not know where to put any of this stuff, all i want is to put in a date and the game execute that date regardless of game mode,

this is exactly what the method I posted allows you to do.

Just breath and re-read my last topic. It can’t be that hard to replace all your dates with a call to getNormalizedDate(x,y) where x is your initial date that you wanted to set and y is set to 1.4

Heck, if you give me the code I’ll show you.

Heres an example i tossed together

derp.addPlatformderp = function () {		
	var icon = './mods/derp/img/derp.png';
	GDT.addPlatform(
		{
			id: 'NRDMNK-0001',
			name: 'derp',
			company: 'derptronics',
			startAmount: 4.635,
			unitsSold: 5.430,
			licencePrize: 750000,
			published: '1/1/1',
			platformRetireDate: '14/2/1',
			developmentCosts: 300000,
			genreWeightings: [0.7, 0.8, 0.9, 1, 0.6, 1],
			audienceWeightings: [1, 0.8, 0.6],
			techLevel: 6,
			iconUri: icon,
			events: [
				{
					id: 'NRDMNK-1111',
					date: '13/11/4',
					getNotification: function (company) {
						return new Notification({
							header: "Industry News".localize(),
							text: "Derptronics has announced they will be discontinuing the Derp because only 4 people bought one.{n} It will pulled from the shelf {0}".localize().format(General.getETADescription('13/11/1', '14/2/1')),
							image: icon
						});
					}
				}
			]
		});
};

try this:

var getNormalizedDate = function (source, modifier) {
	var fracweek = General.getWeekFromDateString(source, true);
	fracweek /= modifier;

	var week = (Math.floor(fracweek) % 4) + 1;
	var month = Math.floor(fracweek) / 4;
	var year = (month / 12) + 1;
	month = (month % 12) + 1;

	return Math.floor(year)+'/'+Math.floor(month)+'/'+Math.floor(week);
};

derp.addPlatformderp = function () {		
	var icon = './mods/derp/img/derp.png';
	GDT.addPlatform(
		{
			id: 'NRDMNK-0001',
			name: 'derp',
			company: 'derptronics',
			startAmount: 4.635,
			unitsSold: 5.430,
			licencePrize: 750000,
			published: '1/1/1',
			platformRetireDate: getNormalizedDate('14/2/1',1.4),
			developmentCosts: 300000,
			genreWeightings: [0.7, 0.8, 0.9, 1, 0.6, 1],
			audienceWeightings: [1, 0.8, 0.6],
			techLevel: 6,
			iconUri: icon,
			events: [
				{
					id: 'NRDMNK-1111',
					date: getNormalizedDate('13/11/4',1.4),
					getNotification: function (company) {
						return new Notification({
							header: "Industry News".localize(),
							text: "Derptronics has announced they will be discontinuing the Derp because only 4 people bought one.{n} It will pulled from the shelf {0}".localize().format(General.getETADescription(getNormalizedDate('13/11/1',1.4), getNormalizedDate('14/2/1',1.4))),
							image: icon
						});
					}
				}
			]
		});
};

(untested)… this should cause the platform to retire in 14/2/1 when playing the 42 year mode and appropriately a little earlier in the shorter settings.

now I have to go. I will probably add the method to the gdt-modAPI later today so you don’t have to include it yourself.

yes adding it built in would be very nice

It LIVES!!! (drops to knees in dramatic fashion)

My mod LIVES!!!

thankyou, every thing is working smooth now, my consoles retire right on the dot, messages and events right on the dot. YEEESSSS.