seronis Posted November 17, 2013 Share Posted November 17, 2013 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 More sharing options...
Malacath Posted November 17, 2013 Share Posted November 17, 2013 Take a look at bufferedaction.luaThe function Do() is the part which will eventually call the ACTION.fn. I don't know what exactly you want to accomplish so I don't know what else to say : P Link to comment Share on other sites More sharing options...
seronis Posted November 17, 2013 Author Share Posted November 17, 2013 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 More sharing options...
Malacath Posted November 17, 2013 Share Posted November 17, 2013 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 addSTRINGS.CHARACTER.GENERIC.ACTIONFAIL.WHATEVERYOURACTIONISCALLED = "The ground is to hard here."Should do the trick. Link to comment Share on other sites More sharing options...
seronis Posted November 17, 2013 Author Share Posted November 17, 2013 I see an empty quote box on my end. Can you edit and repost ? Link to comment Share on other sites More sharing options...
Heavenfall Posted November 17, 2013 Share Posted November 17, 2013 The fail reason is passed from ACTION.testfn. For an example check out ACTION.SHAVE, shaver component, beard component and speech_wilson.lua for the custom fail reasons. Link to comment Share on other sites More sharing options...
seronis Posted November 17, 2013 Author Share Posted November 17, 2013 Thanks guys. I dont play as wilson hardly ever so forgot about the shave stuff. Between the two advices I should be able to get it working Link to comment Share on other sites More sharing options...
Recommended Posts
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.