PT (Peace Time) Feature
Moderator: Content Developer
PT (Peace Time) Feature
I would like to ask BA developers to add a "Peace Time" feature into the game.
The PT is presented in various cool RTSs, for example, in good old "Cossacks: Back to War". In Cossacks it was made the following way. PT counter is shown on the screen. When PT is active, the border between countries is drawn on map. If a unit attacks another unit when PT is active, the attacker dies and the attacker's target gets no damage. I like this thing and have already got used to it. Hope, there will be some people who also like the PT idea.
I think that this feature is essential for every RTS.
Thank you.
The PT is presented in various cool RTSs, for example, in good old "Cossacks: Back to War". In Cossacks it was made the following way. PT counter is shown on the screen. When PT is active, the border between countries is drawn on map. If a unit attacks another unit when PT is active, the attacker dies and the attacker's target gets no damage. I like this thing and have already got used to it. Hope, there will be some people who also like the PT idea.
I think that this feature is essential for every RTS.
Thank you.
Last edited by McArcher on 23 Jun 2011, 17:35, edited 2 times in total.
Re: PT (Peace Time) Feature
Don't make engine level requests if they effect other games on a core level like this. This is a feature request which should go to a game-dev
This request should be made of the ba game devs not the engine devs.
This request should be made of the ba game devs not the engine devs.
Re: PT (Peace Time) Feature
ok, modified the first post.
Re: PT (Peace Time) Feature
No worries, welcome to the forums
Re: PT (Peace Time) Feature
How would it decide where to put the border on the map?
Especially in FFA games?
Scripting something to to forbid units from leaving the startboxes for some time would not be too hard.
Thing is, that idea came up multiple times before but nobody cared to do it for whatever reason.
This game mode would have to be a "modoption": new players struggle with configuring those, so the people who this feature is aimed at would probally not know how to enable it.
Especially in FFA games?
Scripting something to to forbid units from leaving the startboxes for some time would not be too hard.
Thing is, that idea came up multiple times before but nobody cared to do it for whatever reason.
This game mode would have to be a "modoption": new players struggle with configuring those, so the people who this feature is aimed at would probally not know how to enable it.
Re: PT (Peace Time) Feature
Well, actually, in Cossacks borderlines on map were possible because maps were quite simmetric and starting positions were quite fixed. I agree, that in BA this can be made by restricting to leave a starting box area somehow. I think this (PT) can be an option, which will be disabled by default, and only people who need it, can enable it. Is it possible to restrict units' movements this way?
Re: PT (Peace Time) Feature
Thing is, most new players (who are most likely to use it) are already confused by the lobby as is, not sure if they would find such option.I think this (PT) can be an option, which will be disabled by default, and only people who need it, can enable it.
I see so many newb games start with both players the same color, startpositions not set etc..
But yes, it is possible to restrict unit movement.
ie move the unit back into the box whenever it tries to leave.
I will just assume nobody is going to do this because nobody made started working on it in the previous similiar threads

So, if you are interessted in trying to script it yourself, it should not be so hard. ie with:
http://springrts.com/wiki/Lua_SyncedRead
http://springrts.com/wiki/Lua_SyncedCtrl
Spring.GetUnitPosition
Spring.GetUnitsInRectangle
Spring.GetAllyTeamStartBox
Spring.SetUnitPosition
Depending on your background it might take from one evening to a week or so.
Re: PT (Peace Time) Feature
Ok. Thanks for useful links. I will see what I can do soon (hopefully at the weekend).
Re: PT (Peace Time) Feature
Use the ranks! But I'm not sure they're available in synced, so this might need a bit of synced<->unsynced luackery. Also, so that noob can disable and pro enable should they want, the modoption should read: Avg Rank below which to enforce peaceful building up time.knorke wrote:This game mode would have to be a "modoption": new players struggle with configuring those, so the people who this feature is aimed at would probally not know how to enable it.
Re: PT (Peace Time) Feature
I think, only restricting unit's movements is a bad idea. What if somebody builds a cannon or a unit with long ranged weapon... it will be able to attack other units from the starting-zone-box. I think, it must be somehow forbidden for the unit to attack. Maybe, all the units should have the no-attack option selected and "disabled to unselect it". But I don't know how to do this. Maybe somebody could help in this.
P.S.
I think it should work this way:
1. There is an option, called PT in the game settings. The PT time can be, for example, 0, 2, 5, 10, 15, 20, 30, 45, 60 (in minutes).
2. a PT-widget appears in GUI at gamestart; it shows Peace Time left (time left before the war).
3. then there is a check in the loop, smth like
4. "maincheck" will go through all the units and set no-attack behaviour if it was changed, and finally there can be a "sleep" to wait for next maincheck. if no-attack behaviour can be set and fixed (disabled for change), then everything will be MUCH easier. I don't know how all this works and I'm not a pro programmer, though i have studied C language in university and have basic knowledge in C++. So, it is quite difficult for me now to code something.
P.S.
I think it should work this way:
1. There is an option, called PT in the game settings. The PT time can be, for example, 0, 2, 5, 10, 15, 20, 30, 45, 60 (in minutes).
2. a PT-widget appears in GUI at gamestart; it shows Peace Time left (time left before the war).
3. then there is a check in the loop, smth like
Code: Select all
//set no-attack behaviour to all units in game
while (PT_TimeLeft > 0)
{
//maincheck;
};
// set attack behaviour to attack for all units;
// really, it should restore the old one, but i dont know if the previous state can be stored somewhere in unit's object; creating a standalone array of stored states for units is bad i think.
//hide or disable the PT-widget;
Re: PT (Peace Time) Feature
you dont need to know C.
Though knowing any language will allow you to quickly learn other languages.
See the links, its all in Lua which is kind of simple though a bit stupid at times.
No idea how "deep" your programming course went but its probally more then needed
Basically you will just need the basic stuff like if, loops, arrays (called tables in Lua)
Start with "hello world", then the rest is looking up the needed functions from wiki.
Though knowing any language will allow you to quickly learn other languages.
See the links, its all in Lua which is kind of simple though a bit stupid at times.
No idea how "deep" your programming course went but its probally more then needed

Basically you will just need the basic stuff like if, loops, arrays (called tables in Lua)
Start with "hello world", then the rest is looking up the needed functions from wiki.
Re: PT (Peace Time) Feature
lol bump.
There is a map with this feature:
http://springrts.com/phpbb/viewtopic.php?f=13&t=26570
It would be possible to make it into a gadget to be included in the mod.
Walls would just be placed around the startboxes.
(would basically need totally rewriting but the principle would be the same)
For now you can test on that map if the idea is even fun to play.
There is a map with this feature:
http://springrts.com/phpbb/viewtopic.php?f=13&t=26570
It would be possible to make it into a gadget to be included in the mod.
Walls would just be placed around the startboxes.
(would basically need totally rewriting but the principle would be the same)
For now you can test on that map if the idea is even fun to play.