<< Back to Programming Forum   Search

Posts 1 - 12 of 12   
Mod Spawnbarriers: 4/8/2017 20:43:44


dabo1
Level 57
Report
I created a mod called Spawnbarriers. The mod changes the number of armies connected to the spawning regions. But sadly I haven't the access to the Unity client, and so I am not able to test or publish the mod. I think it should run, but I am not completely sure about that, so I am seeking a person who has time to test the Mod and publish the Mod later. You can get the Mod at https://github.com/dabo123148/WarlightMod.

dabo1
Mod Spawnbarriers: 4/8/2017 22:05:01


Deadman 
Level 64
Report
I found two bugs.
1. RandomizeWastelands() needs to be renamed to Spawnbarriers() in Spawnbarriers.lua
2. All usages of newArmies in Spawnbarriers.lua need to be changed to newArmiesCount

It still errors out at the moment and I haven't had a chance to look at the documentation.

Edited 4/8/2017 22:05:10
Mod Spawnbarriers: 4/9/2017 04:52:36


dabo1
Level 57
Report
It should be changed now
Mod Spawnbarriers: 4/9/2017 05:06:49


TBest 
Level 60
Report
I tried the mod, and got the following error

InvalidOperationException: Key territoryID does not exist for reading on TerritoryStanding
WarLight.Shared.Mods.ModProxies+<>c__DisplayClass8_0.<ModProxyRW>b__0 (System.String key)
WarLight.Shared.Mods.LuaScriptImpl+<>c__DisplayClass19_0.<LuaMetatable>b__0 (MoonSharp.Interpreter.ScriptExecutionContext _, MoonSharp.Interpreter.CallbackArguments key)
MoonSharp.Interpreter.CallbackFunction.Invoke (MoonSharp.Interpreter.ScriptExecutionContext executionContext, IList`1 args, Boolean isMethodCall)
MoonSharp.Interpreter.Execution.VM.Processor.Internal_ExecCall (Int32 argsCount, Int32 instructionPtr, MoonSharp.Interpreter.CallbackFunction handler, MoonSharp.Interpreter.CallbackFunction continuation, Boolean thisCall, System.String debugText, MoonSharp.Interpreter.DynValue unwindHandler)
MoonSharp.Interpreter.Execution.VM.Processor.ExecIndex (MoonSharp.Interpreter.Execution.VM.Instruction i, Int32 instructionPtr)
MoonSharp.Interpreter.Execution.VM.Processor.Processing_Loop (Int32 instructionPtr)
MoonSharp.Interpreter.Execution.VM.Processor.Coroutine_Resume (MoonSharp.Interpreter.DynValue[] args)

You basically have a nullpointerexception

Edited 4/9/2017 05:41:16
Mod Spawnbarriers: 4/9/2017 05:50:11


dabo1
Level 57
Report
I guess this bug should now be also fixed
Mod Spawnbarriers: 4/9/2017 06:02:56


TBest 
Level 60
Report
Using += is not allowed, so I changed it to territoryId = territoryId + 1;

for conn, _ in pairs(game.Map.Territories[territoryId].ConnectedTo) do


attempts to Index a nil value.
Mod Spawnbarriers: 4/9/2017 06:50:56


dabo1
Level 57
Report
If territory.ConnectedTo will work, and for placeholder, conn ... will also work, it should be fixed now

Edit: bug should be fixed in mods 0.03

Edited 4/11/2017 15:54:30
Mod Spawnbarriers: 4/12/2017 06:39:34


dabo1
Level 57
Report
every bug is fixed mod can now be used
Mod Spawnbarriers: 4/13/2017 21:16:05


ViralGoat 
Level 60
Report


Edited 4/14/2017 14:48:53
Mod Spawnbarriers: 4/13/2017 21:17:15


ViralGoat 
Level 60
Report
it's not completely clear what "Connected Started Region Armies" means so I wanted to test it.
Mod Spawnbarriers: 4/14/2017 05:57:38


dabo1
Level 57
Report
connected starting regions means the number of troops on the territorys next to the starting regions bug not on the starting regions just on the territorys next to the regions.
Mod Spawnbarriers: 4/15/2017 13:54:57


dabo1
Level 57
Report
New version of the Mod is out. You can now change the Effect Radius, in which the mod interacts. (1-3) territorys from the picks(don't know how they are called in auto distribute). Through performence issues the number is limit to 3. If you have any suggestions on how I can improve the mod, just give them me and I will try to improve the mod.

PS: I hope this update didn't broke any lobbys or running games.

Edited 4/15/2017 13:55:48
Posts 1 - 12 of 12