Jump to content
The Dark Mod Forums

Assigning different targets based on difficulty level


Springheel

Recommended Posts

I'd like an AI to go to one pathnode on Easy difficulty, and a different one on Hard.

 

Seems like this should be an easy thing to do, but I'm having troubles with it.

 

I thought that you could just target an AI at two different pathnodes, and if you simply put nospawn on one at a certain difficulty, the AI would always choose the other one. But apparently not, as sometimes he just stands there. I guess he chooses the one that doesn't exist, which seems like something that shouldn't happen.

 

I also tried to change the "target" spawnarg on the AI for a different difficulty level, but that didn't appear to work either.

 

Is there a way to do this?

Link to comment
Share on other sites

Have you tried cloning the AI twice, and having the AI's themselves only spawn on their selected difficulties with their path nodes already set? Or if that doesn't work, have all 3 of them in a blue room with interleaved thinking turned very far down to save resources, and teleport the right one in depending on difficulty?

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

A quick code read says this should work. The list of targets on the forking path_corner isn't built until after everything is spawned, so path_corners that don't spawn shouldn't show up on the list.

 

When the AI reaches the fork in the road, he uses the list. He doesn't use the forking path_corner's spawnargs.

 

This should be filed in bugtracker.

 

Are you sure there's a walkable path to the path_corner that appears in that difficulty level? He might be stopping for a different reason.

 

As for a workaround, you could build three different paths, one for each difficulty, and give the AI the correct one at map start.

Link to comment
Share on other sites

I obviously did this a lot in Inn Business. It works flawlessly, but as you describe, which makes me think something else might be going on?

 

For example...AI has:

target0 path_corner_64
target1 path_corner_66

 

Path_corner_64 has:

diff_1_nospawn 1
diff_2_nospawn 1

So it only goes there on "Easy" since it doesn't exist for Med/Hard.

 

Yes, AI select between all available targets, the only reason they might not go to one is if it's outside of the AAS or there are no viable targets in my experience.

 

You can also use a atdm:target_changetarget, which I did even more in that mission. In fact, it's important to use them, as if you just use a func_remove to take away a target that an AI is in the midst of pathing toward, you may cause a crash.

 

So, both of the things you describe I've not had any problem with, which indicates to me something else might be going on? Especially since you have two different methods both having problems.

 

Does your AI just stand there if you only provide it the suspect target without using any level/target change abilities?

 

(If this is on your beta test map, I'd be happy to take a look if you point me toward the right AI/path node.)

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Are you sure there's a walkable path to the path_corner that appears in that difficulty level? He might be stopping for a different reason.

 

Cross posted, obviously in agreement with the first part, however no need to do all the work of a workaround, if you went through all that, you'd probably find the same thing happening still. ;-)

 

PS: Have you also tested targets with the new script? Might simply have a typo.

 

Edit: In case you haven't seen it yet, I posted about an AI with missing target in your beta test thread, don't know if it's the one you're having issues with here, or same version.

Edited by RJFerret

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

Ok, I must be doing something wrong then. Thanks for confirming it should work; I'll do more tests.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...