Jump to content

coworotel

Community Members
  • Posts

    348
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by coworotel

  1. This is my first attempt at making a map for 0 A.D. To start simple I tried to replicate a simple but classic mod map in Age of Empires II, Forest Nothing:

    Here is a screenshot:

    map.thumb.jpg.388b378b44326a5bf4d04758f0f04e17.jpg

    Files:

    forest_nothing.json

    forest_nothing.js

    This is a work in progress, there's still some problems with the map:

    • Only works for Tiny, Small and Medium maps, more than that map generation crashes (out of memory);
    • Even Tiny takes ages to generate the map, I guess there is some better way of saying "just put trees everywhere" which I don't know about;
    • There is a little space on the edges of the map where people can walk, you were not supposed to be able to reach your enemies without cutting lots of wood;
    • Beginning of game is extremely slow: the AI sends units to cut trees, but the massive number of them makes pathfinding extremely slow (I guess);
    • AI does surprisingly well, but will need some tweaks. Since it doesn't "know" that it needs to make some space their choices are not optimal. They start to have space to build after more than 1 hour. Also, their units often get stuck among the trees;
    • Market prices lower limit should be raised a bit, because this map is all about buying stuff. You only have wood;
    • If players send many units to cut wood at once it lags the game a lot because they will all do a lot of pathfinding to find the nearest tree (since you cannot put 20 units cutting in the same tree).

    Still, the map is playable. It took me around 2 hours to reach the AI in the tiny map, haha. Will be fun with other human players. There's something cosy about being in a village completely surrounded by trees and protected from your enemies.

    • Like 2
  2. 7 minutes ago, Nescio said:

    Greek city states were culturally and militarily very similar, yet are subdivided into different civilizations. 

    Sparta is very different though. It's so unique with all that military focus that even inspired Plato's The Republic, most read book in American universities today.

  3. 8 hours ago, Nescio said:

    if Athens and Sparta, then why not Thebes? Argos? Corinth? Syracusae? Etc.

    Thebes already in Delenda Est, the others might be implemented eventually in some mods... The team has limited work force.

    @Lion.Kanzen the current Aristeia (in github) is compatible with which version of 0 A.D.? Alpha 22?

  4. 15 minutes ago, aeonios said:

    I'd suggest using a program specifically designed for working with 3D models to do the scaling with, like wings3D or blender.

    I remember the editor of Warcraft III allowing you to scale animated units though. There was a parameter you could set like "scale", just one number, and the corresponding unit would be scalled correctly in proportion.

    • Like 1
    • Thanks 1
  5. The line

    m.PedraBot.prototype = new API3.BaseAI();

    makes PedraBot inherit from BaseAI (I guess?).

    I've found in baseAI.js (part of the common-api):

    m.BaseAI.prototype.HandleMessage = function(state, playerID, sharedAI)
    {
    	PlayerID = playerID;
    	this.events = sharedAI.events;

    So this.events in pedraBot is the same as this.events in BaseAI.

    Now, when is HandleMessage called on BaseAI? I don't know. There's no call to it in Petra as well.

    sharedAI.events is defined in shared.js (part of common-api):

    /**
     * General update of the shared script, before each AI's update
     * applies entity deltas, and each gamestate.
     */
    m.SharedScript.prototype.onUpdate = function(state)
    {
    	if (this.isDeserialized)
    	{
    		this.init(state, true);
    		this.isDeserialized = false;
    	}
    
    	// deals with updating based on create and destroy messages.
    	this.ApplyEntitiesDelta(state);
    	this.ApplyTemplatesDelta(state);
    
    	Engine.ProfileStart("onUpdate");
    
    	// those are dynamic and need to be reset as the "state" object moves in memory.
    	this.events = state.events;

    Now when is onUpdate called on sharedAI? No idea... Every turn maybe (by the engine)?

    Is BaseAI.Init also called by the engine upon beginning of the game?

    I'm also assuming that sharedAI is an object of "class" SharedScript, which is initialized through method SharedScript.Init, called by the engine. Not sure though...

    I'm a bit lost in this. It doesn't help that I'm not skilled in javascript...

    Would greatly appreciate any help.

  6. @Rolf Dew I was wondering if there was an "unofficial" zip somewhere... You know, just the folder with the files as Millennium A.D. for example. Mod.io process of acceptance seems very bureaucratic - this signing process doesn't seem sustainable in the long run, more and more work to verify mods will be necessary.

×
×
  • Create New...