Jump to content
The Dark Mod Forums

Dragofer

Development Role
  • Posts

    2634
  • Joined

  • Last visited

  • Days Won

    157

Posts posted by Dragofer

  1. It's been a fairly longstanding bug that patches exported in DR as .lwo's lose smooth shading and therefore look clunky. The workarounds are to export as .ase or fix it in Blender by removing doubles on a material-by-material basis.

    .lwo is a compressed numeric format while .ase is an uncompressed text based format. They have the same size when they're compressed into a .zip or when they're ue.npacked ingame, so it's mostly a matter of storage space on your harddrive.


    I think it's fine to use multiple smaller patches for more complex shapes.

    • Thanks 1
  2. 1 hour ago, MirceaKitsune said:

    Nice, I didn't know you could do that. Perhaps I could use it to have a single colorable version of each flame type? How do you do this though, as in allow the color of a particle to be specified from the light def rather than coded in the prt file?

    You'd need to:

    - make black&white versions of the flame diffusemaps so they can be recoloured better
    - use the "colored" keyword in their material definitions, see existing colorme textures for examples
    - enable "use entity colour" in the particle editor
    - this gives you a recolourable flame entity. Since it's def_attached to a lamp fixture, you need to use the spawnarg "set _color on flame" on the fixture to change the colour.

    More initial work this way than cloning existing entities with different fixed colours, but you'd get a much more versatile entity and the entity list would remain more navigable.

    • Thanks 2
  3. @STRUNK

    I don't think there's any way around AIs using md5meshes as models, so you'll need to find a working combination of Blender and md5 importer/exporter script plugins to downscale the model. Since there are no animations, though, you can probably get away with making the AI invisible via a skin and binding a small static model (export the elemental as a model inside DR).

    @Geep

    There's the setName script command. But if it's like a change of clothes, then wouldn't setSkin be a better fit in this case?

    • Thanks 1
  4. 12 hours ago, STRUNK said:

     Whatever number I put in void poltergeist_script::init() / clicks , I  keep getting 0 in the console : (

    This is actually a bug with scriptobjects which set up their own S/R the way you've done in your init. I was stumped on this for ages, wondering why the variables don't carry over between functions (always 0), until it occurred to me to use a different method to call the script object i.e. via the frob_action_script spawnarg.

    • Thanks 1
  5. 3 hours ago, grayman said:

    What does "tokenizer: no more tokens" mean when trying to load a map?

    Seems I had that problem in 2010:

    Quote

    After cleaning up some brushes in one area, I went to work on a second area for a few days. When I went back to load the first area again, I got an error message saying "Failed at entity 0. DefTokeniser: no more tokens" while loading the 47th primitive.

    When I try to dmap it, it says in the console "ERROR: C:/map/file/location. Line 613: New line inside string" and nothing happens.

    Quote

    Have you tried loading your map in a texteditor and looking at the offending line?

    Quote

    The problem was that primitive 49 (on line 613) had 4 lines full of ÿ's. So I just took out the whole primitive.

    Thread: DefTokeniser: no more tokens

  6. Other venues towards making ragdolls invisible would be:

    - set the "AIuse" spawnarg to something like "-"
    - use actual ragdoll entities instead of killing AIs
    - or show the ragdolls to the undead in a blue room so they can freak out there without being seen, give them time to relax before teleporting them to the playable area

    For making the lute music stop, only thing that comes to mind now is to make an invisible objective that checks whether the AI is dead or alerted to level 3+, and triggers the speaker once.

  7. 1 hour ago, MirceaKitsune said:

    "chanceNoticePerson 0" doesn't solve it, the AI becomes alert all the same. What else can I try?

    You could disable the visual stims emitted by those AIs, in the same script that kills / knocks them out.

    $name_of_ai.StimEnable(14, 0);

    14 is the ID# of visual stims (found in script/tdm_stim_response.script), 0 is to disable.

    (If they start ragdolled at map start you can just disable the visual stim in the S/R Editor).

     

    1 hour ago, MirceaKitsune said:

    Also please let me know how to make the lute player invincible as well as never becoming alert. That's going to look goofy but it's the best option easily available so I'll go for that.

    One method is to encase him in a brush of nodrawsolid and apply health 1000. If you want to go further you could make a looping script that refreshes his health every few seconds.

    For never becoming alert, you can set all his acuities to 0.

    • Like 1
  8. 52 minutes ago, grayman said:

    Woops.

    Seems I'm unable to revert back to version 8. DR reports a startup error, and even uninstalling fails to help.

    So I'm dead in the water until a fixed 9 becomes available.

    Rats.

    That sounds like your Windows user-specific configuration for DR might be glitched, would be worth going to /name of your user/AppData/Roaming/DarkRadiant/ and deleting or submitting your user.xml as part of a bug report.

  9. 4 hours ago, MirceaKitsune said:

    The lute is offset and floating above the character

    When attaching entities to AIs, the entities sometimes need to be rotated by putting spawnargs into their entity defs which specify their rotation and offset compared to a specific joint (in this case: something attached to the joint "velvetcap_1").

    "angles_velvetcap_1"               "90 90 0"
    "origin_velvetcap_1"               "3 1.2 .2"

    I think if you specify a name_attach5 in addition to the def_attach5, for example "lute", then you can skip modifying the entity def and instead apply a spawnarg like "set angles_velvetcap_1 on lute" "90 90 0".

    This is why you sometimes have "wearable" versions of props for attaching to AIs. Maybe there's one already for the lute? Can check Goldwell's missions for an existing example, I believe Northdale 2 is the one with a skeleton bard playing a lute.

  10. 4 minutes ago, Destined said:

    You can try to copy the shader of another surface and paste it onto your patch. If I remember correctly this had worked for some arches I made.

    You need to copy from a brush's surface onto a patch, and the brush surface has to be on the same plane as the patch. This is a 2D projection, so it'll work best for flat patches.

  11. If the statue should just be in the default position you could export it as an .ase model. No need for the extra complexity of a ragdoll underneath the hood.

    2 hours ago, kingsal said:

    Thats a strange one, can you give me the coordinates in your map and Ill have a look? Sounds like what stagatilov mentioned, whacky matrix on something.

    The entity's name is atdm_env_ragdoll_werebeast_steele_1, but it doesn't look rotation-hacked and doesn't have special settings otherwise.

    • Like 1
    • Thanks 1
  12. 5 minutes ago, STRUNK said:

    @Dragofer

    If a camera was in an other room, and it stays in relatively the same position as the players head (getOrigin() and add distance in one direction to be in the other room). And you can make it "look" the same direction as the player (getRotation()?), you could have that video feed showing on a screen in the room where the player is, so he can see it.

    Is it possible to "get" the looking angle of the player?

    Obsttorte wrote a script based on the player's view angles (statues that only move when the player's not looking at them):

    object statue_look
    {
    	void init();
    	void loopLook();
    	vector viewDir;
    	vector direction;
    	float cosine;
    	float tolerance;
    };
    void statue_look::init()
    {
    	thread loopLook();
    }
    void statue_look::loopLook()
    {
    	while(1)
    	{
    		if (distanceTo($player1)<1024)
    		{
    			viewDir=sys.angToForward($player1.getViewAngles());
    			direction=getOrigin()-$player1.getOrigin();
    			cosine=viewDir*direction/sys.vecLength(direction);
    			direction_z=0;
    			if (cosine<sys.cos($player1.getFov()/2+30))
    			{
    				setAngles(sys.VecToAngles(-direction)+'0 90 0');
    			}
    		}
    		sys.waitFrame();
    	}
    	
    }

     

  13. On 10/14/2020 at 2:43 PM, mattmkb said:

    1. Is there a special tool which one would use for creating a natural looking piece of land with various small dips, peaks, inconsistencies, gaps etc.

    18 minutes ago, Springheel said:

    1.  That sounds like you're talking about patches.  I talk about using patches in my mapping series...somewhere near the end when I talk about outdoor areas.  They're not complicated.

    Expanding on this, you can:
    1) Create a patch with a generous number of rows and columns
    2) Open the Patch Inspector (shift s), enable fixed subdivisions and set to i.e. horizontal 5 and vertical 5.
    2) At the top, Patch > Bulge Patch. This randomly deforms the patch. May need to manually drag down some of the vertices again to avoid knife edges.

     

    If you keep posting into this thread Id suggest renaming it to i.e. mattmkb's Mapping Thread.

  14. 1 hour ago, mattmkb said:

    Is there any mapping video or anything like that where someone attempts a creation of a more open map where illusion of depth would be necessary?

    I'm not aware of a tutorial, but the mission Exhumed has a more open skybox that gives the illusion of extending the landscape into the horizon beyond the map's boundaries.

  15. For punctual information, I find wiki.thedarkmod.com to be most helpful, for example when wanting to find everything about how to setup various doors and behaviours related to them. The DR userguide is more for learning about using the program's interface.

    For broader intros to mapping, it's definitely recommended to look at the video mapping workshops by veteran mappers (I know that those by Springheel or Sotha are detailed and up to date), which walk the viewer through the creation of a small mission. There's also a text-based tutorial on the wiki by Fidcal, but it's very old by now and multiple procedures in it have become much easier nowadays.

  16. There are a few options:

    • type in testmap mapname into the console, which combines dmap and then map. This is risky when you're only beginning to make maps because the map will load even if there's a leak without any warning.
    • create a custom shortcut that starts TDM and automatically loads or compiles a map
    • bind the console commands to dmap/map/testmap your map to hotkeys by typing for example this into the console: bind "p" "map mapname". This works only if you're already loaded into the map.
    • as of 2.09, which is slated for entering beta at the end of 2020, there'll be integration between DarkRadiant and TDM that allows you to update individual entities ingame, after changing them in DR, without having to reload the map. IIRC it'll also allow for functionality like Dromed's alt-g/alt-e.
  17. 1 hour ago, mattmkb said:

    Does anyone know how can I make TDM look for the .map file within the actual mission's directory fms/mymission/maps instead?

    You need to have a darkmod.txt and startingmap.txt in your fm so that it shows up in your mission list in TDM, then you need to install your FM in TDM. This is the same as what you do everytime you switch to playing a new mission.

  18. 8 hours ago, Sneaker said:

    When loading the map, it crashes and I get a bus error in linux...  I'll attach the output log, but I do have an old pc with 4gb of ram, with an old video card; I think I read this is expected with less capable hardware... if so ignore.

    crash-pw.out 47.32 kB · 1 download

    Maybe you've already tried to load the slimmed down version of the mission (in the sense of a large secret area), which can be manually downloaded from here?

    • Like 1
  19. 42 minutes ago, STRUNK said:

    I want to spawn a func_static and a func_mover from script ... is that possible?

    You can spawn entities, and you'd probably need to set a model too, like this:

    entity spawned_entity = sys.spawn("func_static");
    spawned_entity.setModel("models/darkmod/...");
    spawned_entity.setOrigin('0 0 0');

     

    • Thanks 1
  20. 3 hours ago, STRUNK said:

    @Dragofer

    If I getFrameTime() it returns 0.0160 so I guess that is the minimum time the engine can repeat/check things. But if I have a wait of 0.001 in a while() loop, it calculates every frame what would have happened in 16 times this while() loop .. right?

    It's very probable the 0.0160 is just a rounding down of 0.01666666. The most precise expression of a frame is 1/60 of a second.

    sys.wait is less precise than sys.waitFrame because the engine checks every frame how much time has passed. So it checks after 0.0167s, 0.0333s, 0.0500s etc. If you tell it to wait 0.02s it actually waits 0.0333s because that's the first frame where time elapsed is greater than 0.02.

    I really don't think there can be less than 1/60 of a second between scripted events, so you'd have to adjust the distance moved.

    • Thanks 1
  21. 1 hour ago, STRUNK said:

    Does waitFrame() wait 1/60th of a second when the game runs at 60fps and 1/20th of a second at 20fps?

    I think the game clock runs independently of how fast your PC is producing frames. If you run the game at 20fps, the game clock advances by 3 frames even though you've only seen one frame in that time.

    1 hour ago, STRUNK said:

    If I use wait(0.01) or wait(0.001), it's a shorter wait period then waitFrame. What is the shortest "safe" wait period, and can a fast computer handle a shorter wait time then a slow computer?

    The shortest possible waiting duration is 1/60 of a frame, so 0.0167s. As Obsttorte pointed out once, if you use wait commands the engine checks every frame whether a greater or equal amount of time has passed. So if you specify 0.0200s, the engine will wait 2 frames, 0.0333s.

     

    • Thanks 1
×
×
  • Create New...