Jump to content
The Dark Mod Forums

STRUNK

Member
  • Posts

    479
  • Joined

  • Last visited

  • Days Won

    14

Posts posted by STRUNK

  1. On 1/17/2022 at 12:52 PM, Dragofer said:

    I've made a rough experimental build that implements some new spawnargs, shown below with default values (if the entity doesn't have these spawnargs the code will fall back to these default values):

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

  2. On 1/15/2022 at 1:44 PM, Dragofer said:

    would be quite straightforward to replace those hardcoded 1000 milliseconds with a variable derived from a spawnarg so you can disable it completely if you want (would cause zig-zag flying, probably fine for bats):

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

     

  3. 10 hours ago, Dragofer said:

    Would just permit it for those players who go through the trouble.

    I just set spawnarg "noDamage" "1" on them, but I get your piont.

     

    10 hours ago, Dragofer said:

    Btw, the hovering in place looks natural to me, just not the vertical flying.

    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.
     

    10 hours ago, Dragofer said:

    Regarding the scriptobject, it's in tdm_ai_base.script

    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

  4. 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" ?
     

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

  6. 9 hours ago, Dragofer said:

    AAS_elemental allows up to 24x24x24, so I changed "size" to "24 24 24" and commented out your "mins" and "maxs" spawnargs (they seem to be redundant, and elementals don't use these) and dmap now works properly, creating an .aas_elemental file.

    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.

     

     

    9 hours ago, Dragofer said:

    Another problem is that your af_pose animation is the same as the flying animation, which causes it to continue animating even when the bat has been shot down.

    So that should be exported as an md5anim but with only 1 frame?
    I think Bats should not be killable by the way : )

  7. Lots of Bats (video):
    https://cdn.discordapp.com/attachments/815315205483397142/931919491447816262/2022-01-15_14-58-24.mp4

    The Bats do some tricks ans fly around randomly and it's looking good already BUT:
    I don't know what I'm doing wrong, but whenever I set use_aas to any aas I get a warning that it cannot use (that) aas ..
    And I have a lot of spawnargs that I think are related to flying (behavour) but I really can't figure out what they actually do, so I might have some things set wrong, causing the aas problem.
    Also sometimes a Bat just goes up and down and not forward .. and I can't figure out how to keep them going forward all the time.

    Maybe some of you can test the bats and look at the .def files so eventually there can be properly working Bats for everyone?

    All needed files are included in the attachment. Do not start the game but open the console and enter testmap bat to start the test map.

     

    bat.pk4

    • Like 1
    • Thanks 2
  8. On 1/9/2022 at 6:18 PM, thebigh said:

    I did eventually get the "Player possesses item" thing to work but I still would like to know how to get pickpocket objectives to fire, for future reference. This is what I am looking at:

    I tried to get it to work with no succes. I guess it's meant for the general act of pickpocketing, not for getting a specific item.
    I don't really see the practical use of it unless you want to make a: "Pickpocket as many ppl in 10 minutes" sort of challenge : )

    Wiki says:

    • pickpocket
    An inventory item must be taken from a conscious AI. Note that it doesn't matter what happens to the item after it is pickpocketed. It could be destroyed or dropped, but as long as it was originally pickpocketed, it counts. SDK Name: COMP_PICKPOCKET Number of Specificatons: 1 (Item the player must pickpocket) Applicable Specifiers: All except AI type, team and innocence Expected Arguments: int (number of items to pickpocket, 1 by default)
  9. 3 hours ago, thebigh said:

    How do I get a "pickpocket an AI" objective to work?

    I don't know how that works but the key that Bob has, is an unique item so I guess this should work, where Tropy shoud be the specific key "BobsKey" and the description "Steal Bob's key". (And forget about the Completion script "DropDead, that should be empty, if you don't want to call a script on completion that is, otherwise there should be the name of the script you want to call) :
    objective.jpg

  10. 9 hours ago, Dragofer said:

    This looks problematic. The asterisk in front of the bone name means that you also include all bones that are beneath this bone in the hierarchy.

    Ok, I "coppied" that from " steambot.def" and did'nt know wat the astrikses meant:
     

    Spoiler

    /**
     * Baddcog's Lantern Bot (c) 2007
     */
    model tdm_ai_lantern_bot
    {
        mesh            models/md5/chars/steambots/lant_bot.md5mesh

        channel torso   ( *upper_gear_link *low_gear_link *ear *smokestack *gauge *gear_bone)
        channel legs    ( origin waist *lf_upper_leg *lr_upper_leg *rr_upper_leg *rf_upper_leg *lf_mid_leg *lr_mid_leg *rr_mid_leg *rf_mid_leg *lf_low_leg *lr_low_leg *rr_low_leg *rf_low_leg *lf_foot *lr_foot *rf_foot *rr_foot )

        anim af_pose    models/md5/chars/steambots/lant_bot_af.md5anim
        anim ik_pose    models/md5/chars/steambots/lant_bot_af.md5anim

        anim idle       models/md5/chars/steambots/lant_bot_idle.md5anim
        {
            frame 1     triggerSmokeParticle smokestack
            frame 1     sound snd_steam_vent
        }

        anim walk       models/md5/chars/steambots/lant_bot_walk.md5anim
        {
            frame 12    footstep
            frame 31    footstep
            frame 31    sound snd_steam_vent
            frame 32    triggerSmokeParticle smokestack
        }

        anim run        models/md5/chars/steambots/lant_bot_walk.md5anim
        {
            frame 12    footstep
            frame 31    footstep
            frame 31    sound snd_steam_vent
            frame 32    triggerSmokeParticle smokestack
        }

        anim alerted        models/md5/chars/steambots/lant_bot_see_u.md5anim
        {
            frame 2     sound_voice snd_sight
        }
    }

    There is also a some IK setup in the steambot.def:
     

    Spoiler
      // IK Setup
    	"ik_numLegs"            "4"
    	"ik_minWaistFloorDist"  "22"
    	"ik_minWaistAnkleDist"  "8"
    	"ik_footSize"           "4"
    	"ik_waist"              "waist"
    
    	"ik_hip1"               "lf_mid_leg"
    	"ik_hip2"               "lr_mid_leg"
    	"ik_hip3"               "rf_mid_leg"
    	"ik_hip4"               "rr_mid_leg"
    
    	"ik_knee1"              "lf_low_leg"
    	"ik_knee2"              "lr_low_leg"
    	"ik_knee3"              "rf_low_leg"
    	"ik_knee4"              "rr_low_leg"
    
    	"ik_ankle1"             "lf_foot"
    	"ik_ankle2"             "lr_foot"
    	"ik_ankle3"             "rf_foot"
    	"ik_ankle4"             "rr_foot"
    
    	"ik_dir1"               "lf_knee_ik"
    	"ik_dir2"               "lr_knee_ik"
    	"ik_dir3"               "rf_knee_ik"
    	"ik_dir4"               "rr_knee_ik"
    
    	"ik_foot1"              "lf_foot"
    	"ik_foot2"              "lr_foot"
    	"ik_foot3"              "rf_foot"
    	"ik_foot4"              "rr_foot"

     

    Could you shine some light on that?

  11. 1 hour ago, Dragofer said:

    You need to add IK bones in the modelling app (see Youtube tutorials), then simply refer to them in the entity's .def in TDM.

    I've been messing around with IK today and it worked fine for the idle animation I made but I ran into problems with the walkcycle, for I had parented the IK bones to the origin, so I unparented them and was able to make sort of a walkcycle in Blender, but when I wanted to export to MD5anim I got a warning that there are too many rootbone.
    So I have to look into it again .. also in the .def file, where I still have a lot to wrap my mind around anyway, for I have only some basics I found working for me:
     

    Spoiler
    model BlokTor
    {
        mesh             models/md5/chars/cartoons/bloktor/BlokTor.md5mesh
    
        channel torso   ( *EyeR *EyeL *AntennaR *AntennaL)
        channel legs       ( origin Body *LegUpFR *LegUpMR *LegUpBR *LegUpFL *LegUpML *LegUpBL *LegUnFR *LegUnMR *LegUnBR *LegUnFL *LegUnML *LegUnBL *FootFR *FootMR *FootBR *FootFL *FootML *FootBL)
    
        anim idle         models/md5/animations/idle.md5anim 
        anim idle2        models/md5/animations/idle2.md5anim
            anim walk        models/md5/animations/walk.md5anim
    
        anim af_pose        models/md5/animations/idle.md5anim 
            //anim ik_pose        models/md5/animations/idle.md5anim
       }
    
     
    entityDef atdm:ai_BlokTor
    {
        "inherit"                "atdm:ai_base"
        "editor_displayFolder"     "AI"
    
            "model"                 "BlokTor"
            "ragdoll"               "BlokTor"
    
        "use_aas"               "aas_rat"
            "size"                  "7 7 7"
    
    }

     

     

    1 hour ago, HMart said:

    "origin"    -1 ( 0 0 0 ) ( -0.5 -0.5 -0.5 )

    I guess this goes in the .def file or the Entity Inspector?
    Bookmarked the video. It's with a different 3D editor but might clarify some things.

    Thanx for the replies, I'm too far into this now and want to make some stuffs, like bats_2.0, after I get this  to work.



     

  12. 17 hours ago, HMart said:

    Is the character mesh itself well positioned in blender?

    unknown.png
    I think this should be good. I still have to make a layer with control bones/armature for easy animation.
    Only thing I'm still wondering is if the bones that are exported to DR should have IK bones or not .. ?
    But I think that has no influence on the floating issue ..

  13. I started learning some blender last week and made a little caracter and thought; why not try to get that working in TDM. With a lot of fiddling around I got a custom texture/material working, and also the character/rig/mesh and an animation.
    But my little square beatle keeps floating above ground somehow, and I seem to be out of options. I tried changing the origin bone in blender for the mesh and the animation and also changing the aas_rat "size" in the .def file and some other things, but it keeps floating:
    STRUNK_2022-01-06_13.22.29.jpg

    Is there something I can put in the .def to change offset or something else you can think about?

    • Like 3
  14. The new main menu changes regarding loading and starting a mission seem very straightforward to me, only thing; I had to leftclick after the intro video (The Black Mage) to get to the difficulty menu. (Screen went black and after about ten seconds I thought; maybe left click). Could be this has to do with mission .. ?


    @stgatilov
    My FPS almost doubled in the infamous V1 " lava cave", so, for me, there is preformance gain.

×
×
  • Create New...