Tools

Post here if you want to help developing something for FAF.

Re: Tools

Postby Ze_PilOt » 29 Jan 2014, 17:56

I guess you can do use os.remove() with the name of the file before starting the logger.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Tools

Postby Domino » 29 Jan 2014, 18:58

aha, good plan :D

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: Select all
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.

:)
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Domino » 29 Jan 2014, 19:24

hmm,

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: Select all
sverpath = os.getcwd()
    cpath = os.path.join(sverpath, "miniserver.log")

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


here is the code im using.
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Domino » 29 Jan 2014, 19:36

never mind moved that code into the _logger.py file and it now works..
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Domino » 29 Jan 2014, 20:31

ok last question,

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..

:)
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Domino » 08 Feb 2014, 17:42

hi Zep,

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.
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Ze_PilOt » 08 Feb 2014, 21:06

As they are LUA table, not easily.

I would need an actual example of a table and what you are expecting as a result.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Tools

Postby Domino » 08 Feb 2014, 21:22

its ok if its not an easy task, ill just add to the table before i send to the server, i was just wanting a quick and easy way
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.
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Ze_PilOt » 10 Feb 2014, 23:17

It's possible, The lobby has a lua parser/dumper for map/mod vault and GW, but I have to check if it can run one of your table correctly.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Tools

Postby McGeifer » 03 Apr 2014, 09:11

Hey .. are there some news for us? I really hope your project will finish soon. Can't wait to build some epic campaign missions :)
User avatar
McGeifer
Contributor
 
Posts: 74
Joined: 30 Mar 2013, 16:09
Has liked: 3 times
Been liked: 0 time
FAF User Name: McGeifer

Previous

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest