Jump to content

Where is a custom ACTION.fn called from?


seronis

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...