52970 Commits

Author SHA1 Message Date
mattsc
7242ed59bf Protect Unit MAI: slight adjustment of evaluation scores
and add comment about them being hardcoded.
2013-07-04 12:28:29 -07:00
mattsc
338d2f1f22 Healer support MAI: add comment about CA scores being hard-coded 2013-07-04 12:18:04 -07:00
mattsc
5b5964c1e4 Lurkers MAI: add optional ca_score parameter 2013-07-04 12:10:33 -07:00
mattsc
64b923f98f Bottleneck MAI: add optional ca_score parameter 2013-07-04 12:06:36 -07:00
mattsc
ff7a2590f4 Recruiting MAI: add optional ca_score parameter 2013-07-04 11:55:02 -07:00
mattsc
c225c2a3e7 Patrol MAI: add optional ca_score parameter 2013-07-04 11:51:26 -07:00
mattsc
f8e242d5ac All Guardian MAIs: add optional ca_score parameter 2013-07-04 11:42:26 -07:00
mattsc
9b8be208ed All Animal MAIs: add optional ca_score parameter 2013-07-04 11:11:45 -07:00
mattsc
2cd8dea7d9 [micro_ai] tag: simplify how CA id and eval/exec function names are set up 2013-07-04 10:22:51 -07:00
mattsc
ce28d04edd [micro_ai] tag: simplify how sticky BCAs are set up 2013-07-04 09:58:34 -07:00
mattsc
0a3277100b All MAIs: only define score/max_score in one place
Score and max_score are now always defined in the [micro_ai] definition
tag and a treated as a required parameter by the AI eval/exec functions.
2013-07-04 08:03:16 -07:00
mattsc
5b86d489f1 Micro AIs: make CA names consistent with eval/exec function names (and thus unique) 2013-07-03 20:43:33 -07:00
mattsc
447cbc0ecb Micro AIs: consistently use underscores in ids and files names, Part 2
For some reason these were missed in the previous commit.
2013-07-03 20:05:56 -07:00
mattsc
5e676307dc Micro AIs: consistently use underscores in ids and file names
This was still a mix of underscores and hyphens from the development
phase(s) done by a number of different people.
2013-07-03 20:04:09 -07:00
mattsc
bd76e51af9 Multipack Wolves MAI bug fix: move a misplaced 'end'
This caused the AI to become inactive when the show_pack_number= key
was not set.
2013-07-03 19:15:58 -07:00
mattsc
969c6aef03 Messenger MAI: keep messenger at final waypoint once it gets there
Previously this caused an error message and jumping back and forth
between the last waypoint and an adjacent hex.
2013-07-03 18:44:42 -07:00
mattsc
bce61017f1 New Hang Out Micro AI and test scenario 2013-07-03 17:10:49 -07:00
thibault
0ed4441b09 Update terrain2wiki.py to work with github transition better. Also fixing docstrings. 2013-07-03 20:21:52 +02:00
Mark de Wever
8af6638ac1 Fix a compiler error. 2013-07-03 21:11:58 +02:00
Alexander van Gessel
08f3e12a79 Make the GUI1 network transfer dialog use SI units too 2013-07-03 05:06:42 +02:00
mattsc
a277f760eb Goto MAI: Set ca_score and max_score default to 300,000 2013-07-02 18:17:22 -07:00
mattsc
b7fdf80ec2 Messenger Escort MAI: add optional ca_score parameter 2013-07-02 17:34:24 -07:00
mattsc
3059a11602 [micro_ai] tag: make ca_score a universal optional key for all Micro AIs
This does not mean that all the MAIs do anything with this yet, only
that it is passed to all MAIs for which it is set.  It needs to be
implemented on a one-by-one basis.  Only the Goto MAI uses this option
so far.
2013-07-02 16:57:11 -07:00
mattsc
ec11244c1e Recruiting Micro AIs: rename variables
This is necessary because there is now no distinction between
parameters passed as keys or tags in the [micro_ai] tag setup functions
for all MAIs.  No change in functionality.
2013-07-02 13:18:20 -07:00
mattsc
417a3bb42d [micro_ai] tag setup functions: clean up to eliminate lots of duplicate code
As a side effect, key ca_id= is now an optional parameter for all MAIs.
 It did not make sense to disentangle this into a separate commit.
2013-07-02 13:18:20 -07:00
JaMiT
908f0eebed Changelog entry for r56092. 2013-06-30 21:50:51 -05:00
JaMiT
41f8816872 Implement [base_unit] before any other processing of unit types.
Fixes bug #20933.
2013-06-30 21:50:51 -05:00
JaMiT
dd194affaa Safer tracking of location when creating units via debug mode. 2013-06-30 21:50:51 -05:00
Ignacio R. Morelle
6c86a20fb2 gui2/taddon_description: Resolve the full dependency tree for display
This allows displaying the full set after resolving dependencies
recursively instead of just the add-on's original dependency set.
2013-06-30 22:10:26 -04:00
Ignacio R. Morelle
922958877f addon/info: Demote circular dependency errors to info loglevel
It turns out this is actually very useful according to a certain add-on
author who is definitely not me.

For example: have Campaign Foo and Music Pack Foo. Music Pack Foo can
depend upon Campaign Foo so a player attempting to download it is
suggested to download Campaign Foo as well since it's entirely useless
otherwise. Meanwhile, Campaign Foo depends upon Music Pack Foo in order
to be able to use some custom music in the campaign proper.
2013-06-30 21:59:24 -04:00
Ignacio R. Morelle
a5e9d3f8f2 gui2/taddon_description: Implement listing of add-on dependencies
This requires passing additional information about available add-ons (on
the server) and installed add-ons to the dialog's constructor. The
dependency list is a completely flat label displaying a comma-separated
list, with color-keyed installation statuses like the Status field and
the main add-ons list display.
2013-06-30 21:49:19 -04:00
Ignacio R. Morelle
92755323d1 gui2/taddon_description: Add a row for listing add-on dependencies 2013-06-30 21:49:19 -04:00
Ignacio R. Morelle
adb6dc303c gui2/taddon_description: Refactor add-on name coloring logic 2013-06-30 21:49:19 -04:00
Ignacio R. Morelle
7244442f4b addon/state: Add addons_tracking_list typedef
So I don't need to keep repeating the same std::map template
instantiation all over the place.
2013-06-30 21:49:19 -04:00
mattsc
adb90c9113 Micro AI macros: fix a mistake in comments 2013-06-30 17:01:39 -07:00
JaMiT
a09a312a6a Clear fog/shroud when creating units via debug mode. 2013-06-29 21:19:56 -05:00
JaMiT
e99cc26bba Refactor debug mode unit creation.
The goal is to merge three code paths so they are easier to update.
When GUI2 is ready, it might make sense to merge choose_unit_2()
into menu_handler::create_unit().
2013-06-29 20:47:07 -05:00
JaMiT
da968a4a34 Remove a "todo" that was done in r38422. 2013-06-29 18:49:19 -05:00
JaMiT
d5389b38df Grammar in a comment. 2013-06-29 16:49:51 -05:00
Nils Kneuper
092a0dfe52 removed stray [/section] block, pointed out by Pentarctagon 2013-06-27 23:48:16 +02:00
mattsc
d92d96fd07 Guardian and Patrol MAI: check if unit exists even for Behavior CAs
This works around a bug which causes BCAs not to be removed when a
scenario is reloaded from a middle-of-scenario save.
2013-06-27 13:27:29 -07:00
mattsc
1e02ffc77b Zone Guardian MAI: ensure functionality even if no goal hex is found
In that case, the guardian stays put where it is.
2013-06-27 12:24:45 -07:00
mattsc
79f2147034 Zone Guardian MAI: only use reachable zone hexes as goals for the unit
This is done so that the unit does not leave the zone in order to get
to a far away zone hex.  Exception: if none of the zone hexes are
reachable, then all of them are possible goals, so that the unit moves
toward the zone.
2013-06-27 12:04:36 -07:00
mattsc
59f90c5338 Fix indenting 2013-06-27 07:49:37 -07:00
mattsc
3b3b16ce55 Patrols MAI scenario: add a second Micro AI type (zone guardian) to Side 2
This demonstrates how to set up several MAIs for the same side.
2013-06-27 07:05:17 -07:00
Groggy Dice
8dc3bed61f fix wmllint-crashing map_data= bug involving empty quotes
wmllint crashes if the value for the map_data key consists of unfilled quotation marks (""), just as it does if there are no quotation marks:

----
Traceback (most recent call last):
  File "data/tools/wmllint", line 1917, in translator
    outmap = [outmap[0]] + outmap + [outmap[-1]]
IndexError: list index out of range
----

This simple fix checks to make sure that there are no side-by-side quotation marks on the line.

I also tidied up a double-space two lines down.
2013-06-27 02:01:02 -04:00
Groggy Dice
419fabdad8 remove spurious string substitution from a "pango string" message
The format of this message appears to have been copied from the preceding "pango string" messages, which have a "%s" where "< or >" is. But it causes wmllint to crash with the traceback, "TypeError: not all arguments converted during string formatting".
2013-06-27 02:00:36 -04:00
mattsc
e6f69ae056 All MAIs: add optional existing_engine parameter to engine init function
This lets us add the Micro AI candidate actions to an already existing
Lua AI engine and thus combine several MAIs.
2013-06-26 19:15:28 -07:00
mattsc
3e5e317954 Guardians MAI: rename internal engine functions
No change of functionality.  This is done to ensure that function names
are unique, a necessary step toward making different MAIs combinable.
2013-06-26 19:03:32 -07:00
mattsc
6e40d48970 Healer Support MAI: rename internal engine functions
No change of functionality.  This is done to ensure that function names
are unique, a necessary step toward making different MAIs combinable.
2013-06-26 18:52:19 -07:00