Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    471
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by STRUNK

  1. Congrats and thanx for the mission thebig! Can someone point me to what these new techniques are?
  2. I'm thinking to also make a very simple flying AI that is actually only a origin bone, and, if needed a body bone, and if needed some other minimal requirements so mappers can bind things to it, like fireflies ... I saw someone made a bunch of different colored firefly stuff already but I haven't found an AI for it. Is someone working on such a thing already?
  3. I only added "death_script" "batDeath" but I had to also make the scriptobject "ai_bat" instead of "ai_darkmod_base". Finally it all makes sense to me. I really didn't totally understand what you meant by the cleanest way etc : D Btw. did I ever tell you that I really appreciate your help? You should get a statue for that or something!
  4. It has been a long time since I've been scripting anything and I'm doing something wrong I guess .. for my script doesn't work/exist. I included it in the tdm_custom_scripts.script and so far it goes well: the game starts : ) It's a very little testscript for now only to verify if it works. object ai_bat : ai_darkmod_base { void batDeath(); }; void ai_bat::batDeath() { sys.println(" a bat has been killed"); } I also set up a trigger timer targeting a target callScriptFunction with "call" "batDeath" .. but it prints in the console that batDeath does not exist .. I looked at requiem's scripts and I cant find anything obviously wrong with my setup ... Great!
  5. Here a video of fly_seek_scale 1, 4 and 10 1 https://cdn.discordapp.com/attachments/815315205483397142/934550666058285076/2022-01-22_21-39-13.mp4 4 https://cdn.discordapp.com/attachments/815315205483397142/934550792365564004/2022-01-22_21-41-20.mp4 10 https://cdn.discordapp.com/attachments/815315205483397142/934550925014614047/2022-01-22_21-43-17.mp4 I think it will be a welcome addition : ) (Beta) Bats will be released ofc. I tried "burnaway" "0" and "burnaway" "1" with no result. I think Bats might just burn away in green flames, but I don't know how to do that yet.
  6. Video: https://cdn.discordapp.com/attachments/815315205483397142/934193869099245680/2022-01-21_22-09-22.mp4 https://cdn.discordapp.com/attachments/815315205483397142/934204639363096627/2022-01-21_22-51-30.mp4
  7. I think you are right Dragofer. I'm playing with the the wander_radius and the fly_seek_scale, and it looks to be the fly_seek_scale is the only thing that influences the (chance for?) vertical movement. (Not vertical bobbing but this seek scale was influencing vertical movement in my map/settings, that's why we got different results I guess) A fly_seek_scale above 1 seems to result in no significant vertical movement at all, under 1 it's occuring more often. The latest video was with a value of 0.1 I think. These bats are really using the vertical space, as they should, but fly long "straight" streches, bumping their heads against the walls a lot. With a value of 10, they won't go significantly up or down, fly too short streches and look really nervous. fly_seek_scale 0.5 looks quite good btw, but I'm still wondering what fly_seek_scale actually does? That said, if your "animal_patrol_wait" could be added to 2.10, animal_patrol bats can be an option for mappers. Bats don't like small spaces anyway, only to sleep in; these bats don't sleep. (fly_seek_scale works good enough?) Making the bats not damageable is a good solution to not deal with ragdolls and such. Making the bats without senses (all acuity is set at 0 (for bats don't care)), for me, seems a good solution for an AI that is basically meant for decorative purposes, like cricket sounds and flies in toilets.
  8. @Dragofer I found a way to not have these bats "freezing" : setting all acuity spawnargs to 0. So I guess the freeze is caused by going into some sort of alert state? It feels to me that, although this can be a solution, there is something else wrong with the bats, for they just shouldn't care about anything. Rats seemingly don't care if they see, hear or touch an other AI ...
  9. No, for the time the bat is frozen nothing is printed to the console, though it could be I did not have the debug line of code placed for all different "states". First I'm gonna look at the spawnargs I put in for trying to make the bats nonsolid/fly through the player. That might have been a bad Idea for they would also fly through other AI, and it didn't work anyway : )
  10. Things are getting better: the bats now only " freeze" when they hit "me", something you can also see in the latest video, but there they were freezing in other places also. if (owner->AI_MOVE_DONE) { // We've reached the destination, wait a bit switchToState(statePreMovingToNextSpot,owner); //This was: sswitchToState(stateWaiting, owner); gameLocal.Printf( "currently in state: MovingToNextSpot-REACHED\n" ); This way it affects the rats too but i'll try to figure out how to put it in the script where it only optionally affects animal patrol by a spawnarg. (animal_patrol_wait as a boolian probably, and get rid of your original animal_patrol_wait). The "states" where the bat is in most of the time is: // grayman #2356 - if you're far from the goal, run. This keeps rats from slow-hopping great distances. And: // Still moving, maybe turn a bit (These are part of the AnimalPatrolTask::movingToNextSpot) I also changed the code for the turning a bit, to have more turning vertically, and that seems to work for more vertical movement of the bat: // Still moving, maybe turn a bit owner->Event_SaveMove(); float xDelta = gameLocal.random.RandomFloat()*20 - 10; float yDelta = gameLocal.random.RandomFloat()*20 - 10; float zDelta = owner->spawnArgs.GetBool("animal_patrol_fly", "0") ? gameLocal.random.RandomFloat() * 40 - 20 : 1; //Was also 20 - 10 //EDITED gameLocal.Printf( "currently in state: MovingToNextSpot-still moving, maybe turn\n" ); Conclusion: Although getting rid of going to stateWaiting seems to be a little improvement, THAT was not the problem of the freezing: The other AI in the map; the rats, and I tested with some other AI, cause the freezing of the bats. Somehow the bats "freeze" when they hit an other AI, but not when they hit eachother ..
  11. I really don't know much lol : D Where does it print to/where can I see the states/tasks? I thought I could see it in the console but nothing happens there .. Ok I got something printing to the console now. Think somehow my setting in Virtual Studio were wrong.
  12. Made a test setup with different hights, and the bats are looking good and making use of the vertical space, but still there is this idle problem. I'm thinking maybe, if a bat goes into idle, it gets deleted and a new bat spawns at that location .. or the bat just goes invisible until it goes out of idle? Video: https://cdn.discordapp.com/attachments/815315205483397142/933467525935673445/2022-01-19_22-03-24.mp4
  13. @Dragofer I put your original files back and compiled again and set the wander_radius_vertical to 480 and to me it seems they are using more vertical movement in combination with the animal_patrol_fly then without these changes. The existing fly_seek_scale spawnarg also seems to have influence. I think set to 1 or 2 has a good result. So the only significant bad bat behaviour is the long idle they go into sometimes.
  14. Well maybe it doesn't work better then but could be I saw more significant movement at times with bats going down : ) In that case, the wanderRadiusV and H should be there and V should be twice H ... I guess.
  15. I got the newest SVN, but its newer than the latest available update via th installer, but it seems not to matter in this case.
  16. No I got rid of the bobbing completely and I still got them schoosing new positions in all axis, so it works it seems. I changed some things though: // Choose a goal position, somewhere near ourselves float xDelta = gameLocal.random.RandomFloat()*wanderRadius - wanderRadius*0.5f; float yDelta = gameLocal.random.RandomFloat()*wanderRadius - wanderRadius*0.5f; float zDelta = owner->spawnArgs.GetBool("animal_patrol_fly", "0") ? gameLocal.random.RandomFloat()*wanderRadius - wanderRadius*1 : 1; Also I found that the wanderRadius was just fine so I got rid of the wanderRadiusH and V and just used the default 240. The wait does work but doesn't do very much, but it does enough I think. It could be a boolian I think, so normal wait or no wait. The big thing is that in animal patrol mode they go into idle for like 15 seconds some times, and just stay hovering too long. I tested that by setting anim idle to the AF pose., and clearly see them going into idle for much too long. Also this idle state stops movement (only plays the anim). With anim idle ste to the AF pose I see that the wait does work, otherwise they go into idle for a short time. Latest cpp and map I used: (Didn't change the .def but used the spawnargs in the entity inspector) AnimalPatrolTask.cpp Bat.map
  17. Thanks a lot! I'm gonna try if I can compile it and make it work locally, then I can try to tweek it. Update: I managed to compile with your experimental build and it works. Only thing I got a warning " Cannot detect SVN version " in the console, but I guess it has to do with the latest source I got with the turtoiseSVN (and having the latest available update of 2.10 installed (via the TDM installer) and those are not the same. Nontheless, the animal_patrol_fly works so things are looking good. Tomorrow morning I'll go do some fiddling around : ) (Yes I have a fresh install for this so I can't f*ck-up my working game).
  18. That sounds to me like a very good solution, but I don't know how to do that. There is no zDelta: That's why the bats had no real vertical movement ( so I used fly_bob_vert to give them some): // Choose a goal position, somewhere near ourselves float xDelta = gameLocal.random.RandomFloat()*WANDER_RADIUS - WANDER_RADIUS*0.5f; float yDelta = gameLocal.random.RandomFloat()*WANDER_RADIUS - WANDER_RADIUS*0.5f; Instead there is a 1, because the animal patrol is made for small walking animals: idVec3 newPos = curPos + idVec3(xDelta, yDelta, 1); // grayman #2356 - was '5'; reduced to keep goal positions from becoming too high for rats So I think, if I could change the waiting time, the wander radius (as in WANDER_RADIUS*x) for fast flying animals, and add a zDelta instead of using 1, or change the 1 to an other number, the bats wouldn't hang around anymore and wouldn't need the vertical bobbing. The easy way would probably be to somehow set that they are drowning so they wouldn't wait anymore ..
  19. Because of the "fly_bob_vert" I put in probably?
  20. I just set spawnarg "noDamage" "1" on them, but I get your piont. They hover too often, and when they are stationairy on the x an y axis the vertical bobbing gets really unnatural. I can't find a way to have them fly in 3D without using spawnarg "fly_bob_vert" yet. Been looking there but cant find the specific scriptobject tdm:ai_base is using (inherit). I think the function(s) to randomly pause movement must be defined in a script that dictates " animal_patol". We all know that Rats do have this "pausing" behavour , and therefor the script for "animal_patrol" fits the Rat very well .. but Rats can't fly! : D Bats don't pause, so somewhere pieces of the "animal patrol" script should be eliminated to accopmlice that? The Bats should be as simple as: "create entity - Bat" ... and it will fly around within the set boundries, in a Batlike manner" (Plus the (limitid?) ability to use paths). Update: bat.pk4
  21. I found some other spawnargs in the tdm_ai_base.def: - "idle_animations_interval" "Defines the interval the idle animations should be played, in seconds. An uncertainty of +/- 20% is automatically applied by the code." - "idle_animations" "A set of animation states to be played by the idle AI. See the AI's script object for possible Animation State functions." But they have no effect on the problem that they don't keep flying forward, like bats do. Bats don't hang araound in one place like rats do ... so I guess I have to change the animal_patrol behavour somehow, but where to find that? Where can I find scriptobject "ai_darkmod_base" ?
  22. @Dragofer I don't know what it is with that aas but it seems to work for now. I put the 2 defs in one def file as you said and set aas96 for the bat and it worked. Then I set aas96 for the small bat and I got the warning again. Then I commented out the aas foor the small bat .. so it gets the same as the normal bat, and then I got no warning ... while it uses the aas from the normal bat ... aas96. Also the mins and max seem to work for keeping the bats going too close to walls, floor and ceiling. But now, how to keep them flying and not bobbing in one place? When I comment out anim idle I get constant messages in the console that it's missing anim idle ... so that's not an option.
  23. I think, when I set the maxs and mins I prevented the bats from going too close to the walls ans having their wings go in them. Also the "stunt" animations require a bigger box. The aas_elemental was the last one I tested but I guess I can change to aas96 and set the size a bit smaller, and get rid of the mins and maxs. So that should be exported as an md5anim but with only 1 frame? I think Bats should not be killable by the way : )
×
×
  • Create New...