Forged Alliance Forever Forged Alliance Forever Forums 2014-04-03T09:11:11+02:00 /feed.php?f=45&t=4756 2014-04-03T09:11:11+02:00 2014-04-03T09:11:11+02:00 /viewtopic.php?t=4756&p=70318#p70318 <![CDATA[Re: Tools]]>

Statistics: Posted by McGeifer — 03 Apr 2014, 09:11


]]>
2014-02-10T23:17:20+02:00 2014-02-10T23:17:20+02:00 /viewtopic.php?t=4756&p=64853#p64853 <![CDATA[Re: Tools]]> Statistics: Posted by Ze_PilOt — 10 Feb 2014, 23:17


]]>
2014-02-08T21:22:49+02:00 2014-02-08T21:22:49+02:00 /viewtopic.php?t=4756&p=64629#p64629 <![CDATA[Re: Tools]]> to add any kind of data to the table before it is written to disk.. so then i can just send commands like gpgnetsend(id, table1, table2) and add other things in the server, like change a table ect.. but like i say its cool i can do it in fa.

here is the the server code so far, ive umm added quite a bit, but its all easy stuff for pathing/saving/removing.

http://pastebin.com/BkPNE4XC

today i changed tons of code in fa, to reflect the changes made in the server code. its an ongoing process atm,
converting/saving and backing up is all changed and working now thankfully.. ive also condensed tons of other code.
its slow atm.. :/

Dave.

Statistics: Posted by Domino — 08 Feb 2014, 21:22


]]>
2014-02-08T21:06:49+02:00 2014-02-08T21:06:49+02:00 /viewtopic.php?t=4756&p=64628#p64628 <![CDATA[Re: Tools]]>
I would need an actual example of a table and what you are expecting as a result.

Statistics: Posted by Ze_PilOt — 08 Feb 2014, 21:06


]]>
2014-02-08T17:42:52+02:00 2014-02-08T17:42:52+02:00 /viewtopic.php?t=4756&p=64604#p64604 <![CDATA[Re: Tools]]>
is it possible for me to write inside the scenario table from the miniserver?

so say ive sent { me = 1 you = 2 }

how can i add they = 3 to that table in the miniserver code.

thanks.

Dave.

Statistics: Posted by Domino — 08 Feb 2014, 17:42


]]>
2014-01-29T20:31:36+02:00 2014-01-29T20:31:36+02:00 /viewtopic.php?t=4756&p=63626#p63626 <![CDATA[Re: Tools]]>
how do i override a function in fa so it can recieve data from the server.. i need to set the fa path in fa, i guess the only way to do this is to overload
a medial function..

:)

Statistics: Posted by Domino — 29 Jan 2014, 20:31


]]>
2014-01-29T19:36:39+02:00 2014-01-29T19:36:39+02:00 /viewtopic.php?t=4756&p=63624#p63624 <![CDATA[Re: Tools]]> Statistics: Posted by Domino — 29 Jan 2014, 19:36


]]>
2014-01-29T19:24:33+02:00 2014-01-29T19:24:33+02:00 /viewtopic.php?t=4756&p=63622#p63622 <![CDATA[Re: Tools]]>
os.remove doesnt work, the server spews an error, however i cannot see the error as the window closes to fast,
how can i see errors when they occure?

Code:
sverpath = os.getcwd()
    cpath = os.path.join(sverpath, "miniserver.log")

    if os.path.isfile(cpath):
        os.remove(cpath)


here is the code im using.

Statistics: Posted by Domino — 29 Jan 2014, 19:24


]]>
2014-01-29T18:58:55+02:00 2014-01-29T18:58:55+02:00 /viewtopic.php?t=4756&p=63619#p63619 <![CDATA[Re: Tools]]>

ive sorted the pathing stuff in the server.. i can now use self.GetFaPath() to return the fa path ...

ive used the code from the link you posted to store the install path using :
Code:
settings = QtCore.QSettings("ForgedAllianceEditor", "FA Editor")
        settings.beginGroup("ForgedAllianceEditor")
        settings.setValue("app/path", path)
        settings.endGroup()
        settings.sync()


doing the pathing in the server means i can now store the "mission templates" in fapath\templates\scenid\
and i can then save the actual map to the \maps\eow_***\ folder.

:)

Statistics: Posted by Domino — 29 Jan 2014, 18:58


]]>
2014-01-29T17:56:48+02:00 2014-01-29T17:56:48+02:00 /viewtopic.php?t=4756&p=63615#p63615 <![CDATA[Re: Tools]]> Statistics: Posted by Ze_PilOt — 29 Jan 2014, 17:56


]]>
2014-01-29T17:48:57+02:00 2014-01-29T17:48:57+02:00 /viewtopic.php?t=4756&p=63614#p63614 <![CDATA[Re: Tools]]>
zep, how can i make the LOG restart on every startup, so that a new miniserver.log file is wiped and started from fresh on each start up?

Statistics: Posted by Domino — 29 Jan 2014, 17:48


]]>
2014-01-23T21:19:50+02:00 2014-01-23T21:19:50+02:00 /viewtopic.php?t=4756&p=63096#p63096 <![CDATA[Re: Tools]]>
Not only you will know where the installation folder is, but the miniserver can easily be integrated (so it's transparent for the user), and uploading scenario to the map vault would be trivial too.

But if you want to do it yourself, you can look at the function mostProbablePaths in the lobby code :

https://bitbucket.org/thepilot/modular- ... at=default

Statistics: Posted by Ze_PilOt — 23 Jan 2014, 21:19


]]>
2014-01-23T20:23:51+02:00 2014-01-23T20:23:51+02:00 /viewtopic.php?t=4756&p=63085#p63085 <![CDATA[Re: Tools]]>
i thought it would be best to get the supcom fa path from the registry and then the person wanting to make a episode of war wouldnt need
to enter it in fa before they begin in the editor, i can then just issue commands to the server with the tables, and completely omit the path
part, because the server will propogate that and append /maps/scenarioid/ ... filename ect..

SO,

how do i set a variable when the server starts that holds the forged alliance path?

i got some code from the net which i have modified, however i am unable to get it to work in prelim tests.

Code:
def showsupcomfapath(self):
        import errno
        import win32com.client
        import _winreg
        shell = win32com.client.Dispatch('WScript.Shell')
        proc_arch = shell.ExpandEnvironmentStrings(r'%PROCESSOR_ARCHITECTURE%').lower()

        if proc_arch == 'x86':
            arch_keys = {0}
        elif proc_arch == 'amd64':
            arch_keys = {_winreg.KEY_WOW64_32KEY, _winreg.KEY_WOW64_64KEY}
        else:
            raise Exception("Unhandled arch: %s" % arch)

        for arch_key in arch_keys:
            key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{31D95937-B237-405D-920C-A3EF4E482395}", 0, _winreg.KEY_READ | arch_key)
            for i in xrange(0, _winreg.QueryInfoKey(key)[0]-1):
                skey_name = _winreg.EnumKey(key, i)
                skey = _winreg.OpenKey(key, skey_name)
                try:
                    print _winreg.QueryValueEx(skey, 'InstallLocation')[0]
                except OSError as e:
                    if e.errno == errno.ENOENT:
                        # DisplayName doesn't exist in this skey
                        pass
                finally:
                    skey.Close()


could you possibly get this code working for me, so that i can return the fa installation path? thanks..

Dave.

Statistics: Posted by Domino — 23 Jan 2014, 20:23


]]>
2014-01-14T22:31:56+02:00 2014-01-14T22:31:56+02:00 /viewtopic.php?t=4756&p=61981#p61981 <![CDATA[Re: Tools]]> Statistics: Posted by Anaryl — 14 Jan 2014, 22:31


]]>
2014-01-13T20:54:38+02:00 2014-01-13T20:54:38+02:00 /viewtopic.php?t=4756&p=61830#p61830 <![CDATA[Re: Tools]]> Statistics: Posted by Domino — 13 Jan 2014, 20:54


]]>