Map Database  •  FAQ  •  RSS  •  Login

Way to prevent serfs/laborues from leaving the town

<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 05 Oct 2017, 18:28

Way to prevent serfs/laborues from leaving the town

Hi, is there any way to set Serf defined Town. Lets say, SerfA set to TownA, SerfB set to TownB, If TownB requires serf then SerfA will not go help, only if his own TownA it needs.
i want to force specific serf/labours to stay on duty for only one specific town/storehouse.
I know i can:
- separete towns between players, Town1 = player1, Town2 = player2 etc. - but my project design dont allowed it.
- block walking/ways to others towns. - same here, cant do that.

Help photo: photo: Storehouse top has 2 serfs, Storehouse bottom has 1 serf.
Image
<<

Strangelove

User avatar

Crossbowman

Posts: 230

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 05 Oct 2017, 18:54

Re: Way to prevent serfs/laborues from leaving the town

Do not think that possible. There arent any script codes for that at least; well there are, but they are not implemented.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 05 Oct 2017, 19:56

Re: Way to prevent serfs/laborues from leaving the town

Do not think that possible. There arent any script codes for that at least; well there are, but they are not implemented.
Is there chance to implement it with new kam remake ver?

Anyone, any ideas for workaround?
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 05 Oct 2017, 23:19

Re: Way to prevent serfs/laborues from leaving the town

What requreiments would be necesarry?
-sign serfs to a specified storehouse?
- can build only the storehoise independently without road. So serfs could carry timber and stone for basement.
-any other economical problem? I mean carrying wares? Would have to check over every wares to does the serf who would carry has continous road to the specified house or destiny. Just be not there carring wares withkut road.

Anything?
It is always i teresting question, but does ot really need for mp games? You have map idea for this?
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 06 Oct 2017, 09:00

Re: Way to prevent serfs/laborues from leaving the town

It's hard to think of something when you don't provide more detailed description of the gamemode (which is understandable :P), other than the obvious two workarounds you suggested yourself: blocking walking between the cities, or using separate players.

Although maybe simply making the cities far away enough to not have serfs coming to the other city too often, would do the job? Or somehow detecting when a serf tries to walk over to the other city then killing him and respawning in previous base?

If that's any help, in the next Remake version you will be able to see what does an allied player have in the buildings.
<<

woloszek

User avatar

Sword Fighter

Posts: 394

Joined: 23 Apr 2012, 19:50

Location: Poland

Post 06 Oct 2017, 09:54

Re: Way to prevent serfs/laborues from leaving the town

I think it can be done in some different way. Do you remember the minigame made by andreus? Battle sea. Andreus by one click made so that the tiles were changed to another. I think we can do that if we separate from each other, eg 2 villages. How? Builder can do this. For example, when he is making the road wares then appear eg a bridge. In another click this bridge canbe removed etc. We can make an interesting map of SP for this, but for MP? I dont know.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 06 Oct 2017, 12:28

Re: Way to prevent serfs/laborues from leaving the town

More details:
I want to make new Trading Map, where you have one Merchants and trade wares/goods between towns. Multiplayer map 8p.
I plan to put 4 Towns on the map.
If that's any help, in the next Remake version you will be able to see what does an allied player have in the buildings.
oh, is that will be mode on/off, enable/disable by script or smth?
Andreus by one click made so that the tiles were changed to another.
good idea. I was thinking about something similiar, blocking the way to town and put 2 towers(markers) across "blocking wall" and just teleport units when they step on "tower".

Also, without preventing serfs from leaveing towns, it could give nice "traffic effect" to the gameplay. I will test 2 options, with preventing(teleport or changing tile) or without(for traffic effect).
<<

Rey

User avatar

KaM Remake Developer

Posts: 217

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Fair

Location: Moscow

Post 06 Oct 2017, 23:27

Re: Way to prevent serfs/laborues from leaving the town

More details:
I want to make new Trading Map, where you have one Merchants and trade wares/goods between towns. Multiplayer map 8p.
I plan to put 4 Towns on the map.
I'll make suggestions for what you meant, correct me If I understood you wrong:
For each human player you want to have some 'special' area (or town), which should be used as trading post. From there player will be able to trade with other players.

If that is what you mean, then you basically want 2 different hands to be controlled by 1 player.

To make it possible in r6720 you will need some of the tweaks, described above.
To make it possible in new version I can add ability to not only view, but also to control other players assets. By default this option is turned off, but can be allowed from script. Also it can be usufull in regular MP game too, when someone left, f.e.

I just tried to implement it, works fine, the only problem is how to choose for what player we are going to build smth - now you have to select some object for that player and then you will be able to build for him.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 09 Oct 2017, 17:40

Re: Way to prevent serfs/laborues from leaving the town

For each human player you want to have some 'special' area (or town), which should be used as trading post. From there player will be able to trade with other players.
Each human player has 1 group/unit. Human player doesnt have towns only units. Ally AI (player 9) has 4 Towns. Trading will be done by scripting.
To make it possible in r6720 you will need some of the tweaks, described above.
To make it possible in new version I can add ability to not only view, but also to control other players assets. By default this option is turned off, but can be allowed from script. Also it can be usufull in regular MP game too, when someone left, f.e.
It will be okey to have scirpt like this: Actions.SetUnitSpecificTown(unitId, storehouseId) - only works for serfs and labours. I was thnking it could maybe be connected with roads, storehouseId could be any house in specific roads connection(town). Or maybe some kind of AI mesh region.
for the secnond part:
Actions.SetPlayerControlShare(fromPlayerId, toPlayerId, isShared) - share control and view
Actions.SetPlayerViewShare(-||-) - share only view (in houses) //or SetPlayerLoockpickShare

basicly i want it to be disabled in my map. All human players are in an ally, but they fight for victory. I use Storehouse as a "Ware/goods Bag" so i dont want to other players too look at it, what im buying.
I just tried to implement it, works fine, the only problem is how to choose for what player we are going to build smth - now you have to select some object for that player and then you will be able to build for him.
Maybe soemthing like "spectators table", choose player from table. But your solution " select some object for that player and then you will be able to build for him." is good too. But still i think player should know for what player he is building right now, so some information displayed would be great.
<<

Rey

User avatar

KaM Remake Developer

Posts: 217

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Fair

Location: Moscow

Post 10 Oct 2017, 02:15

Re: Way to prevent serfs/laborues from leaving the town

It will be okey to have scirpt like this: Actions.SetUnitSpecificTown(unitId, storehouseId) - only works for serfs and labours. I was thnking it could maybe be connected with roads, storehouseId could be any house in specific roads connection(town). Or maybe some kind of AI mesh region.
It sounds too complicated to do it specially for your task/idea. Serfs and labours and everything can be separated for town/area only if they belongs to different Hands (PlayerIds), so they actually represent different players.
for the secnond part:
Actions.SetPlayerControlShare(fromPlayerId, toPlayerId, isShared) - share control and view
Actions.SetPlayerViewShare(-||-) - share only view (in houses) //or SetPlayerLoockpickShare
That is possible to add. SetPlayerControlShare should then block view of ally player then, as its allowed by default.
Maybe soemthing like "spectators table", choose player from table. But your solution " select some object for that player and then you will be able to build for him." is good too. But still i think player should know for what player he is building right now, so some information displayed would be great.
Yes, smth like that. From that part I am thinking about it mostly as 'play for leaver' feature. Not only from scripting.
May be even someone want to play 2 players at ones vs 2 noobs? So he will control 2 cities from the start. Or at least after save/load (we have to allow ppl to continue control other Hands).
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 10 Oct 2017, 17:01

Re: Way to prevent serfs/laborues from leaving the town

It sounds too complicated to do it specially for your task/idea. Serfs and labours and everything can be separated for town/area only if they belongs to different Hands (PlayerIds), so they actually represent different players.
Yep, too worthless to implement for only one need. Ill workaround it.
Yes, smth like that. From that part I am thinking about it mostly as 'play for leaver' feature. Not only from scripting.
Yea that great feature, letting players countine gameplay when someone disconnected, afk etc.
May be even someone want to play 2 players at ones vs 2 noobs? So he will control 2 cities from the start. Or at least after save/load (we have to allow ppl to continue control other Hands).
Great too, only need to thinkg about UI in muliplayer lobby, maybe something like that:
Image
And "Shared player" is empty player (AI without aciotns), and ALL players in its team can control it. yet if we want to specific what player controls who, we need to add additional "listBox". But i think another "Player Type (Shared)" would be enough.

Or smth like that:
Image
You can occupy more than one location. Team for next location is alwayes automaticly set to the first occured.

We little goes offtopic so it would be nice to create another topic for this discusion. :P
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 15 Dec 2017, 16:14

Re: Way to prevent serfs/laborues from leaving the town

May be even someone want to play 2 players at ones vs 2 noobs? So he will control 2 cities from the start. Or at least after save/load (we have to allow ppl to continue control other Hands).
Great too, only need to thinkg about UI in muliplayer lobby, maybe something like that:
Image
And "Shared player" is empty player (AI without aciotns), and ALL players in its team can control it. yet if we want to specific what player controls who, we need to add additional "listBox". But i think another "Player Type (Shared)" would be enough.

Or smth like that:
Image
You can occupy more than one location. Team for next location is alwayes automaticly set to the first occured.

We little goes offtopic so it would be nice to create another topic for this discusion. :P
Switching players view as in the replay?

Is there any dynamic script command which allow to switching players? As like we would be in the lobby? (for example playing 4v4 and in the PT break the sides are switching their bases. or Something similar.)

What if each player would have an AI partner and with this AI partner always could switchingwhen the player gives the switching sign? Really always would have to reassign all unitIDs if only the player changed? The ai would not have to build or do anything, AI would be a player holder. So the player always could jump between the two villages. After PT could controll each village armies ofc.
MAybe it is a dream, but with that UI platform which is in the Replay viewer would be cool.

Only a Theretical question (not a scripting based one): Anyway could the players handle two villages simultaneously? :D Sounds hard multitasking :P
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 15 Dec 2017, 16:20

Re: Way to prevent serfs/laborues from leaving the town

Maybe registrating the units and building IDs into an array, and switching the ownerships of this array,'s items when the player is telling that?
Would it slows down the script very?
Training units would not be question.

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest