Jump to content
The Dark Mod Forums

Dragofer

Development Role
  • Posts

    2634
  • Joined

  • Last visited

  • Days Won

    157

Posts posted by Dragofer

  1. Sorry I think I meant getting them to use a patrol route post-teleport is tricky. It's been a while since I had the issue.

    What's been working for me, as I remember it, is to link them up to a path_waitfortrigger as the first path node, then trigger them after the teleport. If I misremembered that I can fall back on the working setup in the second phase of One Step Too Far.

  2. Hide only makes the AI invisible. They're still there making barks, etc. I'd teleport them & use interleave thinking when they're far. There's a trick to get them to use pathfinding post teleport that I forget now though.

    Hm, the most convenient would be an on/off toggle for thinking if there is one, but making use of LOD thinking by putting them in a faraway blue room is workable in this case. About your last sentence, you're meaning aas_flood entities for areas with no AI at map start?

     

    My terminology in my OP was somewhat off - with interleaved thinking I meant the never_dormant spawnarg. It doesn't work here because they need to be full-functioning AI's, while that spawnarg means that as soon as you close the door on them they freeze in time.

  3. darkmod \guis \assets \hud \inventory_icons \youritem_icon.tga is a file path in your TDM installation where you can find the available inventory icon images. To make it easier to find such things I've extracted all of TDM's .pk4 archives (to somewhere else than TDM's folder).

     

     

    Stationary rock-throwing AIs is a problem I had on my map's beach when the compiler hadn't made any pathfinding. The most sure-fire way I can think of to solve it is to delete all files in the maps folder except .map and .darkradiant, then restart TDM and make a fresh dmap.

     

    And if you use the 'testmap' console command, which is a shortcut of 'dmap' and then 'map', I'd suggest to avoid that here because it gives no error message if there's a problem with dmapping, i.e. leak.

  4. Do you mean to make it possible to pick up? You can't use a func_static chair, you need to replace it with the moveable version found under right click -> create entity -> moveables.

     

    I quite dig that exterior building style by the way, just the right kind of thing.

  5. How do you get an AI to stay on a moving entity?

    This is something I did for my carriages, if you're looking for an alternative approach.

     

    - monsterclip the cart so that AIs can get on board and sit down

    - duplicate the monsterclip and convert it to mover_elevator, this will push the AIs forward

    - bind the mover_elevator and all cart components to the horse and give the horse a path_corner

     

    - If you want the AIs to get out at the other end you also need a copy of the worldspawn monsterclip there.

    - If you have multiple horses you need to disable idle animations to avoid that they start out of sync, which normally leads to the death of all carriage occupants. Setting the interval to 99999 seems to be the way it's done, at least for head turning.

     

    If the carriage stops in a player-accessible area you'd need to teleport in a fresh carriage which isn't bound to a horse, in case the player shoos away the horse.

     

     

    An alternative approach to propulsion is to bind everything to the elevator and let it move instead of binding to a horse. This is more stable when you use multiple horses and lets you keep your original carriage, see above, but I haven't worked out how to let a horse walk on the spot. TDM's walking animations intrinsically cause the AI to move forward.

    • Like 1
  6. Sure - for textures there is Wiki - Basic Material File but to cut to the chase: a lot of things in TDM are set up via .txt files.

     

    For example, for each texture - proper name: material shader - there's a paragraph in an .mtr (renamed .txt) file in one of TDM's .pk4 (renamed .zip) archives that tells the engine which images to use: which diffusemap, which specularmap, which specularmap etc. For other types of assets, like sounds, skins, entities it's the same story.

     

    It's quite straightforward to make new shaders out of old ones, for example for that 'new' grass material shader I just copied an existing one and replaced the old grass name with the new name, grass4.

     

    Much of the time you don't need to mess with shaders, it's mainly for when you bring new assets into the game, attach special properties to certain textures such as being invisible in normal spectrum light, or in this case for self-help when you see that a certain kind of shader is missing.

  7. Been working on the house more, and on the exterior too.

     

    Tried to get the road tutorial at http://wiki.thedarkmod.com/index.php?title=Roads working on a small scale, but I can't seem to get the grass_edge to match the underlying grass texture. It has noshadows 1 and shaderparm3 0.5 but looks like as follows in the editor. I tried tweaking the colour parameter and realigning the textures and messing with the alpha layers, but it doesn't take on the color/texture.

     

    Ideas?

     

     

    http://imgur.com/a/d9tap

     

    Just made my own road based on that tutorial - it does make a difference which edge texture exactly you choose, they look the same in the editor but ingame each of them specifies a different colour of grass.

     

    There's no edge texture for grass4 yet so I've defined one here, see the attached .mtr file. This belongs into your .../darkmod/materials folder (create if necessary), just remove the .txt ending and remember to include it with your mission when you share or release it.

     

    grass4_edge.mtr.txt

    • Like 1
  8. It would be awesome to have a custom entity spawner in DR that spawns gas clouds, flash bomb, and explosive mine results when triggered. I could see people getting a lot of use out of that in their missions.

    Very much so, I'd also like such an entity. At the moment I'm looking to trigger 'decorative' expanding gas clouds, but on func_emitters the particle is glitchy and looks nothing like what you see when a gas arrow explodes. A triggerable entity that spawns arrow results would make life much easier.

  9. Spectrum alters how surfaces get rendered in dependence to light. If the light don't match the spectrum of the surface material, the interaction wont get drawn.

    Spectrum light does interact properly with spectrum materials, but when the spectrum light goes away the material becomes pitch black - I was expecting that it'd become invisible.

     

    I was wondering whether I need to change something else in the material definition, i.e. add an alpha. Unfortunately Katsbits has nothing at all on spectrum.

     

    Decals are processed in a different way in the engine, so this may cause the spectrum spawnarg not to apply there.

    There simply must be spectrum decals, that's the best part! Nothing like ghostly writings or runes to lead you to obscure locations or give story clues. Besides, the example material the Wiki points to is a pentagram decal.

     

    Regarding the footprints, depending on how the material is defined, you may have to place them slightly above the underneath surface to avoid z-fighting.

    It's not z-fighting - my test setup had footprints both on and over the floor. Most were invisible, the few visible ones ranged from almost invisible yellow to bright red to dark purple; the height didn't make a difference. Probably belongs into the bug tracker.
  10. Yeah, I ended up rebuilding my house as well. Interestingly the second time went very fast, after 30 minutes I had done almost as much as in the first few days. You get much faster with experience.

     

    By the way, if you're looking to make another floor under the roof you'd need more height. The inhabitants need a minimum of 112 units from floor to ceiling.

    • Like 1
  11. The glitch doesn't need to hit the offending brushes - in my screenshot, a sliver was missing out of a big solid floor brush, even though the fiddly brushwork in the doorframes and the front porch was to blame.

     

     

    Grid size is about more than just the minimum dimensions, it's also about how easily the brushes fit together and your sanity. You can't see the difference between a brush of 11*15*22 and a brush of 12*16*24, but for the first brush you need to zoom in and get your magnifying glass every time to check if things are aligned properly, while the second brush just snaps neatly into place with any other brushes. Not to mention that the engine can easily handle tens of thousands of brushes like that second one without a hitch.

     

     

    Small grid sizes, like 2 units, are useful for things that actually need to be 2 units thick and if you want beams with 6 units thickness instead of 4 or 8 units. For model placement you can go all the way down to 0.125 units with no problems. Otherwise it's much faster and easier on yourself to get into the habit of using 8 or 16 unit grids.

    • Like 2
  12. Has anyone successfully used spectrum? I've taken a stock material and added the line spectrum 1 to it - the result was that it's pure black in normal light, so always visible. When you bring a spectrum 1 light it does light up properly.

     

    textures/darkmod/wood/panels/panel_carved_round_worn_spectrum

     

     

    {
    wood
    spectrum 1

    qer_editorimage textures/darkmod/wood/panels/panel_carved_round_worn_ed
    diffusemap textures/darkmod/wood/panels/panel_carved_round_worn
    bumpmap textures/darkmod/wood/panels/panel_carved_round_worn_local

    {
    if ( parm11 > 0 )
    blend gl_dst_color, gl_one
    map _white
    rgb 0.40 * parm11
    }
    {
    if ( parm11 > 0 )
    blend add
    map textures/darkmod/wood/panels/panel_carved_round_worn
    rgb 0.15 * parm11
    }

    // TDM Ambient Method Related
    {
    if (global5 == 1)
    blend add
    map textures/darkmod/wood/panels/panel_carved_round_worn
    scale 1, 1
    red global2
    green global3
    blue global4
    }
    {
    if (global5 == 2)
    blend add
    program ambientEnvironment.vfp
    vertexParm 0 1, 1, 1, 1 // UV Scales for Diffuse and Bump
    vertexParm 1 1, 1, 1, 1 // (X,Y) UV Scale for specular
    vertexParm 2 global2, global3, global4, 1

    fragmentMap 0 cubeMap env/gen1
    fragmentMap 1 textures/darkmod/wood/panels/panel_carved_round_worn_local // Bump


    fragmentMap 2 textures/darkmod/wood/panels/panel_carved_round_worn // Diffuse


    fragmentMap 3 _black // Specular
    }
    }

     

     

     

     

    Decals don't seem to be affected by spectrum at all. For all those I've tested, even generic wall stains, inserting the spectrum 1 line makes no difference, they behave just like the originals.

     

    textures/darkmod/decals/dirt/footprint01r_spectrum

     

    {

    DECAL_MACRO
    noimpact
    spectrum 1

    {
    blend gl_zero, gl_one_minus_src_color
    map textures/decals/footprint01r_d.tga
    clamp // we don't want it to tile if the projection extends past the bounds
    rgb decalFade[(time - Parm3)/(parm4 - parm3)]
    vertexColor // oblique projections will be slightly faded down
    }
    }

     

     

    [spectrum 2 gets the same results as spectrum 1.]

     

     

    Also, leaving spectrum aside for now, the footprint decals - textures/darkmod/decals/dirt/footprint01 and footprint 01r - behave very strangely. I've cloned a dense and regular pattern of footprint patches all over a room and only about every 8th footprint shows up, some are extremely faint. This still happens even when I use a monotonous floor texture, baize green.

  13. I quite like your approach to mission-making, there's something special to those outlying wilderness locations and the stories that happen there.

     

    Now, for a first map, and in general, I'd advise to put the mapping focus on the house and what goes on inside there. Landscaping - forests, rivers, caves - is more in the 'advanced & tricky' department and in my view it mostly serves decorative purposes. Try adding a second floor to your house and combining that with a manageable yard with a brook, let the player start at the fence. The house, that's really where the good stuff is at.

     

     

    --------------------------

     

    Now on to the technical side:

     

    Invisible brushes are something I got a lot in my very first house, six years ago:

     

     

    Rns35ta.jpg

     

     

    The culprit: overcomplicated fiddly brushwork. Brushes can be used for detailing, making things like beams, windows and doorframes, but it's best to use neat grid sizes to avoid pushing the engine. Minimum 8 units grid size for walls, for detailwork minimum 2 units, in my opinion.

     

    Gaps between patches is something that happens when one patch has more subdivisions than the next - think of it as trying to connect an 8-sided tube to a 24-sided tube. You can use shift+s to manually adjust this.

     

    TDM now has a great collection of rocks in its model database so you don't need patches - look for those which have between 750-1500 tris. You can put these together, rotate, shift them to create convincing rock formations with ease. Don't worry about the tri count: once you have one rock in the map, any copies of that cost next to no performance because they share.

    • Like 2
  14. Strange, I thought that fading out objects would be a common action, especially in shooting games like Doom where clutter like downed enemies needs to disappear to free up performance. So far it looks like Doom just abruptly deletes such things.

     

    Would be most effective if the script could assign an alpha to a material at runtime, but as far as I'm aware scripts can't influence materials. No matter what, I'm more than pleased with the options that are already available.

  15. Where are you getting this from?

    This was under scripts/tdm_util.script, next to a couple other _color fades which start or end at black.

     

     

    target_fadeEntity changes the coloring of an entity that uses the _color spawnarg.

     

    It doesn't change the transparency of an object.

    Does the script only accept 3-figure vectors? The screen-fade entities use idVec4 vectors where the 4th number sets the transparency - that's just for an overlay and not a shader, but you did see earlier that the FadeEntity code deals with alpha in some way.

  16. Fantastic, this blew up my expectations of how well done the effect would look. I've been watching a patch wink in and out of existence, after making a reverse variant of that script.

     

    The only downsides are, for one, that it needs specially prepared textures - so there'd still be some convenience in having a func_fadeEntity.

     

    For the other, that the glowing patch needs to be slightly behind the ordinary-looking patch, so at the moment you can't really have the glow effect on models. Would there be a way to make the ordinary texture override the glow texture so they can be in the same space?

     

     

    While the code exists to support this, I don't see the object defined in our *.def files, so it hasn't been implemented or tested

    Would this .def simply be a func_fadeEntity - so, a coloured box with a line referring the fadeEntity function? I've looked to see how idTarget_remove is implemented and that seems to be how it's done. (I ran out of time for now to find this out).

     

     

    On a sidenote, some more for the record:

    crossFadeEnt($entity, '1 0 0', '0 1 0', 2);

    - gradually changes the _color of a colorme textured object or a light from red to green within 2 seconds.

  17. A couple of questions:

    For the record:

    $light.fadeToLight('1 0 0', 4);

    - changes the colour of a light to 1,0,0 within 4 seconds. It looks awesome when the whole room gradually turns red.

     

    $speaker.fadeSound(SND_CHANNEL_ANY, -30, 1)

    - changes the s_volume spawnarg of an active speaker to become -30 within 1 second

     

     

    What I wasn't able to figure out was how to gradually vanish, or materialise, an object (I sound like a magician). I've gone by Wiki - Script Reference and the closest thing I found was FadeEntity, but TDM refuses to load the map because that command is unknown, no matter what combination of upper/lower case I use.

     

    Any ideas please for how this last effect can be done in TDM?

  18. So, what is the current style to get this kind of behavior:

    1) map starts -> AI goes to sleep.

    2) AI sleeps and does nothing else.

    3) if the AI is alerted so that he gets up from the bed, he gets a patrol route and does not go to sleep anymore.

     

    Thanks.

    There's a mention on the Wiki - Sitting Behaviour for AI of this:

     

    2.03 -- if you put "sitting" "1" on an AI and then target him at pathnodes that have an "alert_idle_only" "1" spawnarg on them, the AI will sit as long as he is not alert, but will start patrolling (and will no longer sit) once he is alerted.

×
×
  • Create New...