Jump to content

Recommended Posts

Im looking into exactly how customizable the response messages from doing a custom action can be so that the player can get more info than merely 'i cant do that' depending on which condition of an action failed.  But im having issues tracing everything and I would prefer not to make bad assumptions about what the return values from a given ACTION.fn actually do.

 

Someone point me in the right direction or is this part called from the engine and not another script file?

For my rabbit holes, im wanting the msg to specificaclly mention  "Ground is too hard here" or  "Maybe i should equip a shovel" as appropriate and not just  "I cant do that" which is too generic and doesnt actually tell the player WHY.  I just want the interface of the few mods im making to be intuitive.

 

greping for  "GetActionFailString"  only found where the function was defined in stringutil.lua and not where it was called from.  To me the return value from  action.fn seems to indicate whether the fail msg needs to be displayed so I was hoping to find where I could offer more detailed failure response by tracing it.

 

I just hadnt been able to.  Looking at buffered action now

Edited by seronis

Well, you can put the automatic equip of a shovel directly into the fn, before any return statement of course  ; )

And as for the string you can add

STRINGS.CHARACTER.GENERIC.ACTIONFAIL.WHATEVERYOURACTIONISCALLED = "The ground is to hard here."

Should do the trick.

Edited by Malacath

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
×
  • Create New...