Jump to content
The Dark Mod Forums

Aosys

Member
  • Posts

    277
  • Joined

  • Days Won

    8

Posts posted by Aosys

  1. I looked up the definition of cosine. It didn't help.

     

    Let's say I want the player to be able to trigger the object as long as it is within a 90 degree xy arc of the direction he is looking. What value would I set "tolerance" to?

     

    Ok, time to see if I really understand what's going on here!

     

    From what I understand, an eps (tolerance) of 1 translates to 0 degrees, or in other words looking dead center at the object. An eps of -1 translates to 180 degrees, or looking directly away from the object (and would probably result in the stim being triggered all the time, since the player's view angle can't exceed looking completely away). An eps of 0 translates to 90 degrees, or looking directly perpendicular to the object. The smaller eps is, the smaller the angle to trigger is (or how directly a player has to look at the AI/object before the script is triggered). At least in the version of the script I checked out, unless otherwise specified the eps would default to 0.1, which is a decently generous tolerance of 9 degrees cos(x) = 0.1, or arccos(0.1) = 84.26 degrees. assuming I've done my math right. MAKE SURE YOUR CALCULATOR IS SET TO DEGREES AND NOT RADIANS WHEN MAKING THESE CALCULATIONS!

     

    So for what you're depicting, a total angle of 90 degrees on all sides from the object would need a 45 degree player view angle from any side, so the eps would be 0.5.

     

    [EDIT] No, I haven't done my math right. Eps is calculated by cos(# degrees you want). So 45 degrees would be around an eps of 0.70 or 0.71. Derp.

     

    Am I right, or am I horribly mistaken?

     

    By the by, should probably drop this here for future reference (and thanks for this @Obsttorte, it was super useful; I haven't had time to look into modifying the script yet but I plan to once base architecture is done):

     

  2. New tile texture is finally done (more or less):

     

    LWH6NUV.jpg

     

    Download

     

     

     

    ve7zdSC.jpg

    KQBstZZ.jpg

    MsHDxw2.jpg

     

     

     

    A couple of notes:

     

    1. Sorry for the slightly lower resolution, the base texture was taken with a camera phone which in hindsight was not ideal.

     

    2. IMO, this texture looks best at 0.125 default scale (which is what it's set to in the above screenshots).

     

    3. This version has no specular. I'll probably release a glossy version at some point.

     

    3. Feedback is appreciated!

    • Like 2
  3. @Obsttorte So I was looking at the scriptobject you created, and found the older Trigger Look script you had posted. Do I need both for this to work?

     

    Unfortunately I have 0 scripting experience, so I'm feeling a lot little lost at the moment... I've tried commenting the code but I pretty much don't know what's going on :/

    • Like 1
  4. More of an academic question than one stemming from immediate need, but one that might be nice to implement later.

     

    I'm interested in generating some in-game behaviors based off of the player's POV. The first has to do with the Func_Static Player Face Script by VanishedOne and grayman. Currently, the script works as intended; func_statics with it applied will always turn to face the player. What I'd like to do is invoke the script only when the func_static is outside of the player's FOV.

     

    The other is to have ghosts which are visible in the player's peripheral vision, but not when looked at directly, like what's done in the Metro games:

     

     

     

    I did go digging around in the TDM Script Reference page, and found getViewAngles(). I've also somehow gotten hold of a trigger_look script (apologies about not naming an author, I forget where this came from):

     

     

     

    object trigger_look {
    	float stim;
    	float distance;
    	float processing;
    	float eps;
    	float singleUse;
    	string entityName;
    	void init();
    	void processStim(entity inflictor,float f);
    };
    float length(vector v) {
    	return sys.sqrt(v_x*v_x+v_y*v_y+v_z*v_z);
    }
    void trigger_look::init() {
    	stim=getFloatKey("stim");
    	if (!stim) {
    		stim=23;
    	}
    	distance=getFloatKey("distance");
    	if (!distance) {
    		distance=1024;
    	}
    	eps=getFloatKey("tolerance");
    	if (!eps) {
    		eps=0.1;
    	}
    	eps=1.0-eps;
    	singleUse=getFloatKey("once");
    	entityName=getKey("entityname");
    	if (entityName=="") {
    		entityName="player1";
    	}
    	ResponseAdd(stim);
    	ResponseSetAction(stim,"processStim");
    	ResponseEnable(stim,1);
    	processing=0;
    }
    void trigger_look::processStim(entity inflictor,float f) {
    	if (processing || entityName!=inflictor.getName()) {
    		return;
    	}
    	processing=1;
    	vector playerView,shieldToPlayer,playerViewDir;
    	if (entityName=="player1") {
    		playerView=inflictor.getViewAngles();
    	}
    	else {
    		playerView=inflictor.getAngles();
    	}
    	shieldToPlayer=getOrigin()-inflictor.getOrigin();
    	shieldToPlayer_z-=64;
    	if (entityName!="player1") {
    		playerView_z=shieldToPlayer_z;
    	}
    	if (length(shieldToPlayer)>distance) {
    		return;
    	}
    	playerViewDir_x=sys.cos(playerView_y)*sys.cos(playerView_x);
    	playerViewDir_y=sys.sin(playerView_y)*sys.cos(playerView_x);
    	playerViewDir_z=-sys.sin(playerView_x);
    	float angle;
    	angle=playerViewDir*shieldToPlayer/length(shieldToPlayer);
    	if (angle>eps) {
    		activateTargets(inflictor);
    		if(singleUse) {
    			ResponseEnable(stim,0);
    			return;
    		}
    	}
    	processing=0;
    }
    

     

     

     

    Would either of these be the correct solution?

  5. This is definitely a subjective topic, and can vary immensely depending on the mission, the author, and the player. For what it's worth, here's my two cents on these questions:

     

    What do you think about objectives that limit my ability to KO AI?

     

    Personally, I'm not a fan since my playstyle tends to deviate towards the "KO everyone, explore everything in peace" route. However, a good bit of ghosting can be immensely satisfying if executed correctly, so I would say implement KO limits or prohibitions only if you have a very good reason for it, or it's absolutely crucial for the mission's story. If you do end up implementing limits, I would also suggest allowing knockouts on lower difficulties, since forced ghosting definitely isn't for everyone. Otherwise, this should be optional or not present at all.

     

    What do you think about objectives that prohibit killing?

     

    I myself have gotten used to not killing anyone if I can help it - so much so that I'll take the pacifist route in practically every game it's possible! That said, forced non-lethal can also fall into the contextual category, as Crowbar mentioned. After all, it makes sense for some gentleman thief to not want to get his hands dirty... but it also makes sense for some common street thug to not give a whit about offing someone, so in fact the no-kill objective can act as a bit of character building in and of itself! That said, I'd advise some lenience on this, e.g. making it optional or even removing it on the lowest difficulty, though on the whole I don't think this is as big a deal as KO limits.

     

    What do you think about "collect X loot" objectives?

     

    This one I'm not sure there's a definitive answer to, since a lot of different things can work here. There's definitely a fine line between a so-easy-it's-boring objective and a frustrating loot hunt, though, so I guess what I might attempt is to keep testing and refining until you hit that sweet spot. Most missions tend to be pretty good about their loot goals, and I've gotten used to having this mandatory, so I don't mind it at all. On the flip side, though, you could also argue that a given loot goal can be mission-contextual in order to best satisfy story and mechanics needs. Ergo, in the end it's up to the mission author to decide on what's best to bring their vision to life.

     

     

    For that little extra realism, I've always wanted a "Loot Sack Weight" mechanic, where you have a limit for how much loot you can actually carry at once, before you should head back to the start location to drop off what you have found so far, or hide it in a bush as a loot pile to collect later and then return to where you got to in that mission. I would really like a mechanic like this, especially when I just stole 3 massive golden urns from a mantlepiece and then in my mind I'm thinking - "Where the hell am I carrying all this loot? In my Star Trek Elite Force Holo-Belt?"

     

    I can see where you're coming from here, but I might urge caution with this since it has the potential to get a tad bit annoying. I do, however, really like how Quinn Co.'s bank mission handled loot, with the player having to manually ferry heavy boxes and sacks of ill-gotten gains to a specific drop-off point, rather than sucking said boxes into their magical bag of holding, this being used in conjunction with the normal loot mechanic. I'd like to see more missions do something like that, since I found it to be an interesting challenge and a welcome change of pace, while being optional (if I recall correctly) and therefore not something to stress about.

     

     

    In all, I'd say balancing everything properly is a good thing to strive for, but ultimately you should also stay true to what you've set out to create.

  6. Just a heads up, it appears that the most recent version of Nvidia's drivers (372.70 for me) is not playing nice with Blender on Windows 7 - specifically, whenever you fire up Blender it immediately deactivates Windows Aero. Not a catastrophic bug, but kind of annoying nonetheless...

     

    http://blender.stackexchange.com/questions/61776/blender-disabling-windows-aero

     

    https://blenderartists.org/forum/showthread.php?405368-Blender-suddenly-disables-Windows-Aero-on-launch

  7. While digging around a bit, I found this old thread from the Blenderartists forum:

     

    http://blenderartists.org/forum/archive/index.php/t-206654.html

     

    In particular, one post mentions:

     

    Autodesk and Adobe DO NOT offer any old versions. Retailers are required to stop selling an old version once the new is out - so you´ll not find any legit boxes in a legit shop of any old versions.

    I'm no expert, but I'd say that your best bet would be to pursue updated plugins if at all possible, rather than looking for the older software.

  8. Hi all, not an apocalyptic bug, but something slightly annoying I noticed. Every once in a blue moon, the in-game downloader gets hooked up, and may stop at a certain percentage during a mission download. An easy way to counter this is just to quit out of TDM, but in order to start the game again you need to do a full system restart. As far as I know, this doesn't break anything (I'm always able to get the mission in the end), but it'd be nice if the restart wasn't necessary. Does this count as a bug, or is it just something to live with?

  9. The slightly more labor-intensive way:

     

    [media ]Video link here[/media]

     

    Just delete the space after the first "media"

     

    You can also get to this by going to the "Special BBCode Button", selecting "Media" from the dropdown menu, then pasting in your video URL.

  10. Technically speaking, you don't need to be straight in front of a lock to pick it IRL. With a chest, I imagine that as long as you can access the keyway with your tension tools, picks, skeleton keys, etc. I don't think getting it open from a different angle should be a problem, especially since picking is done mostly by feel. I suppose the logical conclusion a player might draw from a typical scenario is that the player character is reaching out and maybe around the chest to fiddle with the mechanism, even if we as players can't see the PC's arms in action.

     

    On the other hand, if you've got a 10-foot frob distance on your picks, you've got a problem, so I guess the real issue for me would be distance over direction.

  11. Is that a fan-patched SS2? I think they have distributed fan-patched versions of Thief.

     

    Not sure about SS2, but I do know that Thief Gold and Thief II come patched with Newdark (and they're pretty good at staying on top of the most recent ND version).

×
×
  • Create New...