576 Commits

Author SHA1 Message Date
gfgtdf
60d114b606 finish moving cavegen (cave_map_generator.cpp) to lua.
This map generator is used in HttT 17 and SoF 4. which needed to be updated aswell.

With this we finally have a lua generator that is used in mainline and that
can be used an an example by wml authors who want to write other map generators.

Unfortunateley there are still umc add ons in 1.12 that use
scenario_generation=cave so i didn't remove the cpp implementation yet.
2016-09-17 20:52:49 +02:00
Charles Dang
659e482e01 Moved eras files back to multiplayer/ since its movement caused errors in replays pre-move 2016-09-11 10:23:53 +11:00
Charles Dang
3cb8878b9a Fix duplicate loading of eras in mp
This fixes warnings about the era macros being redefined without being #undef-ed when
loading MP.
2016-08-30 19:39:00 +11:00
fendrin
84bab7ad19 Replace FOREACH 2016-08-06 06:20:41 +02:00
Celtic Minstrel
b295aab4ba Deprecate {MAGENTA_IS_THE_TEAM_COLOR}
The magenta colour is now the default flag_rgb colour if one is not specified.
2016-08-05 00:49:39 -04:00
Gregory A Lundberg
010f943a40 [option]message= deprecated, use label=
According to the Wiki, since 1.13.2 message= is an alias for label=.

Using message= provokes a warning about it being deprecated.

This replaces message= with label= in the entire mainline (where it had not already been changed).
2016-07-03 13:41:44 -05:00
sigurdfdragon
87b55feb59 MP Random map (Desert): Use new desert mountains. 2016-06-08 00:30:03 -04:00
Charles Dang
d6b48759dc Hornshark: remove unit ids from Clockwork Boy units (bug #24722)
This prevents ID conflicts resulting in certain units disappearing. They weren't
used anywhere in the scenario anyway.
2016-06-04 00:15:56 +11:00
sigurdfdragon
80e81cdc3a MP - Aethermaw: Fix image not found errors.
Due to Revenant & Skeleton Archer animations moved to subdirectories.
2016-06-02 14:08:00 -04:00
gfgtdf
6f29960e95 Merge pull request #659 from spixi/master
Make the multiplayer faction accessible via Lua and simplified Hornshark Island
2016-05-22 21:08:52 +02:00
gfgtdf
2fa8bc0350 cleanup lua feeding implementation. 2016-05-22 19:41:54 +02:00
Spixi
a8f625fc8a Make the multiplayer faction accessible via Lua and simplified Hornshark
Island
2016-05-22 00:51:09 +02:00
ln-zookeeper
eaa7dac9c2 Disabled ellipses of the statues 2016-05-19 23:58:19 +03:00
Wedge009
eda30529c2 Spelling correction: perentage -> percentage 2016-05-02 19:06:43 +10:00
ln-zookeeper
0eed39ff23 Changed terrain code of desert mountains from Mdy to Mdd
This is because 'y' is reserved for UMC use.
2016-03-29 14:48:25 +03:00
Elvish_Hunter
2cd4298f7b wmllint run on core, campaigns and multiplayer directories 2016-03-24 20:26:44 +01:00
ln-zookeeper
f3d5092534 Replaced regular mountains with desert/snowy mountains in a few places 2016-03-08 11:47:58 +02:00
Charles Dang
a87939acb0 Run wmlindent 2016-02-24 16:27:08 +11:00
Charles Dang
c40c2cd9af ANL: strip unnecessary wmltools guards and ran wmlindent 2016-02-24 09:06:32 +11:00
Robert Wallace
afd53cf6a1 Fixed deprecated code in ANL 2016-02-23 14:17:56 -05:00
gfgtdf
439ded53ee 2p dark forecast: don't store unit pool types in savefiles
instead of storing the poolypesin savefiles we now have them as 'const'
lua array and store only the indexes to this array in the savefiles.
this has some advantages:
1) It makes the savefiles smaller
2) It simplyfies the lua code becasue we don't have to convert the wml
tables to lua tables anymore.

This also changes the scenario so that the spawned unit types are now
calculated at the beginning (they will be the same when reloading from a
savefile.)
2016-02-18 23:34:50 +01:00
gfgtdf
39eb8feaf1 add difficulcy level slider to dark forecast mp scenario
unfortunateley the 'description' (the tooltip of the widget in the mp
configure dialog) doesn't show in current master. This is likeley to be
a bug related to gui internals.
2016-02-18 23:08:44 +01:00
gfgtdf
8ee34c39b2 move most dark forecast code to lua
This has multiple advantages:
1) It makes the code easier to understand because we now can use local
variables and return values.
2) It makes the code easier to debug because we don't have to reload the
wml cache anymore for changes to have an effect
3) It makes loading the multiplayer wml faster, specially dark forecasts
wml codes is now so short that we don't need to guard it inside its own
preprocessor marco anymore.
4) It decreases the save file size.

This commit also does other improvements to the code, for example:
1) We don't create temporary units anymore just to query the costs of
a unittype.
2) We now load the weather maps dynamically at runtime with
wesnoth.read_file, this decreased the prorocessor paring time and savefile
size further.
3) When creating the new spawns we use temporary objects to decrease
the units movement, instead of changing and resetting the unit stats
manually.

This also has a disadvantage:
1) It now requires all players to have this scenario installed, since it
it a mainline scenario i see no problems with that.
2016-02-18 23:08:41 +01:00
gfgtdf
3e2dfed89d added border to dark forecast map
this adds borders to the 2p dark forecast survival map, it also removes
the big empty space in the upper third of the map.

This also renames the mask files to map files, becasue they are actually
just normal maps, and the [terrain_mask] just replaces the current map
with these.
2016-02-18 23:08:36 +01:00
gfgtdf
561e30bc7d 2p Dark Forceast cleanups 2016-02-18 23:08:34 +01:00
Charles Dang
96991a5409 Dark Forecast: ensure weather masks are properly aligned (bug #24200) 2016-02-16 13:53:58 +11:00
gfgtdf
acc5ef3b8d fix sample lua cavegen 2016-02-08 23:38:06 +01:00
gfgtdf
527c3b1a1e fix sample lua cavegen 2016-02-08 23:37:23 +01:00
gfgtdf
fc1c9ff699 fix error in lua sample mapgenerator 2016-02-08 23:34:07 +01:00
gfgtdf
ac79ff350a improve lua sample cave generator. 2016-02-08 23:14:03 +01:00
gfgtdf
37e613b6fc Added a sample lua map generator
this is more or less the code of the cavegen as used in HttT scenario 17
ported to lua.
2016-02-08 21:22:27 +01:00
ln-zookeeper
96bd5ae982 Avoid errors if scenario is played with one of the sides empty 2016-02-01 20:23:55 +02:00
Charles Dang
0dbaabbb3e Split 6p Team Survival map into own file 2015-10-09 15:27:39 +11:00
Charles Dang
68363b3e21 Convert benchmark scenario maps to new format 2015-10-08 05:09:14 +11:00
Charles Dang
a96253982b Team Survival: convert masks to new format 2015-10-08 05:09:13 +11:00
Charles Dang
9ac120ab7d Add missing [ai] block to Drakes (default) faction (bug #23404) 2015-10-01 13:28:39 +11:00
gfgtdf
87313970e1 fix [modification]type=key
Previous it couldhappens that create_engines and depcheck::manager s lis
of mods could get out of sync which caused wrong modification to be
active.

Also we add a type= key to [era]s chiech defaults to mp so that only the
default era is avaiable in sp by default (for technical reasons there
must be at least one era avaiable in sp.
2015-06-21 16:07:36 +02:00
gfgtdf
61fab699e5 fix faction_from_recruit
Previously faction_from_recruit would search for default_recruit= in
[multiplayer_side]. This commit fixes it so that it seached for
'recruit' ('default recruit' is no attribute of [multiplayer_side]).

This fixed behaviour breaks 'A new land' mp scenario becasue the faction
now gets locked to the mp faction that matches the recruits best
(loyalists), but in ANL we wants custon recruitlist and not Loyalists
recruitlist. To Fix this i removed faction_from_recruit= from 'A new
land's sides.
2015-06-20 17:12:47 +02:00
gfgtdf
634d29020f dont make 4mp leader quick in campaigns by default
making 4mp leader automaticly quick is unexpected for a campaigns
designer. And the intention is make it easier to port sp campaigns to
mp.
To do this i ported the quick4 mp leader code to lua.

I also moved the lua code from eras.cfg to a new file eras.lua, this
makes is easier for an editor to detect lua syntax highlichting
automaticly.
2015-06-16 02:13:08 +02:00
gfgtdf
219bb24b30 disable turn over advantage for campaigns by default
For campaigns (sp and mp) which are usually coop campaigns you usually
don't want the turns over advantage message. So we disable it by default
for campaigns. It is still possible to (de-)activate is manually by
setting the wml variable show_turns_over_advantage to yes/no
2015-06-16 01:18:43 +02:00
Ignacio R. Morelle
b80819be02 ANL: Work around recruit lists being overridden by factions (bug #23593)
This only seems to happen when Use Map Settings is enabled. Using
faction_lock in that case forces the "Custom" faction selection, which
offers all possible leaders from all factions and doesn't override the
recruit lists.

faction_from_recruit would limit the faction selection to Loyalists in
1.10, thus ensuring all leaders are Loyalists with Use Map Settings on,
but that doesn't seem to work right now either. It shouldn't matter for
this scenario anyway as long as the recruit lists are the ones defined
here rather than the faction's.
2015-06-12 06:04:14 -03:00
Elvish_Hunter
0e36bedb84 Removed Silver Mage from the Rebels' leaders in Age of Heroes
See bug report at http://forums.wesnoth.org/viewtopic.php?f=4&t=42588
2015-06-02 11:17:05 +02:00
Charles Dang
68dfe27bbd Saved all multiplayer maps in new format 2015-05-30 23:11:46 +11:00
Elvish_Hunter
f6b445f026 ANL: used [filter] status= instead of [filter_wml] 2015-04-28 21:55:41 +02:00
Ignacio R. Morelle
a96e0a3659 Remove orphaned map generator scenario
Fixes an assertion failure on the editor's Generate Map menu.
2015-04-23 05:37:09 -03:00
Ignacio R. Morelle
0d63907982 Prevent wmllint from converting two problematic file paths for now 2015-04-17 11:24:38 -03:00
Ignacio R. Morelle
e036d22bdd Exclude leading <img> from translatable MP faction descriptions 2015-04-17 11:01:11 -03:00
Chris Beck
e85eb66f5b put YAMG as a map generator rather than as a scenario generator
this way is a lot less buggy, the other way seems to cause
mysterious crashes
2014-11-05 18:40:45 -05:00
Chris Beck
43e3d37a21 fix bug #22484 (fix random map generation in mp create)
As described in bug report, mp create had a bizarre implementation
for random map vs scenario generation. Scenario generation was called
map generation, and map generation was impossible. We fix it and make
it work like it works in the rest of the game.

At time of writing the wiki describes map generation wml as follows:

```
To use the default [generator] your [scenario] tag must contain one of
the following keys:

scenario_generation=default
map_generation=default

If ‘scenario_generation’ is used, the engine will expect for your entire
[scenario] sub tags to be inside a [scenario] tag inside [generator].
Tags outside of this will be ignored. There may be value in this, but at
this writing, it’s not clear. ‘map_generation=default’ is simpler and
more commonly used. It is also necessary to use this key so that you can
regenerate a map in MP game creation. In its use only generator data is
in the [generator] tag, all other [scenario] data is placed outside of it.
The exception is if you are making an initial MP scenario available in MP
game creation, for this a [scenario] tag must appear inside of
[generator], containing the [scenario] subtags you want to use.
See “data/multiplayer/scenarios/Random_Scenario.cfg” for an example.
```

This commit essentially removes the "exception" pointed out above.
After this, the mp create dialog treats map and scenario generation
both in the "random maps" classification, and it handles them normally,
scenario generation replacing the entire scenario, and map generation
replacing only the map data of the scenario.
2014-11-05 18:40:45 -05:00
Chris Beck
e243285aba change undead help portrait to spectre, it fits better here 2014-11-01 02:02:56 -04:00