Jump to content

The Undying Nephalim

Community Members
  • Posts

    525
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by The Undying Nephalim

  1. 33 minutes ago, elexis said:

    What role is metal going to play in your mod? If the player can gather, trade or barter it, it sounds like it should be visible.

    I didn't follow the thread so I don't know if it's too much work to delete the metal from the templates or to create metal-free templates inheriting the existing ones.

    (Originally there was a way to add disabled resources, but I didn't like the fact that the resource was still present in all XML files, i.e. leftovers and resource definition still in place).

    Several of my civs will be using metal to construct their buildings, but otherwise it won't be used by many of the factions in my game. Many civs will have similar resources (Food for example is used by almost all of them), but one of the goals of my mod is to have civilizations with radically different resources and methods of collecting said resources. By the end of the mod there will probably be about 10 unique resources split across several civs, so I'll definitely need to have it so only 4 resources are displayed on the UI at a time.

    • Like 1
  2. 36 minutes ago, Imarok said:

    I think that's just changing some GUI code..

    I mean instead of disabling resources, you could just don't show them in the GUI for certain civs...

    That is what I would like to do, just not display metal for this one faction. What file might need to be edited to accomplish this?

  3. A problem I am running into:

    I'm adding a new resource into the game in the form of Rupees. This faction will not use metal, and I'd like metal to not be displayed at all for them and have Rupees replace the resource in the top left display. It seems like no matter what I do in setup_resources.xml and resources.xml it always displays Metal, even after deleting metal entries in the files. Is there any way to make it so that metal does not display for this one faction and my fifth resource does? Also is there a way to determine how much of this fifth resource the faction starts with?

  4. 9 hours ago, Nescio said:

    Forgive me for jumping in a completely unrelated thread without reading anything but the last post, however, I believe I can at least partially answer this. /simulation/data/auras/structures/wonder_pop_2.json has a technology requirement:
    "requiredTechnology": "pop_wonder",
    and there is no reason why unit auras would behave differently. As for improving auras, I suppose this is also possible, albeit probably a bit less straightforward.

    EDIT: Technologies can supersede each other; if this is also allowed with auras (I'm not sure), improving auras would be very easy; just create a new file for the improved aura aura_2.json which contains:
    "supersedes": "aura_1",

    I've gotten my aura research ideas to work thanks to you. :victory:

    EDIT: Everything seems to work except putting supersedes into an aura. The unit just ends up having both auras without the first one being removed.

  5. 4 minutes ago, WhiteTreePaladin said:

    I think the market tech that allows collecting resources at an ally's dropsite requires three traders to be trained before the tech can be researched.

    Hmmm, that seems to have a class of unit as a requirement, nothing about a specific named unit though. I suppose I can give my unit a custom class and use that.

  6. Another question, is it possible to make it so that a unit or technology requires another unit to be built, instead of a tech to be researched?

    Is it also possible to make it so that a tech icon doesn't show up to be clicked on unless it's prerequisites are researched?

    Also is it possible to have more than two technologies in a Pair where you have to choose between them? I can't seem to get more than two to work at a time.

  7. 21 minutes ago, stanislas69 said:

    Those words are tokens separated by spaces, you can add Mage to that.

    So I can add any class I want into any template and it works just like that? Auras will be able to read that class? Seems pretty simple, I like it. ;)

  8. 1 hour ago, stanislas69 said:

    I think you just have to edit some XML templates.

    See template_unit for instance

    Hmmm, the only thing having to do with classes in that file is this:

     <Classes datatype="tokens">Unit ConquestCritical</Classes>

  9. EDIT: Strange, it seems to be working for my other faction (Hylians). It plays the theme then randomizes the music. For the Gerudo though it just loops the first track. I wonder what might be going on.

    EDIT again: Very weird, I changed the names of some music files and it seems to be working for both factions. I wonder if perhaps there might have been something wrong with the .ogg file. Oh well, at least it works now. ;)

    • Like 1
  10. Just now, fcxSanya said:

    Hm, it looks ok. Are you sure you have multiple peace tracks in your civ json?
    You can try to put something like warn(uneval(this.tracks.PEACE)); before the startPlayList to check what tracks are in the list (not sure whether it would properly print the list of objects though).

    Yes, here's my entry in the civ file:

    	"Music":[
    			{"File":"gerudo_theme1.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient1.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient2.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient3.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient4.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient5.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient6.ogg", "Type":"peace"},
    			{"File":"gerudo_ambient7.ogg", "Type":"peace"},
    			{"File":"gerudo_battle1.ogg", "Type":"battle"},
    			{"File":"gerudo_battle2.ogg", "Type":"battle"},
    			{"File":"gerudo_battle3.ogg", "Type":"battle"}
    		],

     

  11. 8 minutes ago, fcxSanya said:

     

    
    // Play the first track first and then the remaining ones in a random order
    this.startPlayList([this.tracks.PEACE[0]].concat(shuffleArray(this.tracks.PEACE.slice(1))), 3.0, true);

    You need to put it in "case this.states.PEACE:" of updateState (where your two startPlayList's currently are)

    I've added this part into my music.js file ( under Music.prototype.updateState = function() ). It doesn't seem to be working though, the first track just loops over and over and it ignores all the others. :huh:

  12. 16 minutes ago, fcxSanya said:

    II didn't test it in the game, but "on paper" (in the browser console) it looks fine:

    image.png

    I'm not entirely sure what to do with everything after this.track.PEACE. I think I should mention I am more of an artist and not exactly the best at scripting so some of this might need to be explained to me like I am a neanderthal. :rolleyes:

    Is this what was meant:

    Music.prototype.resetTracks = function()
    {
        this.tracks = {
            "MENU": ["HyruleConquest_Theme.ogg"].concat(shuffleArray([
                "HyruleConquest_Theme.ogg",
                "HyruleConquest_Theme.ogg",
                "HyruleConquest_Theme.ogg"
            ])),
            BATTLE: [ ],
            VICTORY : ["Victory1.ogg"],
            DEFEAT : ["Dried_Tears.ogg"]
        };
        this.tracks.PEACE = [1,2,3,4,5];
    };

     

  13. I guess I'll have to mess with some components and hopefully figure out how to get the hero icons to show up at the start of a match. I really have no idea where to start but I guess I'll just mess with things and see what happens.

     

    On 8/15/2017 at 1:11 PM, fcxSanya said:

    So, unless I've missed something, you can:

    1. remove the default peace tracks from 'resetTracks'

    2. shuffle only second and subsequent tracks for the 'PEACE' state in 'updateState'

    I'm digging this up because I just realized that it's not playing the first music track and then shuffling the rest, it's just playing all the tracks in a specific order. I must have messed up the script in the music.js file. Really not sure what to do, everything I try it either plays in a specific order of all tracks, or completely shuffles:

    		case this.states.PEACE:
    			this.startPlayList(this.tracks.PEACE, 0, true);
    			this.startPlayList(shuffleArray(this.tracks.PEACE), 1.0, true);
    			break;

     

  14. I have another question. I've made a mock-up of a feature I really want to include in my game:

    yZpyDZL.jpg

    The idea is that at the start of a match it shows four heroes to choose from that unlock specific units and technologies. Is there anyway this sort of feature is currently possible or a way I could go about implementing it?

    • Like 1
  15. 1 minute ago, wowgetoffyourcellphone said:

    I feel like you're going to have a bad time when it comes to maintaining your changes. Make sure you work very closely with the team and maybe you can get some of your changes implemented into the public mod code when applicable.

    I suspect what I might end up doing is having two different versions of the mod. One using the latest public build and then another with the dev version. As I mentioned my problem is that I try and bring out frequent releases. If you track my history with the total war version of the mod I generally released two new factions every 3-4 months and I hope to do the same with the 0AD incarnation of the mod. I don't want to have to wait around for months until the devs release a new public version of 0AD so that I can release my mod to the public. I also worry that asking people to download the dev version to play my mod might be too complicated for the average player. I get complaints from people about getting my total war version of the mod to work when it turns out they installed it in the wrong folder. :rolleyes:

    • Haha 2
    • Confused 1
  16. 35 minutes ago, mimo said:

    yep, seems that there is a missing protection in that function when the field template does not exist. You should add

    if (!gameState.getTemplate(gameState.applyCiv("structures/{civ}_field")) return false;

    before the line let maxGatherers = ...

    That should be enough

    That seems to have solved it, although it needed an extra ).

    That should do for the AI of these two factions, I'll revisit this when I get to some of the more weirder factions. ;)

    • Haha 1
×
×
  • Create New...