Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    479
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by STRUNK

  1. Nice mission but I had a lot of strange things happen:
     

    Spoiler

    It started to get weird when I got out of the undead area. I entered it from street level and when I got out by removing the window, all AI from the whole map, exept the gatehouse guard, got out on the streets searching .. and they didn't stop.
    They were all alerted by doors that were open and somehow I caugt 5 guards (including the gatehouse guard) inside one of the gatehouse towers. I stole the key already and the followed me in there. I swiftly sneaked out and managed to lock them all up.
    I was able to search the whole builders building without having npc's to worry about. Some were already dead and the others were still searching the streets, until I opend a window, and they all came swarming in.
    Also knocking out npc's didn't work most of the time .. it killed them instead, and send them flopping around in mid air for a second. Sometimes it did work as it should.
    Also, under the moving rug, in the little hiding place, there is one item that I can't see nor grab.
    I can see it's there with tdm_show_loot but can't obtain it ...
    Maybe it has to do with different versions of 2.10 beta?

     

  2. 11 hours ago, datiswous said:

    Would be cool to have a visual effect that transforms a human ai into a bat.

    You are more then welcome experiment with that wous : )
    I think in combination with a blinding effect , then spawning a vampire at the bats location, this shouldn't be that difficult
    . You could also have vampires turn into bats when you shoot them I guess.

    • Like 2
  3. 9 hours ago, Dragofer said:

    Well, TDM is getting a bat and maybe also an ambient AI out of this, so well worth

    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?
     

  4. 9 hours ago, Dragofer said:

    it looks like you might not have updated the bat's "scriptobject" spawnarg?

    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!

    • Like 1
    • Thanks 1
  5. On 1/22/2022 at 1:46 PM, Dragofer said:

    You can set a "death_script" spawnarg on the bats so a script is called when a bat dies. The cleanest way would be to make a small scriptobjection extension that inherits from the bats' existing scriptobject and only contains a script function that's called by that spawnarg - see Scriptobjects section of the A to Z Scripting guide for how to set that up.

    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 ...

     

    9 hours ago, Dragofer said:

    I've committed the "animal_patrol_wait" spawnarg with rev 9810 - it should be in 2.10b5 onwards.

    Great!

  6. On 1/21/2022 at 4:14 PM, Dragofer said:

    "seek" seems to have to do with predicting where the AI will be in x seconds based on current position and velocity.

    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

     

    On 1/21/2022 at 4:14 PM, Dragofer said:

    something like this seems quite minimally invasive

    I think it will be a welcome addition : )
    (Beta) Bats will be released ofc.
     

     

    On 1/21/2022 at 4:14 PM, Dragofer said:

    A ragdoll is basically a string of collision meshes bound to the joints of an AI.

    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.

  7. On 1/19/2022 at 6:53 AM, Dragofer said:

    so the addition of zDelta isn't having any effect unfortunately.

    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 ...
     

    • Like 1
  9. 10 hours ago, Dragofer said:

    Did you also see what state the bats are in when they are frozen?

    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. On 1/19/2022 at 1:34 PM, Dragofer said:

    think you need to add some debug messages to the code to help figure out which state the bats are

    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. 9 hours ago, Dragofer said:

    That's weird, I read your change to zDelta's calculation as resulting in it being anywhere between 0 to -240 in Z from the bat's starting position - whereas previously it was -120 to +120.

    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. 9 hours ago, Dragofer said:

    Nice - but I assume you still have a high bob_strength?

    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

×
×
  • Create New...