Tools

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

Tools

Postby Domino » 18 Aug 2013, 15:17

Hi,

I am here i am interested :)

if you tools that can make my job easier lets see what you have got :)
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Ze_PilOt » 18 Aug 2013, 18:48

Here is a mini server :

https://bitbucket.org/thepilot/mini-server/src

You need python + pyQt4 to run it.

Launch the game with :
Code: Select all
ForgedAlliance.exe /gpgnet 127.0.0.1:1234


It will connect to the mini-server.

Now, if you put this somewhere in the lua code (in the UI side only) :

Code: Select all
GpgNetSend('addProp', 'prop', posx, posy)


prop is the name of the prop, posx & posy the positions

It will be recognized by the server that will add it to a table.
If you send

Code: Select all
GpgNetSend('saveToFile')

It will dump the prop table into a file named props.json.

Now, you can either :
- modify the code yourself to do what you want (the code is fairly simple)
- you can tell me what you want to do, give me your lua code so I can test, and I will give you the "dumper" in .exe.


It's probably better to save everything as a json file, it's more easy to manipulate, and it's trivial to convert it back to a lua table.

If for you making the scenario is the easy part, making the utility to dump data from FA is the easy one for me, so I think we can combine our forces to do something good :)
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 » 18 Aug 2013, 19:23

Hi,

Thanks for the download and instructions,

i have installed the latest python and PYQT4

what do i download from the mini server and how do i start that server
just incase you need to know im on windows 7 64U

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

Re: Tools

Postby Ze_PilOt » 18 Aug 2013, 19:29

You can either follow the instructions there :
viewtopic.php?f=45&t=1788

or go there :
https://bitbucket.org/thepilot/mini-server/downloads
and download the branch "default".

Code: Select all
python main.py
to start it.

Also, if you do some modification to the code, you have to contribute back (give the modifications) in the repository. I can eventually put them myself if you don't know how to do it.

But if you are a coder, you should familiarize yourself with the repository system, it's really, really useful in many ways.
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 » 18 Aug 2013, 19:42

ok cool,

so tried that and start fa with the specified params, what is supposed to happen initially?

i downloaded the default thingy and extracted, i then made a lil .bat file with python main.py inside
i then double click the .bat file, the window opens and just closes i pressume the server is now running at this point?

i also created a .bat file to start fa with the required command line options..
fa starts BUT the screen is just black i have to manually close fa with ctrl + alt + del

what is supposed to happen?

sorry about this..
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Tools

Postby Ze_PilOt » 18 Aug 2013, 19:46

Oh, and sorry, I actually usedpySide, not PyQt4 : http://qt-project.org/wiki/PySide_Binaries_Windows

Also, it should produce a miniserver.log telling you what is happening if something is wrong. The console should not close as long as the server is running.
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 » 18 Aug 2013, 19:55

ahh, ok installed that,

i pressumed i had to put the mini server in the python folder, so i did that, and tried to start,

i get this error


Image

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

Re: Tools

Postby Ze_PilOt » 18 Aug 2013, 20:03

Do you have a __logger.py file in the miniserverlogger directory ?

This file actually :
https://bitbucket.org/thepilot/mini-ser ... at=default

From what I see in your screenshot, you have copied the main.py in your python install.

What you need to do is create a folder anywhere (ie. c:\workspace\miniserver), go there, and type
Code: Select all
c:\Program Files\python\python main.py


When the code is stabilized, it's easy to convert it to .exe to ease the process.

Also, you can put c:\Program Files\python in the path variable of your system, so you don't need to enter the path to python each time you want to launch it.
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 RoundTabler » 18 Aug 2013, 20:25

What are you attempting to do Domino? :)
Avantgarde: bug reports go to you [zep] via PM?
Ze_PilOt_: no
Ze_PilOt_: never.

Ze_PilOt: FA is not about being in a comfort zone all the time.
I think the game you want to play is Starcraft 2.
User avatar
RoundTabler
Contributor
 
Posts: 236
Joined: 18 Jan 2013, 18:33
Has liked: 34 times
Been liked: 1 time
FAF User Name: RoundTabler

Re: Tools

Postby Ze_PilOt » 18 Aug 2013, 20:28

Basically a tool that allow to place props in game and dump it into a file to allow mission creation.
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

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest