Need some help writing in Objectives

Kays

Active member
Elder
Joined
Mar 10, 2003
Messages
2,923
Well, I said I wasn't going to look into it, but my curiosity got the better of me. :rolleyes

I started messing around with trying to get the Objectives menu to function. And it wasn't that difficult. Basically, define an Objective, the menu will be populated with it and track it's status awarding the tribute amount when completed.

However I've got a few problems I could use some help with
Code:
set player 0 objective class TRIBUTE_OBJECTIVE_CLASS_TOWN amount 1
set player 0 objective TRIBUTE_OBJECTIVE_MAKE_DISCIPLES with amount 5 text [color=green]"BW2T_SCRIPT_01FINAL_OBJECTIVE_ELOI_20"[/color] amount 5 class TRIBUTE_OBJECTIVE_CLASS_TOWN start value 1 reward 2500 force open

That code is all that's needed to establish an objective. My problem is the bit in green. This needs to be a database string. Which I'm assuming is the bw2text.lhts file. Does anyone know how to open it. I did have an app by Dero. But I've forgotten the name. Or where I've placed/hidden it. This is also required to identify the icons for objectives menu bar.

The second problem is that I can't see a way to check if an objective has been completed.

It would be nice to write a script where when one objective is completed that it start a new one. You can't get too far on a map without tribute and completing objectives is a good way to earn it.

Any ideas? ???
 
All you need to do to open the .lhts file is change the extension to .txt. Then its best to open it in Word or something like that. The string names can be found next to the strings themselves. It's quite hard to explain until you see it for yourself  :p

For the second problem, is this what you were looking for? It's the only related thing i can find.
Code:
if player 0 objective TRIBUTE_OBJECTIVE_COLLECT_WOOD complete

Thanks
 
Thanks, but it looks like crap in Word. :rolleyes

Found what I was looking for on this thread on the LHS boards. I don't see the icons in there. Any ideas?

Thanks for the code. I haven't tried it yet, but if it works that's what I'm looking for.


[edit]Cool that works. I'm on a roll now.  :yourock:

What I'm looking for now is ideas for objectives and the reward amount. There's a list of all available objectives in the Spoiler below. What I think I'm going to start with is creating disciple. Create 10 of one type and then 10 of another untill all are done and then do it again but for a higher reward amount.[/edit]
    TRIBUTE_OBJECTIVE_TYPE_NONE                     = -1 ,
    TRIBUTE_OBJECTIVE_TYPE_FIRST                    =  0 ,
    TRIBUTE_OBJECTIVE_MINE_ORE                      =  0 ,
    TRIBUTE_OBJECTIVE_COLLECT_WOOD                  =  1 ,
    TRIBUTE_OBJECTIVE_COLLECT_FOOD                  =  2 ,
    TRIBUTE_OBJECTIVE_ACHIEVE_POPULATION            =  3 ,
    TRIBUTE_OBJECTIVE_CREATE_TROOPS                 =  4 ,
    TRIBUTE_OBJECTIVE_BREED_CHILDREN                =  5 ,
    TRIBUTE_OBJECTIVE_WIN_CREATURE_FIGHT            =  6 ,
    TRIBUTE_OBJECTIVE_TAKEOVER_TOWNS                =  7 ,
    TRIBUTE_OBJECTIVE_BUILT_ABODE                   =  8 ,
    TRIBUTE_OBJECTIVE_MAKE_DISCIPLES                =  9 ,
    TRIBUTE_OBJECTIVE_MAKE_FARMER_DISCIPLES         =  10 ,
    TRIBUTE_OBJECTIVE_MAKE_FORESTER_DISCIPLES       =  11 ,
    TRIBUTE_OBJECTIVE_MAKE_FISHERMAN_DISCIPLES      =  12 ,
    TRIBUTE_OBJECTIVE_MAKE_BREEDER_DISCIPLES        =  13 ,
    TRIBUTE_OBJECTIVE_MAKE_WORSHIPPER_DISCIPLES     =  14 ,
    TRIBUTE_OBJECTIVE_MAKE_BUILDER_DISCIPLES        =  15 ,
    TRIBUTE_OBJECTIVE_MAKE_MINER_DISCIPLES          =  16 ,
    TRIBUTE_OBJECTIVE_CREATURE_COLLECT_WOOD         =  17 ,
    TRIBUTE_OBJECTIVE_CREATURE_COLLECT_FOOD         =  18 ,
    TRIBUTE_OBJECTIVE_CREATURE_COLLECT_ORE          =  19 ,
    TRIBUTE_OBJECTIVE_ENEMY_CREATURE_DEAD           =  20 ,
    TRIBUTE_OBJECTIVE_PLAYER_TAKE_OVER_MINOR_SETTLEMENTS
                                                    =  21 ,
    TRIBUTE_OBJECTIVE_BUILD_IMPRESSIVE_BUILDINGS    =  22 ,
    TRIBUTE_OBJECTIVE_CREATURE_WATER_TREES          =  23 ,
    TRIBUTE_OBJECTIVE_PLAYER_BUILD_FIELDS           =  24 ,
    TRIBUTE_OBJECTIVE_CREATURE_BUILD_ABODES         =  25 ,
    TRIBUTE_OBJECTIVE_REACH_TOWN_STATUS             =  26 ,
    TRIBUTE_OBJECTIVE_REACH_CITY_STATUS             =  27 ,
    TRIBUTE_OBJECTIVE_REACH_METROPOLIS_STATUS       =  28 ,
    TRIBUTE_OBJECTIVE_CREATURE_ENTERTAIN            =  29 ,
    TRIBUTE_OBJECTIVE_CREATURE_ATTACK_TROOPS        =  30 ,
    TRIBUTE_OBJECTIVE_CREATURE_KILL_SOLDIERS        =  31 ,
    TRIBUTE_OBJECTIVE_CREATURE_PLANT_TREES          =  32 ,
    TRIBUTE_OBJECTIVE_TAKEOVER_TOWNS_IMPRESSIVENESS =  33 ,
    TRIBUTE_OBJECTIVE_TAKEOVER_TOWNS_FORCE          =  34 ,
    TRIBUTE_OBJECTIVE_LEVEL_UP_PLATOON              =  35 ,
    TRIBUTE_OBJECTIVE_BUILD_FIELD_FERTILE           =  36 ,
    TRIBUTE_OBJECTIVE_INCREASE_IMPRESSIVENESS       =  37 ,
    TRIBUTE_OBJECTIVE_BUILD_EMBELLISHMENT           =  38 ,
    TRIBUTE_OBJECTIVE_CREATURE_ENTERTAIN_AT_ONCE    =  39 ,
    TRIBUTE_OBJECTIVE_BUILD_WONDER                  =  40 ,
    TRIBUTE_OBJECTIVE_KILL_ENEMY_CREATURE_WITH_ARMIES
                                                    =  41 ,
    TRIBUTE_OBJECTIVE_HEAL_VILLAGERS                =  42 ,
    TRIBUTE_OBJECTIVE_COLLECT_ALL                   =  43 ,
    TRIBUTE_OBJECTIVE_CREATURE_COLLECT_ALL          =  44 ,
    TRIBUTE_OBJECTIVE_WATER_FIELD                   =  45 ,
    TRIBUTE_OBJECTIVE_WATER_FOREST                  =  46 ,
    TRIBUTE_OBJECTIVE_CREATURE_KILL_PLATOONS        =  47 ,
    TRIBUTE_OBJECTIVE_CREATE_PLATOONS               =  48 ,
    TRIBUTE_OBJECTIVE_DEFEAT_ARMY_WITH_FIRE         =  49 ,
    TRIBUTE_OBJECTIVE_DEFEAT_ARMY_WITH_ELECTRICITY  =  50 ,
    TRIBUTE_OBJECTIVE_DEFEAT_ARMY_WITH_METEOR       =  51 ,
    TRIBUTE_OBJECTIVE_SPECIAL_SEGREGATE_MEN_WOMEN   =  52 ,
    TRIBUTE_OBJECTIVE_SPECIAL_ENLIST_ALL_MEN        =  53 ,
    TRIBUTE_OBJECTIVE_SPECIAL_DEFEAT_WALL_ATTACKERS =  54 ,
    TRIBUTE_OBJECTIVE_SPECIAL_PROTECT_N_VILLAGERS_WITH_SHIELD_MIRACLE
                                                    =  55 ,
    TRIBUTE_OBJECTIVE_SPECIAL_LINK_TOWNS_WITH_IMPRESSIVENESS
                                                    =  56 ,
    TRIBUTE_OBJECTIVE_SPECIAL_ENCLOSE_TOWN_WITHIN_WALLS
                                                    =  57 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_CONNECT_TOWNS_WITH_ROADS
                                                    =  58 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_BUILDINGS_DESTROYED=  59 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_LIVING_THINGS_DEAD =  60 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_FOOD_DESTROYED     =  61 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_NON_GREEK_DEAD     =  62 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_TREES_REMOVED      =  63 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_CONVERT_ALIGMNENT_TO_GOOD
                                                    =  64 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_CONVERT_ALIGMNENT_TO_EVIL
                                                    =  65 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_ULTIMATE_GOOD      =  66 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_ULTIMATE_EVIL      =  67 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_UNCOVER_ALL_DYK    =  68 ,
    TRIBUTE_OBJECTIVE_AS_SOON_AS_CREATURE_BREAK_ENEMY_WALLS
                                                    =  69 ,
    TRIBUTE_OBJECTIVE_FAILABLE_NEVER_ATTACK         =  70 ,
    TRIBUTE_OBJECTIVE_FAILABLE_NEVER_RUN_OUT_OF_FOOD=  71 ,
    TRIBUTE_OBJECTIVE_FAILABLE_CREATURE_BUILD_ALL_BUILDINGS
                                                    =  72 ,
    TRIBUTE_OBJECTIVE_FAILABLE_NEVER_LOSE_VILLAGER_TO_ATTACK
                                                    =  73 ,
    TRIBUTE_OBJECTIVE_FAILABLE_CRATURE_BUILD_ALL_ABODES
                                                    =  74 ,
    TRIBUTE_OBJECTIVE_FAILABLE_HAPPINESS_ABOVE      =  75 ,
    TRIBUTE_OBJECTIVE_FAILABLE_ATTACKED_ONLY_UNDER_DARKNESS
                                                    =  76 ,
    TRIBUTE_OBJECTIVE_FAILABLE_CREATURE_KILL_PLATOON=  77 ,
    TRIBUTE_OBJECTIVE_FAILABLE_FIELDS_ON_FERTILE_LAND
                                                    =  78 ,
    TRIBUTE_OBJECTIVE_FAILABLE_WATER_FIELDS_EVERY_DAY
                                                    =  79 ,
 
Back
Top