Call for a web based platform

Talk about anything not related to FA or FAF here !

Re: Call for a web based lobby

Postby Ze_PilOt » 08 Aug 2013, 13:50

It's probably possible in the blueprint parser script..
I will look into that.

See, when you want, you can actually contribute in a positive way.
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: Call for a web based lobby

Postby Ze_PilOt » 09 Aug 2013, 09:03

Hm, I wasn't sure, but you are actually wrong.

As I thought, simply add the same bp file in the mod without any merging completely replace the default one.
That is, by the way, how pip is doing his early tests for balance mod.

From the blueprints.lua (the blueprint "parser") :

Code: Select all
#   First, a mod can simply add a new blueprint file that defines a new blueprint.
#
#   Second, a mod can contain a blueprint with the same ID as an existing blueprint.
#   In this case it will completely override the original blueprint. Note that in
#   order to replace an original non-unit blueprint, the mod must set the "BlueprintId"
#   field to name the blueprint to be replaced. Otherwise the BlueprintId is defaulted
#   off the source file name. (Units don't have this problem because the BlueprintId is
#   shortened and doesn't include the original path).
#   Third, a mod can can contain a blueprint with the same ID as an existing blueprint,
#   and with the special field "Merge = true". This causes the mod to be merged with,
#   rather than replace, the original blueprint.
#
#   Finally, a mod can hook the ModBlueprints() function which manipulates the
#   blueprints table in arbitrary ways.
#      1. create a file /mod/s.../hook/system/Blueprints.lua
#      2. override ModBlueprints(all_bps) in that file to manipulate the blueprints
#
# Reloading of changed blueprints
#
#   When the disk watcher notices that a .bp file has changed, it calls
#   ReloadBlueprint() on it. ReloadBlueprint() repeats the above steps, but with
#   original_blueprints containing just the one blueprint.
#
#   Changing an existing blueprint is not 100% reliable; some changes will be picked
#   up by existing units, some not until a new unit of that type is created, and some
#   not at all. Also, if you remove a field from a blueprint and then reload, it will
#   default to its old value, not to 0 or its normal default.


# Second, a mod can contain a blueprint with the same ID as an existing blueprint.
# In this case it will completely override the original blueprint. Note that in
# order to replace an original non-unit blueprint, the mod must set the "BlueprintId"
# field to name the blueprint to be replaced. Otherwise the BlueprintId is defaulted
# off the source file name.


So I was right, on that matter, there is no difference with a featured at all. And I'm pretty sure it's the same for lua files (unless you explain better what your problem is).

I was surprised that you've said otherwise, because that's how hooking works, and there is no real difference or special code for a mod.
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: Call for a web based lobby

Postby dstojkov » 09 Aug 2013, 12:02

local function StoreBlueprint(group, bp)
local id = bp.BlueprintId
local t = original_blueprints[group]

if t[id] and bp.Merge then
bp.Merge = nil
bp.Source = nil
t[id] = table.merged(t[id], bp)
else
t[id] = bp
end
end

Yes no need for a Replace feature there is already there. I just have to erase the Merge = true but behold the BlueprintId on all the bp of my mods.

Ze_PilOt wrote:there is no difference with a featured at all


Actually yes ... need to add the BlueprintId and for the featured mod just a copy paste

But will test it to be sure.
dstojkov
Evaluator
 
Posts: 775
Joined: 21 Sep 2011, 22:04
Has liked: 0 time
Been liked: 24 times

Re: Call for a web based lobby

Postby Ze_PilOt » 09 Aug 2013, 12:14

No, for units, if the blueprint id is not there, it's derived from the file name.

There is really not special code for mods.
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: Call for a web based lobby

Postby dstojkov » 10 Aug 2013, 10:53

Ze_PilOt wrote:There is really not special code for mods.


This is like I said you don't need the Merge=true but source or BlueprintId is mandatory otherwise no Replace. The game will start but you will see a icon not the unit :-/

Now I will have to look at the lua side ...
dstojkov
Evaluator
 
Posts: 775
Joined: 21 Sep 2011, 22:04
Has liked: 0 time
Been liked: 24 times

Re: Call for a web based lobby

Postby dstojkov » 14 Aug 2013, 10:49

Ze_PilOt wrote:Here is code I've received from the original GW team when I've started FAF.

I was sadly way ahead of what it does at that time, but it should give you a good start.

From there, you just need to implement a livereplay server, a map/replay vault and blogs, should be fairly easy.

Attachments

supcom.zip
(7.45 KiB) Downloaded 22 times



Do you have the jars( the library ) to make this working ? Or you become only that ? In this state this is not launchable :-/
dstojkov
Evaluator
 
Posts: 775
Joined: 21 Sep 2011, 22:04
Has liked: 0 time
Been liked: 24 times

Re: Call for a web based lobby

Postby Ze_PilOt » 14 Aug 2013, 10:58

What did you expect ?

I've looked quickly at it, but it was useless to me.
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: Call for a web based lobby

Postby dstojkov » 14 Aug 2013, 12:41

Can you try to get the missing part from this GW team ? I spend hours when not days in trying to find it but it seems that they close their web page :-/


P.S: For my futures followers I found something interesting

http://code.google.com/p/gpgnetfix/

take a look and give some feedback.

the first phase is to gather as much as possible wreck from old project and after to build something from them
dstojkov
Evaluator
 
Posts: 775
Joined: 21 Sep 2011, 22:04
Has liked: 0 time
Been liked: 24 times

Re: Call for a web based lobby

Postby dstojkov » 14 Aug 2013, 13:40

dstojkov
Evaluator
 
Posts: 775
Joined: 21 Sep 2011, 22:04
Has liked: 0 time
Been liked: 24 times

Re: Call for a web based lobby

Postby Ze_PilOt » 14 Aug 2013, 13:40

dstojkov wrote:Can you try to get the missing part from this GW team ?


Do it yourself ?
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

PreviousNext

Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 1 guest