Forged Alliance Forever Forged Alliance Forever Forums 2016-12-13T00:20:11+02:00 /feed.php?f=45&t=5757 2016-12-13T00:20:11+02:00 2016-12-13T00:20:11+02:00 /viewtopic.php?t=5757&p=140442#p140442 <![CDATA[Re: Supreme Commander Script Extender]]>
And.. is this currently being used by FAF?

Statistics: Posted by snooc — 13 Dec 2016, 00:20


]]>
2013-11-12T15:35:08+02:00 2013-11-12T15:35:08+02:00 /viewtopic.php?t=5757&p=57933#p57933 <![CDATA[Supreme Commander Script Extender]]> http://forums.gaspowered.com/viewtopic.php?t=37615

summary from the original author, Mesenion:

...So it can be possible implement some CPU-intensive functions on C\C++, register this function as a library (see library "math" in Lua, for example) and call them directly from Lua...


it didnt worked with faf's FA.exe so i had to patch it.

patch diff
Code:
# HG changeset patch
# User fafafaf
# Date 1384261829 -3600
#      Tue Nov 12 14:10:29 2013 +0100
# Node ID 323446b228064b134ae76b4af83ac5755fe949a4
# Parent  d381dff72f6bafefd2ade10fb2cd0cc93222cc73
fixes for faf compatibility

diff -r d381dff72f6b -r 323446b22806 scse_loader/scse_loader.cpp
--- a/scse_loader/scse_loader.cpp   Tue Nov 12 14:02:02 2013 +0100
+++ b/scse_loader/scse_loader.cpp   Tue Nov 12 14:10:29 2013 +0100
@@ -119,6 +119,12 @@

         switch(checksum)
         {
+        case 0x03b0b4ab: // FAF version
+            printf("Found Supreme Commander Forged Alliance FAF version.\n");
+            *hookAddr = 0x0090ab5d;
+            printf("Address for hook: 0x%08x.\n", *hookAddr);
+            return true;
+
         case 0x84b9e832: // Supreme Commander Forged Alliance 1.5.3599 official version
             printf("Finded Supreme Commander Forged Alliance 1.5.3599 version.\n");
             *hookAddr = 0x0090a3bd;
diff -r d381dff72f6b -r 323446b22806 scse_lualinker/LuaLinker.cpp
--- a/scse_lualinker/LuaLinker.cpp   Tue Nov 12 14:02:02 2013 +0100
+++ b/scse_lualinker/LuaLinker.cpp   Tue Nov 12 14:10:29 2013 +0100
@@ -22,6 +22,10 @@

         switch(checksum)
         {
+        case 0x03b0b4ab: // FAF version
+            log.LogMessage("Found FAF version. Setting up base\n");
+            base = 0x7a0;
+
         case 0x84b9e832: // Supreme Commander Forged Alliance 1.5.3599 official version
             log.LogMessage("Finded Supreme Commander Forged Alliance 1.5.3599 version.\n");



compiled files attached:

Statistics: Posted by PattogoTehen — 12 Nov 2013, 15:35


]]>