ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Compatibility with new patches

« Previous 10 events | 1 2 | All Messages
Posted by/on
Question/AnswerMake Oldest Up Sort by Ascending
  18:02:22  16 November 2007
profilee-mailreply Message URLTo the Top
On forum: 04/20/2007
Messages: 92
You said that they changed the save game file.

I can load 1.0004 games and play them, however if I then try to load a 1.0005 game I get a CTD.

I am using the trader mod, and the endurance mod.

The game says it is version 1.0005, but all I can load are the 1.0004 games any ideas?

This includes auto, quick, and normal saves.
  13:58:55  14 November 2007
profilee-mailreply Message URLTo the Top
Don Reba
Bishop and Councilor of War


On forum: 12/04/2002
Messages: 11615
Compatibility with new patches


This is for the US version:

The large file size is due to the inclusion of the 1.0004 gamedata.dbb (unchanged) and modsmp_military_2.xdb0.

The bin directory is essentially replaced, including the OpenAL stuff.

The only new file in the STALKER installation directory is gamedata.dbc, dated 2007/10/24. The all.spawn is not changed, nor is game.graph.

Changed files:

wrap_oal.dll - old, but will replace any update
OpenAL32.dll - new date, will replace any update


system.ltx - current_server_entity_version is now 7 instead of 6

gamedata.dbcconfigui - all multiplayer fixes

dialog_manager.script - optimized, uses different number/strings conversions
task_manager.script - optimized, uses different number/strings conversions*
xr_motivator.script - minor version change support for the dialog manager

*No, they didn't fix the reputation bug. Again.


It's my quick guess that the Bes dialog fix is not really affected.

The problem there might have been that the number was too large in 1.0004 new engine code. Instead of fixing the engine to work as it did in 1.0003, they changed both the engine code and the script code to use strings instead of numbers.

The primary change is to the signature of dlg:AddPhrase():

What is in 1.0004 lua_help.script (not updated by 1.0005):

class CPhraseDialog {
function AddPhrase(string, number, number, number);

What's used by dialog_manager.script and task_manager.script via dlg:AddPhrase() calls:

function AddPhrase(string, string, string, number);

Essentially, the former arguments passed as numbers are now passed as strings: 0 => "0", 1 => "1", etc. The only exception to this I've seen so far is that -1 is now passed as an empty string: "" in a couple of places.

While 1.0004 saved games can be read by 1.0005, it won't work the other way; 1.0005 introduces a change to the save game format.

It's either have two versions of the corresponding scripts or have a smart script set that works with both.

Nothing in that set of files is incompatible with 1.0005 except possibly the current_server_entity_version value of 6; it's 7 in 1.0005. But you say that 6 works? Interesting. Probably not for multiplayer, though.

The changes to the game engine are unknown right now (at least to me), except those that are shown by what is changed in the scripts that call game engine functions. Other than the multiplayer changes, the only difference is the change in the GPhraseDialog function AddPhrase() API* call.

In version 1.0004, the parameters passed by this call were a string followed by three numbers. In 1.0005, the parameters are three strings followed by a number.

Every place that you use dlg:AddPhrase() to get a CPhraseScript object in your custom code will have to be changed.

In many cases this will be just a simple change. For example, the 1.0004 line:

    dlg:AddPhrase("tm_reward_complete", 0, 1, -10000)

becomes this in 1.0005:

    dlg:AddPhrase("tm_reward_complete", "0", "1", -10000)

You can convert numeric variables via tostring(), as shown when you compare task_manager.script in the two versions.

The problem with this is the need to then support two independent versions of your code, or tell everyone you are abandoning 1.0004 (or not supporting 1.0005, if you choose not to do this).

I propose an alternative: use a fa├žade, a routine that checks the version of the engine and then makes the correct call, in your 1.0004 script:

function dlg_AddPhrase(name, phrase_id, phr_id_2, offset)
    if self.script_version == 6 then
        return dlg:AddPhrase(name, phrase_id, phr_id_2, offset)
    elseif self.script_version >= 7 then
        local phr2string;
        if phr_id_2 == -1 then
            phr2string = ""
            phr2string = tostring(phr_id_2)
        return dlg:AddPhrase(name, tostring(phrase_id), phr2string, offset)

Then change all your dlg:AddPhrase() calls to dlg_AddPhrase() calls. More is needed; you'll need to set the script_version based on the engine if it is not available (or correct).

I plan to release an update to the ZRP in a couple of days that should work with either 1.0004 or 1.0005, if testing goes well.

*Application Programming Interface - a set of function calls in a module (like a DLL) that are made available to other modules. Here, the game engine has a set of published interface calls given in lua_help.script -- which is not a real script, just a help file that is automatically generated. The problem is that the file no longer matches the reality of the new engine code's API.
Each word should be at least 3 characters long.
Search conditions:    - spaces as AND    - spaces as OR   
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion

All short dates are in Month-Day-Year format.


Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.