Deleting/Modifying CoreCommands Library [SOLVED]

Anonynn
23 Jul 2016, 18:04

I know, I know you aren't supposed to modify or delete things from the CoreCommand Library if you are completely inexperienced with it, but I'm more concerned if it's possible to delete something like "DefaultKiss" without destroying the game's loading process.

I'm moderately experienced the the CoreCommands, but I've never tried to delete one or erase everything from it.


XanMag
23 Jul 2016, 19:16

So you want to remove it entirely so instead of "you can't kiss that" it will print "I don't recognize your command"?

I assume in your game you want a response to kissing stuff, right? If you are creating your own response, modify the heck out of it (after making an editable copy). If you want it gone altogether, I tried deleting kiss and defaultkiss, but I guess it was still hidden somewhere I couldn't see. Also, after tinkering with those two commands (deleting, altering) the game loaded without a problem.

So, instead, I went into the kiss attributes and made the 'is a verb' false instead of true. That essentially turns off the the built in kiss (you'll get the "I don't recognize your command" response) when trying to kiss anything.


hegemonkhan
23 Jul 2016, 20:29

an alternative way...

put a 'if (Boolean Attribute)' check on them, for example:

(using reverse logic of 'enabled' instead of 'block/disabled': if 'enabled' then display the code that you don't want displayed, otehrwise if 'not enabled' then don't display the code that you don't want displayed)

<object name="global_data_object">
  <attr name="enable_code_boolean_attribute" type="boolean">true</attr>
</object>

for all the code you want to remove (hopefully there's some way of scripting this: maybe there's a "master handle command/whatever" for all of the Commands/whatever, as it'd be a huge pain to have to do this for every single piece of code you want blocked, lol), for example with say your 'kisscommand' or whatever piece of code:

// kisscommand:

if (not global_data_object.block_code_boolean_attribue) {
  // the normal/default kisscommand code, it's content will be displayed ONLY if the condtion above was met (it's correctly not met), which is what we (if it was being met) don't want, which this code example is handling correctly (the Boolean Attribute is correctly set to true, which causes the condition NOT to be met and thus its code content is blocked from being run, which is the same effect as if you had deleted it)
}
// we don't even need an 'else', as we just want to block the normal code from being activated, which this code example does.

actually...

why do you need something to be deleted?

(if you just merely don't use it in your game, then it's effectively "deleted", lol. Well, maybe there's some built-in things that are normally used by quest that you don't want... hmm...)
~OR~
(if you put in your own scripts for any such code piece/Element/Command/Verb/whatever, you OVER-RIDE it, meaning only your new scripting is being done, and not the default/original/initial/built-in scripting for it, effectively "deleting" that old/initial/original/built-in scripting without actually deleting it --- you're over-riding it)


Anonynn
24 Jul 2016, 03:48

Ah, so I can just over-ride it and not worry about it. Thanks! :D Appreciate it Xan and HK.


hegemonkhan
24 Jul 2016, 05:29

the caveat (doesn't apply directly to your topic):

just don't over-ride anything (especially not any of the underlying robust functionalities that Alex, and any co-helpers on/for/with the quest coding, has done for us with quest, unless you can code in your own such systems/robust code functionalities) the that you don't want to over-ride (as you plan on using/needing it).

(over-riding doesn't do anything to the over-ridden default/underlying code, but it can be hard in some cases to track down what+where you did to over-ride what+where to delete those part/s of your code out, if you want to undo/remove your over-ridding code parts)


also however, I'm not fully sure/clear on/of how the over-riding works (or doesn't work) with user-level functionality vs the underlying functionality.

what I mean by this, for example:

just changing what scripts are run by say a 'whatever' individual Object's 'take' Verb; just changing what scripts to put/add into say the 'take' Verb of 'whatever' individual Object
VS
changing the underlying functionality of say the 'taking' system coding of it how, say, 'take', works / is able to work.