Good idea to try and reset the current values to the initial,
and then observe the progress... I'll give that a try!
I'll back up the current blob first though, in case that is
not how it works. These huge numbers do not seem to
be changing which leads me to believe they are a pointer
to a value in memory... I will try a reset to initial values and
if that does not seem correct I will try the strategies below:
I started digging in the serverplatform.exe with a
hex editor for the answer to the current political tesion
values.
I found all the corresponding string pieces but have not yet found
the formula used to determine which string is presented.
I did notice the following relevant funtion names (among many others)
called from ImportExportTable.dll however:
GetIETString
GetIETQWORD
GetIETLongDouble
GetIETInt64
GetIETFloat
GetIETDouble
GetIETLong
GetIETWORD
GetIETShort
GetIETChar
(full list below)
as well as the internal(?) functions:
MultiByteToWideChar
WideCharToMultiByte
I wonder if the value for the current tension is
a pointer to a value stored in memory? (AVtBuffer@nDataStore)?
Since these current values in the matrix blob do not seem to change
perhaps that is the case?
There is some code that comes before the tension strings
that would lead me to believe so. But then how is the tension
remembered if the server is restarted? (Doesn't really make sense)
Unless it is recalculated from the battles table info
and the gf settings each time the server is started?
Aha, perhaps I can manually calculate the current tension
according to the battles, map and character tables and the gf info myself...
then I just need to relate these values to the tension strings.
Full import table from ImportExportTable.dll for ServerPlatform.exe:
Ordinal Function Name
0280 ?GetIETShort@CImportExportTable@@UAEPAFPBD@Z
009c ??1CIETStringPtrArray@@UAE@XZ
009b ??1CIETString@@QAE@XZ
02c8 ?GetSourceAttributeSetInfo@CImportExportTable@@SI_NAAVCSourceAttributeSetInfo@@@Z
034c ?ReleaseBuffer@CIETString@@QAEXH@Z
0226 ?GetBuffer@CIETString@@QAEPADH@Z
009a ??1CIETData@@QAE@XZ
0198 ?Copy@CIETData@@QAEHPBXK@Z
0046 ??0CIETData@@QAE@XZ
00de ??4CIETString@@QAEABV0@PBD@Z
004d ??0CIETStringPtrArray@@QAE@XZ
02a6 ?GetNetInterface@CImportExportTable@@SIPAVCNetInterface@@XZ
004b ??0CIETString@@QAE@XZ
02f2 ?GlobalInitCybernetRTI@CImportExportTable@@SI_NPAVCIETCallbacks@@@Z
00b3 ??3CIETString@@SIXPAX@Z
02f3 ?GlobalResetCybernetRTI@CImportExportTable@@SIXXZ
0049 ??0CIETString@@QAE@ABV0@@Z
0389 ?SetSize@CIETData@@QAEHK@Z
03b6 ?UpdateAttributeSets@CImportExportTable@@QAEXPAV1@@Z
0051 ??0CImportExportTable@@QAE@XZ
009e ??1CImportExportTable@@UAE@XZ
0274 ?GetIETChar@CImportExportTable@@UAEPADPBD@Z
027d ?GetIETLong@CImportExportTable@@UAEPAJPBD@Z
0279 ?GetIETDouble@CImportExportTable@@UAEPANPBD@Z
01a0 ?CreateAttributeSets@CImportExportTable@@QAE_NXZ
01b4 ?DestroyAttributeSets@CImportExportTable@@QAEXXZ
031a ?NetRegisterAttributeSets@CImportExportTable@@QAE_NXZ
031c ?NetReregistrationCallbackProc@CImportExportTable@@UAEXXZ
031b ?NetRegistrationCallbackProc@CImportExportTable@@UAEXXZ
031d ?NetUnregisterAttributeSets@CImportExportTable@@QAEXXZ
00b1 ??2CIETString@@SIPAXI@Z
0152 ?Add@CIETStringPtrArray@@QAEHPAVCIETString@@@Z
0282 ?GetIETWORD@CImportExportTable@@UAEPAGPBD@Z
027f ?GetIETQWORD@CImportExportTable@@UAEPA_KPBD@Z
0281 ?GetIETString@CImportExportTable@@UAEPAVCIETString@@PBD@Z
027a ?GetIETFloat@CImportExportTable@@UAEPAMPBD@Z
027c ?GetIETInt64@CImportExportTable@@UAEPA_JPBD@Z
027e ?GetIETLongDouble@CImportExportTable@@UAEPAOPBD@Z
Full export table from ServerPlatform.exe:
Ordinal Entry Point Name
0000 00189ba0 ?CreateIET@CIETCallbacks@@SIPAVCImportExportTable@@ABVCIETID@@@Z
0001 00189c20 ?DestroyIET@CIETCallbacks@@SIXPAVCImportExportTable@@@Z
0002 001cccc0 ?FindIET@CIETCallbacks@@SIPAVCImportExportTable@@ABVCIETID@@@Z
0003 00189b90 ?GetAppName@CIETCallbacks@@SIPBDXZ
0004 001cccc0 ?SetupIETForExtOwner@CIETCallbacks@@SIHPAVCImportExportTable@@@Z
0005 00189c90 ?UpdateStatus@CIETCallbacks@@SIHPBDH@Z
The export table for ImportExportTable.dll is HUGE (too much to post here)...
ImportExportTable.dll code would tell me if Big-E or Little-E byte order is used.
I guess I will try and grab the values from memory (if there, and if possible in php),
otherwise I will try to recalculate the values myself. I have decoded the current tension
values every way I can think of, it must be some kind of pointer.
Phew, repair and supply has got to be easier than this!
NB: This might be viewed as reverse engineering, but I could not find a
license agreement in my serverkit. Neither does the client license agreement
mention the server component. So I assume it is OK. (I'm certainly
not making any money off it, and it's only to help add to the game...)