Changing verbs in the 9 verb template

Started by Glenjamin, Tue 24/03/2015 00:11:42

Previous topic - Next topic

Glenjamin

I'm currently working with the 9 verb template in AGS. I want to replace some of the verbs with new ones. For example, I'd replace the "Push" verb with "Attack". How do I do this?

Monsieur OUXX

There are two answers to your question :
1) (the lazy way) If you just want the actions to appear to have changed, but are not bothered to re-script everything, then only change the buttons icons and mouse cursors. for example, just change the icon of the "push" button to another icon saying "attack", and then in your game script always use eModePush whenever you want the player to actually "attack".
2) (The serious way) Create new mouse modes (e.g. eModeAttack), and all the cursors and buttons that go along with them.
 

Glenjamin

Thanks! Ive started with the lazy way, but it still says the original verbs in the action bar. How do I use these verbs anyway? I know it's something to do with the "Usermode1" and "usermode2" items but otherwise I don't know.

Ghost

#3
Quote from: Gfreezie on Tue 24/03/2015 21:28:42
Thanks! Ive started with the lazy way, but it still says the original verbs in the action bar.

The buttons are sprites with text on them. The 9VT displays the "action text" depending on the currently selected action, and *that* is done by using (and combining) strings of text. You will need to open the guiscript.asc file and find this function:
function TranslateAction(int action, int tr_lang)

There you can edit the strings easily; just match your desired text to the actions.

Quote from: Gfreezie on Tue 24/03/2015 21:28:42
How do I use these verbs anyway? I know it's something to do with the "Usermode1" and "usermode2" items but otherwise I don't know.
In case of the 9VT there is a lot of custom (and awesomely complex) scripting but it boils down to: When clicked on, every "thing" in an AGS game will check what action is currently active, and then ceck if it has an event handler for this action. If this is the case, the code in that handler will be executed. Check one of the objects/inventory items/hotspots provided by the template: The code you see there is just a set of if-then commands. IF the current action is "Look", THEN make the player say "This is a banana and it looks funny."

(Usermode1 and 2 are AGS's way of providing "custom" verbs. The original ones are eModeWalkTo, emodeLookAt etc- just an enum that has the basics covered. Again, the 9VT is an extremely advanced bit of scripting and it provides a lot of comfort, but depending on your knowledge of AGS it can be tricky to customize/edit it)

SMF spam blocked by CleanTalk