<< Back to Programming Forum   Search

Posts 1 - 8 of 8   
Mods v0.02 are live!: 4/8/2017 02:03:54

Fizzer 
Level 64

Warzone Creator
Report
A new update is out to both the client and server! Here's what's changed:

- Added the Server_Created hook. This allows mods to change settings when they're created.
- To show off its use, I created the randomized bonuses mod, viewable here: https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedBonusesMod
- This mod allows setting the random amount (+/- 1 or more), and it also has a check box to specify whether or not to allow bonuses to go negative. It's a very simple example, check the code to see how it works and how to make check boxes.
- The API documentation has been vastly improved. See this page for a full list of all objects: https://www.warlight.net/wiki/Mod_API_Reference
- Fixed a bug with the Server_StartGame hook that made games throw errors whenever history was retrieved.
- If a mod in a multi-player game crashes, players now get a more friendly "This mod has crashed" error.
- If a mod in a multi-player game crashes, it now saves the report into the database. Mod creators can click the new "Reports" button in the mod development console to view data about any crashes.
- Games with mods are never considered pure skill.
- Mod authors can now place a file in their github repo called ModDescription.txt. This file will be loaded and displayed to players when "Mod Info" is clicked.
- I marked four bonuses as Promoted, which means that they show up by default for everyone in the Mods page now: Randomized Wastelands (by Fizzer), Randomized Bonuses (by Fizzer), Picks Swap (by Krzysztof), and Customized Wastelands (by Master of the Dead)

Edited 4/8/2017 02:04:19
Mods v0.02 are live!: 4/8/2017 02:33:47


ps 
Level 61
Report
Mods v0.02 are live!: 4/8/2017 21:44:15


Krzysztof 
Level 67
Report
I think something is missing in this documentation.

https://www.warlight.net/wiki/Mod_API_Reference:Armies for example.
NumArmies cannot be modified, as Armies is proxy objecy and NumArmies propery is readonly, trying to modify cause error (i've checked).
So we can create new Armies object with Armies(numArmies) constructor. But the only source of this knowledge is your example mod (or at least i cannot find anything about it).
And later - i tried to use bosses in multiplayer. As we can't modify Armies i guessed that special units should be passed the same way, and, in fact, Armies(numArmies, specialUnits) works. But there we need SpecialUnit object(s). So the question is - how to create it? I've already checked and there is no SpecialUnit(...), Commander(...), Boss1(...) etc.
Mods v0.02 are live!: 4/8/2017 21:59:42

Fizzer 
Level 64

Warzone Creator
Report
But the only source of this knowledge is your example mod (or at least i cannot find anything about it).

You're right, constructors are missing from the wiki. I'll add these.

But there we need SpecialUnit object(s). So the question is - how to create it? I've already checked and there is no SpecialUnit(...), Commander(...), Boss1(...) etc.

You're right there, too. There should be constructors for Commanders and bosses. Right now constructors aren't automatic, I need to go through and add them one by one, and I haven't done that work yet. This will be coming in the next update. Sorry about that.

Edited 4/8/2017 21:59:52
Mods v0.02 are live!: 4/8/2017 22:01:42


Deadman 
Level 64
Report
Nice. Will look at the details soon.

Please consider adding a clear screen button for the mod output dialog. It's annoying to have to close it and open a new instance to clear screen. I also have to dock it every time I do this :(
Mods v0.02 are live!: 4/8/2017 22:34:33

Fizzer 
Level 64

Warzone Creator
Report
Please consider adding a clear screen button for the mod output dialog.

Sure, I'll add that. Krzysztof also pointed out it needs scrollbars instead of shrinking text.
Mods v0.02 are live!: 4/8/2017 22:34:55


Krzysztof 
Level 67
Report
Also one feature request, rather simple, so it's possible that it is already in (immediate) roadmap ;) But if not - it would be nice to allow mode to show messages to players. Originally i tried to inform player 'sorry, this mod won't work with your settings' as it's more polite than simply not working. But it would be useful in future when creating scenarios with custom events to show information like 'your army doesn't want to fight - all attack orders has been cancelled' or 'rebellion in your empire, insurgets took over [BonusName]'. Without it such actions (cancelling orders, changing territories owner) will be confusing
Mods v0.02 are live!: 4/8/2017 22:38:58

Fizzer 
Level 64

Warzone Creator
Report
Without it such actions (cancelling orders, changing territories owner) will be confusing

Yes, I do plan to allow inserting messages into the orders list. For example, a common activity will be having a mod skip an attack. We don't want it to just not show up, or the player might think they just forgot to enter it. It's better to always replace it with an information message, at the very least "Mod X skipped an attack from Y to Z"
Posts 1 - 8 of 8