[SOLVED] Release Dates Problem

Hello,
Im working on my mod, and when I was debugging I saw that the date I wrote in the mod file is other than in game.
For example:
published : ‘22/6/4’,

In Game its year almost 24. I was playing on normal game time (35 yrs).

Hi @haxor,
it depends on the gamelengthmodifier. see the following wiki page: https://github.com/greenheartgames/gdt-modAPI/wiki/Date

30 years gameLengthModifier = 1
35 years (default game length) gameLengthModifier = 1.16667
42 years gameLengthModifier = 1.4

hope this helps

The time you’re writing it to be on is for the 30 years length. As you can see in @alphabit’s post they modify the length from the other ones. If you’ve done it correct you should get in on that time when you play 30 years. :wink:

Okay… tried something like

gameLengthModifier : 1.16667,
published : ‘5/10/2’,
platformRetireDate : ‘9/10/2’,

Didnt work.

Does it relate to a platform you add?

You shouldn’t have the gameLengthModifier. If you want it to be 5/10/2 in normal time just get it earlier in short time. :slight_smile:

Not that in year 22… but I used cheat mod and get to the 5/7/4. Nothing happened there and on 5/10/2.

Then there’s a problem in your code. :stuck_out_tongue_winking_eye:

Yeah I had that idea, but if Then i need to divide everythin`.

var qicon = ‘./mods/SuperConsoles/source/img/Coden16.png’;
GDT.addPlatform({
id : ‘Coden16’,
name : ‘Coden 16’,
company : ‘Coden’,
startAmount : 0.39,
unitsSold : 1.001,
licencePrize : 75000,
gameLengthModifier : 1.16667,
published : ‘5/10/2’,
platformRetireDate : ‘9/10/2’,
developmentCosts : 45000,
genreWeightings : [1, 0.8, 0.9, 0.8, 0.9, 0.8],
audienceWeightings : [0.7, 0.9, 1],
techLevel : 3,
iconUri : qicon,
events : [{
id : ‘92230381-51b5-452d-898c-d91c19fc0b31’,
date : ‘5/8/2’,
getNotification : function (company) {
return new Notification({
header : “Industry News”.localize(),
text : “Blah Blah {0}.”.localize().format(General.getETADescription(‘5/8/2’, ‘5/10/2’)),
image : qicon
});
}
}
]
});

Whats wrong in that?

You could also query the gameLengthModifier from “GameManager.flags.gameLengthModifier”. But as @LineLiar pointed out, the date you specify is relative to the game length.

You have to consider the fact that the game is not longer in terms of real years, but the years are longer depending on the factor.

See:
Playing with 30 years has the modifier = 1, that means that’s 1-to-1
Other values influence how long an year takes to happen. If you specify 1/1/10, it’ll be 1/1/8.57, so 1/1/9.

So… I just need to change that dates?

You just should take this into consideration when defining dates. Let’s make an example:

you write

published : ‘5/10/2’,
platformRetireDate : ‘9/10/2’,

Now GDT will publish on 5/10/2 if you’re playing with 30 years.
If you want to publish on 5/10/2 while playing 35 years, you have to change your publish date in your code accordingly.

From the WIKI:

You don’t have to worry about the modifier in code but when defining dates on an event (GDT.addEvent) for example, you need to be aware that all dates in code are based on a gameLengthModifier of 1. This means that if you define a date as 30/1/1 and a player is playing with the default game length setting, the event will actually fire on 35/1/1. If the player would play the 42 year version it would fire on 42/1/1. (You can disable this for events by setting the event.ignoreGameLengthModifier to true.)

Okay. Thanks for help!

Glad I could help :smile: