Map Database  •  FAQ  •  RSS  •  Login

Militia strength map editor

<<

Dan

Serf

Posts: 5

Joined: 13 May 2018, 17:22

KaM Skill Level: Beginner

Post 13 May 2018, 17:34

Militia strength map editor

Hi Guys,

I've been playing around with the map editor (v9.1), trying to design my own scenario.
I gave the opponent AI about 20 militia on base defense, attacking these dudes with my 100 man strong militia army resulted in me being wiped out.
I was wondering if there is some buff for soldiers near camps or something that I need to turn off.
The same thing happens when the AI sends a scripted attack of militia to my base. He just gets wiped out by a force half the size.

Any pointers?

Thanks,

Dan
<<

Dan

Serf

Posts: 5

Joined: 13 May 2018, 17:22

KaM Skill Level: Beginner

Post 13 May 2018, 18:35

Re: Militia strength map editor

Never mind I figured it out.
The morale drops to about 15% which means about 20 militia are able to take out a 100.
What affects the morale, distance to the own storehouse or something?

Another dumb question, are triggers working already in the map editor?
And can we add typed objectives like in the DarkianMaker campaign?

Dan
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 May 2018, 18:54

Re: Militia strength map editor

Hi Dan,

Battlefield tactics matter a lot too. Attackers best bet is to try to surround defenders and hit them from their backs and/or from multiple sides. Defenders best bet is to meet attackers behind narrow passage, face to face and comrades at their shoulder.

As you've discovered, morale plays role as well. This is especially critical for Militia, who are weakest troops available early.

Morale effect depends on distance from any own or allied house excluding towers and campfires.

-----

Triggers already work. You can see how they are rigged in Walkers map. Trigger is placed in the MapEd and is handled in the dynamic script.

-----

Objectives are also rigged through dynamic script.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Dan

Serf

Posts: 5

Joined: 13 May 2018, 17:22

KaM Skill Level: Beginner

Post 14 May 2018, 18:44

Re: Militia strength map editor

Thanks Krom,

Can I access this dynamic script? If so where?
I've figured out the scripted movements for units (select unit, tweek group order), The pre-set unit allocations for AI (Village planning -> AI defense/attack)), and that you can designate a trigger area for a unit in the map editor (select unit, ->terrain editor -> trigger -> draw trigger area), but then how do I run a trigger effect?
Also, I guess these scripted text pop-ups are in the dynamic script as well? I mean these pop-ups after destroying X amount or specific units?
Lastly, If I try to save my map as a campaign, KP prompts an error. Am I supposed to do something different when saving campaigns as opposed to normal single player missions?

Sorry about the many questions.

Thanks,

Dan
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 15 May 2018, 04:42

Re: Militia strength map editor

Dynamic script is located in mission folder in a text file called mission_name.script. You can open it with Notepad. Script wiki is at https://github.com/Kromster80/knights_province/wiki (see Dynamic script section)

See the Walkers.script for example - it has an event (list of existing events and their syntax is in Wiki) associated with a unit entering the trigger area:
  Code:
procedure OnTerrainTrigger(aTriggerId: Integer; aUnit: Integer; aX, aY: Word); begin // Kill anyone entering bridge except Walkers if (aTriggerId = 1) and (States.UnitOwner(aUnit) <> WALKERS_PLAYER) then Actions.UnitKill(aUnit, False); end;
Popups are from script as well (as Actions). E.g.:
  Code:
Actions.PlayerOverlaySet(HUMAN_PLAYER, '[$EAEAEA]Some text[]');
Saving for campaign - show me the error please (could be a bug).

Questions are welcome! You can join KP Discord server and we could talk there if you like - https://discord.gg/yw4BTgE
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Dan

Serf

Posts: 5

Joined: 13 May 2018, 17:22

KaM Skill Level: Beginner

Post 17 May 2018, 17:15

Re: Militia strength map editor

Hi Krom,

Thanks again.
I'll take a look at the dynamic script today, didn't have the time before.
I took a screenshot of the error:
Image

Dan
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 18 May 2018, 04:21

Re: Militia strength map editor

Can you describe steps to reproduce this error?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Dan

Serf

Posts: 5

Joined: 13 May 2018, 17:22

KaM Skill Level: Beginner

Post 21 May 2018, 10:51

Re: Militia strength map editor

Sure,

I made a map in map editor. Go to save map. tick the "campaigns" box and I get the error. You can click resume application to continue, but then if you press save you get the same error and it will not save the map as campaign. (i can't remember atm if I saved it as a skirmish map before trying to save it as a campaign, not sure if that matters anyway).

I know the wiki states a different way to create a campaign:
https://github.com/Kromster80/knights_p ... /Campaigns
but I haven't tried that yet, just been tinkering with my map and the dynamic script atm.

Thanks,

Dan
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 22 May 2018, 04:56

Re: Militia strength map editor

There is a flaw in map saving logic. The fix will be in Alpha 10.

For now, to overcome it:
- save map as singleplayer and move maps folder from "maps" to "campaigns\campaign_name\map_name"
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de

Return to “Knights Province Development”

Who is online

Users browsing this forum: No registered users and 0 guests