Your script has a very small amount of time to execute code before the game crashes. My game crashes, and I think it is because my loops are too big, what to do? The script on the host player can then just loop through all the players can call addResources() for them. To do this, make sure you wrap all calls to host only functions with an if(isHost()) conditional. This means that if you the modder want to add 500 wood to all players at the start, only the host player can call that function. For example, the function addResource() under player can only be done by the host player. Many functions, in particular those that change the game state, can only be run by the host player. What does it mean that a function is "host only"? This will increase the number of allowed buildings on zone 12 to 20. Yes, to do so, simply set the value on the zone like this: getZone(12).maxBuildings = 20 Until then, you can manually place multiple of the same building into a tile, but the players would be unable to build multiple during the game.Ĭan the number of buildings on a tile be increased? No, though the devs have seen this request and may in the future deliver. You can however change some values of existing buildings and units within the database.Ĭan I have more than one of the same building on a tile? No, there is currently no functionality to do anything like that. Make sure you have the correct zone numbers, and only one person is the leader for the whole team.Ĭan I create my own units, heroes, characters, buildings? The game will not auto-reveal home tiles of teammates, so you will need to do that yourself by calling discoverZone for each player to the other. ![]() In the above example, p2 is the leader of the team. Yes, since September 2020 you can set teams in MapEditor.īut, for something more complex (i.e, making actual use of that teams) you can use scripts, see: var p1 = getZone(160).owner If your map has DLC clans, then ALL players that join the map must have the DLC to play, regardless if they pick a DLC clan or not. ![]() It will be hopefully be added in the future. No, there is no functionality for that at this time. Place this in the init() call to function: You can only do this through scripting, you can not use the Map Editor. state.removeVictory(VictoryKind.VYggdrasil) įAQ To set the victory condition to military only. State.removeVictory(VictoryKind.VOdinSword) State.removeVictory(VictoryKind.VHelheim) State.removeVictory(VictoryKind.VMilitary) setObjectives() // if you want to use Objectives API do it here, on first launch only - State to set onFirstLaunch, keep and serialize with Save. - Named constants, settings and flags. Save following code as script.hx text file and put it together with your map file ( map.dat) 2.18 Which API features are only for single-player?.2.17 Where I can see my Workshop-subscribed mods?.2.16 How to save time and pre-load tiles that are used often throughout the script?.2.15 I want to scan the player units and find PREDICATE.2.14 I want something to happen only once after a certain time, how do I do that?.2.13 How do I get the current or future months? How do I convert a year/month to seconds?.2.12 Why can't I Add Happiness or Warband?.2.11 I can not check if player has Lighthouse.2.10 How do I make my own victory conditions?.2.9 Can I change the commercial influence needed to win? What about other default victory conditions?.2.8 My game crashes, and I think it is because my loops are too big, what to do?. ![]() 2.7 What does it mean that a function is "host only"?.2.6 Can the number of buildings on a tile be increased?.2.5 Can I have more than one of the same building on a tile?.2.4 Can I create my own units, heroes, characters, buildings?.2.1 To set the victory condition to military only.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |