Jump to content

Two questions unrelated to each other! A little help if it's okay. \o/


Recommended Posts

Hello, I wasn't sure if any of these questions have been asked before. I've googled and perused the recent pages prior but my efforts resulted in fruitless meandering!

 

Question A:

Is there a tutorial out here on how to create custom amulets/necklaces? I would like my character and his brother to be the only one able to wear them and this special amulet raises sanity.

 

Codes are not necessary demanded, I think first and foremost I wish I knew how to create them first. There are several tutorials on handheld items and armor but none so far for this (as much as I know). There was a tutorial on hats but that was a little confusing too, I feel slightly abashed.

 

Question B:

Is there a way for a character to be less targeted by aggressive monsters? My character can be defined as living wallpaper, he's so dull even animals don't feel his presence until he makes it known! Is there any way to make this possible?

 

For example, if he were chased alongside another character, the monsters would likely go to the other person more often than him.

Link to comment
Share on other sites

A: http://forums.kleientertainment.com/files/file/1089-dst-hat-tutorial/

edit: well, armors and amulets are pretty much the same. to make a custom amulet, i personally would just take the the animfiles and luascripts of the ingame amulet and rework it into a custom one.

theres good tutorial on that in http://forums.kleientertainment.com/topic/27341-tutorial-the-artists-guide-to-characteritem-modding/ under "But what about items?"

Edited by Seiai
Link to comment
Share on other sites

@Luitfeldt,

as for B: every monster has its own complex retargetfunction (its the function that gets passed as parameter to inst.components.combat:SetKeepTargetFunction, u should find that in all files of aggressive creatures). so unless u want to make your own version of every retargetfunction of every monster in the game, it's gonna be rather tricky.

one workaround could be to directly change the enemies combattarget inst.components.combat.target

So u could for instance have your charcter check all nearby entities, whether one is targeting u, and set its target to nil, like every few seconds or under specific conditions, so the enemy has to try to find a new target again, which might not be u this time.

Or u could check for enemies that target u, and for other players near u, and set them directly as your enemy's target.

But making them less likely to target u in the first place is rather tricky...

Edited by Seiai
Link to comment
Share on other sites

When there are players nearby, who are not currently in combat or being targeted, add tags "invisible", "playerghost" and "noattack" to your character, and/or remove tags such as "_health" and "_combat" from your character.

 

Otherwise, remove "invisible", "playerghost" and "noattack" tags from your character, and add "_health" and "_combat" to your character.

Link to comment
Share on other sites

@Seiai - With regards to question A, I've found the sources for all the original items to be pretty elusive. OTL I'm kind of stuck figuring out where people are actually getting them.

 

@Isosurface - I'll be sure to test this out with my friend and see if it works; I'm quite new to this coding business so I'll come back to this post once we've exhausted all our options with this suggestion.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...