Jump to content

Phoenix4646

Community Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by Phoenix4646

  1. Thing is, I did create a GetClipSize() function, otherwise the stuff I added to the ''ATTACKING'' state wouldn't work which is why this confuses me. It doesn't throw any errors there and works fine, but everytime it's in the Init function it would just give errors.
  2. Alright, now I get another error. var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack); this.clipSize = cmpAttack.GetClipSize("Ranged"); this.actualclip = this.clipSize.clipsize; warn("this was just run!");I've added this to UnitAI.prototype.Init (the warning was only for me to see when the code is run). I'm getting no problems when I am trying to control one unit (but the ''warn''-print doesn't appear), but as soon as I try to control multiple units, my commands aren't issued and I get this error: ERROR: Script message handler OnCreate failedERROR: JavaScript error: simulation/components/UnitAI.js line 3193 TypeError: cmpAttack.GetClipSize is not a function UnitAI.prototype.Init@simulation/components/UnitAI.js:3193:2 GetFormationUnitAIs@simulation/helpers/Commands.js:1402:8 commands.walk@simulation/helpers/Commands.js:116:3 ProcessCommand@simulation/helpers/Commands.js:37:3ERROR: Failed to call ProcessCommand() global script functionWhen I remove all my additions except the warning, the warning appears whenever I create a new group by selecting multiple units and issuing a command (but only on the first command issued). EDIT:: and what is done here? var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); this.lastAttacked = cmpTimer.GetTime() - msg.lateness;What is msg.lateness? How can I modify the repeat time to be different under certain circumstances in the "Timer" part?
  3. That is exactly what I've done The problem I have is with implementing the variable actualclip, e.g. the variable that defines how much ammo is left in the clip. ClipSize only defines the maximum ammo that the clip will have. Now I have no idea how I can create such a variable in the code. Or should I just do another entry for that in the Ranged Attack component? Can you even modify values in those components on the fly without it accidently acting like a tech or something like that?
  4. Alright then! I got almost everything set up in UnitAI.js, I'm only having one problem. I do not know where to put the variable this.actualclip; when putting it at the start of the file (after "function UnitAI() {}" of course) the game tells me that there's a "missing variable name" and if I don't put it anywhere the variable is ''undefined'' (which makes sense of course). As a tinkerer, this is where my little coding knowledge is already at a loss.
  5. Derp... my bad. I tried to write ''Integer'' with a capital letter at the beginning. Thank you. And one more thing, about particle effects. Right now when I use a particle effect it needs to fade in first which is fine, but I need the effect to fade in faster than it usually does. Is there any way to manipulate that yet?
  6. Back with another thing I wanted to implement clips for (ranged) units and took a look at attack.js. Now, what I wanted to do was add two other things (excuse my untechnical gibberish - maybe someone could educate me ) called ClipSize and ReloadTime, contained in the same block where RepeatTime is defined. Then, when the unit is created, another variable called actualclip (or whatever you want to call it) will be set equal to ClipSize. After that, whenever the unit fires, it subtracts 1 from actualclip until it is 0. When that happens, the unit uses ReloadTime instead of RepeatTime once and sets actualclip equal to ClipSize again. However, the only thing concerning RepeatTime I found was "Attack.prototype.GetTimers", which applies the Repeat- and PrepareTimes. GetTimers is used nowhere in the whole file though. Is this one of those things that is mainly done in the engine? EDIT:: Oh yeah, and I looked at the datatypes available for schemas. So there's only positiveInteger and nonNegativeInteger. So is there no way to use a value of -1 anyway, or would I need to use ''text''?
  7. @niektb: No, I couldn't find these links. Thanks for the almost instant reply And sorry for my late one, I already saw your post 10 minutes after but I thought I'd post again once questions regarding the process come up ... and stuff looked complicated so I thought I'd get to animating later. And then I forgot to atleast say thanks @LordGood: Yeah, I'm familiar with how the audio system in 0 AD works, that was not the problem. The problem is that attack sounds aren't played if there isn't an animation specified for attacking (you can even use an idle animation for it, it's just about having an animation *at all*). The question was if there was some workaround to get the sound to play without specifying an animation (towers and fortresses (structures) play the attack sound nonetheless while balistas and catapults (units) without an animation don't comply (for that, either check the old alphas where they didn't have attack animations or remove the attack animations from the actors for testing)), and if there's no way of doing that, then I'd need to know how to make animations for 0 AD and if they need to be in the weird .psa format (which already got answered above ). But thanks for the answer
  8. So I've made some placeholder models and I've been trying to implement them into 0 AD which worked fine so far. The only problem I have is with the attack sound. As everyone knows, the attack sound of a unit won't be played if the actor has no attack animation set. Now my first question would be is it still possible to somehow get the game to play the sound? And how do I export .psa animations in blender that work in 0 AD? The .psa addons in blender are for the Unreal Engine model formats and I couldn't find anything about animations in 0 AD.
  9. Works like a charm, thanks a lot! While talking about civic centres, are Or-requirements for templates similar to technology requirements possible yet? I'd like to be able to build only one civic centre when I got none and as many as I want once I reach the third phase. Also I'm looking for the file where the standard playercolors are set because I'd like to adjust some of them and I've been searching through a lot of files but found nothing.Where are they located at? And what about unit limits? How can I set up a units' / buildings' limit so it can only be created x times at the same time? I've only seen the BuildRestrictions and TrainingRestrictions stuff which included setting a category, but I'd be thankful if someone could explain how this works.
  10. Yes, right now I'm trying to do that in specific scenarios. Although sometime later on I'd also like to implement a ''starting age'' setting into the match setup, but not right now So, any ideas?
  11. So I've been making some scenarios again and now I wondered if it is possible to have some technologies already researched when the game starts, e.g. already being in Town Phase. I was thinking about if that could be implemented in the maps' script?
  12. Oh well, I was going to name my Mod ''Ancient Empires''... but seems like I wasn't fast enough
  13. I haven't implemented anything related to converting yet, I've only been messing around with the convert cheat for testing stuff and then I noticed the experience bar thing. But if I ever plan on adding conversion I think it'd be useful if some stuff already worked I didn't even know about that mod. For how long has that one been around?
  14. Yeah, I'm aware that it's only a temporary workaround. I was talking about a workaround for the GUI problem only (the experience bar that expands endlessly when RequiredXP is 0). I just felt like saying what I've done because I thought it might help others for the time being, you never know I cannot get the promotion bug to happen again though. Once a converted unit kills anything (= gains some XP) he gets promoted. Maybe when I took the screenshot I converted a slinger that already had gotten XP prior to converting. Or were you unable to get them promoted afterwards? I'm absolutely sure that I haven't changed anything since I'm testing that without mods (except the mod that adds the promotion tech back in the game so I could test it). And sorry about the duplicate.
  15. No problem, I'll open a ticket for each issue. Btw., all of a sudden promotion of converted units works like a charm (without having modified Promotion.js) which confuses me because it didn't work before as you can see on the screenshot. Also I managed to make a temporary workaround for the visual bug. All I did was editing GuiInterface.js in lines 520 to 527: I simply add +1 to the shown RequiredXP amount if it is 0 and there you go, it acts as if the unit needs 1 XP to advance (although I still would prefer it to still say x / 0 and make only the bar think that requiredXP is 1, but as a beginner I got to take a closer look on that). PS: And while I'm at making tickets, I'll also make a ticket of this: Garrisoning a hero inside a building lets the star stay exactly where the unit was before it went inside the structure. EDIT:: There they are http://trac.wildfiregames.com/ticket/2909 http://trac.wildfiregames.com/ticket/2910 http://trac.wildfiregames.com/ticket/2911
  16. Ah, alright then. Better ask first before opening a ticket Well, and then there's another thing with techs setting RequiredXP to 0 (e.g. promote units permanently). If I research an upgrade that promotes a certain type of unit and then somehow get control of a pre-stage unit (e.g. I can create advanced hoplites and get a basic one from the enemy by using the convert cheat), the experience points bar glitches and stretches across the screen (similar to the tech bug that has been reported in a ticket some months ago and which got fixed). Now this is a scenario that is very unlikely to happen in 0ad since you don't convert units, but how can I fix the display myself? I know that it happens because it tries to show 0 / x on a bar that is 0 points long and thus it stretches endlessly. Maybe I can force the display (*only* the display) to use the value 1 instead if RequiredXP is 0 and then fill the bar up? Tested in most recent SVN version with a mod that adds the promotion techs back to the barracks queue: Also, these converted units cannot be promoted in any way (since the requiredXP stuff is bugged on this one it cannot correctly promote them) https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_requiredxp_visbug_02.jpg It says the unit has 10 / 0 requiredXP but it doesn't promote it. One way to do it would be just to promote converted units if the new owner has the particular upgrade researched. But I'd rather have it like this, converted units stay like they are and get all the other techs (damage/armor/hp upgrades, speed etc. and whatnot). Instead in this case I'd like the unit to get promoted if it kills any kind of unit (gets any amount of XP). PS:: Just wanted to say: some very minor things I noticed The workers are using the carry animations even though they don't carry any resources. Can be reproduced by selecting multiple workers and sending them to get resources. Then when all of them carry resources, tell them to drop them off. Do that by rapidly clicking on the town centre / storehouse / farmstead (for whatever resource they are carrying) and keep clicking until all of them have dropped the resources off. If you make them walk now, they still look like they're carrying stuff. And this: Incorrect rotation of workers when the resource is directly at a drop off structure
  17. And it's me again, today with a question regarding techs. So I changed the look of the house for the first phase. https://dl.dropboxusercontent.com/u/93679544/Screenshots/0%20AD/issues/0ad_ancemp_house_01.jpg Then in the third phase it is supposed to change its look to the 0ad hellenes house model, which works fine. Except when the building is placed, destroyed or hidden in the fog of war. At those times it goes back to the old phase 1 model. The same goes for units with actor changes. When they are created, they use the new phase x model, but when they die they go back to their old one. Am I missing something or is something wrong on 0ad's scripting part?
  18. I just feel the need to update this. Right now it looks like this has been fixed (or atleast heavily improved?) with the latest memory leak fixes . Even though the game lags extremely sometimes with 2 or more AI players on rather big maps (nothing new ) it still keeps running and only uses 800 MB at peak (talking about my last game) compared to 1.3 GB which I was able to get to before (which was the point at which it crashed)! Also the game doesn't immensely increase the amount of RAM used when in the main menu like before. So good job everyone
  19. Okay, today I ran into it again with the public mod. Again it didn't generate a crashlog.dmp dump file. SVN Revision 15728 I wanted to create a match with three players (me (Athenians) and one very hard AI (Spartans) vs. one very hard AI (Romans)) on the random naval map Archipelago. The first time I tried to start the match I got an error which returned me to the main menu while the game tried to load the match. The second time it started just fine with the same settings being used. See the first error on the very top in the interestinglog. Around 30 minutes into the game I got a very long stream of Javascript errors (see interestinglog - as I said, the 1st error on the top is not related to this) which made the game lag badly. After some time it resulted in the dbghelp.cpp crash. https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbhhelp-random-Crash-3/interestinglog.html https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbhhelp-random-Crash-3/mainlog.html https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbhhelp-random-Crash-3/crashlog.txt https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbhhelp-random-Crash-3/commands.txt Also, there's a command.txt for the 1st game which didn't start: https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbhhelp-random-Crash-3/commands_fail.txt (note: this wasn't named ''fail'' by the game, I just added it into the filename to know which is which)
  20. That's pretty similar to what I have experienced! It runs out of memory faster the more / the longer you've minimized it.
  21. Indeed, I'm definitely running out of memory. I just crashed again when trying to play a match with a friend (both of us against one hard AI) about 40 minutes in - again I got a lot of out of memory java errors and it totally messed my view up. I could hear the game go on in the background while my vision was being entirely obstructed by the background texture of the gamesetup menu (the gamesetup menu where you select which map, etc.). The console's font outside of the console wasn't readable, it was only white blocks (but the text inside the console which you can open with F9 was readable). Checking the task manager said that the game was using 1.3 GB of RAM, being at the top of the list of processes. Another thing that I noticed is that when I started 0 AD and minimize it (when the game is still at the moving starting screen) the RAM usage is ~78MB. It then rises by ~15 MB each minute! From 00:53 to 1:03 it changed from using ~78MB to using 255MB of RAM. I then maximized the game again and continued to sit on the starting screen for 30 seconds. Then I minimized again and checked the task manager: All of a sudden it used 360 MB of RAM!
  22. I got it to crash in normal 0 AD. But this time it was wdbg_sym.cpp! It again happened when trying to take a screenshot (but I got to take some some minutes before). SVN Revision 15622 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/InitDbghelp-random-Crash-2/mainlog.html?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/InitDbghelp-random-Crash-2/interestinglog.html?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/InitDbghelp-random-Crash-2/crashlog.txt?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/InitDbghelp-random-Crash-2/commands.txt?dl=1 I also noticed that there's more stuff going on with 2 AI players in my mod than there is in normal 0AD. Maybe that's one of the reasons why it crashes more. I think you can reproduce these crashes by making a match with 2 or more AI players at very hard and try to take a screenshot once in a while. That's how it happened most of the times for me atleast.
  23. And it just happened again - I tried to take a screenshot and it crashed. But this time it didn't even create a dump file, only a .txt! SVN Revision 15621 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-3/crashlog.txt?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-3/interestinglog.html?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-3/mainlog.html?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-3/commands.txt?dl=1 I've uploaded the latest build again, just tell me if I should send it to you - I don't just want to send it to you everytime and spam your inbox
  24. Alright, now the Dbghelp.cpp crash happened again! Also worth noting is that I get a lot of out of memory errors when playing with 2 AI players for a long time (this isn't the only time the out of memory error happened, see the log) Checking the task manager told me that out of my 4 GB RAM 3,2 GB are being used. SVN Revision 15619 http://pastebin.com/CUqc0wqN https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-2/crashlog.dmp?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-2/crashlog.txt?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-2/interestinglog.html?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-2/mainlog.html?dl=1 https://dl.dropboxusercontent.com/u/93679544/0AD%20logs/Dbghelp-random-Crash-2/commands.txt?dl=1 Now this match took a while longer - around 3 hours! I'm sending the new build to you again.
×
×
  • Create New...