Benutzer-Werkzeuge

Webseiten-Werkzeuge


scripting:ems

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
Letzte ÜberarbeitungBeide Seiten, nächste Überarbeitung
scripting:ems [2019/06/28 19:38] madshadowscripting:ems [2021/09/18 19:15] – Externe Bearbeitung 127.0.0.1
Zeile 5: Zeile 5:
 ===== Verwendung ===== ===== Verwendung =====
 Folgendes Skript kann ins Mapskript kopiert werden: Folgendes Skript kann ins Mapskript kopiert werden:
-<code lua>-- ##################################################################################################+<code lua> 
--- #                                                                                                 # +-- ###################################################################################################
--- #                                                                                                 # +
--- #     Mapname:  XXXXXXXXXX                                                                        #+
 -- #                                                                                                 # -- #                                                                                                 #
--- #     Author:   XXXXXXXXXX                                                                        # 
 -- #                                                                                                 # -- #                                                                                                 #
 -- #     Script:   Enhanced Multiplayer Script by MadShadow                                          # -- #     Script:   Enhanced Multiplayer Script by MadShadow                                          #
Zeile 41: Zeile 38:
 ===== Die Konfiguration ===== ===== Die Konfiguration =====
 Jede Karte lädt eine Standardkonfiguration. Die reicht in der Regel jedoch nicht aus, daher musst du noch ein Konfigurationsskript erstellen und in den **EMSconfigurations** Ordner kopieren: Jede Karte lädt eine Standardkonfiguration. Die reicht in der Regel jedoch nicht aus, daher musst du noch ein Konfigurationsskript erstellen und in den **EMSconfigurations** Ordner kopieren:
-<code>+Damit das Skript geladen wird **muss** es denselben Namen wie die Karte tragen.\\ 
 +Beispiel: Heißt die Karte "(4) Toscana V2", so muss das Skript "(4) toscana v2.lua" heißen. Groß- und Kleinschreibung spielen keine Rolle. 
 +<code lua>
 -- ************************************************************************************************ -- ************************************************************************************************
 -- *                                                                                              * -- *                                                                                              *
Zeile 58: Zeile 57:
  -- ********************************************************************************************  -- ********************************************************************************************
  Version = 1,  Version = 1,
 +
 + -- ********************************************************************************************
 + -- * Debug Mode
 + -- * Activates the ems debug mode if set to true.
 + -- * This will enable key bindings to achieve some common debug tasks.
 + -- * Ingame a button with the text "Debug" will be shown to give further information.
 + -- * (Default: false)
 + -- ********************************************************************************************
 + ActivateDebug = true,
 +
 + -- ********************************************************************************************
 + -- * Custom debug functions
 + -- * If ActivateDebug is set to true, these two debug methods can be called by pressing N or M
 + -- * _fromPlayer - the id of the player that pressed the key
 + -- * _targetPlayerId1 - a player id between 1-8 (or 16 on cnetwork), that the caller wants to target
 + -- * _targetPlayerId2 - a second player id
 + -- * _x, _y - the position of the callers mouse at the time of pressing the key
 + -- * Example content:
 + -- * SetFriendly(_targetPlayerId1, _targetPlayerId2); -- make friends between p1 and p2
 + -- * Logic.CreateEntity(Entities.PU_Serf, _x, _y, 0, _fromPlayer); -- create Serf for caller
 + -- ********************************************************************************************
 + CustomDebugFunc1 = function(_fromPlayer, _targetPlayerId1, _targetPlayerId2, _x, _y)
 + Logic.CreateEntity(Entities.PU_Serf, _x, _y, 0, _fromPlayer);
 + end,
 + CustomDebugFunc2 = function(_fromPlayer, _target1, _target2, _x, _y)
 + Logic.CreateEntity(Entities.PU_Serf, _x, _y, 0, _target2);
 + end,
   
  -- ********************************************************************************************  -- ********************************************************************************************
Zeile 64: Zeile 90:
  -- * Similar use to FirstMapAction/GameCallback_OnGameSart  -- * Similar use to FirstMapAction/GameCallback_OnGameSart
  -- ********************************************************************************************  -- ********************************************************************************************
-  
  Callback_OnMapStart = function()  Callback_OnMapStart = function()
  AddPeriodicSummer(60);  AddPeriodicSummer(60);
Zeile 111: Zeile 136:
  Callback_GameModeSelected = function(_gamemode)  Callback_GameModeSelected = function(_gamemode)
  end,  end,
-  
- --[[ 
- Ressources 
- You can specify the ressources for a player in one of the tables Normal, FastGame, SpeedGame 
- by adding a key entry with the playerId containing 6 entries which either contain a number 
- or a function that returns a number as amount for the respective ressource 
- If a player is not specified, he will get the ressources of player 1 
- So if you want to give the same amount of ressources to all players, just specify player 1 
- ]] 
   
  -- ********************************************************************************************  -- ********************************************************************************************
Zeile 198: Zeile 214:
  DisableStandardVictoryCondition = false,  DisableStandardVictoryCondition = false,
   
 + -- ********************************************************************************************
 + -- * Units
 + -- * Various units can be allowed or forbidden
 + -- * A 0 means the unit is forbidden - a higher number represents the maximum allowed level
 + -- * Example: 
 + -- * Sword = 0, equals Swords are forbidden
 + -- * Sword = 2, equals the maximum level for swords is 2 = Upgrading once
 + -- ********************************************************************************************
 + Sword   = 4,
 + Bow     = 4,
 + PoleArm = 4,
 + HeavyCavalry = 0,
 + LightCavalry = 0,
 + Rifle = 2,
 + Thief = 1,
 + Scout = 1,
 + Cannon1 = 0,
 + Cannon2 = 0,
 + Cannon3 = 0,
 + Cannon4 = 0,
 +
 + -- * Buildings
 + Bridge = 1,
 +
 + -- * Markets
 + -- * -1 = Building markets is forbidden
 + -- * 0 = Building markets is allowed
 + -- * >0 = Markets are allowed and limited to the number given
 + Markets = 0,
 +
 + -- * Trade Limit
 + -- * 0 = no trade limit
 + -- * greater zero = maximum amount that you can buy in one single trade 
 + TradeLimit = 0,
 +
 + -- * TowerLevel
 + -- * 0 = Towers forbidden
 + -- * 1 = Watchtowers
 + -- * 2 = Balistatowers
 + -- * 3 = Cannontowers
 + TowerLevel = 1, -- 0-3
 +
 + -- * TowerLimit
 + -- * 0  = no tower limit
 + -- * >0 = towers are limited to the number given
 + TowerLimit = 0,
 +
 + -- * WeatherChangeLockTimer
 + -- * Minutes for how long the weather can't be changed directly again after a weatherchange happened
 + WeatherChangeLockTimer =  3,
 +
 + -- * Enables chaning to a specific weather with the weather tower
 + MakeSummer = 1,
 + MakeRain   = 1,
 + MakeSnow   = 1,
 +
 + -- * Fixes the DestrBuild bug
 + AntiBug    = 1,
 +
 + -- * HQRush
 + -- * If set to 1, Headquarters are invulernerable as long the player still has village centers
 + AntiHQRush = 1,
 +
 + -- * If set to 1, Players can't abuse blessing and overtime in combination for unlimited work
 + BlessLimit = 1,
 +
 + -- * if set to true, Players are not able to lose their Headquarter.
 + InvulnerableHQs = false,
 +
 + -- * Heroes
 + -- * NumberOfHeroesForAll sets the number of heroes every player can pick
 + -- * 1 behind each hero defines if the hero is allowed; 0 for forbidden
 + NumberOfHeroesForAll = 2,
 + Dario    = 1,
 + Pilgrim  = 1,
 + Ari      = 1,
 + Erec     = 1,
 + Salim    = 1,
 + Helias   = 1,
 + Drake    = 1,
 + Yuki     = 1,
 + Kerberos = 1,
 + Varg     = 1,
 + Mary_de_Mortfichet = 1,
 + Kala     = 1,
 }; };
 </code> </code>
scripting/ems.txt · Zuletzt geändert: 2022/01/11 23:27 von madshadow