Jump to content

fcxSanya

WFG Retired
  • Posts

    1.083
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by fcxSanya

  1. If you guys are itching to translate something 0 A.D. related the 0 A.D. article over at the English Wikipedia needs translating into other languages.

    Please make sure first that it will met notability rules in specific language edition where you going to create article. For example in dewiki it was already deleted number of times: Logbuch 0 A.D. (Computerspiel), Logbuch 0 A.D., so it is probably don't make sense to create it there until 0ad will reach beta or even 1.0 release or something.

  2. Its a Tower Defense with 5 towers and 10 waves of creeps.

    I played your mod a bit and I like it :) It looks raw of course, but it is a good start and it is already playable, which is nice.

    I call this 'mod' rather than 'scenario' because currently it is impossible to embed all this logic into map, and maybe this will be impossible to fit it into scenario even later when pyrogenesis will have triggers support.

    Btw, pyrogenesis have mods support and you can perform following to run this as mod:

    1. create some folder (for example 'towerdefense') in binaries/data/mods folder

    2. copy into binaries/data/mods/towerdefense content of archive (art, maps and simulation folders)

    3. run "pyrogenesis -mod=towerdefense"

    Another small note: I can see images from hosting which you use only via proxy.

    • Like 1
  3. You can find some useful info about writing components here: How to write components

    I failed creating a mod which simply sends the message hello world to all players at the beginning of the game.

    This patch should do this:

    HelloWorldComponent.patch


    Index: source/simulation2/Simulation2.cpp
    ===================================================================
    --- source/simulation2/Simulation2.cpp (revision 9803)
    +++ source/simulation2/Simulation2.cpp (working copy)
    @@ -105,6 +105,7 @@
    LOAD_SCRIPTED_COMPONENT("GuiInterface");
    LOAD_SCRIPTED_COMPONENT("PlayerManager");
    LOAD_SCRIPTED_COMPONENT("Timer");
    + LOAD_SCRIPTED_COMPONENT("HelloWorld");

    #undef LOAD_SCRIPTED_COMPONENT
    }
    Index: binaries/data/mods/public/simulation/components/interfaces/HelloWorld.js
    ===================================================================
    --- binaries/data/mods/public/simulation/components/interfaces/HelloWorld.js (revision 0)
    +++ binaries/data/mods/public/simulation/components/interfaces/HelloWorld.js (revision 0)
    @@ -0,0 +1,2 @@
    +Engine.RegisterInterface("HelloWorld");
    +
    Index: binaries/data/mods/public/simulation/components/HelloWorld.js
    ===================================================================
    --- binaries/data/mods/public/simulation/components/HelloWorld.js (revision 0)
    +++ binaries/data/mods/public/simulation/components/HelloWorld.js (revision 0)
    @@ -0,0 +1,19 @@
    +function HelloWorld() {}
    +
    +HelloWorld.prototype.Schema =
    + "<a:component type='system'/><empty/>";
    +
    +
    +HelloWorld.prototype.Init = function()
    +{
    + var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);
    +
    + for (var i = 0; i < 8; i++)
    + {
    + var notification = {"player": i+1, "message": "Hello player " + (i + 1)};
    + cmpGUIInterface.PushNotification(notification);
    + }
    +}
    +
    +Engine.RegisterComponentType(IID_HelloWorld, "HelloWorld", HelloWorld);
    +

    Edit: And as Kenny said in case if you want to program AI it is probably better to start from learning existing AI code and bots, you can find it here: http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/ai

    Edit 2: After discussion with our more experienced programmers I improved my patch:

    HelloWorldComponent.patch


    Index: source/simulation2/Simulation2.cpp
    ===================================================================
    --- source/simulation2/Simulation2.cpp (revision 9803)
    +++ source/simulation2/Simulation2.cpp (working copy)
    @@ -105,6 +105,7 @@
    LOAD_SCRIPTED_COMPONENT("GuiInterface");
    LOAD_SCRIPTED_COMPONENT("PlayerManager");
    LOAD_SCRIPTED_COMPONENT("Timer");
    + LOAD_SCRIPTED_COMPONENT("HelloWorld");

    #undef LOAD_SCRIPTED_COMPONENT
    }
    Index: binaries/data/mods/public/simulation/components/interfaces/HelloWorld.js
    ===================================================================
    --- binaries/data/mods/public/simulation/components/interfaces/HelloWorld.js (revision 0)
    +++ binaries/data/mods/public/simulation/components/interfaces/HelloWorld.js (revision 0)
    @@ -0,0 +1,2 @@
    +Engine.RegisterInterface("HelloWorld");
    +
    Index: binaries/data/mods/public/simulation/components/HelloWorld.js
    ===================================================================
    --- binaries/data/mods/public/simulation/components/HelloWorld.js (revision 0)
    +++ binaries/data/mods/public/simulation/components/HelloWorld.js (revision 0)
    @@ -0,0 +1,32 @@
    +function HelloWorld() {}
    +
    +HelloWorld.prototype.Schema =
    + "<a:component type='system'/><empty/>";
    +
    +
    +HelloWorld.prototype.Init = function() {
    + this.firstUpdate = true;
    +};
    +
    +/**
    + * Perform logic after first update, i.e. when simulation was started
    + */
    +HelloWorld.prototype.OnUpdate = function(msg) {
    + if (this.firstUpdate)
    + {
    + this.firstUpdate = false;
    +
    + var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);
    + var cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
    + // number of players without gaia (player 0)
    + var numPlayers = cmpPlayerManager.GetNumPlayers() - 1;
    +
    + for (var i = 0; i < numPlayers; i++)
    + {
    + var notification = {"player": i+1, "message": "Hello player " + (i + 1)};
    + cmpGUIInterface.PushNotification(notification);
    + }
    + }
    +};
    +
    +Engine.RegisterComponentType(IID_HelloWorld, "HelloWorld", HelloWorld);

    Now it perform logic in more appropriate moment (when simulation started, so all data loaded). In particular this solves problem with actual number of players, because if you will try to get it in first version of patch, you will get 0, because PlayerManager component has 0 players after it's initialization (see PlayerManager.prototype.Init) and they added later (in Player.js:LoadPlayerSettings)

  4. How do foundations affect territories? If they have no effect, I can probably build a dozen civ center foundations right next to each other in neutral territory and then finish constructing them all. If they do affect territories, I can probably capture enemy buildings by placing loads of foundations around them and then later I can destroy all those foundations and get all my resources back, so they're effectively free.

    As I understood from Michael's description, we can just separate logic which check distance between civ centers from territories logic, because this distance is always constant and independently from fact whether you build civ center on your own territory or on neutral one. In this case foundation should not affect territories, but you will not be able to "build a dozen civ center foundations right next to each other". Maybe I'm missed something ?

  5. If you are still interested Spring 1944 developers are available to release something with CC-BY-SA :) :

    It will be great if they will release anything :)

    But to really create WWII mod for 0ad (on pyrogenesis engine to be more precise) there should be some interested community, which will actually work on it. As Michael said:

    However, we decided it would be best to release a wider variety of Easter egg objects to help spur and inspire modders and modding teams.

    so while Wildfire Games team concentrate on 0ad and engine development everyone free to maintain mods and we will be happy to help as much as possible.

  6. EDIT: By the way, how much cost one P51-Mustang?

    Wikipedia claim that it cost US$50,985 in 1945 :)

    In 0ad template it has not 'Cost' element, so it inherit it from template_unit:


    <Cost>
    <Population>1</Population>
    <PopulationBonus>0</PopulationBonus>
    <BuildTime>1</BuildTime>
    <Resources>
    <food>0</food>
    <wood>0</wood>
    <stone>0</stone>
    <metal>0</metal>
    </Resources>
    </Cost>

    But as far as I know you can't create them in game :)

  7. Problem is i do not know where the files for the buildings are, and what i have to do to add one (or replace an existent one) in the game.

    Look at this topic: Michael answered there similar questions, also here is information how to work with COLLADA files in Blender and useful links.

    Edit: Jeff was faster :) But maybe my links can help too.

  8. When I click on links posted here a new tab opens but both tabs go to the link.

    Is it just me or is there something I'm missing?

    It works fine in Firefox 4.0.1. I just tried this in IE 9 and it works as you described (but when compatibility mode enabled it works properly).

  9. I remember having a discussion about it. I cannot remember the outcome of that discussion.

    Here is Philip's answer about this: http://www.wildfiregames.com/forum/index.php?showtopic=14725&view=findpost&p=219233 :

    Any idea when you will switch to libeven 1.3.x?

    Probably for the next release - I think the easiest approach is probably to bundle ENet 1.3 with the game, for distros that only have 1.2 (which should disappear over time), but use the standard system library when available, so it just needs a bit of fiddling with the build system to support that.

  10. Are there specific instructions on how to compile on a Debian system on the Wiki that you guys referred to?

    There is general build instructions on the wiki for all linux distributions: http://trac.wildfiregames.com/wiki/BuildInstructions#Linux. As you can see only thing which is specified for Debian-based distributions, it is the list of packages, which you need to install.

    Edit: if you want to compile only latest release, instead of using SVN version, you can download archives, mentioned on this page: http://trac.wildfiregames.com/wiki/LatestReleaseLinux#CompilingonLinux .

  11. In the future we will have different game modes (different victory conditions), currently we have only "conquest", which meant that player will be defeated in case if all it's important buildings/units will be destroyed/killed (see http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/EndGameManager.js), to mark important buildings/units we have "ConquestCritical" class for Identity component, currently it is added to all units and all buildings. Probably bot should act like human-player in this case, i.e. if human-player is able to proceed game, bot should be able too, if human-player is not able to play later (have no chance to win), we should adjust victory conditions (conquest in this case) to suppose that player defeated in this case.

  12. Hello.

    except libcurl4-gnutls-dev libcurl4-openssl-devas they depend on licurl-dev which is not available


    ../../../source/lib/external_libraries/curl.h:50:23: fatal error: curl/curl.h: No such file or directory

    Apparently you need to install some libcurl*-dev somehow. What distribution do you use? (Edit: I found it in the topic title)

    Edit2: maybe you have some other curl package installed, which blocks installation of libcurl4-gnutls-dev and libcurl4-openssl-dev ?

    <...> and more errors about unused variables or parameters

    Probably this is just warnings, which intended to remind developers that something should be implemented/changed.

×
×
  • Create New...