PDA

View Full Version : Linking objectives/information to action points



TomtheTall
November 19th, 2013, 00:49
Hey everyone,

I've been going through various trial-and-error methods of getting objectives and/or information points to pop up when an action point is triggered by the player, but I cannot for the life of me get it to function! After looking through existing script for the original DK/DD levels, I see a lot of things like this:

IF_ACTION_POINT(2,PLAYER0)DISPLAY_OBJECTIVE(902)
ENDIF

Implying that there is some massive list of information/objectives somewhere that the code refers to? That being the case, do I add my own to this and then add the reference in my own scripting? I've tried listing them at the bottom of the script itself but it just brings them all up at the beginning of the level.

This is probably a bit of noobie issue, but I'm pretty new to this editing/creating lark.

Any help would be gratefully received :)

DragonsLover
November 19th, 2013, 17:22
Hello!

In which level did you see that? Unless changes have been brought to the DISPLAY_OBJECTIVE command, this is absolutely not the way to write this command.

DISPLAY_OBJECTIVE must have two parameters: the text ID and the zoom to player, thus giving DISPLAY_OBJECTIVE(xxx,PLAYERy). If you don't want the objective to zoom at a specific player, use ALL_PLAYERS instead.

DISPLAY_INFORMATION, however, must have a single parameter, which is simply the text ID such as: DISPLAY_INFORMATION(x). You must NOT put a player as a second parameter.

mefistotelis
November 19th, 2013, 20:13
Also, you may have only one command in one line - the scripting language in DK isn't very sophisticated.

shortmicky
November 19th, 2013, 20:55
Too point out maybe the hidden question, is there a list of objectives viewable or creatable to reference when using DISPLAY_OBJECTIVE, Using my own I use QUICK_OBJECTIVE but could also use DISPLAY_OBJECTIVE if I could find a list of what each one says.

mefistotelis
November 20th, 2013, 08:12
is there a list of objectives viewable or creatable to reference when using DISPLAY_OBJECTIVE
There are tools which allow to view and edit text.dat - the file which stores translations in original DK.
As for KeeperFX, DAT files are generated from .PO/.POT files, which are available on code repository:
https://code.google.com/p/keeperfx/source/browse/#svn%2Ftrunk%2Fkeeperfx%2Flang

As you can see, KeeperFX allows you to create your own .pot/.po file for a specific campaign. Then a tool po2ngdat is used to convert the file into .DAT format.


I use QUICK_OBJECTIVE but could also use DISPLAY_OBJECTIVE if I could find a list of what each one says.
I think you should use one convention. Either use QUICK_* for all messages, or DISPLAY_* for all of them.

It's quite easy to convert QUICK_* commands into .pot file by a simple script, so you can start with QUICK_* commands, and replace them with DISPLAY_* when the whole campaign is ready.
The script which creates large part of .pot file based on QUICK_* commands is here:
https://code.google.com/p/keeperfx/source/browse/#svn%2Ftrunk%2Fkeeperfx%2Ftools%2Fcampgn2pot

Using .POT file to store english objectives allows easy translation of the campaign with use of POEdit - it's a tool which helps translating various applications.
.POT is a translation template in english.
.PO is a translation to language other than english.

TomtheTall
December 5th, 2013, 22:10
Thanks for the tips guys, I haven't been doing any DK editing/creating for a while, but I'll let you know how I get on :)