Jump to content

niektb

WFG Retired
  • Posts

    2.843
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by niektb

  1. There is no graphical interface for triggers in Atlas. To implement them you need to program (or find someone that does that for you) like we do here (or at least try to): http://www.wildfiregames.com/forum/index.php?showtopic=19368
  2. Update #4: I believe it has been quite a while since the last week so here is another one. Let's start with the bad news: my development PC broke down last week with a faulty HDD so that delayed the coding side. Luckily I had the code on a different hard drive so my work from the past week is not lost. (I did lost a number of photoshop files I created, like the Mapping Contest banner/symbol, though) The Good news: the map has received a number of painting updates in order to populate the world more by adding a number of small villages: I hope you enjoyed the map A Silent Day In Gaul! Keep in touch for other updates!
  3. There were some changes made with regards to visibility in SVN, and I think Prodigal Son hasn't updated that: http://trac.wildfiregames.com/changeset/16022
  4. The Wiki is somewhat outdated at certain parts. In addition to diffuse textures, normal and specular maps are available in the texture folder. AO is also supported but model specific and therefore needs to be baked. http://www.wildfiregames.com/forum/index.php?showtopic=17542&p=273078 In-game however these need to be turned on. The problem is that it is not accessible in the Options menu. You need to create a config file like described here: http://www.wildfiregames.com/forum/index.php?showtopic=17326&p=290232 http://trac.wildfiregames.com/wiki/Manual_Settings Especially materialmgr.**** is important.
  5. Not entirely sure if all are there (I don't know all old structures) but I do know there are quite a lot old structures. When trying those releases you'll probably encounter errors and bugs.
  6. No, they can be found in Atlas but under the actors tab instead of the entities tab.
  7. Tobi95 was working on the Temple of Jupiter, not this one.
  8. Update #3: About Resources Sometimes you want to give a player resources, either to enable him to do something or reward him for things he did earlier. I wrote a little function to do that easily. //Add a certain amount of a given resource to a given player//@param PlayerID: the ID of the player that receives the resources//@param resources: object that holds resource data: var resources = {"food" : 500};function AddPlayerResources(PlayerID, resources) { var Player = TriggerHelper.GetPlayerComponent(PlayerID); for(var type in resources) { var resource = Player.GetResourceCounts()[type]; if ((resources[type] < 0) && (-resources[type] > resource)) resources[type] = -resource; Player.AddResource(type, resources[type]); }}In case you already looked at the code in A Silent Day In Gaul, I improved the behavior a bit to allow for passing data objects if you want to add multiple resources (so you don't have to call the function multiple times). Calling can be done like this: this.PlayerID = 1;var resources = { "wood": 500, "stone": 500, "metal": 500};AddPlayerResources(this.PlayerID, resources);
  9. I've also created a github repo for it: https://github.com/0ADMods/map_A_Silent_Day_In_Gaul feel free to create forks / pull requests, or anything you like.
  10. There was an issue with the Localisation of the GUI Notifications, I corrected the post. (markForTranslation should be done directly on the to be translated text)
  11. I fixed some text and defeat conditions. I consider this my final release, I'd better focus on the main scenario map_A_Silent_Day_In_Gaul.zip
  12. And another one Edit: I keep fixing map_A_Silent_Day_In_Gaul.zip
  13. Thanks for you testing, I indeed forgot to disable that trigger. Thanks for your other fixes too. Here is a new version (much smaller too by removing some git folders) Edit: see next post.
  14. Update #2: About GUI notifications NOTE: In my code info I assume you've read (and understood) http://trac.wildfiregames.com/wiki/Triggers. As a Mapmaker you of course need to tell the player something. I think two types are going to be used most. I call them (1) Dialogue Window and (2) GUI Notification. Dialogue Window This is the most complicated version of the two. Thanks to sanderd17 for implementing it. (Excuse me for the Dutch Localisation) In the code the window needs to be specified as well as a number of buttons and some side-info. For the above window I used the following code:Trigger.prototype.VisitVillageDialog = function() { var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); cmpGUIInterface.PushNotification({ "type": "dialog", "players": [1,2,3,4,5,6,7,8], "dialogName": "yes-no", "data": { "text": { "caption": { "message": markForTranslation("Welcome, young man. I already heard of your arrival. What is it you are looking for?"), "translateMessage": true, }, }, "button1": { "caption": { "message": markForTranslation("I'm looking to increase my combat skills!"), "translateMessage": true, }, "tooltip": { "message": markForTranslation("Say this"), "translateMessage": true, }, }, "button2": { "caption": { "message": markForTranslation("I'm looking to increase my wisdom!"), "translateMessage": true, }, "tooltip": { "message": markForTranslation("Say this"), "translateMessage": true, }, }, }, });};However, to receive the answer the mapper has to create a Listener that keeps track of the Player Commands (as pressing one of the two buttons is a player command). It can be done the following way: Trigger.prototype.PlayerCommandHandler = function(data) { if ((data.cmd.type == "dialog-answer") && (data.cmd.answer == "button1")) //do something};I also check whether the Player Command issued is a button press (as there are multiple types possible like a move command) and I check which button is actually clicked on. If you have multiple dialogs I also suggest that you check for the name of the dialogue to make sure you don't mess around with the various Dialogue Windows. This PlayerCommandHandler needs to be registered of course like described in the Wiki. GUI Notification This one is much easier to understand and to code, as it doesn't require feedback of the player. I've defined the following function (credit to Radagast for coding it, one fix aside) to make life easier://Post a GUI notification//@param players: Array of playerIDs to post the message to//@param message: the to be posted message in a Stringfunction PushGUINotification(players, message) { if (!players || !message || message == "") return; var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); var recipients = players; if (!players.length) recipients = [players]; cmpGUIInterface.PushNotification({ "players": recipients, "message": message, translateMessage: true });}This can be called in the storyline (or wherever you want to post a GUI notification) like the following: PushGUINotification([1], markForTranslation("Shame on you! You've been killed!"));That's it, now a notification pops up like shown in the image. No additional code required. In order to test and learn all these stuff I've created a small map (surprise!). I hope you don't mind I actually didn't bother too much with the aestetics and storytelling (it's quite short) but rather focused on the code. Once more credit to Radagast (or was it Stanislas?) for creating a Do Nothing AI to make sure nothing interferes with the storyline. I hope you all enjoy it! Happy playing (as long as it lasts)! In future updates I'll grab more code snippets from this map and explain these in detail.
  15. I generated that analysis this morning on SVN, but I indeed see the script excluded the Ptol and the Sele. And sure, It doesn't give a definite answer but an indication.
  16. This is BTW necessary to read the upper table pleasantly: https://www.dropbox.com/s/5ud8omq67dpoebp/style.css?dl=0
  17. Because Peregriino said he had about 10 melee cavs against about 10 ranged infantry
  18. In fact hard counters were removed in Alpha 17 after it was deciced (with a good discussion) that a soft counter system is easier to balance (dunno which topic)
  19. It's funny that you say that archers beat melee cav. A while ago wriatti wrote a template analyzing tool, here are the results of the current svn: https://www.dropbox.com/s/goida2xwceajdos/unit_summary_table.html?dl=0 It shows that melee cav are actually OP (they're the unit type that often is countered the least). Also I just tested and I see that 10 Sword Cavs make quick work of 10 infantry archers.
  20. I think most (if not all) textures are made in Photoshop/Gimp. So that's fine. And quickly scrolling through the links you gave I think that these would perfectly fit in 0 A.D. and look awesome to! Not able to open 0 A.D. properly is indeed not really a desirably working situation, but we'll appreciate any feedback you have! About the roofs: we're about to replace them with hay roofs. No chimneys at all? How did the fire smoke move to the outside? Just with a hole?
×
×
  • Create New...