Northgard

Northgard

Your Battlefied, Your Rules
Unique and vibrant user made battlefields, all new tiles, customization win conditions, endless possibilities. The world is in your hands with the Northgard Map Editor!
Learn More
datamanc0r 5 Jun, 2020 @ 11:05am
[scripting] Triggering Support Ship
Hi guys,

great thing, that Northgard now supports custom maps and scripts!
However, I was wondering if it was possible to trigger the event that regularly a support ship appears and delivers resources like 100 food, 10 iron, etc.

I guess there is a function like drakkar() which btw does not work for me. It could be this way:
var tick = 0;
function regularUpdate(dt : Float) {
tick = tick + 1;
if (tick == 200) {
tick = 0;
drakkar(player, getZone(35), getZone(53), 8, -4, [Unit.Warrior, Unit.Warrior, Unit.Warrior], 0.2);
...... here goes the funktion for the support ship .....
}

}

Does anybody know how to do this?
< >
Showing 1-5 of 5 comments
datamanc0r 5 Jun, 2020 @ 11:15am 
Allright, I found the function. It ist the following:
launchEvent(Event.SupplyFromHomeland, int numberofmonthstowait, int whatever)

But this kind of supply always brings a few citizens and no resources...
Last edited by datamanc0r; 5 Jun, 2020 @ 11:30am
Umília 5 Jun, 2020 @ 9:03pm 
You can try adding player.addResource() to your code
datamanc0r 6 Jun, 2020 @ 9:30am 
Originally posted by mistereme:
You can try adding player.addResource() to your code
Yes, that works well, thank you!
However, I would like to see a ship coming but it seems that "SupplyFromHomeland" does not take any parameters.
So probably, I would need to get this "drakkar" function going as it is possible to set its cargo. This way, you could let an empty ship sail to the player and on arrival add the resources. At least this would be a workaround. However, drakkar is not spawning in my mod.
But I will work on this and keep you updated.
Thank you so far! :)
Umília 6 Jun, 2020 @ 1:19pm 
No problem :). I am also still trying to figure out most of this. BTW, I am trying to change the winter duration, do you have any idea how I do this? "WINTER_DURATION" is an available variable but nothing I do seems to change it :x.
< >
Showing 1-5 of 5 comments
Per page: 1530 50